diff --git a/CI/domain_map.py b/CI/domain_map.py index d72c7b071f7a5df4d97fa66aea4ed6a758f3467c..10138001b6d6203003c7aea7b84e7fffb77926f4 100644 --- a/CI/domain_map.py +++ b/CI/domain_map.py @@ -18,7 +18,7 @@ DOMAIN_MAP['ForwardDetectors'] = set(['^ForwardDetectors/']) DOMAIN_MAP['Generators'] = set(['^Generators/']) DOMAIN_MAP['Geometry'] = set(['^AtlasGeometryCommon/','^DetectorDescription/']) DOMAIN_MAP['InnerDetector'] = set(['^InnerDetector/']) -DOMAIN_MAP['JetEtmiss'] = set(['Jet','MET','MissingEt','EventShape']) +DOMAIN_MAP['JetEtmiss'] = set(['Jet','(?<!spectro)(?<!geo)MET','MissingEt','EventShape']) DOMAIN_MAP['LAr'] = set(['^LArCalorimeter/']) DOMAIN_MAP['Magnets'] = set(['^MagneticField/']) DOMAIN_MAP['MuonSpectrometer'] = set(['^MuonSpectrometer/']) diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/CMakeLists.txt b/Calorimeter/CaloCnv/CaloAthenaPool/CMakeLists.txt index 7c58d0756ca920e154ce15084d08eca6e157f3b2..3fb3f5ef0b8c38730b51fc68dac673dec3ec1c3b 100644 --- a/Calorimeter/CaloCnv/CaloAthenaPool/CMakeLists.txt +++ b/Calorimeter/CaloCnv/CaloAthenaPool/CMakeLists.txt @@ -45,11 +45,18 @@ find_package( AthenaPoolUtilitiesTest ) # Set up the tests if possible: if( ATHENAPOOLUTILITIESTEST_FOUND ) - run_tpcnv_test( CaloTPCnv_14.5.0 AOD-14.5.0-full ) - run_tpcnv_test( CaloTPCnv_15.1.0 AOD-15.1.0-full ) - run_tpcnv_test( CaloTPCnv_15.5.0 AOD-15.5.0-full ) - run_tpcnv_test( CaloTPCnv_18.0.0 ESD-18.0.0 ) - run_tpcnv_test( CaloTPCnv_20.1.7.2 ESD-20.1.7.2 ) + set( CALOATHENAPOOL_REFERENCE_TAG + CaloAthenaPoolReference-01-00-00 ) + run_tpcnv_test( CaloTPCnv_14.5.0 AOD-14.5.0-full + REFERENCE_TAG ${CALOATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( CaloTPCnv_15.1.0 AOD-15.1.0-full + REFERENCE_TAG ${CALOATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( CaloTPCnv_15.5.0 AOD-15.5.0-full + REFERENCE_TAG ${CALOATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( CaloTPCnv_18.0.0 ESD-18.0.0 + REFERENCE_TAG ${CALOATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( CaloTPCnv_20.1.7.2 ESD-20.1.7.2 + REFERENCE_TAG ${CALOATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) endif() diff --git a/Calorimeter/CaloG4Sim/CaloG4Sim/CalibrationDefaultProcessing.h b/Calorimeter/CaloG4Sim/CaloG4Sim/CalibrationDefaultProcessing.h index db9d902cd40660517cf8a4a670c27848f9e0ce42..e92fc4688fc4a7c527f787131cca869c956e23c8 100644 --- a/Calorimeter/CaloG4Sim/CaloG4Sim/CalibrationDefaultProcessing.h +++ b/Calorimeter/CaloG4Sim/CaloG4Sim/CalibrationDefaultProcessing.h @@ -23,49 +23,12 @@ #ifndef CaloG4_CalibrationDefaultProcessing_h #define CaloG4_CalibrationDefaultProcessing_h -// The Athena and stand-alone G4 setups have different UserAction -// classes (though they accomplish the same thing. - -#include "G4AtlasTools/UserActionBase.h" - // Forward declarations class G4Run; class G4Step; class G4VSensitiveDetector; -namespace CaloG4 { - - class CalibrationDefaultProcessing final : public UserActionBase { - - public: - - CalibrationDefaultProcessing(const std::string& type, const std::string& name, const IInterface* parent); - virtual ~CalibrationDefaultProcessing(); - - virtual void Step(const G4Step*) override; - virtual void BeginOfEvent(const G4Event*) override; - - // Make the default sensitive detector available to other routines. - G4VSensitiveDetector* GetDefaultSD() { return m_defaultSD; } - //static void SetDefaultSD( G4VSensitiveDetector* ); - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - - - private: - - // The default sensitive detector to be applied to all G4Steps - // in volumes without a CalibrationSensitiveDetector. - G4VSensitiveDetector* m_defaultSD; - std::string m_SDname; - - }; - -} // namespace CaloG4 - -// new implementation for Hive #include "G4AtlasInterfaces/IBeginEventAction.h" #include "G4AtlasInterfaces/ISteppingAction.h" diff --git a/Calorimeter/CaloG4Sim/CaloG4Sim/SimulationEnergies.h b/Calorimeter/CaloG4Sim/CaloG4Sim/SimulationEnergies.h index 7de81767eee66b63f00c5821fcfa8de422a581de..9a09b08eb244bf809bd0e71d6e74c1e43770f838 100644 --- a/Calorimeter/CaloG4Sim/CaloG4Sim/SimulationEnergies.h +++ b/Calorimeter/CaloG4Sim/CaloG4Sim/SimulationEnergies.h @@ -37,6 +37,11 @@ #include <map> #include <vector> +#ifdef ATHENAHIVE +# include <thread> +# include "tbb/concurrent_unordered_map.h" +#endif + // Forward declarations. class G4Step; @@ -53,7 +58,7 @@ namespace CaloG4 { // Examine the G4Step and return the energies required for a // calibration hit. - void Energies( const G4Step* , std::vector<G4double> & ); + void Energies( const G4Step* , std::vector<G4double> & ) const; // Accessing detailed information: @@ -100,12 +105,12 @@ namespace CaloG4 { // energy is routed to some other volume that the one in which the // G4Step occurs. - ClassifyResult_t Classify( const G4Step*, const G4bool processEscaped = true ); + ClassifyResult_t Classify( const G4Step*, const G4bool processEscaped = true ) const; // Has this routine been called for this G4Step? - static G4bool StepWasProcessed() { return m_calledForStep; } - static void SetStepProcessed() { m_calledForStep = true; } - static void ResetStepProcessed() { m_calledForStep = false; } + static G4bool StepWasProcessed(); + static void SetStepProcessed(); + static void ResetStepProcessed(); private: @@ -114,18 +119,29 @@ namespace CaloG4 { G4double measurableEnergy(const G4ParticleDefinition *particleDef, G4int PDGEncoding, G4double totalEnergy, - G4double kineticEnergy); + G4double kineticEnergy) const; G4double measurableEnergyV2(const G4ParticleDefinition *particleDef, G4int PDGEncoding, G4double totalEnergy, - G4double kineticEnergy); + G4double kineticEnergy) const; // Escaped energy requires special processing. - G4bool ProcessEscapedEnergy( G4ThreeVector point, G4double energy ); + G4bool ProcessEscapedEnergy( G4ThreeVector point, G4double energy ) const; // Used to keep track of processing state. +#ifdef ATHENAHIVE + /// Thread-to-SD concurrent map type + /// TODO: this needs a redesign. The map structure is bizarre and needless. + using StCallThreadMap_t = tbb::concurrent_unordered_map + < std::thread::id, G4bool, std::hash<std::thread::id> >; + /// Concurrent map of flags, one for each thread + static StCallThreadMap_t m_calledForStepThreadMap; +#else + // flag to mark that call was made static G4bool m_calledForStep; +#endif + }; } // namespace CaloG4 diff --git a/Calorimeter/CaloG4Sim/python/CaloG4SimConfig.py b/Calorimeter/CaloG4Sim/python/CaloG4SimConfig.py index ca5acdbe2daedfe3ad7f4e3da039b4820e16d74c..122a8d3743081bc11ea53fdebd5f1227b80111a4 100644 --- a/Calorimeter/CaloG4Sim/python/CaloG4SimConfig.py +++ b/Calorimeter/CaloG4Sim/python/CaloG4SimConfig.py @@ -1,13 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr -def getCalibrationDefaultProcessing(name="CalibrationDefaultProcessing", **kwargs): - #kwargs.setdefault("TargetRegions", ["EMEC","EMB"]) - # this SD name is for ATLAS, H8 - kwargs.setdefault("SDName", "Default::Dead::Uninstrumented::Calibration::Region") - # this is for H6 - #kwargs.setdefault("SDName", "Default::Dead::Uninstrumented::Calibration::H6") - return CfgMgr.CaloG4__CalibrationDefaultProcessing(name, **kwargs) def getCalibrationDefaultProcessingTool(name="G4UA::CaloG4::CalibrationDefaultProcessing", **kwargs): #kwargs.setdefault("TargetRegions", ["EMEC","EMB"]) diff --git a/Calorimeter/CaloG4Sim/python/CaloG4SimConfigDb.py b/Calorimeter/CaloG4Sim/python/CaloG4SimConfigDb.py index e60b74790ca4771eec7feba39ad67a3c57990fe9..a7bb780421d8f09db2affd9dda21d9bd03365d4f 100644 --- a/Calorimeter/CaloG4Sim/python/CaloG4SimConfigDb.py +++ b/Calorimeter/CaloG4Sim/python/CaloG4SimConfigDb.py @@ -2,5 +2,4 @@ from AthenaCommon.CfgGetter import addTool -addTool("CaloG4Sim.CaloG4SimConfig.getCalibrationDefaultProcessing", "CalibrationDefaultProcessing") addTool("CaloG4Sim.CaloG4SimConfig.getCalibrationDefaultProcessingTool", "G4UA::CaloG4::CalibrationDefaultProcessingTool") diff --git a/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessing.cc b/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessing.cc index 9c36981dd9056d06baaaad2eefac3d2cefa020fd..765ae788b723057f6339087fd75a50dfddb15ab8 100644 --- a/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessing.cc +++ b/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessing.cc @@ -27,108 +27,8 @@ #include "G4Step.hh" -namespace CaloG4 { - - // Register this class with the UserAction class managers. - CalibrationDefaultProcessing::CalibrationDefaultProcessing(const std::string& type, const std::string& name, const IInterface* parent) : - UserActionBase(type,name,parent),m_defaultSD(0), m_SDname("Default::Dead::Uninstrumented::Calibration::Region") - - { - - declareProperty("SDName",m_SDname); - - } - - - CalibrationDefaultProcessing::~CalibrationDefaultProcessing() {;} - - - void CalibrationDefaultProcessing::BeginOfEvent(const G4Event*){ - - // retrieve the SD from G4SDManager - // done here instead of in initialize to leave more flexibility to the rest of the G4 init - - m_defaultSD = G4SDManager::GetSDMpointer()-> FindSensitiveDetector(m_SDname); - - if(!m_defaultSD) ATH_MSG_ERROR("No valid SD name specified. The job will continue, but you should check your configuration"); - - } - - void CalibrationDefaultProcessing::Step(const G4Step* a_step) - { - - - // Do we have a sensitive detector? - if ( m_defaultSD != 0 ) - { - // We only want to perform the default processing if no other - // calibration processing has occurred for this step. - - if ( ! CaloG4::SimulationEnergies::StepWasProcessed() ) - { - // We haven't performed any calibration processing for this - // step (probably there is no sensitive detector for the - // volume). Use the default sensitive detector to process - // this step. Note that we have to "cast away" const-ness for - // the G4Step*, due to how G4VSensitiveDetector::Hit() is - // defined. - m_defaultSD->Hit( const_cast<G4Step*>(a_step) ); - } - - // In any case, clear the flag for the next step. - CaloG4::SimulationEnergies::ResetStepProcessed(); - } - else - { - static G4bool warningPrinted = false; - if ( ! warningPrinted ) - { - warningPrinted = true; - G4cout << "CaloG4::CalibrationDefaultProcessing::SteppingAction - " - << G4endl - << " A default calibration sensitive detector was not defined." - << G4endl - << " Not all calibration energies will be recorded." - << G4endl; - } - } - } - -// void CalibrationDefaultProcessing::SetDefaultSD( G4VSensitiveDetector* a_sd ) -// { -// if ( m_defaultSD != 0 ) -// { -// G4cout << "CaloG4::CalibrationDefaultProcessing::SetDefaultSD - " -// << G4endl -// << " The default calibration sensitive detector '" -// << m_defaultSD->GetName() -// << "'" << G4endl -// << " is being replace by sensitive detector '" -// << a_sd->GetName() -// << "'" << G4endl; -// } -// -// m_defaultSD = a_sd; -// } -// -// - - - StatusCode CalibrationDefaultProcessing::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -} // namespace CaloG4 - +#include "GaudiKernel/Bootstrap.h" +#include "GaudiKernel/ISvcLocator.h" namespace G4UA { diff --git a/Calorimeter/CaloG4Sim/src/SimulationEnergies.cc b/Calorimeter/CaloG4Sim/src/SimulationEnergies.cc index c7a861a84e3138663f16af53c5f3e76cb1396071..abece5fe1cbe93a38b89ce9f444160c996b04b0d 100644 --- a/Calorimeter/CaloG4Sim/src/SimulationEnergies.cc +++ b/Calorimeter/CaloG4Sim/src/SimulationEnergies.cc @@ -135,8 +135,11 @@ namespace CaloG4 { G4double SimulationEnergies::helium3Mass = 0; */ +#ifdef ATHENAHIVE + SimulationEnergies::StCallThreadMap_t SimulationEnergies::m_calledForStepThreadMap; +#else G4bool SimulationEnergies::m_calledForStep = false; - +#endif SimulationEnergies::SimulationEnergies() { @@ -176,8 +179,39 @@ namespace CaloG4 { {;} + G4bool SimulationEnergies::StepWasProcessed() { +#ifdef ATHENAHIVE + // Get current thread-ID + const auto tid = std::this_thread::get_id(); + // Retrieve it from the call flags map + auto cfPair = m_calledForStepThreadMap.find(tid); + if(cfPair == m_calledForStepThreadMap.end()) return false; + return cfPair->second; +#else + return m_calledForStep; +#endif + } + + void SimulationEnergies::SetStepProcessed() { +#ifdef ATHENAHIVE + const auto tid = std::this_thread::get_id(); + m_calledForStepThreadMap.insert( std::make_pair(tid, true) ); +#else + m_calledForStep = true; +#endif + } + + void SimulationEnergies::ResetStepProcessed() { +#ifdef ATHENAHIVE + const auto tid = std::this_thread::get_id(); + m_calledForStepThreadMap.insert( std::make_pair(tid, false) ); +#else + m_calledForStep = false; +#endif + } + // The "simple" call, intended for calibration calculators: - void SimulationEnergies::Energies( const G4Step* a_step , std::vector<G4double>& energies ) + void SimulationEnergies::Energies( const G4Step* a_step , std::vector<G4double>& energies ) const { // Call the detailed classification. Process any escaped energy. ClassifyResult_t category = Classify( a_step, true ); @@ -215,7 +249,7 @@ namespace CaloG4 { // energy will be not be routed to some other volume's hits. SimulationEnergies::ClassifyResult_t SimulationEnergies::Classify( const G4Step* step, - const G4bool a_processEscaped ) + const G4bool a_processEscaped ) const { // Initialize our result to zero. @@ -336,7 +370,7 @@ namespace CaloG4 { #endif ProcessEscapedEnergy( pTrack->GetVertexPosition(), escapedEnergy ); else - result.energy[kEscaped] = escapedEnergy; + result.energy[kEscaped] += escapedEnergy; } // END of calculation of Invisible and Escaped energy for current step @@ -374,7 +408,7 @@ namespace CaloG4 { G4double SimulationEnergies::measurableEnergyV2(const G4ParticleDefinition *particleDef, G4int PDGEncoding, G4double totalEnergy, - G4double kineticEnergy) + G4double kineticEnergy) const // 15-Dec-2003 Mikhail Leltchouk: inspired by FORTRAN Function PrMeasE // used by Michael Kuhlen and Peter Loch with Geant3 since 1991. @@ -428,7 +462,7 @@ namespace CaloG4 { G4double SimulationEnergies::measurableEnergy(const G4ParticleDefinition* particleDef, G4int PDGEncoding, G4double totalEnergy, - G4double kineticEnergy) + G4double kineticEnergy) const // 5-Dec-2003 Mikhail Leltchouk: extended version of FORTRAN Function PrMeasE // used by Michael Kuhlen and Peter Loch with Geant3 since 1991. @@ -516,7 +550,7 @@ namespace CaloG4 { - G4bool SimulationEnergies::ProcessEscapedEnergy( G4ThreeVector a_point, G4double a_energy ) + G4bool SimulationEnergies::ProcessEscapedEnergy( G4ThreeVector a_point, G4double a_energy ) const { // Escaped energy requires special processing. The energy was not // deposited in the current G4Step, but at the beginning of the diff --git a/Calorimeter/CaloG4Sim/src/components/CaloG4Sim_entries.cxx b/Calorimeter/CaloG4Sim/src/components/CaloG4Sim_entries.cxx index de42b930d547ad45c7c651915146e04ed9b02cd7..14048bdb6bff1eb819d884f76780a1b367373ad7 100644 --- a/Calorimeter/CaloG4Sim/src/components/CaloG4Sim_entries.cxx +++ b/Calorimeter/CaloG4Sim/src/components/CaloG4Sim_entries.cxx @@ -1,13 +1,10 @@ #include "GaudiKernel/DeclareFactoryEntries.h" -#include "CaloG4Sim/CalibrationDefaultProcessing.h" #include "CaloG4Sim/CalibrationDefaultProcessingTool.h" -DECLARE_NAMESPACE_TOOL_FACTORY( CaloG4 , CalibrationDefaultProcessing ) DECLARE_TOOL_FACTORY( G4UA::CaloG4::CalibrationDefaultProcessingTool ) DECLARE_FACTORY_ENTRIES( CaloG4 ) { - DECLARE_NAMESPACE_TOOL( CaloG4 , CalibrationDefaultProcessing ) DECLARE_TOOL( G4UA::CaloG4::CalibrationDefaultProcessingTool ) } diff --git a/Calorimeter/CaloIdentifier/test/LArEM_ID_test.cxx b/Calorimeter/CaloIdentifier/test/LArEM_ID_test.cxx index f1a28ff7ace982194a3686c5320e148bc2184bbf..d26c2934fed4d2cd0e4df42e0e164e65c010d840 100644 --- a/Calorimeter/CaloIdentifier/test/LArEM_ID_test.cxx +++ b/Calorimeter/CaloIdentifier/test/LArEM_ID_test.cxx @@ -21,6 +21,15 @@ #include "larem_id_test_common.cxx" +class LArEM_ID_Test + : public LArEM_ID, public ILArEM_ID_Test +{ +public: + virtual int get_lar_field_value() const override { return lar_field_value(); } + virtual int get_lar_em_field_value() const override { return lar_em_field_value(); } +}; + + void test_basic (const LArEM_Base_ID& idhelper) { std::cout << "test_basic\n"; @@ -68,8 +77,8 @@ void test4 (const LArEM_ID& em_id) int main() { - std::unique_ptr<LArEM_ID> idhelper = make_helper<LArEM_ID>(); - std::unique_ptr<LArEM_ID> idhelper_n = make_helper<LArEM_ID>(true); + std::unique_ptr<LArEM_ID> idhelper = make_helper<LArEM_ID_Test>(); + std::unique_ptr<LArEM_ID> idhelper_n = make_helper<LArEM_ID_Test>(true); try { test_basic (*idhelper); test_connected (*idhelper); diff --git a/Calorimeter/CaloIdentifier/test/LArEM_SuperCell_ID_test.cxx b/Calorimeter/CaloIdentifier/test/LArEM_SuperCell_ID_test.cxx index c8b9ddd05b9cb94300d5ee63aae04a7de9bd168c..3d21b5a7555ea930183c282fc336bfa63b28d865 100644 --- a/Calorimeter/CaloIdentifier/test/LArEM_SuperCell_ID_test.cxx +++ b/Calorimeter/CaloIdentifier/test/LArEM_SuperCell_ID_test.cxx @@ -21,6 +21,15 @@ #include "larem_id_test_common.cxx" +class LArEM_SuperCell_ID_Test + : public LArEM_SuperCell_ID, public ILArEM_ID_Test +{ +public: + virtual int get_lar_field_value() const override { return lar_field_value(); } + virtual int get_lar_em_field_value() const override { return lar_em_field_value(); } +}; + + void test_basic (const LArEM_Base_ID& idhelper) { std::cout << "test_basic\n"; @@ -70,8 +79,8 @@ void test4 (const LArEM_SuperCell_ID& /*em_id*/) int main() { - std::unique_ptr<LArEM_SuperCell_ID> idhelper = make_helper<LArEM_SuperCell_ID>(); - std::unique_ptr<LArEM_SuperCell_ID> idhelper_n = make_helper<LArEM_SuperCell_ID>(true); + std::unique_ptr<LArEM_SuperCell_ID> idhelper = make_helper<LArEM_SuperCell_ID_Test>(); + std::unique_ptr<LArEM_SuperCell_ID> idhelper_n = make_helper<LArEM_SuperCell_ID_Test>(true); try { test_basic (*idhelper); test_connected (*idhelper, true); diff --git a/Calorimeter/CaloIdentifier/test/LArFCAL_ID_test.cxx b/Calorimeter/CaloIdentifier/test/LArFCAL_ID_test.cxx index ac650ee58f89de6451458c3cd7a4e31371ea6a60..5bd3898cded86609127490df8158ef0a09e32fa5 100644 --- a/Calorimeter/CaloIdentifier/test/LArFCAL_ID_test.cxx +++ b/Calorimeter/CaloIdentifier/test/LArFCAL_ID_test.cxx @@ -23,6 +23,15 @@ #include "larfcal_id_test_common.cxx" +class LArFCAL_ID_Test + : public LArFCAL_ID, public ILArFCAL_ID_Test +{ +public: + virtual int get_lar_field_value() const override { return lar_field_value(); } + virtual int get_lar_fcal_field_value() const override { return lar_fcal_field_value(); } +}; + + // neighbors void test4 (const LArFCAL_ID& fcal_id) { @@ -74,8 +83,8 @@ int main() idd.add_metadata("FCAL2DNEIGHBORS", "FCal2DNeighbors-DC3-05-Comm-01.txt"); idd.add_metadata("FCAL3DNEIGHBORSNEXT", "FCal3DNeighborsNext-DC3-05-Comm-01.txt"); idd.add_metadata("FCAL3DNEIGHBORSPREV", "FCal3DNeighborsPrev-DC3-05-Comm-01.txt"); - std::unique_ptr<LArFCAL_ID> idhelper = make_helper<LArFCAL_ID>(); - std::unique_ptr<LArFCAL_ID> idhelper_n = make_helper<LArFCAL_ID>(true); + std::unique_ptr<LArFCAL_ID> idhelper = make_helper<LArFCAL_ID_Test>(); + std::unique_ptr<LArFCAL_ID> idhelper_n = make_helper<LArFCAL_ID_Test>(true); try { test_basic (*idhelper); test_connected (*idhelper, false); diff --git a/Calorimeter/CaloIdentifier/test/LArFCAL_SuperCell_ID_test.cxx b/Calorimeter/CaloIdentifier/test/LArFCAL_SuperCell_ID_test.cxx index 21a48aad94dcb0b45d97d76a1e2fb4b65923138d..f91e9df1df0b552f41e567d598df1307f3a3561a 100644 --- a/Calorimeter/CaloIdentifier/test/LArFCAL_SuperCell_ID_test.cxx +++ b/Calorimeter/CaloIdentifier/test/LArFCAL_SuperCell_ID_test.cxx @@ -23,6 +23,15 @@ #include "larfcal_id_test_common.cxx" +class LArFCAL_SuperCell_ID_Test + : public LArFCAL_SuperCell_ID, public ILArFCAL_ID_Test +{ +public: + virtual int get_lar_field_value() const override { return lar_field_value(); } + virtual int get_lar_fcal_field_value() const override { return lar_fcal_field_value(); } +}; + + void test_basic (const LArFCAL_SuperCell_ID& idhelper) { std::cout << "test_basic\n"; @@ -39,7 +48,7 @@ void test_basic (const LArFCAL_SuperCell_ID& idhelper) int main() { - std::unique_ptr<LArFCAL_SuperCell_ID> idhelper = make_helper<LArFCAL_SuperCell_ID>(); + std::unique_ptr<LArFCAL_SuperCell_ID> idhelper = make_helper<LArFCAL_SuperCell_ID_Test>(); try { test_basic (*idhelper); test_connected (*idhelper, true); diff --git a/Calorimeter/CaloIdentifier/test/LArHEC_ID_test.cxx b/Calorimeter/CaloIdentifier/test/LArHEC_ID_test.cxx index c3db399dd3af89f8762dde7dc24b42176c3a0544..a166c968d5a2b1af770070ee7291ca62553d0981 100644 --- a/Calorimeter/CaloIdentifier/test/LArHEC_ID_test.cxx +++ b/Calorimeter/CaloIdentifier/test/LArHEC_ID_test.cxx @@ -21,6 +21,15 @@ #include "larhec_id_test_common.cxx" +class LArHEC_ID_Test + : public LArHEC_ID, public ILArHEC_ID_Test +{ +public: + virtual int get_lar_field_value() const override { return lar_field_value(); } + virtual int get_lar_hec_field_value() const override { return lar_hec_field_value(); } +}; + + void test_basic (const LArHEC_ID& idhelper) { std::cout << "test_basic\n"; @@ -67,8 +76,8 @@ void test_neighbors (const LArHEC_ID& idhelper) int main() { - std::unique_ptr<LArHEC_ID> idhelper = make_helper<LArHEC_ID>(); - std::unique_ptr<LArHEC_ID> idhelper_n = make_helper<LArHEC_ID>(true); + std::unique_ptr<LArHEC_ID> idhelper = make_helper<LArHEC_ID_Test>(); + std::unique_ptr<LArHEC_ID> idhelper_n = make_helper<LArHEC_ID_Test>(true); try { test_basic (*idhelper); test_connected (*idhelper, false); diff --git a/Calorimeter/CaloIdentifier/test/LArHEC_SuperCell_ID_test.cxx b/Calorimeter/CaloIdentifier/test/LArHEC_SuperCell_ID_test.cxx index dcfc3c48269b38e9c957ec2dc19e88a07b7330bc..890a44176419ecd6610fbca3388ba34c862c0885 100644 --- a/Calorimeter/CaloIdentifier/test/LArHEC_SuperCell_ID_test.cxx +++ b/Calorimeter/CaloIdentifier/test/LArHEC_SuperCell_ID_test.cxx @@ -21,6 +21,15 @@ #include "larhec_id_test_common.cxx" +class LArHEC_SuperCell_ID_Test + : public LArHEC_SuperCell_ID, public ILArHEC_ID_Test +{ +public: + virtual int get_lar_field_value() const override { return lar_field_value(); } + virtual int get_lar_hec_field_value() const override { return lar_hec_field_value(); } +}; + + void test_basic (const LArHEC_Base_ID& idhelper) { std::cout << "test_basic\n"; @@ -65,8 +74,8 @@ void test_neighbors (const LArHEC_SuperCell_ID& idhelper) int main() { - std::unique_ptr<LArHEC_SuperCell_ID> idhelper = make_helper<LArHEC_SuperCell_ID>(); - std::unique_ptr<LArHEC_SuperCell_ID> idhelper_n = make_helper<LArHEC_SuperCell_ID>(true); + std::unique_ptr<LArHEC_SuperCell_ID> idhelper = make_helper<LArHEC_SuperCell_ID_Test>(); + std::unique_ptr<LArHEC_SuperCell_ID> idhelper_n = make_helper<LArHEC_SuperCell_ID_Test>(true); try { test_basic (*idhelper); test_connected (*idhelper, true); diff --git a/Calorimeter/CaloIdentifier/test/LArMiniFCAL_ID_test.cxx b/Calorimeter/CaloIdentifier/test/LArMiniFCAL_ID_test.cxx index c368b8e022fce5388d9cf5ed90b8c8c003e4ad75..d423ab3e1b111e268322a0b5a634a6adb42bb164 100644 --- a/Calorimeter/CaloIdentifier/test/LArMiniFCAL_ID_test.cxx +++ b/Calorimeter/CaloIdentifier/test/LArMiniFCAL_ID_test.cxx @@ -22,12 +22,20 @@ #include "make_idhelper_common.cxx" +class ILArMiniFCAL_ID_Test +{ +public: + virtual int get_lar_field_value() const = 0; + virtual int get_lar_fcal_field_value() const = 0; +}; + + class LArMiniFCAL_ID_Test - : public LArMiniFCAL_ID + : public LArMiniFCAL_ID, public ILArMiniFCAL_ID_Test { public: - using LArMiniFCAL_ID::lar_field_value; - using LArMiniFCAL_ID::lar_fcal_field_value; + virtual int get_lar_field_value() const override { return lar_field_value(); } + virtual int get_lar_fcal_field_value() const override { return lar_fcal_field_value(); } }; @@ -131,9 +139,9 @@ void test_connected (const LArMiniFCAL_ID& idhelper) counts.count (depth); ExpandedIdentifier exp_id; - LArMiniFCAL_ID_Test* idhelper_test = (LArMiniFCAL_ID_Test*)&idhelper; - exp_id << idhelper_test->lar_field_value() - << idhelper_test->lar_fcal_field_value() + const ILArMiniFCAL_ID_Test& idhelper_test = dynamic_cast<const ILArMiniFCAL_ID_Test&>(idhelper); + exp_id << idhelper_test.get_lar_field_value() + << idhelper_test.get_lar_fcal_field_value() << idhelper.pos_neg(id) << idhelper.module(id) << idhelper.depth(id) @@ -161,9 +169,9 @@ void test_connected (const LArMiniFCAL_ID& idhelper) assert (id == idhelper.module_id (side, mod)); ExpandedIdentifier exp_id; - LArMiniFCAL_ID_Test* idhelper_test = (LArMiniFCAL_ID_Test*)&idhelper; - exp_id << idhelper_test->lar_field_value() - << idhelper_test->lar_fcal_field_value() + const ILArMiniFCAL_ID_Test& idhelper_test = dynamic_cast<const ILArMiniFCAL_ID_Test&>(idhelper); + exp_id << idhelper_test.get_lar_field_value() + << idhelper_test.get_lar_fcal_field_value() << idhelper.pos_neg(id) << idhelper.module(id) << idhelper.depth(id); @@ -239,8 +247,8 @@ int main() idd.add_metadata("FCAL3DNEIGHBORSNEXT", "FCal3DNeighborsNext-DC3-05-Comm-01.txt"); idd.add_metadata("FCAL3DNEIGHBORSPREV", "FCal3DNeighborsPrev-DC3-05-Comm-01.txt"); - std::unique_ptr<LArMiniFCAL_ID> idhelper = make_helper<LArMiniFCAL_ID>(); - std::unique_ptr<LArMiniFCAL_ID> idhelper_n = make_helper<LArMiniFCAL_ID>(true); + std::unique_ptr<LArMiniFCAL_ID> idhelper = make_helper<LArMiniFCAL_ID_Test>(); + std::unique_ptr<LArMiniFCAL_ID> idhelper_n = make_helper<LArMiniFCAL_ID_Test>(true); try { test_basic (*idhelper); test_connected (*idhelper); diff --git a/Calorimeter/CaloIdentifier/test/TileID_test.cxx b/Calorimeter/CaloIdentifier/test/TileID_test.cxx index acb4350c871172b9317dda937576a90ce727b93a..df895db9fb1383dbfd00c5c6e436501e706551aa 100644 --- a/Calorimeter/CaloIdentifier/test/TileID_test.cxx +++ b/Calorimeter/CaloIdentifier/test/TileID_test.cxx @@ -21,6 +21,14 @@ #include "tile_id_test_common.cxx" +class TileID_Test + : public TileID, public ITile_ID_Test +{ +public: + virtual int get_tile_field_value() const override { return tile_field_value(); } +}; + + std::unique_ptr<TileID> make_helper (bool do_neighbours = false) { auto idhelper = CxxUtils::make_unique<TileID>(); @@ -99,8 +107,8 @@ int main() idDictXmlFile = "IdDictTileCalorimeter.xml"; IdDictMgr& idd = getDictMgr(); idd.add_metadata("TILENEIGHBORS", "TileNeighbour_reduced.txt"); - std::unique_ptr<TileID> idhelper = make_helper<TileID>(); - std::unique_ptr<TileID> idhelper_n = make_helper<TileID>(true); + std::unique_ptr<TileID> idhelper = make_helper<TileID_Test>(); + std::unique_ptr<TileID> idhelper_n = make_helper<TileID_Test>(true); try { test_basic (*idhelper); test_connected (*idhelper, false); diff --git a/Calorimeter/CaloIdentifier/test/Tile_SuperCell_ID_test.cxx b/Calorimeter/CaloIdentifier/test/Tile_SuperCell_ID_test.cxx index e0f8f5b5990a4378c60c1a198ee02b02de93e799..5436169973f326ab0575fd455d0296107629a821 100644 --- a/Calorimeter/CaloIdentifier/test/Tile_SuperCell_ID_test.cxx +++ b/Calorimeter/CaloIdentifier/test/Tile_SuperCell_ID_test.cxx @@ -21,6 +21,14 @@ #include "tile_id_test_common.cxx" +class Tile_SuperCell_ID_Test + : public Tile_SuperCell_ID, public ITile_ID_Test +{ +public: + virtual int get_tile_field_value() const override { return tile_field_value(); } +}; + + void test_basic (const Tile_SuperCell_ID& idhelper) { std::cout << "test_basic\n"; @@ -45,7 +53,7 @@ int main() { idDictType = "TileCalorimeter"; idDictXmlFile = "IdDictTileCalorimeter.xml"; - std::unique_ptr<Tile_SuperCell_ID> idhelper = make_helper<Tile_SuperCell_ID>(); + std::unique_ptr<Tile_SuperCell_ID> idhelper = make_helper<Tile_SuperCell_ID_Test>(); try { test_basic (*idhelper); test_connected (*idhelper, true); diff --git a/Calorimeter/CaloIdentifier/test/larem_id_test_common.cxx b/Calorimeter/CaloIdentifier/test/larem_id_test_common.cxx index c182c6fa6aff3a7074b13200b993b86f401eca2e..a8630f6471db405e8d06d471f2ff7f10bbdfc3ad 100644 --- a/Calorimeter/CaloIdentifier/test/larem_id_test_common.cxx +++ b/Calorimeter/CaloIdentifier/test/larem_id_test_common.cxx @@ -13,7 +13,6 @@ */ -#include "boost/foreach.hpp" #include "make_idhelper_common.cxx" @@ -31,12 +30,11 @@ void basic_print_id (const LArEM_Base_ID& idhelper, const Identifier& id) } -class LArEM_ID_Test - : public LArEM_Base_ID +class ILArEM_ID_Test { public: - using LArEM_Base_ID::lar_field_value; - using LArEM_Base_ID::lar_em_field_value; + virtual int get_lar_field_value() const = 0; + virtual int get_lar_em_field_value() const = 0; }; @@ -176,9 +174,9 @@ void test_connected (const LArEM_Base_ID& em_id, bool supercell = false) counts.count (bec, samp); ExpandedIdentifier exp_id; - LArEM_ID_Test* em_id_test = (LArEM_ID_Test*)&em_id; - exp_id << em_id_test->lar_field_value() - << em_id_test->lar_em_field_value() + const ILArEM_ID_Test& em_id_test = dynamic_cast<const ILArEM_ID_Test&>(em_id); + exp_id << em_id_test.get_lar_field_value() + << em_id_test.get_lar_em_field_value() << em_id.barrel_ec(ch_id) << em_id.sampling(ch_id) << em_id.region(ch_id) @@ -190,11 +188,7 @@ void test_connected (const LArEM_Base_ID& em_id, bool supercell = false) for (size_t i = 0; i < hashvec.size(); i++) assert (hashvec[i]); -#if __cplusplus > 201100 for (Identifier ch_id : em_id.em_range()) { -#else - BOOST_FOREACH (Identifier ch_id, em_id.em_range()) { -#endif hashsum -= em_id.channel_hash (ch_id); } assert (hashsum == 0); @@ -238,9 +232,9 @@ void test_connected (const LArEM_Base_ID& em_id, bool supercell = false) hashvec[regHash] = true; ExpandedIdentifier exp_id; - LArEM_ID_Test* em_id_test = (LArEM_ID_Test*)&em_id; - exp_id << em_id_test->lar_field_value() - << em_id_test->lar_em_field_value() + const ILArEM_ID_Test& em_id_test = dynamic_cast<const ILArEM_ID_Test&>(em_id); + exp_id << em_id_test.get_lar_field_value() + << em_id_test.get_lar_em_field_value() << em_id.barrel_ec(reg_id) << em_id.sampling(reg_id) << em_id.region(reg_id); @@ -249,11 +243,7 @@ void test_connected (const LArEM_Base_ID& em_id, bool supercell = false) for (size_t i = 0; i < hashvec.size(); i++) assert (hashvec[i]); -#if __cplusplus > 201100 for (Identifier ch_id : em_id.reg_range()) { -#else - BOOST_FOREACH (Identifier ch_id, em_id.reg_range()) { -#endif hashsum -= em_id.region_hash (ch_id); } assert (hashsum == 0); diff --git a/Calorimeter/CaloIdentifier/test/larfcal_id_test_common.cxx b/Calorimeter/CaloIdentifier/test/larfcal_id_test_common.cxx index 8591df7c1e4a52909683853e2dbf22dc5ccfa055..049b629e1bc1f9d4ad6775e6f7cd8689009d5cd2 100644 --- a/Calorimeter/CaloIdentifier/test/larfcal_id_test_common.cxx +++ b/Calorimeter/CaloIdentifier/test/larfcal_id_test_common.cxx @@ -31,12 +31,11 @@ void basic_print_id (const LArFCAL_Base_ID& idhelper, const Identifier& id) } -class LArFCAL_ID_Test - : public LArFCAL_Base_ID +class ILArFCAL_ID_Test { public: - using LArFCAL_Base_ID::lar_field_value; - using LArFCAL_Base_ID::lar_fcal_field_value; + virtual int get_lar_field_value() const = 0; + virtual int get_lar_fcal_field_value() const = 0; }; @@ -135,9 +134,9 @@ test_connected (const LArFCAL_Base_ID& fcal_id, bool supercell = false) counts.count (mod); ExpandedIdentifier exp_id; - LArFCAL_ID_Test* fcal_id_test = (LArFCAL_ID_Test*)&fcal_id; - exp_id << fcal_id_test->lar_field_value() - << fcal_id_test->lar_fcal_field_value() + const ILArFCAL_ID_Test& fcal_id_test = dynamic_cast<const ILArFCAL_ID_Test&>(fcal_id); + exp_id << fcal_id_test.get_lar_field_value() + << fcal_id_test.get_lar_fcal_field_value() << fcal_id.pos_neg(ch_id) << fcal_id.module(ch_id) << fcal_id.eta(ch_id) @@ -196,9 +195,9 @@ test_connected (const LArFCAL_Base_ID& fcal_id, bool supercell = false) hashvec[modHash] = true; ExpandedIdentifier exp_id; - LArFCAL_ID_Test* fcal_id_test = (LArFCAL_ID_Test*)&fcal_id; - exp_id << fcal_id_test->lar_field_value() - << fcal_id_test->lar_fcal_field_value() + const ILArFCAL_ID_Test& fcal_id_test = dynamic_cast<const ILArFCAL_ID_Test&>(fcal_id); + exp_id << fcal_id_test.get_lar_field_value() + << fcal_id_test.get_lar_fcal_field_value() << fcal_id.pos_neg(mod_id) << fcal_id.module(mod_id); assert (fcal_id.module_id (exp_id) == mod_id); diff --git a/Calorimeter/CaloIdentifier/test/larhec_id_test_common.cxx b/Calorimeter/CaloIdentifier/test/larhec_id_test_common.cxx index 17d08f76ef74a85e1b753bdc811023a1dabe0a5e..586c9e1e67d5b97bd33efcc3c7634ceb1ed6aaf8 100644 --- a/Calorimeter/CaloIdentifier/test/larhec_id_test_common.cxx +++ b/Calorimeter/CaloIdentifier/test/larhec_id_test_common.cxx @@ -32,12 +32,11 @@ void basic_print_id (const LArHEC_Base_ID& idhelper, const Identifier& id) } -class LArHEC_ID_Test - : public LArHEC_Base_ID +class ILArHEC_ID_Test { public: - using LArHEC_Base_ID::lar_field_value; - using LArHEC_Base_ID::lar_hec_field_value; + virtual int get_lar_field_value() const = 0; + virtual int get_lar_hec_field_value() const = 0; }; @@ -122,9 +121,9 @@ void test_connected (const LArHEC_Base_ID& idhelper, bool supercell) counts.count (reg, samp); ExpandedIdentifier exp_id; - LArHEC_ID_Test* idhelper_test = (LArHEC_ID_Test*)&idhelper; - exp_id << idhelper_test->lar_field_value() - << idhelper_test->lar_hec_field_value() + const ILArHEC_ID_Test& idhelper_test = dynamic_cast<const ILArHEC_ID_Test&>(idhelper); + exp_id << idhelper_test.get_lar_field_value() + << idhelper_test.get_lar_hec_field_value() << idhelper.pos_neg(id) << idhelper.sampling(id) << idhelper.region(id) @@ -157,9 +156,9 @@ void test_connected (const LArHEC_Base_ID& idhelper, bool supercell) assert (id == id2); ExpandedIdentifier exp_id; - LArHEC_ID_Test* idhelper_test = (LArHEC_ID_Test*)&idhelper; - exp_id << idhelper_test->lar_field_value() - << idhelper_test->lar_hec_field_value() + const ILArHEC_ID_Test& idhelper_test = dynamic_cast<const ILArHEC_ID_Test&>(idhelper); + exp_id << idhelper_test.get_lar_field_value() + << idhelper_test.get_lar_hec_field_value() << idhelper.pos_neg(id) << idhelper.sampling(id) << idhelper.region(id); diff --git a/Calorimeter/CaloIdentifier/test/tile_id_test_common.cxx b/Calorimeter/CaloIdentifier/test/tile_id_test_common.cxx index 13f6a0db1e37e8e890547716555047faadc7e5cf..9d8b5aced88f7c8a7a4469536d9631420e04ca0d 100644 --- a/Calorimeter/CaloIdentifier/test/tile_id_test_common.cxx +++ b/Calorimeter/CaloIdentifier/test/tile_id_test_common.cxx @@ -31,11 +31,10 @@ void basic_print_id (const Tile_Base_ID& idhelper, const Identifier& id) } -class Tile_ID_Test - : public Tile_Base_ID +class ITile_ID_Test { public: - using Tile_Base_ID::tile_field_value; + virtual int get_tile_field_value() const = 0; }; @@ -202,8 +201,8 @@ void test_connected (const Tile_Base_ID& idhelper, bool supercell) counts.count (sect, samp); ExpandedIdentifier exp_id; - Tile_ID_Test* idhelper_test = (Tile_ID_Test*)&idhelper; - exp_id << idhelper_test->tile_field_value() + const ITile_ID_Test& idhelper_test = dynamic_cast<const ITile_ID_Test&>(idhelper); + exp_id << idhelper_test.get_tile_field_value() << (idhelper.section(id) + (supercell ? Tile_Base_ID::SUPERCELL_MASK : 0)) << idhelper.side(id) << idhelper.module(id) @@ -228,8 +227,8 @@ void test_connected (const Tile_Base_ID& idhelper, bool supercell) assert (!idhelper.module_id (reg_id, 100, id2)); ExpandedIdentifier exp_id; - Tile_ID_Test* idhelper_test = (Tile_ID_Test*)&idhelper; - exp_id << idhelper_test->tile_field_value() + const ITile_ID_Test& idhelper_test = dynamic_cast<const ITile_ID_Test&>(idhelper); + exp_id << idhelper_test.get_tile_field_value() << (idhelper.section(id) + (supercell ? Tile_Base_ID::SUPERCELL_MASK : 0)) << idhelper.side(id) << idhelper.module(id); @@ -252,8 +251,8 @@ void test_connected (const Tile_Base_ID& idhelper, bool supercell) assert (!idhelper.tower_id (reg_id, mod, 100, id2)); ExpandedIdentifier exp_id; - Tile_ID_Test* idhelper_test = (Tile_ID_Test*)&idhelper; - exp_id << idhelper_test->tile_field_value() + const ITile_ID_Test& idhelper_test = dynamic_cast<const ITile_ID_Test&>(idhelper); + exp_id << idhelper_test.get_tile_field_value() << (idhelper.section(id) + (supercell ? Tile_Base_ID::SUPERCELL_MASK : 0)) << idhelper.side(id) << idhelper.module(id) @@ -271,8 +270,8 @@ void test_connected (const Tile_Base_ID& idhelper, bool supercell) assert (!idhelper.pmt_id (cell_id, 2, id2)); ExpandedIdentifier exp_id; - Tile_ID_Test* idhelper_test = (Tile_ID_Test*)&idhelper; - exp_id << idhelper_test->tile_field_value() + const ITile_ID_Test& idhelper_test = dynamic_cast<const ITile_ID_Test&>(idhelper); + exp_id << idhelper_test.get_tile_field_value() << (idhelper.section(id) + (supercell ? Tile_Base_ID::SUPERCELL_MASK : 0)) << idhelper.side(id) << idhelper.module(id) @@ -330,8 +329,8 @@ void test_connected (const Tile_Base_ID& idhelper, bool supercell) region_check (idhelper, id); ExpandedIdentifier exp_id; - Tile_ID_Test* idhelper_test = (Tile_ID_Test*)&idhelper; - exp_id << idhelper_test->tile_field_value() + const ITile_ID_Test& idhelper_test = dynamic_cast<const ITile_ID_Test&>(idhelper); + exp_id << idhelper_test.get_tile_field_value() << (idhelper.section(id) + (supercell ? Tile_Base_ID::SUPERCELL_MASK : 0)) << idhelper.side(id) << idhelper.module(id) @@ -364,8 +363,8 @@ void test_connected (const Tile_Base_ID& idhelper, bool supercell) idhelper.phi_max(id)); ExpandedIdentifier exp_id; - Tile_ID_Test* idhelper_test = (Tile_ID_Test*)&idhelper; - exp_id << idhelper_test->tile_field_value() + const ITile_ID_Test& idhelper_test = dynamic_cast<const ITile_ID_Test&>(idhelper); + exp_id << idhelper_test.get_tile_field_value() << (idhelper.section(id) + (supercell ? Tile_Base_ID::SUPERCELL_MASK : 0)) << idhelper.side(id); assert (idhelper.region_id (exp_id) == id); diff --git a/Calorimeter/CaloMonitoring/CMakeLists.txt b/Calorimeter/CaloMonitoring/CMakeLists.txt index 3d8ad7608da4a1e59ed16f6c109bb70dc63f3c8a..b1c9939ebecdfaf13c3b97a1a0cd6e0828876d51 100644 --- a/Calorimeter/CaloMonitoring/CMakeLists.txt +++ b/Calorimeter/CaloMonitoring/CMakeLists.txt @@ -6,44 +6,47 @@ atlas_subdir( CaloMonitoring ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Calorimeter/CaloEvent - Calorimeter/CaloIdentifier - Calorimeter/CaloInterface - Commission/CommissionEvent - Control/AthenaMonitoring - Control/StoreGate - DetectorDescription/Identifier - Event/xAOD/xAODCaloEvent - GaudiKernel - LArCalorimeter/LArIdentifier - LArCalorimeter/LArRecConditions - LArCalorimeter/LArCabling - Reconstruction/MissingETEvent - Reconstruction/egamma/egammaEvent - PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools - Tools/LWHists - Trigger/TrigAnalysis/TrigDecisionTool - PRIVATE - Calorimeter/CaloDetDescr - Calorimeter/CaloGeoHelpers - Control/AthenaKernel - Event/xAOD/xAODEventInfo - LArCalorimeter/LArRecEvent - Reconstruction/Jet/JetEvent - Reconstruction/RecBackground/RecBackgroundEvent ) +atlas_depends_on_subdirs( + PUBLIC + Calorimeter/CaloEvent + Calorimeter/CaloIdentifier + Calorimeter/CaloInterface + Commission/CommissionEvent + Control/AthenaMonitoring + Control/StoreGate + DetectorDescription/Identifier + Event/xAOD/xAODCaloEvent + GaudiKernel + LArCalorimeter/LArIdentifier + LArCalorimeter/LArRecConditions + LArCalorimeter/LArCabling + Reconstruction/MissingETEvent + Reconstruction/egamma/egammaEvent + PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools + Tools/LWHists + Trigger/TrigAnalysis/TrigDecisionTool + PRIVATE + Calorimeter/CaloDetDescr + Calorimeter/CaloGeoHelpers + Control/AthenaKernel + Event/xAOD/xAODEventInfo + LArCalorimeter/LArRecEvent + Reconstruction/Jet/JetEvent + Reconstruction/RecBackground/RecBackgroundEvent ) # External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( ROOT COMPONENTS Core Hist MathCore Gpad ) # Component(s) in the package: atlas_add_component( CaloMonitoring - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CaloIdentifier CommissionEvent AthenaMonitoringLib StoreGateLib SGtests Identifier xAODCaloEvent GaudiKernel LArIdentifier LArRecConditions LArCablingLib MissingETEvent egammaEvent ElectronPhotonSelectorTools LWHists TrigDecisionToolLib CaloDetDescrLib CaloGeoHelpers AthenaKernel xAODEventInfo LArRecEvent JetEvent RecBackgroundEvent ) + CaloMonitoring/*.h src/*.cxx src/components/*.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CaloIdentifier CommissionEvent + AthenaMonitoringLib StoreGateLib Identifier xAODCaloEvent GaudiKernel + LArIdentifier LArRecConditions LArCablingLib MissingETEvent egammaEvent + ElectronPhotonSelectorToolsLib LWHists TrigDecisionToolLib CaloDetDescrLib + CaloGeoHelpers AthenaKernel xAODEventInfo LArRecEvent JetEvent + RecBackgroundEvent ) # Install files from the package: -atlas_install_headers( CaloMonitoring ) atlas_install_joboptions( share/*.py ) - diff --git a/Calorimeter/CaloRec/share/CaloCellFastCopyTool_test.ref b/Calorimeter/CaloRec/share/CaloCellFastCopyTool_test.ref index 6bf53cf39c8f208a8376f428efcf1f4c81fb25a4..7929803bf6f5747334cb4207c0fb9216d30f9f27 100644 --- a/Calorimeter/CaloRec/share/CaloCellFastCopyTool_test.ref +++ b/Calorimeter/CaloRec/share/CaloCellFastCopyTool_test.ref @@ -5,16 +5,16 @@ JobOptionsSvc INFO Job options successfully read in from ./CaloCellFastCo ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) - running on karma on Tue Sep 20 12:08:07 2016 + running on karma on Wed Mar 8 12:09:08 2017 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : StoreGate ApplicationMgr INFO Application Manager Configured successfully -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-00-00 -ClassIDSvc INFO getRegistryEntries: read 6521 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 6701 CLIDRegistry entries for module ALL StoreGateSvc DEBUG Property update for OutputLevel : new value = 2 StoreGateSvc DEBUG Service base class initialized successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-00-00 -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-00-00-00 +StoreGateSvc DEBUG trying to create store SGImplSvc/StoreGateSvc_Impl +StoreGateSvc_Impl DEBUG Property update for OutputLevel : new value = 2 +StoreGateSvc_Impl DEBUG Service base class initialized successfully EventLoopMgr WARNING Unable to locate service "EventSelector" EventLoopMgr WARNING No events will be processed from external input. HistogramPersis...WARNING Histograms saving not required. @@ -94,132 +94,132 @@ AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionar AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! AtlasDetectorID DEBUG Could not get value for label 'no_side' of field 'DetZside' in dictionary Calorimeter AtlasDetectorID::initialize_from_dictionary - OK -StoreGateSvc DEBUG Recorded object @0x2e8e2c0 with key AllCalo of type CaloCellContainer(CLID 2802) - in DataObject @0x2ecc110 - object not modifiable when retrieved -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) ClassIDSvc INFO getRegistryEntries: read 357 CLIDRegistry entries for module ALL +StoreGateSvc_Impl DEBUG Recorded object @0x1cc8810 with key AllCalo of type CaloCellContainer(CLID 2802) + in DataObject @0x172f440 + object not modifiable when retrieved +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[1] INFO In initialize CopyToolTest[1] DEBUG Accepted calo samplings: 17; CopyToolTest[1] DEBUG Accepted sub calos: 3; CopyToolTest[1] DEBUG CaloCell hash max: 187652 CopyToolTest[1] DEBUG Number of accepted hashes: 0 CopyToolTest[1] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[1] INFO In initialize CopyToolTest[1] DEBUG Accepted calo samplings: 17; CopyToolTest[1] DEBUG Accepted sub calos: 3; CopyToolTest[1] DEBUG CaloCell hash max: 187652 CopyToolTest[1] DEBUG Number of accepted hashes: 512 CopyToolTest[1] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[3] INFO In initialize CopyToolTest[3] DEBUG Accepted calo samplings: 17; CopyToolTest[3] DEBUG Accepted sub calos: 3; CopyToolTest[3] DEBUG CaloCell hash max: 187652 CopyToolTest[3] DEBUG Number of accepted hashes: 0 CopyToolTest[3] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[4] INFO In initialize CopyToolTest[4] DEBUG Accepted calo samplings: 17; CopyToolTest[4] DEBUG Accepted sub calos: 3; CopyToolTest[4] DEBUG CaloCell hash max: 187652 CopyToolTest[4] DEBUG Number of accepted hashes: 512 CopyToolTest[4] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[13] INFO In initialize CopyToolTest[13] DEBUG Accepted calo samplings: 17; CopyToolTest[13] DEBUG Accepted sub calos: 3; CopyToolTest[13] DEBUG CaloCell hash max: 187652 CopyToolTest[13] DEBUG Number of accepted hashes: 0 -CopyToolTest[13] ERROR ../src/CaloCellFastCopyTool.cxx:332 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*)): code 0: Can't copy to a non-const view container. -CopyToolTest[13] FATAL ../src/CaloCellFastCopyTool.cxx:119 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: (this->*m_copyCells)(srcCont.cptr(), theCont) +CopyToolTest[13] ERROR ../src/CaloCellFastCopyTool.cxx:336 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*)): code 0: Can't copy to a non-const view container. +CopyToolTest[13] FATAL ../src/CaloCellFastCopyTool.cxx:123 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: (this->*m_copyCells)(srcCont.cptr(), theCont) CopyToolTest[13] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[14] INFO In initialize CopyToolTest[14] DEBUG Accepted calo samplings: 17; CopyToolTest[14] DEBUG Accepted sub calos: 3; CopyToolTest[14] DEBUG CaloCell hash max: 187652 CopyToolTest[14] DEBUG Number of accepted hashes: 512 -CopyToolTest[14] ERROR ../src/CaloCellFastCopyTool.cxx:321 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*)): code 0: Can't copy to a non-const view container. -CopyToolTest[14] FATAL ../src/CaloCellFastCopyTool.cxx:119 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: (this->*m_copyCells)(srcCont.cptr(), theCont) +CopyToolTest[14] ERROR ../src/CaloCellFastCopyTool.cxx:325 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*)): code 0: Can't copy to a non-const view container. +CopyToolTest[14] FATAL ../src/CaloCellFastCopyTool.cxx:123 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: (this->*m_copyCells)(srcCont.cptr(), theCont) CopyToolTest[14] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[15] INFO In initialize CopyToolTest[15] DEBUG Accepted calo samplings: 17; CopyToolTest[15] DEBUG Accepted sub calos: 3; CopyToolTest[15] DEBUG CaloCell hash max: 187652 CopyToolTest[15] DEBUG Number of accepted hashes: 0 -CopyToolTest[15] ERROR ../src/CaloCellFastCopyTool.cxx:332 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*)): code 0: Can't copy to a non-const view container. -CopyToolTest[15] FATAL ../src/CaloCellFastCopyTool.cxx:119 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: (this->*m_copyCells)(srcCont.cptr(), theCont) +CopyToolTest[15] ERROR ../src/CaloCellFastCopyTool.cxx:336 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*)): code 0: Can't copy to a non-const view container. +CopyToolTest[15] FATAL ../src/CaloCellFastCopyTool.cxx:123 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: (this->*m_copyCells)(srcCont.cptr(), theCont) CopyToolTest[15] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[16] INFO In initialize CopyToolTest[16] DEBUG Accepted calo samplings: 17; CopyToolTest[16] DEBUG Accepted sub calos: 3; CopyToolTest[16] DEBUG CaloCell hash max: 187652 CopyToolTest[16] DEBUG Number of accepted hashes: 512 -CopyToolTest[16] ERROR ../src/CaloCellFastCopyTool.cxx:321 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*)): code 0: Can't copy to a non-const view container. -CopyToolTest[16] FATAL ../src/CaloCellFastCopyTool.cxx:119 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: (this->*m_copyCells)(srcCont.cptr(), theCont) +CopyToolTest[16] ERROR ../src/CaloCellFastCopyTool.cxx:325 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*)): code 0: Can't copy to a non-const view container. +CopyToolTest[16] FATAL ../src/CaloCellFastCopyTool.cxx:123 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: (this->*m_copyCells)(srcCont.cptr(), theCont) CopyToolTest[16] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[5] INFO In initialize CopyToolTest[5] DEBUG Accepted calo samplings: 17; CopyToolTest[5] DEBUG Accepted sub calos: 3; CopyToolTest[5] DEBUG CaloCell hash max: 187652 CopyToolTest[5] DEBUG Number of accepted hashes: 0 CopyToolTest[5] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[6] INFO In initialize CopyToolTest[6] DEBUG Accepted calo samplings: 17; CopyToolTest[6] DEBUG Accepted sub calos: 3; CopyToolTest[6] DEBUG CaloCell hash max: 187652 CopyToolTest[6] DEBUG Number of accepted hashes: 512 CopyToolTest[6] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[7] INFO In initialize CopyToolTest[7] DEBUG Accepted calo samplings: 17; CopyToolTest[7] DEBUG Accepted sub calos: 3; CopyToolTest[7] DEBUG CaloCell hash max: 187652 CopyToolTest[7] DEBUG Number of accepted hashes: 0 CopyToolTest[7] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[8] INFO In initialize CopyToolTest[8] DEBUG Accepted calo samplings: 17; CopyToolTest[8] DEBUG Accepted sub calos: 3; CopyToolTest[8] DEBUG CaloCell hash max: 187652 CopyToolTest[8] DEBUG Number of accepted hashes: 512 CopyToolTest[8] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[9] INFO In initialize CopyToolTest[9] DEBUG Accepted calo samplings: 17; CopyToolTest[9] DEBUG Accepted sub calos: 3; CopyToolTest[9] DEBUG CaloCell hash max: 187652 CopyToolTest[9] DEBUG Number of accepted hashes: 0 CopyToolTest[9] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[10] INFO In initialize CopyToolTest[10] DEBUG Accepted calo samplings: 17; CopyToolTest[10] DEBUG Accepted sub calos: 3; CopyToolTest[10] DEBUG CaloCell hash max: 187652 CopyToolTest[10] DEBUG Number of accepted hashes: 512 CopyToolTest[10] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[11] INFO In initialize CopyToolTest[11] DEBUG Accepted calo samplings: 17; CopyToolTest[11] DEBUG Accepted sub calos: 3; CopyToolTest[11] DEBUG CaloCell hash max: 187652 CopyToolTest[11] DEBUG Number of accepted hashes: 0 CopyToolTest[11] DEBUG Calling destructor -StoreGateSvc DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[12] INFO In initialize CopyToolTest[12] DEBUG Accepted calo samplings: 17; CopyToolTest[12] DEBUG Accepted sub calos: 3; CopyToolTest[12] DEBUG CaloCell hash max: 187652 CopyToolTest[12] DEBUG Number of accepted hashes: 512 CopyToolTest[12] DEBUG Calling destructor -StoreGateSvc DEBUG Recorded object @0x2eb7910 with key AllCalloFull of type CaloCellContainer(CLID 2802) - in DataObject @0x55cf020 +StoreGateSvc_Impl DEBUG Recorded object @0x1c979e0 with key AllCalloFull of type CaloCellContainer(CLID 2802) + in DataObject @0x43c32d0 object not modifiable when retrieved CopyToolTest[9] INFO In initialize CopyToolTest[9] DEBUG Accepted calo samplings: 17; @@ -233,10 +233,10 @@ CopyToolTest[9] DEBUG CaloCell hash max: 187652 CopyToolTest[9] DEBUG Number of accepted hashes: 0 CopyToolTest[9] DEBUG Calling destructor CopyToolTest[9] DEBUG Calling destructor -StoreGateSvc WARNING setupProxy:: error setting up proxy for key AllCalloFull and clid 2802 - Pre-existing valid DataProxy @0x55cf1b0 found in Store for key AllCalloFull with clid 2802 -StoreGateSvc WARNING record_impl: Problem setting up the proxy for object @0x55cf6f0 - recorded with key AllCalloFull of type CaloCellContainer (CLID 2802) in DataObject @0x7b0a500 +StoreGateSvc_Impl WARNING setupProxy:: error setting up proxy for key AllCalloFull and clid 2802 + Pre-existing valid DataProxy @0x43c3460 found in Store for key AllCalloFull with clid 2802 +StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x43c35a0 + recorded with key AllCalloFull of type CaloCellContainer (CLID 2802) in DataObject @0x68fce90 CopyToolTest[10] INFO In initialize CopyToolTest[10] DEBUG Accepted calo samplings: 17; CopyToolTest[10] DEBUG Accepted sub calos: 3; diff --git a/Calorimeter/CaloRec/src/CaloClusterMaker.cxx b/Calorimeter/CaloRec/src/CaloClusterMaker.cxx index 78928daf8ade5884b633b79bec4b2e8991009dbc..f6bdf2a0a8fd5d1a17c1f19de09eec66e2c657f5 100644 --- a/Calorimeter/CaloRec/src/CaloClusterMaker.cxx +++ b/Calorimeter/CaloRec/src/CaloClusterMaker.cxx @@ -47,6 +47,7 @@ CaloClusterMaker::CaloClusterMaker(const std::string& name, ISvcLocator* pSvcLocator) : AthReentrantAlgorithm(name, pSvcLocator) + , m_clusterOutput("") , m_clusterMakerTools(this) , m_clusterCorrectionTools(this) , m_chrono("ChronoStatSvc", name) @@ -55,7 +56,7 @@ CaloClusterMaker::CaloClusterMaker(const std::string& name, { // Name of Cluster Container to be registered in TDS - declareProperty("ClustersOutputName",m_clustersOutputName); + declareProperty("ClustersOutputName",m_clusterOutput); // Name(s) of Cluster Maker Tools declareProperty("ClusterMakerTools",m_clusterMakerTools); @@ -108,9 +109,11 @@ StatusCode CaloClusterMaker::initialize() if (m_chronoTools) { msg(MSG::INFO) << "Will use ChronoStatSvc to monitor ClusterMaker and ClusterCorrection tools" << endmsg; - CHECK( m_chrono.retrieve() ); + ATH_CHECK( m_chrono.retrieve() ); } + ATH_CHECK( m_clusterOutput.initialize() ); + return StatusCode::SUCCESS; } @@ -126,8 +129,8 @@ StatusCode CaloClusterMaker::execute_r (const EventContext& ctx) const { // make a Cluster Container - xAOD::CaloClusterContainer* clusColl=CaloClusterStoreHelper::makeContainer(&(*evtStore()),m_clustersOutputName,msg()); - if (!clusColl) return StatusCode::FAILURE; + SG::WriteHandle<xAOD::CaloClusterContainer> clusColl (m_clusterOutput, ctx); + ATH_CHECK(CaloClusterStoreHelper::AddContainerWriteHandle(&(*evtStore()), clusColl, msg())); ToolHandleArray<CaloClusterCollectionProcessor>::const_iterator toolIt, toolIt_e; //Iterators over Tool handles toolIt=m_clusterMakerTools.begin(); @@ -138,7 +141,7 @@ StatusCode CaloClusterMaker::execute_r (const EventContext& ctx) const for(;toolIt!=toolIt_e;++toolIt) { const std::string chronoName = this->name() + "_" +toolIt->name(); if (m_chronoTools) m_chrono->chronoStart(chronoName); - CHECK((*toolIt)->execute(ctx, clusColl)); + ATH_CHECK((*toolIt)->execute(ctx, clusColl.ptr())); if (m_chronoTools) m_chrono->chronoStop(chronoName); } //End loop over maker tools @@ -162,26 +165,26 @@ StatusCode CaloClusterMaker::execute_r (const EventContext& ctx) const for(;toolIt!=toolIt_e;++toolIt) { const std::string& toolname=(*toolIt).name(); if (m_keep_each_correction) { - const std::string interimContName=m_clustersOutputName + "-pre" +toolname; + const std::string interimContName=m_clusterOutput.key() + "-pre" +toolname; xAOD::CaloClusterContainer* interimCont=CaloClusterStoreHelper::makeContainer(&(*evtStore()),interimContName,msg()); - CaloClusterStoreHelper::copyContainer(clusColl,interimCont); - CHECK(CaloClusterStoreHelper::finalizeClusters(&(*evtStore()),interimCont, interimContName, msg())); + CaloClusterStoreHelper::copyContainer(clusColl.ptr(),interimCont); + ATH_CHECK(CaloClusterStoreHelper::finalizeClusters(&(*evtStore()),interimCont, interimContName, msg())); } ATH_MSG_DEBUG(" Applying correction = " << toolname); const std::string chronoName = this->name() + "_" + toolname; if (m_chronoTools) m_chrono->chronoStart(chronoName); - CHECK((*toolIt)->execute(ctx, clusColl)); + ATH_CHECK((*toolIt)->execute(ctx, clusColl.ptr())); if (m_chronoTools) m_chrono->chronoStop(chronoName); }//End loop over correction tools ATH_MSG_DEBUG("Created cluster container with " << clusColl->size() << " clusters"); - CHECK(CaloClusterStoreHelper::finalizeClusters(&(*evtStore()),clusColl,m_clustersOutputName,msg())); + ATH_CHECK(CaloClusterStoreHelper::finalizeClusters(&(*evtStore()),clusColl.ptr(),m_clusterOutput.key(),msg())); return StatusCode::SUCCESS; } const std::string& CaloClusterMaker::getOutputContainerName() const { - return m_clustersOutputName; + return m_clusterOutput.key(); } diff --git a/Calorimeter/CaloRec/src/CaloClusterMaker.h b/Calorimeter/CaloRec/src/CaloClusterMaker.h index a953c1c53e11a650cc5548cf317a0758e34adb5e..5234190812366006f637399ff6c6b2f3d7153fa1 100644 --- a/Calorimeter/CaloRec/src/CaloClusterMaker.h +++ b/Calorimeter/CaloRec/src/CaloClusterMaker.h @@ -56,7 +56,7 @@ class CaloClusterMaker : public AthReentrantAlgorithm /** @brief the name of the key in StoreGate for the output CaloClusterContainer */ - std::string m_clustersOutputName; + SG::WriteHandleKey<xAOD::CaloClusterContainer> m_clusterOutput; /** * @brief a list of names for tools to make clusters diff --git a/Control/AthContainers/AthContainers/tools/DVLEltBaseInfo.icc b/Control/AthContainers/AthContainers/tools/DVLEltBaseInfo.icc index 7e1ae8efc3c5ccb1cda0753c3ba3ba5e5593832b..fa4f344abf3296f53c2041d53429b95212cb34b1 100644 --- a/Control/AthContainers/AthContainers/tools/DVLEltBaseInfo.icc +++ b/Control/AthContainers/AthContainers/tools/DVLEltBaseInfo.icc @@ -98,7 +98,7 @@ template <class T> RegisterDVLEltBaseInit<T>::RegisterDVLEltBaseInit() { // Make sure the BaseInfo derived class has been instantiated. - SG::BaseInfo<T>::baseinfo(); + SG::BaseInfo<T>::maybeInit(); // Set up the init function. SG::BaseInfoBase::addInit(&typeid(T), doinit); } diff --git a/Control/AthContainers/src/copyAuxStoreThinned.cxx b/Control/AthContainers/src/copyAuxStoreThinned.cxx index d93006a0a3f11f014090283fd1c70984c9284a1d..1112306e93821a0ca046366961146b4c82dcbac4 100644 --- a/Control/AthContainers/src/copyAuxStoreThinned.cxx +++ b/Control/AthContainers/src/copyAuxStoreThinned.cxx @@ -19,6 +19,7 @@ #include "AthContainersInterfaces/IAuxStore.h" #include "AthContainersInterfaces/IAuxStoreIO.h" #include "AthenaKernel/IThinningSvc.h" +#include "CxxUtils/no_sanitize_undefined.h" #include <vector> @@ -35,9 +36,10 @@ namespace SG { * The data from @c orig will be copied to @c copy, with individual * elements removed according to thinning recorded for @c orig in @c svc. */ -void copyAuxStoreThinned (const SG::IConstAuxStore& orig, - SG::IAuxStore& copy, - IThinningSvc* svc) +void copyAuxStoreThinned NO_SANITIZE_UNDEFINED + (const SG::IConstAuxStore& orig, + SG::IAuxStore& copy, + IThinningSvc* svc) { copy.resize(0); size_t size = orig.size(); @@ -80,6 +82,9 @@ void copyAuxStoreThinned (const SG::IConstAuxStore& orig, { const std::type_info* typ = iio->getIOType (auxid); if (strstr (typ->name(), "PackedContainer") != nullptr) { + // This cast gets a warning from the undefined behavior sanitizer + // in gcc6. Done like this deliberately for now, so suppress ubsan + // checking for this function. const PackedParameters& parms = reinterpret_cast<const PackedContainer<int>* > (iio->getIOData (auxid))->parms(); copy.setOption (auxid, AuxDataOption ("nbits", parms.nbits())); diff --git a/Control/AthContainers/test/AuxStoreInternal_test.cxx b/Control/AthContainers/test/AuxStoreInternal_test.cxx index 29a216e35dc806e436087a0014eee481994357df..d29604f330343c68b770af1185feb01bcfc5f804 100644 --- a/Control/AthContainers/test/AuxStoreInternal_test.cxx +++ b/Control/AthContainers/test/AuxStoreInternal_test.cxx @@ -64,7 +64,7 @@ public: void test1() { std::cout << "test1\n"; - SG::AuxStoreInternal s; + AuxStoreInternalTest s; assert (!s.standalone()); SG::auxid_t ityp1 = SG::AuxTypeRegistry::instance().getAuxID<int> ("anInt"); @@ -159,7 +159,7 @@ void test1() assert (s.getIOType(btyp1) == &typeid(std::vector<char>)); assert (s.getAuxIDs().size() == 4); - static_cast<AuxStoreInternalTest*>(&s)->addAuxID (999); + s.addAuxID (999); const SG::auxid_set_t& ids2 = s.getAuxIDs(); assert (ids2.size() == 5); assert (ids2.find (ityp1) != ids2.end()); diff --git a/Control/AthenaServices/src/LoggedMessageSvc.h b/Control/AthenaServices/src/LoggedMessageSvc.h index 1f85039c4f5e44e680d68e14cd759ad90fc13da6..a4a6ea7e663b0297545e5837a08f946fa152bba7 100644 --- a/Control/AthenaServices/src/LoggedMessageSvc.h +++ b/Control/AthenaServices/src/LoggedMessageSvc.h @@ -19,6 +19,7 @@ #include "GaudiKernel/Message.h" #include "GaudiKernel/Property.h" #include "GaudiKernel/IIncidentSvc.h" +#include "AthenaBaseComps/AthService.h" #include "AthenaKernel/ILoggedMessageSvc.h" #include <boost/thread/recursive_mutex.hpp> @@ -36,7 +37,7 @@ class ISvcLocator; // // Author: Charles Leggett // -class LoggedMessageSvc : public extends2<Service, ILoggedMessageSvc, IInactiveMessageCounter> { +class LoggedMessageSvc : public extends2<AthService, ILoggedMessageSvc, IInactiveMessageCounter> { public: typedef std::pair< std::string, std::ostream* > NamedStream; typedef std::multimap< int, NamedStream > StreamMap; diff --git a/Control/AthenaServices/test/AthenaEventLoopMgr_test.cxx b/Control/AthenaServices/test/AthenaEventLoopMgr_test.cxx index 39e531db33478c70983fcb0ac386c31ae1d18fdc..7cb05af71dfb1f397b353b015f1ac4a52b7e7738 100644 --- a/Control/AthenaServices/test/AthenaEventLoopMgr_test.cxx +++ b/Control/AthenaServices/test/AthenaEventLoopMgr_test.cxx @@ -16,6 +16,7 @@ #undef NDEBUG #include "TestTools/initGaudi.h" #include "AthenaBaseComps/AthAlgorithm.h" +#include "AthenaBaseComps/AthService.h" #include "AthenaKernel/errorcheck.h" #include "EventInfo/EventInfo.h" #include "EventInfo/EventID.h" @@ -168,7 +169,7 @@ TestContext::~TestContext() class TestEvtSelector - : public extends<Service, IEvtSelector> + : public extends<AthService, IEvtSelector> { public: TestEvtSelector (const std::string& nam, ISvcLocator* svcLoc); diff --git a/Control/CxxUtils/CxxUtils/no_sanitize_undefined.h b/Control/CxxUtils/CxxUtils/no_sanitize_undefined.h new file mode 100644 index 0000000000000000000000000000000000000000..43dd1c82a23e4fe93b7b53125f6942ab6459be51 --- /dev/null +++ b/Control/CxxUtils/CxxUtils/no_sanitize_undefined.h @@ -0,0 +1,32 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// $Id$ +/** + * @file CxxUtils/no_sanitize_undefined.h + * @author scott snyder <snyder@bnl.gov> + * @date Mar, 2017 + * @brief Helper to disable undefined behavior sanitizer for a function. + * + * To disable the undefined behavior sanitizers for a given function, + * write in the function's declaration: + * + * void f NO_SANITIZE_UNDEFINED (int x) + */ + + +#ifndef CXXUTILS_NO_SANITIZE_UNDEFINED_H +#define CXXUTILS_NO_SANITIZE_UNDEFINED_H + + +#if (__GNUC__ >= 6) && !defined(__clang__) +# define NO_SANITIZE_UNDEFINED [[gnu::no_sanitize_undefined]] +#else +# define NO_SANITIZE_UNDEFINED +#endif + + +#endif // not CXXUTILS_NO_SANITIZE_UNDEFINED_H diff --git a/Control/SGTools/SGTools/BaseInfo.h b/Control/SGTools/SGTools/BaseInfo.h index e3997696a2f4e60bd7f0e41e58a6b30387cad524..9ffe44b311aa8fd4d8988ee57d39ef171ac7d3a8 100755 --- a/Control/SGTools/SGTools/BaseInfo.h +++ b/Control/SGTools/SGTools/BaseInfo.h @@ -873,6 +873,9 @@ public: static const BaseInfoBase& baseinfo (); + static void maybeInit (); + + private: /// Return a reference to the (singleton) implementation object /// for this class. diff --git a/Control/SGTools/SGTools/BaseInfo.icc b/Control/SGTools/SGTools/BaseInfo.icc index ad0df280f296427b66b3b86316e2cc9d00f5a62c..c60567ae1cb8444f399235a2ab7a425143e9f59c 100755 --- a/Control/SGTools/SGTools/BaseInfo.icc +++ b/Control/SGTools/SGTools/BaseInfo.icc @@ -109,7 +109,7 @@ public: void add_base (bool is_virtual) { // Make sure the bib for the base class exists. - (void)BaseInfo<B>::baseinfo(); + BaseInfo<B>::maybeInit(); // Add the information for this base. this->add_info (typeid(B), @@ -468,6 +468,15 @@ const BaseInfoBase& BaseInfo<T>::baseinfo() } +template <class T> +void BaseInfo<T>::maybeInit() +{ + BaseInfoImpl<T>* inst = s_instance.instance; + if (inst) + inst->maybeInit(); +} + + /** * @brief Return a reference to the (singleton) implementation object * for this class. diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx index 812cb145b36f9f0884dd53f1465efb4b5fbac1eb..70d01c1ebda67269f0e4823266bf3098cc36d2d7 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx @@ -189,16 +189,11 @@ StatusCode AthenaPoolCnvSvc::createObj(IOpaqueAddress* pAddress, DataObject*& re if (m_doChronoStat) { m_chronoStatSvc->chronoStart("cObj_" + objName); } - // Save pool input context to be used in setObjPtr for "this" converter - m_contextIds.push_back(*(pAddress->ipar())); - // Forward to base class createObj StatusCode status = ::AthCnvSvc::createObj(pAddress, refpObject); if (m_doChronoStat) { m_chronoStatSvc->chronoStop("cObj_" + objName); } - // Remove pool input context for "this" converter - m_contextIds.pop_back(); return(status); } //______________________________________________________________________________ @@ -740,11 +735,8 @@ void AthenaPoolCnvSvc::setObjPtr(void*& obj, const Token* token) const { m_chronoStatSvc->chronoStop("rAux_ALL"); } } - } else if (!m_inputStreamingTool.empty() && m_inputStreamingTool->isServer()) { - // Reading in Server - m_poolSvc->setObjPtr(obj, token); } else { - m_poolSvc->setObjPtr(obj, token, m_contextIds.back()); + m_poolSvc->setObjPtr(obj, token); } if (m_doChronoStat) { m_chronoStatSvc->chronoStop("cObjR_ALL"); diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h index 372229ae9c5daa45d30b17f2be55a4e7901abb9c..518f2d87772ac4b81e2b6a4555b20647caccb716 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h @@ -248,9 +248,6 @@ private: // properties /// bool to activate the chrono stats, depending on the m_skipFirstChronoCommit data member bool m_doChronoStat; - /// pool connection context - std::vector<unsigned long> m_contextIds; - typedef std::recursive_mutex CallMutex; mutable CallMutex m_i_mut; mutable CallMutex m_o_mut; diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolConverter.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolConverter.cxx index 69541c997b0f55f62727ae55748f354d7cb3769e..29d58b77e9ea05492a6c48650776d06813cf019f 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolConverter.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolConverter.cxx @@ -61,6 +61,15 @@ StatusCode AthenaPoolConverter::createObj(IOpaqueAddress* pAddr, DataObject*& pO } else { m_i_poolToken = tokAddr->getToken(); } + if (m_i_poolToken != nullptr) { + char text[32]; + if (*(pAddr->ipar()) != IPoolSvc::kInputStream) { +// Use ipar field of GenericAddress to create custom input context/persSvc in PoolSvc::setObjPtr() (e.g. for conditions) + ::sprintf(text, "[CTXT=%08X]", static_cast<int>(*(pAddr->ipar()))); +// Or use context label, e.g.: ::sprintf(text, "[CLABEL=%08X]", pAddr->clID()); to create persSvc + const_cast<Token*>(m_i_poolToken)->setAuxString(text); + } + } try { if (!PoolToDataObject(pObj, m_i_poolToken).isSuccess()) { ATH_MSG_ERROR("createObj PoolToDataObject() failed, Token = " << (m_i_poolToken ? m_i_poolToken->toString() : "NULL")); diff --git a/Database/AthenaPOOL/PoolSvc/PoolSvc/IPoolSvc.h b/Database/AthenaPOOL/PoolSvc/PoolSvc/IPoolSvc.h index 921b5c7aa0dfba164e6930bdee7e4fc0fd9aebd1..ec9d1f66b204841da79873cd769e4d239fff96b7 100644 --- a/Database/AthenaPOOL/PoolSvc/PoolSvc/IPoolSvc.h +++ b/Database/AthenaPOOL/PoolSvc/PoolSvc/IPoolSvc.h @@ -55,15 +55,12 @@ public: // Non-static members /// @return void /// @param obj [OUT] pointer to the Data Object. /// @param token [IN] token of the Data Object for which a Pool Ref is filled. - /// @param contextId [IN] id for PoolSvc persistency service to use for input. - virtual void setObjPtr(void*& obj, - const Token* token, - unsigned long contextId = IPoolSvc::kInputStream) const = 0; + virtual void setObjPtr(void*& obj, const Token* token) const = 0; /// @return an Id for an input context (POOL persistency service) and create it if needed. /// @param label [IN] string label to name new context and allow sharing (returns existing contextId) /// @param maxFile [IN] maximum number of open input files. - virtual unsigned long getInputContext(const std::string& label, unsigned int maxFile = 0) = 0; + virtual unsigned int getInputContext(const std::string& label, unsigned int maxFile = 0) = 0; /// @return the context. virtual const coral::Context* context() const = 0; @@ -96,7 +93,7 @@ public: // Non-static members const std::string& connection, const std::string& collectionName, const pool::ICollection::OpenMode& openMode = pool::ICollection::READ, - unsigned long contextId = IPoolSvc::kInputStream) const = 0; + unsigned int contextId = IPoolSvc::kInputStream) const = 0; /// @return void /// @param c [IN] collection to be registered @@ -118,34 +115,34 @@ public: // Non-static members /// Connect to a logical database unit; PersistencySvc is chosen according to transaction type (accessmode). virtual StatusCode connect(pool::ITransaction::Type type, - unsigned long stream = IPoolSvc::kInputStream) const = 0; + unsigned int contextId = IPoolSvc::kInputStream) const = 0; /// Commit data for a given stream and flush buffer. /// @param stream [IN] poolStream to be commited. - virtual StatusCode commit(unsigned long stream = IPoolSvc::kInputStream) const = 0; + virtual StatusCode commit(unsigned int contextId = IPoolSvc::kInputStream) const = 0; /// Commit data for a given stream and hold buffer. /// @param stream [IN] poolStream to be commited. - virtual StatusCode commitAndHold(unsigned long stream = IPoolSvc::kInputStream) const = 0; + virtual StatusCode commitAndHold(unsigned int contextId = IPoolSvc::kInputStream) const = 0; /// Disconnect PersistencySvc associated with a stream. /// @param stream [IN] poolStream to be disconnected. - virtual StatusCode disconnect(unsigned long stream = IPoolSvc::kInputStream) const = 0; + virtual StatusCode disconnect(unsigned int contextId = IPoolSvc::kInputStream) const = 0; /// Disconnect single Database. /// @param connection [IN] connection string for Database to be disconnected. /// @param contextId [IN] context id of database to be disconnected. virtual StatusCode disconnectDb(const std::string& connection, - unsigned long contextId = IPoolSvc::kInputStream) const = 0; + unsigned int contextId = IPoolSvc::kInputStream) const = 0; /// Get POOL FileSize attribute for database without logging a message - virtual long long int getFileSize(const std::string& dbName, long tech, unsigned long contextId) const = 0; + virtual long long int getFileSize(const std::string& dbName, long tech, unsigned int contextId) const = 0; /// Get POOL attributes - domain virtual StatusCode getAttribute(const std::string& optName, std::string& data, long tech, - unsigned long contextId = IPoolSvc::kInputStream) const = 0; + unsigned int contextId = IPoolSvc::kInputStream) const = 0; /// Get POOL attributes - db/file, container/collection virtual StatusCode getAttribute(const std::string& optName, @@ -153,13 +150,13 @@ public: // Non-static members long tech, const std::string& dbName, const std::string& contName = "", - unsigned long contextId = IPoolSvc::kInputStream) const = 0; + unsigned int contextId = IPoolSvc::kInputStream) const = 0; /// Set POOL attributes - domain virtual StatusCode setAttribute(const std::string& optName, const std::string& data, long tech, - unsigned long contextId = IPoolSvc::kOutputStream) const = 0; + unsigned int contextId = IPoolSvc::kOutputStream) const = 0; /// Set POOL attributes - db/file, container/collection virtual StatusCode setAttribute(const std::string& optName, @@ -167,7 +164,7 @@ public: // Non-static members long tech, const std::string& dbName, const std::string& contName = "", - unsigned long contextId = IPoolSvc::kOutputStream) const = 0; + unsigned int contextId = IPoolSvc::kOutputStream) const = 0; /// Setup Frontier cache for given logical or physical connection name virtual StatusCode setFrontierCache(const std::string& conn) const = 0; diff --git a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx index 24c1f194f0f4b480d0896491b7d2f3f283a45325..5a908df58df5df506f8a651e3d3487880448fdae 100644 --- a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx +++ b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx @@ -248,7 +248,11 @@ StatusCode PoolSvc::setupPersistencySvc() { return(StatusCode::FAILURE); } m_pers_mut.push_back(new CallMutex); - m_contextMaxFile.insert(std::pair<unsigned long, int>(IPoolSvc::kInputStream, m_dbAgeLimit)); + if (!m_persistencySvcVec[IPoolSvc::kInputStream]->session().technologySpecificAttributes(pool::ROOT_StorageType.type()).setAttribute<bool>("MultiThreaded", true)) { + ATH_MSG_FATAL("Failed to enable multithreaded ROOT via PersistencySvc."); + return(StatusCode::FAILURE); + } + m_contextMaxFile.insert(std::pair<unsigned int, int>(IPoolSvc::kInputStream, m_dbAgeLimit)); if (!connect(pool::ITransaction::READ).isSuccess()) { ATH_MSG_FATAL("Failed to connect Input PersistencySvc."); return(StatusCode::FAILURE); @@ -271,7 +275,7 @@ StatusCode PoolSvc::setupPersistencySvc() { //__________________________________________________________________________ StatusCode PoolSvc::stop() { - unsigned long contextId = 0; + unsigned int contextId = 0; bool retError = false; for (std::vector<pool::IPersistencySvc*>::const_iterator iter = m_persistencySvcVec.begin(), last = m_persistencySvcVec.end(); iter != last; iter++, contextId++) { @@ -284,7 +288,7 @@ StatusCode PoolSvc::stop() { } //__________________________________________________________________________ StatusCode PoolSvc::finalize() { - unsigned long contextId = 0; + unsigned int contextId = 0; for (std::vector<pool::IPersistencySvc*>::const_iterator iter = m_persistencySvcVec.begin(), last = m_persistencySvcVec.end(); iter != last; iter++, contextId++) { delete *iter; @@ -337,14 +341,23 @@ const Token* PoolSvc::registerForWrite(const Placement* placement, return(token); } //__________________________________________________________________________ -void PoolSvc::setObjPtr(void*& obj, const Token* token, unsigned long contextId) const { - if (contextId >= m_persistencySvcVec.size()) { - contextId = IPoolSvc::kInputStream; +void PoolSvc::setObjPtr(void*& obj, const Token* token) const { + unsigned int contextId = IPoolSvc::kInputStream; + const std::string& auxString = token->auxString(); + if (!auxString.empty()) { + if (auxString.substr(0, 6) == "[CTXT=") { + ::sscanf(auxString.c_str(), "[CTXT=%08X]", &contextId); + } else if (auxString.substr(0, 8) == "[CLABEL=") { + contextId = const_cast<PoolSvc*>(this)->getInputContext(auxString); + } + if (contextId >= m_persistencySvcVec.size()) { + contextId = IPoolSvc::kInputStream; + } } - std::lock_guard<CallMutex> dummy(m_pool_mut); // FIXME, PvG: Don't know why we need this, DataHeader? + // Get Context ID/label from Token std::lock_guard<CallMutex> lock(*m_pers_mut[contextId]); obj = m_persistencySvcVec[contextId]->readObject(*token, obj); - std::map<unsigned long, unsigned int>::const_iterator maxFileIter = m_contextMaxFile.find(contextId); + std::map<unsigned int, unsigned int>::const_iterator maxFileIter = m_contextMaxFile.find(contextId); if (maxFileIter != m_contextMaxFile.end() && maxFileIter->second > 0) { m_guidLists[contextId].remove(token->dbID()); m_guidLists[contextId].push_back(token->dbID()); @@ -354,10 +367,10 @@ void PoolSvc::setObjPtr(void*& obj, const Token* token, unsigned long contextId) } } //__________________________________________________________________________ -unsigned long PoolSvc::getInputContext(const std::string& label, unsigned int maxFile) { +unsigned int PoolSvc::getInputContext(const std::string& label, unsigned int maxFile) { std::lock_guard<CallMutex> lock(m_pool_mut); if (!label.empty()) { - std::map<std::string, unsigned long>::const_iterator contextIter = m_contextLabel.find(label); + std::map<std::string, unsigned int>::const_iterator contextIter = m_contextLabel.find(label); if (contextIter != m_contextLabel.end()) { if (maxFile > 0) { m_contextMaxFile[contextIter->second] = maxFile; @@ -370,7 +383,7 @@ unsigned long PoolSvc::getInputContext(const std::string& label, unsigned int ma ATH_MSG_ERROR("Failed to create PersistencySvcFactory."); return(IPoolSvc::kInputStream); } - const unsigned long id = m_persistencySvcVec.size(); + const unsigned int id = m_persistencySvcVec.size(); m_persistencySvcVec.push_back(psfactory->create("PersistencySvc", *m_catalog)); if (m_persistencySvcVec[id] == nullptr) { ATH_MSG_ERROR("Failed to create Input PersistencySvc."); @@ -382,9 +395,9 @@ unsigned long PoolSvc::getInputContext(const std::string& label, unsigned int ma return(IPoolSvc::kInputStream); } if (!label.empty()) { - m_contextLabel.insert(std::pair<std::string, unsigned long>(label, id)); + m_contextLabel.insert(std::pair<std::string, unsigned int>(label, id)); } - m_contextMaxFile.insert(std::pair<unsigned long, int>(id, maxFile)); + m_contextMaxFile.insert(std::pair<unsigned int, int>(id, maxFile)); return(id); } //__________________________________________________________________________ @@ -441,7 +454,7 @@ pool::ICollection* PoolSvc::createCollection(const std::string& collectionType, const std::string& connection, const std::string& collectionName, const pool::ICollection::OpenMode& openMode, - unsigned long contextId) const { + unsigned int contextId) const { std::string collection(collectionName); if (collectionType == "RootCollection") { if (collectionName.find("PFN:") == std::string::npos @@ -486,7 +499,7 @@ pool::ICollection* PoolSvc::createCollection(const std::string& collectionType, if (dbH->openMode() == pool::IDatabase::CLOSED) { dbH->connectForRead(); } - std::map<unsigned long, unsigned int>::const_iterator maxFileIter = m_contextMaxFile.find(contextId); + std::map<unsigned int, unsigned int>::const_iterator maxFileIter = m_contextMaxFile.find(contextId); if (maxFileIter != m_contextMaxFile.end() && maxFileIter->second > 0 && !dbH->fid().empty()) { const Guid guid(dbH->fid()); m_guidLists[contextId].remove(guid); @@ -619,7 +632,7 @@ bool PoolSvc::testDictionary(const std::string& className) const { return(true); } //__________________________________________________________________________ -StatusCode PoolSvc::connect(pool::ITransaction::Type type, unsigned long contextId) const { +StatusCode PoolSvc::connect(pool::ITransaction::Type type, unsigned int contextId) const { if (type != pool::ITransaction::READ) { contextId = IPoolSvc::kOutputStream; } @@ -640,11 +653,10 @@ StatusCode PoolSvc::connect(pool::ITransaction::Type type, unsigned long context return(StatusCode::SUCCESS); } //__________________________________________________________________________ -StatusCode PoolSvc::commit(unsigned long contextId) const { +StatusCode PoolSvc::commit(unsigned int contextId) const { if (contextId >= m_persistencySvcVec.size()) { return(StatusCode::FAILURE); } - std::lock_guard<CallMutex> dummy(m_pool_mut); std::lock_guard<CallMutex> lock(*m_pers_mut[contextId]); pool::IPersistencySvc* persSvc = m_persistencySvcVec[contextId]; if (persSvc != nullptr && persSvc->session().transaction().isActive()) { @@ -661,11 +673,10 @@ StatusCode PoolSvc::commit(unsigned long contextId) const { return(StatusCode::SUCCESS); } //__________________________________________________________________________ -StatusCode PoolSvc::commitAndHold(unsigned long contextId) const { +StatusCode PoolSvc::commitAndHold(unsigned int contextId) const { if (contextId >= m_persistencySvcVec.size()) { return(StatusCode::FAILURE); } - std::lock_guard<CallMutex> dummy(m_pool_mut); std::lock_guard<CallMutex> lock(*m_pers_mut[contextId]); pool::IPersistencySvc* persSvc = m_persistencySvcVec[contextId]; if (persSvc->session().transaction().isActive()) { @@ -677,7 +688,7 @@ StatusCode PoolSvc::commitAndHold(unsigned long contextId) const { return(StatusCode::SUCCESS); } //__________________________________________________________________________ -StatusCode PoolSvc::disconnect(unsigned long contextId) const { +StatusCode PoolSvc::disconnect(unsigned int contextId) const { if (contextId >= m_persistencySvcVec.size()) { return(StatusCode::SUCCESS); } @@ -693,7 +704,7 @@ StatusCode PoolSvc::disconnect(unsigned long contextId) const { return(StatusCode::SUCCESS); } //__________________________________________________________________________ -StatusCode PoolSvc::disconnectDb(const std::string& connection, unsigned long contextId) const { +StatusCode PoolSvc::disconnectDb(const std::string& connection, unsigned int contextId) const { if (contextId >= m_persistencySvcVec.size()) { return(StatusCode::SUCCESS); } @@ -705,7 +716,7 @@ StatusCode PoolSvc::disconnectDb(const std::string& connection, unsigned long co delete dbH; dbH = nullptr; return(StatusCode::FAILURE); } - std::map<unsigned long, unsigned int>::const_iterator maxFileIter = m_contextMaxFile.find(contextId); + std::map<unsigned int, unsigned int>::const_iterator maxFileIter = m_contextMaxFile.find(contextId); if (maxFileIter != m_contextMaxFile.end() && maxFileIter->second > 0) { const Guid guid(dbH->fid()); m_guidLists[contextId].remove(guid); @@ -716,7 +727,7 @@ StatusCode PoolSvc::disconnectDb(const std::string& connection, unsigned long co return(StatusCode::SUCCESS); } //_______________________________________________________________________ -long long int PoolSvc::getFileSize(const std::string& dbName, long tech, unsigned long contextId) const { +long long int PoolSvc::getFileSize(const std::string& dbName, long tech, unsigned int contextId) const { pool::ISession* sesH = nullptr; pool::IDatabase* dbH = nullptr; if (!getSessionDbHandles(sesH, dbH, contextId, dbName).isSuccess()) { @@ -740,24 +751,20 @@ long long int PoolSvc::getFileSize(const std::string& dbName, long tech, unsigne StatusCode PoolSvc::getAttribute(const std::string& optName, std::string& data, long tech, - unsigned long contextId) const { + unsigned int contextId) const { if (contextId >= m_persistencySvcVec.size()) { contextId = IPoolSvc::kInputStream; } - pool::ISession* sesH = &m_persistencySvcVec[contextId]->session(); - if (sesH == nullptr) { - ATH_MSG_DEBUG("Failed to get SessionHandle for context " << contextId << " to get POOL property."); - return(StatusCode::FAILURE); - } + pool::ISession& sesH = m_persistencySvcVec[contextId]->session(); std::ostringstream oss; if (data == "DbLonglong") { - long long int value = sesH->technologySpecificAttributes(tech).attribute<long long int>(optName); + long long int value = sesH.technologySpecificAttributes(tech).attribute<long long int>(optName); oss << std::dec << value; } else if (data == "double") { - double value = sesH->technologySpecificAttributes(tech).attribute<double>(optName); + double value = sesH.technologySpecificAttributes(tech).attribute<double>(optName); oss << std::dec << value; } else { - int value = sesH->technologySpecificAttributes(tech).attribute<int>(optName); + int value = sesH.technologySpecificAttributes(tech).attribute<int>(optName); oss << std::dec << value; } data = oss.str(); @@ -770,7 +777,7 @@ StatusCode PoolSvc::getAttribute(const std::string& optName, long tech, const std::string& dbName, const std::string& contName, - unsigned long contextId) const { + unsigned int contextId) const { pool::ISession* sesH = nullptr; pool::IDatabase* dbH = nullptr; if (!getSessionDbHandles(sesH, dbH, contextId, dbName).isSuccess()) { @@ -832,24 +839,20 @@ StatusCode PoolSvc::getAttribute(const std::string& optName, StatusCode PoolSvc::setAttribute(const std::string& optName, const std::string& data, long tech, - unsigned long contextId) const { + unsigned int contextId) const { if (contextId >= m_persistencySvcVec.size()) { contextId = IPoolSvc::kOutputStream; } - pool::ISession* sesH = &m_persistencySvcVec[contextId]->session(); - if (sesH == nullptr) { - ATH_MSG_DEBUG("Failed to get SessionHandle to set POOL property."); - return(StatusCode::FAILURE); - } + pool::ISession& sesH = m_persistencySvcVec[contextId]->session(); if (data[data.size() - 1] == 'L') { long long int value = atoll(data.c_str()); - if (!sesH->technologySpecificAttributes(tech).setAttribute<long long int>(optName, value)) { + if (!sesH.technologySpecificAttributes(tech).setAttribute<long long int>(optName, value)) { ATH_MSG_DEBUG("Failed to set POOL property, " << optName << " to " << data); return(StatusCode::FAILURE); } } else { int value = atoi(data.c_str()); - if (!sesH->technologySpecificAttributes(tech).setAttribute<int>(optName, value)) { + if (!sesH.technologySpecificAttributes(tech).setAttribute<int>(optName, value)) { ATH_MSG_DEBUG("Failed to set POOL property, " << optName << " to " << data); return(StatusCode::FAILURE); } @@ -862,7 +865,7 @@ StatusCode PoolSvc::setAttribute(const std::string& optName, long tech, const std::string& dbName, const std::string& contName, - unsigned long contextId) const { + unsigned int contextId) const { std::lock_guard<CallMutex> lock(m_pool_mut); pool::ISession* sesH = nullptr; pool::IDatabase* dbH = nullptr; @@ -1062,7 +1065,7 @@ PoolSvc::~PoolSvc() { //__________________________________________________________________________ StatusCode PoolSvc::getSessionDbHandles(pool::ISession*& sesH, pool::IDatabase*& dbH, - unsigned long contextId, + unsigned int contextId, const std::string& dbName) const { if (contextId >= m_persistencySvcVec.size()) { contextId = IPoolSvc::kInputStream; diff --git a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h index 11451d201024e405dc3f50d5e2a9c582b5aef83b..48f57fbb8e2d896117d802ba2ec59a09eace9ed8 100644 --- a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h +++ b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h @@ -64,15 +64,12 @@ public: // Non-static members /// @return void /// @param obj [OUT] pointer to the Data Object. /// @param token [IN] token of the Data Object for which a Pool Ref is filled. - /// @param contextId [IN] id for PoolSvc persistency service to use for input. - void setObjPtr(void*& obj, - const Token* token, - unsigned long contextId = IPoolSvc::kInputStream) const; + void setObjPtr(void*& obj, const Token* token) const; /// @return an Id for an input context (POOL persistency service) and create it if needed. /// @param label [IN] string label to name new context and allow sharing (returns existing contextId) /// @param maxFile [IN] maximum number of open input files. - unsigned long getInputContext(const std::string& label, unsigned int maxFile = 0); + unsigned int getInputContext(const std::string& label, unsigned int maxFile = 0); /// @return the context. const coral::Context* context() const; @@ -105,7 +102,7 @@ public: // Non-static members const std::string& connection, const std::string& collectionName, const pool::ICollection::OpenMode& openMode = pool::ICollection::READ, - unsigned long contextId = IPoolSvc::kInputStream) const; + unsigned int contextId = IPoolSvc::kInputStream) const; /// @return void /// @param c [IN] collection to be registered @@ -127,34 +124,34 @@ public: // Non-static members /// Connect to a logical database unit; PersistencySvc is chosen according to transaction type (accessmode). StatusCode connect(pool::ITransaction::Type type, - unsigned long contextId = IPoolSvc::kInputStream) const; + unsigned int contextId = IPoolSvc::kInputStream) const; /// Commit data for a given contextId and flush buffer. /// @param contextId [IN] poolStream to be commited. - StatusCode commit(unsigned long contextId = IPoolSvc::kInputStream) const; + StatusCode commit(unsigned int contextId = IPoolSvc::kInputStream) const; /// Commit data for a given contextId and hold buffer. /// @param contextId [IN] poolStream to be commited. - StatusCode commitAndHold(unsigned long contextId = IPoolSvc::kInputStream) const; + StatusCode commitAndHold(unsigned int contextId = IPoolSvc::kInputStream) const; /// Disconnect PersistencySvc associated with a contextId. /// @param contextId [IN] poolStream to be disconnected. - StatusCode disconnect(unsigned long contextId = IPoolSvc::kInputStream) const; + StatusCode disconnect(unsigned int contextId = IPoolSvc::kInputStream) const; /// Disconnect single Database. /// @param connection [IN] connection string for Database to be disconnected. /// @param contextId [IN] context id of database to be disconnected. StatusCode disconnectDb(const std::string& connection, - unsigned long contextId = IPoolSvc::kInputStream) const; + unsigned int contextId = IPoolSvc::kInputStream) const; /// Get POOL FileSize attribute for database without logging a message - long long int getFileSize(const std::string& dbName, long tech, unsigned long contextId) const; + long long int getFileSize(const std::string& dbName, long tech, unsigned int contextId) const; /// Get POOL attributes - domain StatusCode getAttribute(const std::string& optName, std::string& data, long tech, - unsigned long contextId = IPoolSvc::kInputStream) const; + unsigned int contextId = IPoolSvc::kInputStream) const; /// Get POOL attributes - db/file, container/collection StatusCode getAttribute(const std::string& optName, @@ -162,13 +159,13 @@ public: // Non-static members long tech, const std::string& dbName, const std::string& contName = "", - unsigned long contextId = IPoolSvc::kInputStream) const; + unsigned int contextId = IPoolSvc::kInputStream) const; /// Set POOL attributes - domain StatusCode setAttribute(const std::string& optName, const std::string& data, long tech, - unsigned long contextId = IPoolSvc::kOutputStream) const; + unsigned int contextId = IPoolSvc::kOutputStream) const; /// Set POOL attributes - db/file, container/collection StatusCode setAttribute(const std::string& optName, @@ -176,7 +173,7 @@ public: // Non-static members long tech, const std::string& dbName, const std::string& contName = "", - unsigned long contextId = IPoolSvc::kOutputStream) const; + unsigned int contextId = IPoolSvc::kOutputStream) const; /// Setup Frontier cache for given logical or physical connection name StatusCode setFrontierCache(const std::string& conn) const; @@ -195,9 +192,9 @@ private: // data ServiceHandle<IAthenaSealSvc> m_athenaSealSvc; std::vector<pool::IPersistencySvc*> m_persistencySvcVec; mutable std::vector<CallMutex*> m_pers_mut; - std::map<std::string, unsigned long> m_contextLabel; - std::map<unsigned long, unsigned int> m_contextMaxFile; - mutable std::map<unsigned long, std::list<Guid> > m_guidLists; + std::map<std::string, unsigned int> m_contextLabel; + std::map<unsigned int, unsigned int> m_contextMaxFile; + mutable std::map<unsigned int, std::list<Guid> > m_guidLists; mutable std::map<std::string, std::vector<std::string> > m_containersMap; private: // properties @@ -238,7 +235,7 @@ private: // internal helper functions /// Get Session and Database handles StatusCode getSessionDbHandles(pool::ISession*& sesH, pool::IDatabase*& dbH, - unsigned long contextId, + unsigned int contextId, const std::string& dbName) const; /// Get Container handle StatusCode getContainerHandle(pool::IDatabase* dbH, diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/CMakeLists.txt b/DetectorDescription/GeoModel/GeoSpecialShapes/CMakeLists.txt index c78cf8a3e626c84e766b0d7b854d734fbe36c9c5..178b14395f78efc2b81d68ade59a233cd0715ea1 100644 --- a/DetectorDescription/GeoModel/GeoSpecialShapes/CMakeLists.txt +++ b/DetectorDescription/GeoModel/GeoSpecialShapes/CMakeLists.txt @@ -42,3 +42,9 @@ atlas_add_dictionary( LArGeoCheckerDict INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} ${GSL_LIBRARIES} ${CLHEP_LIBRARIES} SGTools StoreGateLib SGtests GeoModelKernel AthenaKernel CxxUtils GeoModelUtilities GaudiKernel GeoSpecialShapes ) +atlas_add_dictionary( LArWheelEnums + GeoSpecialShapes/LArWheelCalculatorEnums.h + GeoSpecialShapes/selectionEnums.xml + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} ${GSL_LIBRARIES} ${CLHEP_LIBRARIES} SGTools StoreGateLib SGtests GeoModelKernel AthenaKernel CxxUtils GeoModelUtilities GaudiKernel GeoSpecialShapes ) + diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/LArCustomShape.h b/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/LArCustomShape.h index d440aeac024090864779ae007235bc7ba3d7258d..a027b48abfd9601ceaf2b6138a6dd9399ce895b3 100644 --- a/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/LArCustomShape.h +++ b/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/LArCustomShape.h @@ -14,6 +14,7 @@ #include "GeoModelKernel/GeoShape.h" #include "GeoSpecialShapes/LArWheelCalculator.h" +#include "GeoSpecialShapes/LArWheelCalculatorEnums.h" // Forward declaration @@ -23,7 +24,7 @@ class GeoShapeAction; class LArCustomShape : public GeoShape { public: typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t; - typedef std::pair<LArWheelCalculator::LArWheelCalculator_t, int> CalcDef_t; + typedef std::pair<LArG4::LArWheelCalculator_t, int> CalcDef_t; typedef std::map<std::string, CalcDef_t> ShapeCalc_typemap; // The custom shape has only one property: a string that contains diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/LArWheelCalculator.h b/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/LArWheelCalculator.h index a8223046e4ca4d6b6e2ce4f36b62e8b0a481ec85..88e0c34d9763645fed058439865776330b4dccfd 100644 --- a/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/LArWheelCalculator.h +++ b/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/LArWheelCalculator.h @@ -14,6 +14,8 @@ #include "CLHEP/Vector/ThreeVector.h" #include "SGTools/CLASS_DEF.h" +#include "GeoSpecialShapes/LArWheelCalculatorEnums.h" + #define LARWC_SINCOS_POLY 5 #define LARWC_DTNF_NEW @@ -42,33 +44,20 @@ class LArWheelCalculator template <typename SaggingType> friend class LArWheelCalculator_Impl::DistanceToTheNeutralFibre_OfFan; public: - typedef enum { - InnerAbsorberWheel, OuterAbsorberWheel, - InnerElectrodWheel, OuterElectrodWheel, - InnerAbsorberModule, OuterAbsorberModule, - InnerElectrodModule, OuterElectrodModule, - BackInnerBarretteWheel, BackOuterBarretteWheel, - BackInnerBarretteWheelCalib, BackOuterBarretteWheelCalib, - BackInnerBarretteModule, BackOuterBarretteModule, - BackInnerBarretteModuleCalib, BackOuterBarretteModuleCalib, - InnerGlueWheel, OuterGlueWheel, - InnerLeadWheel, OuterLeadWheel - } LArWheelCalculator_t; - - LArWheelCalculator(LArWheelCalculator_t a_wheelType, int zside = 1); + LArWheelCalculator(LArG4::LArWheelCalculator_t a_wheelType, int zside = 1); virtual ~LArWheelCalculator(); LArWheelCalculator (const LArWheelCalculator&) = delete; LArWheelCalculator& operator= (const LArWheelCalculator&) = delete; - static const char *LArWheelCalculatorTypeString(LArWheelCalculator_t); - static double GetFanHalfThickness(LArWheelCalculator_t); + static const char *LArWheelCalculatorTypeString(LArG4::LArWheelCalculator_t); + static double GetFanHalfThickness(LArG4::LArWheelCalculator_t); // "Get constant" methods: double GetWheelThickness(void) const { return m_WheelThickness; } double GetdWRPtoFrontFace(void) const { return m_dWRPtoFrontFace; } double GetStraightStartSection(void) const { return m_StraightStartSection; } - virtual LArWheelCalculator_t type() const { return m_type; } + virtual LArG4::LArWheelCalculator_t type() const { return m_type; } // "zShift" is the z-distance (cm) that the EM endcap is shifted // (due to cabling, etc.) int GetAtlasZside() const { return m_AtlasZside; } @@ -117,7 +106,7 @@ class LArWheelCalculator double AmplitudeOfSurface(const CLHEP::Hep3Vector& P, int side, int fan_number) const; private: - LArWheelCalculator_t m_type; + LArG4::LArWheelCalculator_t m_type; int m_AtlasZside; bool m_SaggingOn; // ! diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/LArWheelCalculatorEnums.h b/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/LArWheelCalculatorEnums.h new file mode 100644 index 0000000000000000000000000000000000000000..a565e53c9753e0701d372e010fd91313dea44ab0 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/LArWheelCalculatorEnums.h @@ -0,0 +1,25 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GEOSPECIALSHAPES_LARWHEELCALCULATORENUMS_H +#define GEOSPECIALSHAPES_LARWHEELCALCULATORENUMS_H + +namespace LArG4 { + + enum LArWheelCalculator_t { + InnerAbsorberWheel, OuterAbsorberWheel, + InnerElectrodWheel, OuterElectrodWheel, + InnerAbsorberModule, OuterAbsorberModule, + InnerElectrodModule, OuterElectrodModule, + BackInnerBarretteWheel, BackOuterBarretteWheel, + BackInnerBarretteWheelCalib, BackOuterBarretteWheelCalib, + BackInnerBarretteModule, BackOuterBarretteModule, + BackInnerBarretteModuleCalib, BackOuterBarretteModuleCalib, + InnerGlueWheel, OuterGlueWheel, + InnerLeadWheel, OuterLeadWheel + }; + + struct ROOT6_NamespaceAutoloadHook_WheelCalc{}; +} +#endif diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/selectionEnums.xml b/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/selectionEnums.xml new file mode 100644 index 0000000000000000000000000000000000000000..c9d830fd654527e8305ae45d98358fca908157b4 --- /dev/null +++ b/DetectorDescription/GeoModel/GeoSpecialShapes/GeoSpecialShapes/selectionEnums.xml @@ -0,0 +1,8 @@ +<lcgdict> + + <enum pattern="LArG4::*"/> + <variable pattern="LArG4::*"/> + <class name="LArG4::ROOT6_NamespaceAutoloadHook_WheelCalc" /> + +</lcgdict> + diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/cmt/requirements b/DetectorDescription/GeoModel/GeoSpecialShapes/cmt/requirements index 0bfc3ede3dd9700f13286d35530ee445416c1581..c6bfb396cd88d9f8729cd804b03cc77496634c03 100755 --- a/DetectorDescription/GeoModel/GeoSpecialShapes/cmt/requirements +++ b/DetectorDescription/GeoModel/GeoSpecialShapes/cmt/requirements @@ -32,4 +32,5 @@ apply_tag ROOTMathLibs # Make dict for LArGeoChecker use AtlasReflex AtlasReflex-* External -no_auto_imports apply_pattern lcgdict dict=LArGeoChecker selectionfile=selection.xml headerfiles="../GeoSpecialShapes/LArGeoCheckerDict.h" +apply_pattern lcgdict dict=LArWheelEnums selectionfile=selectionEnums.xml headerfiles="../GeoSpecialShapes/LArWheelCalculatorEnums.h" diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArCustomShape.cxx b/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArCustomShape.cxx index a7d23228bb55cfacb53b4fc4da87d50e5fb9284c..a59d6a08f0055e6da9b96a449a3ed6e47d11b5d0 100644 --- a/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArCustomShape.cxx +++ b/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArCustomShape.cxx @@ -13,53 +13,53 @@ const std::string LArCustomShape::s_classType = "CustomShape"; const ShapeType LArCustomShape::s_classTypeID = 500; const LArCustomShape::ShapeCalc_typemap LArCustomShape::s_calculatorTypes = { - { "LAr::EMEC::InnerWheel::Absorber", {LArWheelCalculator::InnerAbsorberWheel, 1} }, - { "LAr::EMEC::Pos::InnerWheel::Absorber", {LArWheelCalculator::InnerAbsorberWheel, 1} }, + { "LAr::EMEC::InnerWheel::Absorber", {LArG4::InnerAbsorberWheel, 1} }, + { "LAr::EMEC::Pos::InnerWheel::Absorber", {LArG4::InnerAbsorberWheel, 1} }, - { "LAr::EMEC::OuterWheel::Absorber", {LArWheelCalculator::OuterAbsorberWheel, 1} }, - { "LAr::EMEC::Pos::OuterWheel::Absorber", {LArWheelCalculator::OuterAbsorberWheel, 1} }, + { "LAr::EMEC::OuterWheel::Absorber", {LArG4::OuterAbsorberWheel, 1} }, + { "LAr::EMEC::Pos::OuterWheel::Absorber", {LArG4::OuterAbsorberWheel, 1} }, - { "LAr::EMEC::InnerWheel::Electrode", {LArWheelCalculator::InnerElectrodWheel, 1} }, - { "LAr::EMEC::Pos::InnerWheel::Electrode", {LArWheelCalculator::InnerElectrodWheel, 1} }, + { "LAr::EMEC::InnerWheel::Electrode", {LArG4::InnerElectrodWheel, 1} }, + { "LAr::EMEC::Pos::InnerWheel::Electrode", {LArG4::InnerElectrodWheel, 1} }, - { "LAr::EMEC::OuterWheel::Electrode", {LArWheelCalculator::OuterElectrodWheel, 1} }, - { "LAr::EMEC::Pos::OuterWheel::Electrode", {LArWheelCalculator::OuterElectrodWheel, 1} }, + { "LAr::EMEC::OuterWheel::Electrode", {LArG4::OuterElectrodWheel, 1} }, + { "LAr::EMEC::Pos::OuterWheel::Electrode", {LArG4::OuterElectrodWheel, 1} }, - { "LAr::EMEC::Neg::InnerWheel::Absorber", {LArWheelCalculator::InnerAbsorberWheel, -1} }, + { "LAr::EMEC::Neg::InnerWheel::Absorber", {LArG4::InnerAbsorberWheel, -1} }, - { "LAr::EMEC::Neg::OuterWheel::Absorber", {LArWheelCalculator::OuterAbsorberWheel, -1} }, + { "LAr::EMEC::Neg::OuterWheel::Absorber", {LArG4::OuterAbsorberWheel, -1} }, - { "LAr::EMEC::Neg::InnerWheel::Electrode", {LArWheelCalculator::InnerElectrodWheel, -1} }, + { "LAr::EMEC::Neg::InnerWheel::Electrode", {LArG4::InnerElectrodWheel, -1} }, - { "LAr::EMEC::Neg::OuterWheel::Electrode", {LArWheelCalculator::OuterElectrodWheel, -1} }, + { "LAr::EMEC::Neg::OuterWheel::Electrode", {LArG4::OuterElectrodWheel, -1} }, - { "LAr::EMEC::InnerModule::Absorber", {LArWheelCalculator::InnerAbsorberModule, 1} }, + { "LAr::EMEC::InnerModule::Absorber", {LArG4::InnerAbsorberModule, 1} }, - { "LAr::EMEC::OuterModule::Absorber", {LArWheelCalculator::OuterAbsorberModule, 1} }, + { "LAr::EMEC::OuterModule::Absorber", {LArG4::OuterAbsorberModule, 1} }, - { "LAr::EMEC::InnerModule::Electrode", {LArWheelCalculator::InnerElectrodModule, 1} }, + { "LAr::EMEC::InnerModule::Electrode", {LArG4::InnerElectrodModule, 1} }, - { "LAr::EMEC::OuterModule::Electrode", {LArWheelCalculator::OuterElectrodModule, 1} }, + { "LAr::EMEC::OuterModule::Electrode", {LArG4::OuterElectrodModule, 1} }, - { "LAr::EMEC::InnerWheel::Glue", {LArWheelCalculator::InnerGlueWheel, 1} }, - { "LAr::EMEC::Pos::InnerWheel::Glue", {LArWheelCalculator::InnerGlueWheel, 1} }, + { "LAr::EMEC::InnerWheel::Glue", {LArG4::InnerGlueWheel, 1} }, + { "LAr::EMEC::Pos::InnerWheel::Glue", {LArG4::InnerGlueWheel, 1} }, - { "LAr::EMEC::InnerWheel::Lead", {LArWheelCalculator::InnerLeadWheel, 1} }, - { "LAr::EMEC::Pos::InnerWheel::Lead", {LArWheelCalculator::InnerLeadWheel, 1} }, + { "LAr::EMEC::InnerWheel::Lead", {LArG4::InnerLeadWheel, 1} }, + { "LAr::EMEC::Pos::InnerWheel::Lead", {LArG4::InnerLeadWheel, 1} }, - { "LAr::EMEC::OuterWheel::Glue", {LArWheelCalculator::OuterGlueWheel, 1} }, - { "LAr::EMEC::Pos::OuterWheel::Glue", {LArWheelCalculator::OuterGlueWheel, 1} }, + { "LAr::EMEC::OuterWheel::Glue", {LArG4::OuterGlueWheel, 1} }, + { "LAr::EMEC::Pos::OuterWheel::Glue", {LArG4::OuterGlueWheel, 1} }, - { "LAr::EMEC::OuterWheel::Lead", {LArWheelCalculator::OuterLeadWheel, 1} }, - { "LAr::EMEC::Pos::OuterWheel::Lead", {LArWheelCalculator::OuterLeadWheel, 1} }, + { "LAr::EMEC::OuterWheel::Lead", {LArG4::OuterLeadWheel, 1} }, + { "LAr::EMEC::Pos::OuterWheel::Lead", {LArG4::OuterLeadWheel, 1} }, - { "LAr::EMEC::Neg::InnerWheel::Glue", {LArWheelCalculator::InnerGlueWheel, -1} }, + { "LAr::EMEC::Neg::InnerWheel::Glue", {LArG4::InnerGlueWheel, -1} }, - { "LAr::EMEC::Neg::OuterWheel::Glue", {LArWheelCalculator::OuterGlueWheel, -1} }, + { "LAr::EMEC::Neg::OuterWheel::Glue", {LArG4::OuterGlueWheel, -1} }, - { "LAr::EMEC::Neg::InnerWheel::Lead", {LArWheelCalculator::InnerLeadWheel, -1} }, + { "LAr::EMEC::Neg::InnerWheel::Lead", {LArG4::InnerLeadWheel, -1} }, - { "LAr::EMEC::Neg::OuterWheel::Lead", {LArWheelCalculator::OuterLeadWheel, -1} } + { "LAr::EMEC::Neg::OuterWheel::Lead", {LArG4::OuterLeadWheel, -1} } }; LArCustomShape::LArCustomShape(const std::string& a_shapeName) @@ -69,79 +69,79 @@ LArCustomShape::LArCustomShape(const std::string& a_shapeName) { // if(a_shapeName == "LAr::EMEC::InnerWheel::Absorber" || a_shapeName == "LAr::EMEC::Pos::InnerWheel::Absorber"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::InnerAbsorberWheel, 1); +// new LArWheelCalculator(LArG4::InnerAbsorberWheel, 1); // } // else if(a_shapeName == "LAr::EMEC::OuterWheel::Absorber" || a_shapeName == "LAr::EMEC::Pos::OuterWheel::Absorber"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::OuterAbsorberWheel, 1); +// new LArWheelCalculator(LArG4::OuterAbsorberWheel, 1); // } // else if(a_shapeName == "LAr::EMEC::InnerWheel::Electrode" || a_shapeName == "LAr::EMEC::Pos::InnerWheel::Electrode"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::InnerElectrodWheel, 1); +// new LArWheelCalculator(LArG4::InnerElectrodWheel, 1); // } // else if(a_shapeName == "LAr::EMEC::OuterWheel::Electrode"|| a_shapeName == "LAr::EMEC::Pos::OuterWheel::Electrode"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::OuterElectrodWheel, 1); +// new LArWheelCalculator(LArG4::OuterElectrodWheel, 1); // } // else if(a_shapeName == "LAr::EMEC::Neg::InnerWheel::Absorber"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::InnerAbsorberWheel, -1); +// new LArWheelCalculator(LArG4::InnerAbsorberWheel, -1); // } // else if(a_shapeName == "LAr::EMEC::Neg::OuterWheel::Absorber"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::OuterAbsorberWheel, -1); +// new LArWheelCalculator(LArG4::OuterAbsorberWheel, -1); // } // else if(a_shapeName == "LAr::EMEC::Neg::InnerWheel::Electrode"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::InnerElectrodWheel, -1); +// new LArWheelCalculator(LArG4::InnerElectrodWheel, -1); // } // else if(a_shapeName == "LAr::EMEC::Neg::OuterWheel::Electrode"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::OuterElectrodWheel, -1); +// new LArWheelCalculator(LArG4::OuterElectrodWheel, -1); // } // else if(a_shapeName == "LAr::EMEC::InnerModule::Absorber"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::InnerAbsorberModule, 1); +// new LArWheelCalculator(LArG4::InnerAbsorberModule, 1); // } // else if(a_shapeName == "LAr::EMEC::OuterModule::Absorber"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::OuterAbsorberModule, 1); +// new LArWheelCalculator(LArG4::OuterAbsorberModule, 1); // } // else if(a_shapeName == "LAr::EMEC::InnerModule::Electrode"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::InnerElectrodModule, 1); +// new LArWheelCalculator(LArG4::InnerElectrodModule, 1); // } // else if(a_shapeName == "LAr::EMEC::OuterModule::Electrode"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::OuterElectrodModule, 1); +// new LArWheelCalculator(LArG4::OuterElectrodModule, 1); // } // else if(a_shapeName == "LAr::EMEC::InnerWheel::Glue" || a_shapeName == "LAr::EMEC::Pos::InnerWheel::Glue"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::InnerGlueWheel, 1); +// new LArWheelCalculator(LArG4::InnerGlueWheel, 1); // } // else if(a_shapeName == "LAr::EMEC::InnerWheel::Lead" || a_shapeName == "LAr::EMEC::Pos::InnerWheel::Lead"){ // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::InnerLeadWheel, 1); +// new LArWheelCalculator(LArG4::InnerLeadWheel, 1); // } // else if(a_shapeName == "LAr::EMEC::OuterWheel::Glue" || a_shapeName == "LAr::EMEC::Pos::OuterWheel::Glue"){ -// m_calculator = new LArWheelCalculator(LArWheelCalculator::OuterGlueWheel, 1); +// m_calculator = new LArWheelCalculator(LArG4::OuterGlueWheel, 1); // } // else if(a_shapeName == "LAr::EMEC::OuterWheel::Lead" || a_shapeName == "LAr::EMEC::Pos::OuterWheel::Lead"){ -// m_calculator = new LArWheelCalculator(LArWheelCalculator::OuterLeadWheel, 1); +// m_calculator = new LArWheelCalculator(LArG4::OuterLeadWheel, 1); // } // else if(a_shapeName == "LAr::EMEC::Neg::InnerWheel::Glue") { // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::InnerGlueWheel, -1); +// new LArWheelCalculator(LArG4::InnerGlueWheel, -1); // } // else if(a_shapeName == "LAr::EMEC::Neg::OuterWheel::Glue" ) { // m_calculator = -// new LArWheelCalculator(LArWheelCalculator::OuterGlueWheel, -1); +// new LArWheelCalculator(LArG4::OuterGlueWheel, -1); // } // else if(a_shapeName == "LAr::EMEC::Neg::InnerWheel::Lead") { -// m_calculator = new LArWheelCalculator(LArWheelCalculator::InnerLeadWheel, -1); +// m_calculator = new LArWheelCalculator(LArG4::InnerLeadWheel, -1); // } // else if(a_shapeName == "LAr::EMEC::Neg::OuterWheel::Lead") { -// m_calculator = new LArWheelCalculator(LArWheelCalculator::OuterLeadWheel, -1); +// m_calculator = new LArWheelCalculator(LArG4::OuterLeadWheel, -1); // } else { // std::string error = "Unknown name "; // error += a_shapeName; @@ -162,8 +162,8 @@ LArCustomShape::~LArCustomShape() //delete m_calculator; } -StatusCode LArCustomShape::createCalculator(const CalcDef_t & cdef) { // LArWheelCalculator::LArWheelCalculator_t wheelType, int zside - LArWheelCalculator::LArWheelCalculator_t wheelType = cdef.first; +StatusCode LArCustomShape::createCalculator(const CalcDef_t & cdef) { // LArG4::LArWheelCalculator_t wheelType, int zside + LArG4::LArWheelCalculator_t wheelType = cdef.first; int zside = cdef.second; m_calculator = new LArWheelCalculator(wheelType, zside); diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator.cxx b/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator.cxx index f84fd7c8d5496ee79c111362782a7d08bd208b72..93e4c704bb8b11a5fac18fc3867dd65aff8d2577 100644 --- a/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator.cxx +++ b/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator.cxx @@ -70,29 +70,29 @@ static const double default_slant_parametrization[2][5] = { { -34.254, 0.15528, -0.11670E-03, 0.45018E-07, -0.68473E-11 } //outer }; -const char *LArWheelCalculator::LArWheelCalculatorTypeString(LArWheelCalculator_t type) +const char *LArWheelCalculator::LArWheelCalculatorTypeString(LArG4::LArWheelCalculator_t type) { switch(type){ - case InnerAbsorberWheel: return("InnerAbsorberWheel"); - case OuterAbsorberWheel: return("OuterAbsorberWheel"); - case InnerElectrodWheel: return("InnerElectrodWheel"); - case OuterElectrodWheel: return("OuterElectrodWheel"); - case InnerAbsorberModule: return("InnerAbsorberModule"); - case OuterAbsorberModule: return("OuterAbsorberModule"); - case InnerElectrodModule: return("InnerElectrodModule"); - case OuterElectrodModule: return("OuterElectrodModule"); - case BackOuterBarretteWheel: return("BackOuterBarretteWheel"); - case BackInnerBarretteWheel: return("BackInnerBarretteWheel"); - case BackOuterBarretteModule: return("BackOuterBarretteModule"); - case BackInnerBarretteModule: return("BackInnerBarretteModule"); - case BackOuterBarretteWheelCalib: return("BackOuterBarretteWheelCalib"); - case BackInnerBarretteWheelCalib: return("BackInnerBarretteWheelCalib"); - case BackOuterBarretteModuleCalib: return("BackOuterBarretteModuleCalib"); - case BackInnerBarretteModuleCalib: return("BackInnerBarretteModuleCalib"); - case InnerGlueWheel: return("InnerGlueWheel"); - case InnerLeadWheel: return("InnerLeadWheel"); - case OuterGlueWheel: return("OuterGlueWheel"); - case OuterLeadWheel: return("OuterLeadWheel"); + case LArG4::InnerAbsorberWheel: return("InnerAbsorberWheel"); + case LArG4::OuterAbsorberWheel: return("OuterAbsorberWheel"); + case LArG4::InnerElectrodWheel: return("InnerElectrodWheel"); + case LArG4::OuterElectrodWheel: return("OuterElectrodWheel"); + case LArG4::InnerAbsorberModule: return("InnerAbsorberModule"); + case LArG4::OuterAbsorberModule: return("OuterAbsorberModule"); + case LArG4::InnerElectrodModule: return("InnerElectrodModule"); + case LArG4::OuterElectrodModule: return("OuterElectrodModule"); + case LArG4::BackOuterBarretteWheel: return("BackOuterBarretteWheel"); + case LArG4::BackInnerBarretteWheel: return("BackInnerBarretteWheel"); + case LArG4::BackOuterBarretteModule: return("BackOuterBarretteModule"); + case LArG4::BackInnerBarretteModule: return("BackInnerBarretteModule"); + case LArG4::BackOuterBarretteWheelCalib: return("BackOuterBarretteWheelCalib"); + case LArG4::BackInnerBarretteWheelCalib: return("BackInnerBarretteWheelCalib"); + case LArG4::BackOuterBarretteModuleCalib: return("BackOuterBarretteModuleCalib"); + case LArG4::BackInnerBarretteModuleCalib: return("BackInnerBarretteModuleCalib"); + case LArG4::InnerGlueWheel: return("InnerGlueWheel"); + case LArG4::InnerLeadWheel: return("InnerLeadWheel"); + case LArG4::OuterGlueWheel: return("OuterGlueWheel"); + case LArG4::OuterLeadWheel: return("OuterLeadWheel"); } return("unknown"); } @@ -104,7 +104,7 @@ LArWheelCalculator::~LArWheelCalculator() { m_fanCalcImpl = 0; } -LArWheelCalculator::LArWheelCalculator(LArWheelCalculator_t a_wheelType, int zside) : +LArWheelCalculator::LArWheelCalculator(LArG4::LArWheelCalculator_t a_wheelType, int zside) : m_type(a_wheelType), m_AtlasZside(zside), m_distanceCalcImpl(0), @@ -221,86 +221,78 @@ LArWheelCalculator::LArWheelCalculator(LArWheelCalculator_t a_wheelType, int zsi m_LastFan = 0; switch(m_type){ - case BackInnerBarretteWheelCalib: - m_isBarretteCalib = true; - /* FALLTHROUGH */ - case BackInnerBarretteWheel: - m_isBarrette = true; - m_type = InnerAbsorberWheel; - /* FALLTHROUGH */ - case InnerAbsorberWheel: - case InnerGlueWheel: - case InnerLeadWheel: - inner_wheel_init(EmecWheelParameters_recs); - m_ZeroFanPhi = m_FanStepOnPhi * 0.5; - if(m_phiRotation) m_ZeroFanPhi += m_FanStepOnPhi * 0.5; - break; - case BackOuterBarretteWheelCalib: - m_isBarretteCalib = true; - /* FALLTHROUGH */ - case BackOuterBarretteWheel: - m_isBarrette = true; - m_type = OuterAbsorberWheel; - /* FALLTHROUGH */ - case OuterAbsorberWheel: - case OuterGlueWheel: - case OuterLeadWheel: - outer_wheel_init(EmecWheelParameters_recs); - m_ZeroFanPhi = m_FanStepOnPhi * 0.5; - if(m_phiRotation) m_ZeroFanPhi += m_FanStepOnPhi * 0.5; - break; - case InnerElectrodWheel: - inner_wheel_init(EmecWheelParameters_recs); - m_ZeroFanPhi = 0; - if(m_phiRotation) m_ZeroFanPhi += m_FanStepOnPhi * 0.5; - m_isElectrode = true; - break; - case OuterElectrodWheel: - outer_wheel_init(EmecWheelParameters_recs); - m_ZeroFanPhi = 0; - if(m_phiRotation) m_ZeroFanPhi += m_FanStepOnPhi * 0.5; - m_isElectrode = true; - break; - case BackInnerBarretteModuleCalib: - m_isBarretteCalib = true; - /* FALLTHROUGH */ - case BackInnerBarretteModule: - m_isBarrette = true; - m_type = InnerAbsorberModule; - /* FALLTHROUGH */ - case InnerAbsorberModule: - inner_wheel_init(EmecWheelParameters_recs); - module_init(); - m_ZeroFanPhi += m_FanStepOnPhi * 0.5; - // later for all? m_ZeroFanPhi_ForDetNeaFan = m_ZeroFanPhi - m_FanStepOnPhi * 0.5; - break; - case BackOuterBarretteModuleCalib: - m_isBarretteCalib = true; - /* FALLTHROUGH */ - case BackOuterBarretteModule: - m_isBarrette = true; - m_type = OuterAbsorberModule; - /* FALLTHROUGH */ - case OuterAbsorberModule: - outer_wheel_init(EmecWheelParameters_recs); - module_init(); - m_ZeroFanPhi += m_FanStepOnPhi * 0.5; - // later for all? m_ZeroFanPhi_ForDetNeaFan = m_ZeroFanPhi - m_FanStepOnPhi * 0.5; - break; - case InnerElectrodModule: - inner_wheel_init(EmecWheelParameters_recs); - module_init(); - m_FirstFan ++; - m_isElectrode = true; - break; - case OuterElectrodModule: - outer_wheel_init(EmecWheelParameters_recs); - module_init(); - m_FirstFan ++; - m_isElectrode = true; - break; - default: - throw std::runtime_error("LArWheelCalculator constructor:unknown LArWheelCalculator_t"); + case LArG4::BackInnerBarretteWheelCalib: + m_isBarretteCalib = true; + case LArG4::BackInnerBarretteWheel: + m_isBarrette = true; + m_type = LArG4::InnerAbsorberWheel; + case LArG4::InnerAbsorberWheel: + case LArG4::InnerGlueWheel: + case LArG4::InnerLeadWheel: + inner_wheel_init(EmecWheelParameters_recs); + m_ZeroFanPhi = m_FanStepOnPhi * 0.5; + if(m_phiRotation) m_ZeroFanPhi += m_FanStepOnPhi * 0.5; + break; + case LArG4::BackOuterBarretteWheelCalib: + m_isBarretteCalib = true; + case LArG4::BackOuterBarretteWheel: + m_isBarrette = true; + m_type = LArG4::OuterAbsorberWheel; + case LArG4::OuterAbsorberWheel: + case LArG4::OuterGlueWheel: + case LArG4::OuterLeadWheel: + outer_wheel_init(EmecWheelParameters_recs); + m_ZeroFanPhi = m_FanStepOnPhi * 0.5; + if(m_phiRotation) m_ZeroFanPhi += m_FanStepOnPhi * 0.5; + break; + case LArG4::InnerElectrodWheel: + inner_wheel_init(EmecWheelParameters_recs); + m_ZeroFanPhi = 0; + if(m_phiRotation) m_ZeroFanPhi += m_FanStepOnPhi * 0.5; + m_isElectrode = true; + break; + case LArG4::OuterElectrodWheel: + outer_wheel_init(EmecWheelParameters_recs); + m_ZeroFanPhi = 0; + if(m_phiRotation) m_ZeroFanPhi += m_FanStepOnPhi * 0.5; + m_isElectrode = true; + break; + case LArG4::BackInnerBarretteModuleCalib: + m_isBarretteCalib = true; + case LArG4::BackInnerBarretteModule: + m_isBarrette = true; + m_type = LArG4::InnerAbsorberModule; + case LArG4::InnerAbsorberModule: + inner_wheel_init(EmecWheelParameters_recs); + module_init(); + m_ZeroFanPhi += m_FanStepOnPhi * 0.5; + // later for all? m_ZeroFanPhi_ForDetNeaFan = m_ZeroFanPhi - m_FanStepOnPhi * 0.5; + break; + case LArG4::BackOuterBarretteModuleCalib: + m_isBarretteCalib = true; + case LArG4::BackOuterBarretteModule: + m_isBarrette = true; + m_type = LArG4::OuterAbsorberModule; + case LArG4::OuterAbsorberModule: + outer_wheel_init(EmecWheelParameters_recs); + module_init(); + m_ZeroFanPhi += m_FanStepOnPhi * 0.5; + // later for all? m_ZeroFanPhi_ForDetNeaFan = m_ZeroFanPhi - m_FanStepOnPhi * 0.5; + break; + case LArG4::InnerElectrodModule: + inner_wheel_init(EmecWheelParameters_recs); + module_init(); + m_FirstFan ++; + m_isElectrode = true; + break; + case LArG4::OuterElectrodModule: + outer_wheel_init(EmecWheelParameters_recs); + module_init(); + m_FirstFan ++; + m_isElectrode = true; + break; + default: + throw std::runtime_error("LArWheelCalculator constructor:unknown LArWheelCalculator_t"); } m_ZeroFanPhi_ForDetNeaFan = m_ZeroFanPhi - m_FanStepOnPhi * 0.5; m_NumberOfHalfWaves = m_NumberOfWaves * 2; @@ -456,41 +448,41 @@ void LArWheelCalculator::outer_wheel_init(const RDBParamRecords & EmecWheelParam } -double LArWheelCalculator::GetFanHalfThickness(LArWheelCalculator_t t) +double LArWheelCalculator::GetFanHalfThickness(LArG4::LArWheelCalculator_t t) { switch(t){ - case BackInnerBarretteWheelCalib: - case BackInnerBarretteModuleCalib: - case BackInnerBarretteWheel: - case BackInnerBarretteModule: - case InnerAbsorberWheel: - case InnerAbsorberModule: - // return (2.2 / 2 + 0.2 + 0.15) * mm; - return (2.2 / 2 + 0.2 + 0.1)*0.997 * mm; // new values, 02.11.06 J.T. with contraction in cold - // lead / 2 + steel + glue - case InnerGlueWheel: - return (2.2 / 2 + 0.1)*0.997 * mm; - case InnerLeadWheel: - return 2.2 / 2 * 0.997 * mm; - - case BackOuterBarretteWheelCalib: - case BackOuterBarretteModuleCalib: - case BackOuterBarretteWheel: - case BackOuterBarretteModule: - case OuterAbsorberWheel: - case OuterAbsorberModule: - //return (1.7 / 2 + 0.2 + 0.15) * mm; - return (1.69 / 2 + 0.2 + 0.1)*0.997 * mm; // new values, 02.11.06 J.T. - case OuterGlueWheel: - return (1.69 / 2 + 0.1)*0.997 * mm; - case OuterLeadWheel: - return 1.69 / 2 * 0.997 * mm; - - case InnerElectrodWheel: - case OuterElectrodWheel: - case InnerElectrodModule: - case OuterElectrodModule: - return 0.275/1.0036256 *mm * 0.5; //new values, 02.11.06 J.T + case LArG4::BackInnerBarretteWheelCalib: + case LArG4::BackInnerBarretteModuleCalib: + case LArG4::BackInnerBarretteWheel: + case LArG4::BackInnerBarretteModule: + case LArG4::InnerAbsorberWheel: + case LArG4::InnerAbsorberModule: + // return (2.2 / 2 + 0.2 + 0.15) * mm; + return (2.2 / 2 + 0.2 + 0.1)*0.997 * mm; // new values, 02.11.06 J.T. with contraction in cold + // lead / 2 + steel + glue + case LArG4::InnerGlueWheel: + return (2.2 / 2 + 0.1)*0.997 * mm; + case LArG4::InnerLeadWheel: + return 2.2 / 2 * 0.997 * mm; + + case LArG4::BackOuterBarretteWheelCalib: + case LArG4::BackOuterBarretteModuleCalib: + case LArG4::BackOuterBarretteWheel: + case LArG4::BackOuterBarretteModule: + case LArG4::OuterAbsorberWheel: + case LArG4::OuterAbsorberModule: + //return (1.7 / 2 + 0.2 + 0.15) * mm; + return (1.69 / 2 + 0.2 + 0.1)*0.997 * mm; // new values, 02.11.06 J.T. + case LArG4::OuterGlueWheel: + return (1.69 / 2 + 0.1)*0.997 * mm; + case LArG4::OuterLeadWheel: + return 1.69 / 2 * 0.997 * mm; + + case LArG4::InnerElectrodWheel: + case LArG4::OuterElectrodWheel: + case LArG4::InnerElectrodModule: + case LArG4::OuterElectrodModule: + return 0.275/1.0036256 *mm * 0.5; //new values, 02.11.06 J.T } throw std::runtime_error("LArWheelCalculator::GetFanHalfThickness: wrong wheel type"); } diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/src/ForwardRegionFieldSvc.cxx b/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/src/ForwardRegionFieldSvc.cxx index 300aa7384be304e454f573aa029d706990331b6f..73413bbdf7a19be198f8dbcbd8337487bc009589 100644 --- a/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/src/ForwardRegionFieldSvc.cxx +++ b/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/src/ForwardRegionFieldSvc.cxx @@ -105,18 +105,23 @@ StatusCode MagField::ForwardRegionFieldSvc::initialize() return StatusCode::SUCCESS; } -// Query the interfaces - no idea what this is - TODO: find out +// Query the interfaces StatusCode MagField::ForwardRegionFieldSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) { if(IIncidentListener::interfaceID().versionMatch(riid)) { *ppvInterface = dynamic_cast<IIncidentListener*>(this); } + else if(IMagFieldSvc::interfaceID().versionMatch(riid)) + { + *ppvInterface = dynamic_cast<IMagFieldSvc*>(this); + } else { // Interface is not directly available: try out a base class - return Service::queryInterface(riid, ppvInterface); + return AthService::queryInterface(riid, ppvInterface); } + addRef(); return StatusCode::SUCCESS; } diff --git a/InnerDetector/InDetConditions/PixelCoralClientUtils/PixelCoralClientUtils/PCDDb.h b/InnerDetector/InDetConditions/PixelCoralClientUtils/PixelCoralClientUtils/PCDDb.h index f85654e982c3bc19d7dcf016ced38fb735073216..a2ba6c0773ad864d361cd4f7bccf15ef4a27e7ee 100644 --- a/InnerDetector/InDetConditions/PixelCoralClientUtils/PixelCoralClientUtils/PCDDb.h +++ b/InnerDetector/InDetConditions/PixelCoralClientUtils/PixelCoralClientUtils/PCDDb.h @@ -29,7 +29,6 @@ class PCDDb private: bool m_verbose; - bool m_load_text; coral::ISessionProxy *m_session; std::string m_connString; std::string m_pixeltable; diff --git a/InnerDetector/InDetConditions/PixelCoralClientUtils/PixelCoralClientUtils/PixelCalibData.hh b/InnerDetector/InDetConditions/PixelCoralClientUtils/PixelCoralClientUtils/PixelCalibData.hh index 571a2cd1dd351f0ddfc801245554c4916ba9d3a9..9c34244a623a39b4d16f2d770a9411d018068d2f 100644 --- a/InnerDetector/InDetConditions/PixelCoralClientUtils/PixelCoralClientUtils/PixelCalibData.hh +++ b/InnerDetector/InDetConditions/PixelCoralClientUtils/PixelCoralClientUtils/PixelCalibData.hh @@ -170,13 +170,13 @@ inline int PixelCalibData::PixelChipSummaryData::getThresholdSigma(int type) con else{ return m_q2tot[0]*(Q+m_q2tot[1])/(Q+m_q2tot[2]);} } - inline float PixelCalibData::PixelChipSummaryData::getTotP1() const{ return m_totres[0]* 1/100.; } + inline float PixelCalibData::PixelChipSummaryData::getTotP1() const{ return m_totres[0]* (1/100.); } - inline float PixelCalibData::PixelChipSummaryData::getTotP2() const{ return m_totres[1]*1./1000.; } + inline float PixelCalibData::PixelChipSummaryData::getTotP2() const{ return m_totres[1]*(1./1000.); } inline float PixelCalibData::PixelChipSummaryData::getTotRes(float Q) const{ - float p1 = m_totres[0]*1/100.; - float p2 = m_totres[1]*1./1000.; + float p1 = m_totres[0]*(1/100.0); + float p2 = m_totres[1]*(1/1000.0); return p1+p2*Q; } @@ -266,9 +266,9 @@ inline void PixelCalibData::PixelChipSummaryData::setTotRes(float p1, float p2){ // careful with rounding -- A.X. using std::abs; - int p1x = (int)roundf(p1/0.01); + int p1x = (int)roundf(p1*100); if(abs(p1x)>127)p1x = 127*p1x/abs(p1x); - int p2x = (int)roundf(p2/0.001); + int p2x = (int)roundf(p2*1000); if(abs(p2x)>127)p2x = 127*p2x/abs(p2x); m_totres[0] = (char)p1x; @@ -347,7 +347,6 @@ inline PixelCalibData::PixelChipSummaryData::PixelChipSummaryData(){ } } -//================ Destructor ================================================= inline PixelCalibData::~PixelCalibData(){} inline int PixelCalibData::size() const diff --git a/InnerDetector/InDetConditions/PixelCoralClientUtils/src/CoralClient.cc b/InnerDetector/InDetConditions/PixelCoralClientUtils/src/CoralClient.cc index 33ce384dbe2b2614eb70cef679188431f8d4de79..df8bae3d1ab3bcbc239010d61572a364c3d81a14 100644 --- a/InnerDetector/InDetConditions/PixelCoralClientUtils/src/CoralClient.cc +++ b/InnerDetector/InDetConditions/PixelCoralClientUtils/src/CoralClient.cc @@ -746,9 +746,9 @@ void PixCoralClient::createTable(){ if (m_verbose) { std::cout << "\nCOOLCORAL Client: Creating table: " << PIXEL_TABLE_DATA <<" for "; try { - std::cout <<tableTypeName<T>() << std::endl; + std::cout <<tableTypeName<T>() << std::endl; } catch (coral::AttributeListException) { - std::cout <<typeid(T).name() << std::endl; + std::cout <<typeid(T).name() << std::endl; } } @@ -758,7 +758,7 @@ void PixCoralClient::createTable(){ pixel_columns.insertColumn("FK", coral::AttributeSpecification::typeNameForType<long long>()); pixel_columns.insertColumn("CONNECTIVITY", coral::AttributeSpecification::typeNameForType<std::string>(), /*size in BYTES = */ 100, /*fixed_size=*/ false); pixel_columns.insertColumn("VARIABLE", coral::AttributeSpecification::typeNameForType<std::string>(), /*size in BYTES = */ 100, /*fixed_size=*/ false); - + if (typeid(T)==typeid(CAN::AverageResult_t)) { pixel_columns.insertColumn("N", coral::AttributeSpecification::typeNameForType<int>()); pixel_columns.insertColumn("MEAN", coral::AttributeSpecification::typeNameForType<float>()); @@ -768,7 +768,7 @@ void PixCoralClient::createTable(){ } else if (typeid(T)==typeid(PixelMap_t)) { // A size > 4000 triggers the use of a CLOB object pixel_columns.insertColumn("VALUE", coral::AttributeSpecification::typeNameForType<std::string>(), /*size = */ 4001, /*fixed_size=*/ false); - // added -- A.X. + // added -- A.X. } else if (typeid(T)==typeid(PixelCoralClientUtils::PixelCalibData)) { pixel_columns.insertColumn("IDMOD",coral::AttributeSpecification::typeNameForType<int>()); pixel_columns.insertColumn("CHIP",coral::AttributeSpecification::typeNameForType<int>()); @@ -797,10 +797,10 @@ void PixCoralClient::createTable(){ } //set the foreign key - pixel_columns.createForeignKey(variableType<T>()+"_FK","FK",m_pixeltable,"FK"); + pixel_columns.createForeignKey(tableTypeName<T>()+"_FK","FK",m_pixeltable,"FK"); // create indices - pixel_columns.createIndex(variableType<T>()+"_CONNECTIVITY_IDX", "CONNECTIVITY"); - pixel_columns.createIndex(variableType<T>()+"_VARIABLE_IDX", "VARIABLE"); + pixel_columns.createIndex(tableTypeName<T>()+"_CONNECTIVITY_IDX", "CONNECTIVITY"); + pixel_columns.createIndex(tableTypeName<T>()+"_VARIABLE_IDX", "VARIABLE"); pixel_columns.setNotNullConstraint ( "CONNECTIVITY" ); pixel_columns.setNotNullConstraint ( "VARIABLE" ); diff --git a/InnerDetector/InDetConditions/PixelCoralClientUtils/src/PCDDb.cxx b/InnerDetector/InDetConditions/PixelCoralClientUtils/src/PCDDb.cxx index d6f9418008a043ccaa72050e29dc7518391c634a..06529283c1c35d03d8a7b7f27fd3a3147f05a8ca 100644 --- a/InnerDetector/InDetConditions/PixelCoralClientUtils/src/PCDDb.cxx +++ b/InnerDetector/InDetConditions/PixelCoralClientUtils/src/PCDDb.cxx @@ -39,8 +39,8 @@ using namespace std; /** Constructor. Open the default database and seal context. */ -PCDDb::PCDDb(std::string connString, std::string tableName, bool verbose, bool load_text) : - m_verbose(verbose), m_load_text(load_text), +PCDDb::PCDDb(std::string connString, std::string tableName, bool verbose, bool /*load_text*/) : + m_verbose(verbose), m_session(0), m_connString(connString), m_pixeltable(tableName), m_query(0), m_query_2(0), m_cursor(0) { diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx index 25161c4b365f4e32f368bf3d43f68e84651c85bb..c638b4b75009f86f9222316180cfef9d07d5affb 100755 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx @@ -756,12 +756,12 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) CLHEP::Hep2Vector shellCorner3(m_data->shellCornerXPosition[iABC][2],m_data->shellCornerYPosition[iABC][2]); CLHEP::Hep2Vector shellCorner4(m_data->shellCornerXPosition[iABC][3],m_data->shellCornerYPosition[iABC][3]); HepGeom::Transform3D shellPosition; + if ( shellCorner1 <= 0 ) { msg(MSG::DEBUG) << "shellCorner1 is <= 0 (" << shellCorner1 << ")" << endmsg; } + if ( shellCorner2 <= 0 ) { msg(MSG::DEBUG) << "shellCorner2 is <= 0 (" << shellCorner2 << ")" << endmsg; } + if ( shellCorner3 <= 0 ) { msg(MSG::DEBUG) << "shellCorner3 is <= 0 (" << shellCorner3 << ")" << endmsg; } + if ( shellCorner4 <= 0 ) { msg(MSG::DEBUG) << "shellCorner4 is <= 0 (" << shellCorner4 << ")" << endmsg; } const GeoShape * sShell = makeModule(m_data->lengthOfBarrelVolume, - shellCorner1 > 0 ? shellCorner1 : shellCorner1, - shellCorner2 > 0 ? shellCorner2 : shellCorner2, - shellCorner3 > 0 ? shellCorner3 : shellCorner3, - shellCorner4 > 0 ? shellCorner4 : shellCorner4, - shellPosition); + shellCorner1,shellCorner2,shellCorner3,shellCorner4,shellPosition); // STS: We have three different shellmodules and radiators densities. std::ostringstream layerstr; @@ -780,10 +780,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) // Make a Radiator HepGeom::Transform3D radAbsolutePosition; const GeoShape * sRad = makeModule(m_data->lengthOfBarrelVolume, - shellCorner1 > 0 ? shellCorner1 : shellCorner1, - shellCorner2 > 0 ? shellCorner2 : shellCorner2, - shellCorner3 > 0 ? shellCorner3 : shellCorner3, - shellCorner4 > 0 ? shellCorner4 : shellCorner4, + shellCorner1,shellCorner2,shellCorner3,shellCorner4, radAbsolutePosition,m_data->barrelThicknessOfModuleWalls); // FibreRadiator will have three different densities for each type of module diff --git a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py index 67c41b00455eb890451bd65be4be85d4689b9628..7dca8ed764f072fef5950c60df8ffca214291fce 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py +++ b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py @@ -28,13 +28,13 @@ def Pixel_LastXing(): def ChargeCollProbSvc(name="ChargeCollProbSvc", **kwargs): return CfgMgr.ChargeCollProbSvc(name, **kwargs) +############################################################################### + def DBMChargeTool(name="DBMChargeTool", **kwargs): kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) kwargs.setdefault("RndmEngine", "PixelDigitization") return CfgMgr.DBMChargeTool(name, **kwargs) -############################################################################### - def BichselSimTool(name="BichselSimTool", **kwargs): kwargs.setdefault("DeltaRayCut", 117.) kwargs.setdefault("nCols", 5) @@ -43,7 +43,7 @@ def BichselSimTool(name="BichselSimTool", **kwargs): kwargs.setdefault("RndmEngine", "PixelDigitization") return CfgMgr.BichselSimTool(name, **kwargs) -def PixelBarrelBichselChargeTool(name="PixelBarrelBichselChargeTool", **kwargs): +def PixelPlanarChargeTool(name="PixelPlanarChargeTool", **kwargs): kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) kwargs.setdefault("RndmEngine", "PixelDigitization") kwargs.setdefault("doBichsel", hasattr(digitizationFlags, "doBichselSimulation") and digitizationFlags.doBichselSimulation()) @@ -53,28 +53,9 @@ def PixelBarrelBichselChargeTool(name="PixelBarrelBichselChargeTool", **kwargs): kwargs.setdefault("BichselSimTool", "BichselSimTool") # kwargs.setdefault("OutputFileName", digitizationFlags.BichselOutputFileName()) # kwargs.setdefault("doHITPlots", True) - return CfgMgr.PixelBarrelBichselChargeTool(name, **kwargs) - -def PixelECBichselChargeTool(name="PixelECBichselChargeTool", **kwargs): - kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) - kwargs.setdefault("RndmEngine", "PixelDigitization") - kwargs.setdefault("doBichsel", hasattr(digitizationFlags, "doBichselSimulation") and digitizationFlags.doBichselSimulation()) - kwargs.setdefault("doBichselBetaGammaCut", 0.7) # dEdx not quite consistent below this - kwargs.setdefault("doPU", True) - kwargs.setdefault("BichselSimTool", "BichselSimTool") - return CfgMgr.PixelECBichselChargeTool(name, **kwargs) - -def IblPlanarBichselChargeTool(name="IblPlanarBichselChargeTool", **kwargs): - kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) - kwargs.setdefault("RndmEngine", "PixelDigitization") - kwargs.setdefault("doBichsel", hasattr(digitizationFlags, "doBichselSimulation") and digitizationFlags.doBichselSimulation()) - kwargs.setdefault("doBichselBetaGammaCut", 0.7) # dEdx not quite consistent below this - kwargs.setdefault("doDeltaRay", False) # needs validation - kwargs.setdefault("doPU", True) - kwargs.setdefault("BichselSimTool", "BichselSimTool") - return CfgMgr.IblPlanarBichselChargeTool(name, **kwargs) + return CfgMgr.PixelPlanarChargeTool(name, **kwargs) -def Ibl3DBichselChargeTool(name="Ibl3DBichselChargeTool", **kwargs): +def Pixel3DChargeTool(name="Pixel3DChargeTool", **kwargs): kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) kwargs.setdefault("RndmEngine", "PixelDigitization") kwargs.setdefault("doBichsel", hasattr(digitizationFlags, "doBichselSimulation") and digitizationFlags.doBichselSimulation()) @@ -82,31 +63,7 @@ def Ibl3DBichselChargeTool(name="Ibl3DBichselChargeTool", **kwargs): kwargs.setdefault("doDeltaRay", False) # needs validation kwargs.setdefault("doPU", True) kwargs.setdefault("BichselSimTool", "BichselSimTool") - return CfgMgr.Ibl3DBichselChargeTool(name, **kwargs) - - -############################################################################### - - -def PixelBarrelChargeTool(name="PixelBarrelChargeTool", **kwargs): - kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) - kwargs.setdefault("RndmEngine", "PixelDigitization") - return CfgMgr.PixelBarrelChargeTool(name, **kwargs) - -def PixelECChargeTool(name="PixelECChargeTool", **kwargs): - kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) - kwargs.setdefault("RndmEngine", "PixelDigitization") - return CfgMgr.PixelECChargeTool(name, **kwargs) - -def IblPlanarChargeTool(name="IblPlanarChargeTool", **kwargs): - kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) - kwargs.setdefault("RndmEngine", "PixelDigitization") - return CfgMgr.IblPlanarChargeTool(name, **kwargs) - -def Ibl3DChargeTool(name="Ibl3DChargeTool", **kwargs): - kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) - kwargs.setdefault("RndmEngine", "PixelDigitization") - return CfgMgr.Ibl3DChargeTool(name, **kwargs) + return CfgMgr.Pixel3DChargeTool(name, **kwargs) def SubChargesTool(name="SubChargesTool", **kwargs): kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) @@ -128,9 +85,6 @@ def PixelNoisyCellGenerator(name="PixelNoisyCellGenerator", **kwargs): kwargs.setdefault("RndNoiseProb", 1.e-10) return CfgMgr.PixelNoisyCellGenerator(name, **kwargs) -def PixelGangedMerger(name="PixelGangedMerger", **kwargs): - return CfgMgr.PixelGangedMerger(name, **kwargs) - def PixelChargeSmearer(name="PixelChargeSmearer", **kwargs): kwargs.setdefault("ThermalNoise", 160.0) return CfgMgr.PixelChargeSmearer(name, **kwargs) @@ -222,19 +176,16 @@ def BasicPixelDigitizationTool(name="PixelDigitizationTool", **kwargs): feSimTools = [] if GeometryFlags.isSLHC(): procTools += ['PixelDiodeCrossTalkGenerator'] - chargeTools += ['IblPlanarBichselChargeTool'] + chargeTools += ['PixelPlanarChargeTool'] feSimTools += ['FEI4SimTool'] else: procTools += ['PixelDiodeCrossTalkGenerator'] procTools += ['PixelChargeSmearer'] procTools += ['PixelNoisyCellGenerator'] - procTools += ['PixelGangedMerger'] procTools += ['PixelRandomDisabledCellGenerator'] chargeTools += ['DBMChargeTool'] - chargeTools += ['PixelECBichselChargeTool'] - chargeTools += ['PixelBarrelBichselChargeTool'] - chargeTools += ['IblPlanarBichselChargeTool'] - chargeTools += ['Ibl3DBichselChargeTool'] + chargeTools += ['PixelPlanarChargeTool'] + chargeTools += ['Pixel3DChargeTool'] feSimTools += ['FEI4SimTool'] feSimTools += ['FEI3SimTool'] kwargs.setdefault("PixelProcessorTools", procTools) diff --git a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfigDb.py b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfigDb.py index e95ffa5212812d5e5b7509ee79647fb908eddfb2..ea47b1caa44a8694963986fc24a6dc0b274784b5 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfigDb.py +++ b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfigDb.py @@ -13,15 +13,12 @@ addTool("PixelDigitization.PixelDigitizationConfig.getPixelRange", "PixelRange") addService("PixelDigitization.PixelDigitizationConfig.ChargeCollProbSvc","ChargeCollProbSvc") addTool("PixelDigitization.PixelDigitizationConfig.PixelProcessorTool","PixelProcessorTool") addTool("PixelDigitization.PixelDigitizationConfig.PixelNoisyCellGenerator", "PixelNoisyCellGenerator") -addTool("PixelDigitization.PixelDigitizationConfig.PixelGangedMerger", "PixelGangedMerger") addTool("PixelDigitization.PixelDigitizationConfig.PixelChargeSmearer", "PixelChargeSmearer") addTool("PixelDigitization.PixelDigitizationConfig.PixelDiodeCrossTalkGenerator", "PixelDiodeCrossTalkGenerator") addTool("PixelDigitization.PixelDigitizationConfig.PixelRandomDisabledCellGenerator", "PixelRandomDisabledCellGenerator") addTool("PixelDigitization.PixelDigitizationConfig.DBMChargeTool","DBMChargeTool") -addTool("PixelDigitization.PixelDigitizationConfig.PixelBarrelChargeTool","PixelBarrelChargeTool") -addTool("PixelDigitization.PixelDigitizationConfig.PixelECChargeTool","PixelECChargeTool") -addTool("PixelDigitization.PixelDigitizationConfig.IblPlanarChargeTool","IblPlanarChargeTool") -addTool("PixelDigitization.PixelDigitizationConfig.Ibl3DChargeTool","Ibl3DChargeTool") +addTool("PixelDigitization.PixelDigitizationConfig.PixelPlanarChargeTool","PixelPlanarChargeTool") +addTool("PixelDigitization.PixelDigitizationConfig.Pixel3DChargeTool","Pixel3DChargeTool") addTool("PixelDigitization.PixelDigitizationConfig.SubChargesTool","SubChargesTool") addTool("PixelDigitization.PixelDigitizationConfig.FrontEndSimTool","FrontEndSimTool") addTool("PixelDigitization.PixelDigitizationConfig.FEI4SimTool","FEI4SimTool") @@ -29,9 +26,5 @@ addTool("PixelDigitization.PixelDigitizationConfig.FEI3SimTool","FEI3SimTool") addService("PixelDigitization.PixelDigitizationConfig.TimeSvc","TimeSvc") addTool("PixelDigitization.PixelDigitizationConfig.PixelOverlayDigitizationTool", "PixelOverlayDigitizationTool") addAlgorithm("PixelDigitization.PixelDigitizationConfig.PixelOverlayDigitization", "PixelOverlayDigitization") - addTool("PixelDigitization.PixelDigitizationConfig.BichselSimTool", "BichselSimTool") -addTool("PixelDigitization.PixelDigitizationConfig.PixelBarrelBichselChargeTool", "PixelBarrelBichselChargeTool") -addTool("PixelDigitization.PixelDigitizationConfig.PixelECBichselChargeTool","PixelECBichselChargeTool") -addTool("PixelDigitization.PixelDigitizationConfig.IblPlanarBichselChargeTool", "IblPlanarBichselChargeTool") -addTool("PixelDigitization.PixelDigitizationConfig.Ibl3DBichselChargeTool", "Ibl3DBichselChargeTool") + diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/ChargeCollProbSvc.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/ChargeCollProbSvc.cxx index 758f8d26ba9dcd2cdc4da42fba55327e29e76309..9083ba40a4b1de36f5b04f2d34c75af03ade6ce3 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/ChargeCollProbSvc.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/ChargeCollProbSvc.cxx @@ -14,9 +14,6 @@ #include <fstream> -/** - ** Constructor(s) - **/ ChargeCollProbSvc::ChargeCollProbSvc(const std::string& name,ISvcLocator* svc) : AthService(name,svc) // : AthService(name,svc),log(msgSvc(),name) @@ -26,43 +23,25 @@ ChargeCollProbSvc::ChargeCollProbSvc(const std::string& name,ISvcLocator* svc) declareProperty( "CCProbMapFileFEI4", m_cc_prob_file_fei4 = "3DFEI4-2E-problist-1um_v0.txt"); } -ChargeCollProbSvc::~ChargeCollProbSvc() -{ -} - -/** - ** Initialize Service - **/ -StatusCode ChargeCollProbSvc::initialize() -{ - //MsgStream log(msgSvc(), name()); - - StatusCode result = AthService::initialize(); - if (result.isFailure()) - { - ATH_MSG_FATAL ( "Unable to initialize the service!" ); - return result; - } - - // read Charge Collection Probability Maps - - if ( this->readProbMap(m_cc_prob_file_fei3).isFailure() || this->readProbMap(m_cc_prob_file_fei4).isFailure() ){ - ATH_MSG_ERROR ( "Charge Collection Prob Maps: error in reading txt files" ); - return StatusCode::FAILURE; - } - - ATH_MSG_INFO ( "initialized service!" ); - return result; +ChargeCollProbSvc::~ChargeCollProbSvc() { } +StatusCode ChargeCollProbSvc::initialize() { + + CHECK(AthService::initialize()); + + CHECK(readProbMap(m_cc_prob_file_fei3)); + + CHECK(readProbMap(m_cc_prob_file_fei4)); + + ATH_MSG_INFO("initialized service!"); + return StatusCode::SUCCESS; } - -StatusCode ChargeCollProbSvc::finalize() -{ - return StatusCode::SUCCESS; + +StatusCode ChargeCollProbSvc::finalize() { + return StatusCode::SUCCESS; } - -StatusCode ChargeCollProbSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ + +StatusCode ChargeCollProbSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) { if ( IID_IChargeCollProbSvc == riid ) { *ppvInterface = (IChargeCollProbSvc*)this; } diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/DBMChargeTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/DBMChargeTool.cxx index bc1bedcf9d29c1861aff2c68a1b165c0a628dbac..674d92cb170c21eb2d73816960ac077c8ca334f9 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/DBMChargeTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/DBMChargeTool.cxx @@ -12,6 +12,7 @@ #include "DBMChargeTool.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" +#include "SiDigitization/SiSurfaceCharge.h" #include "InDetSimEvent/SiHit.h" #include "InDetIdentifier/PixelID.h" #include "GeneratorObjects/HepMcParticleLink.h" @@ -80,7 +81,7 @@ StatusCode DBMChargeTool::charge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeC //const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); //electronHolePairsPerEnergy = siProperties.electronHolePairsPerEnergy(); // Flers: hard-code electronHolePairsPerEnergy - electronHolePairsPerEnergy = 1. / (13. * CLHEP::eV); // was 3.62 eV. + double eleholePairEnergy = 1. / (13. * CLHEP::eV); // was 3.62 eV. double stepsize = sensorThickness/m_numberOfSteps; double tanLorentz = Module.getTanLorentzAnglePhi(); @@ -144,7 +145,7 @@ StatusCode DBMChargeTool::charge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeC SiLocalPosition chargePos = Module.hitLocalToLocal(xEtaD, xPhiD); // The parametrization of the sensor efficiency (if needed) - double ed=e1*this->electronHolePairsPerEnergy*nontrappingProbability*smearScale; + double ed=e1*eleholePairEnergy*nontrappingProbability*smearScale; //The following lines are adapted from SiDigitization's Inserter class SiSurfaceCharge scharge(chargePos,SiCharge(ed,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx index b9aa4180865ce1bc5992172972fdf63840256332..6f2486ff78f3f00e103edc83066cb3e1be34a0fe 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx @@ -49,6 +49,36 @@ void FEI3SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle int layerIndex = pixelId->layer_disk(chargedDiodes.element()->identify()); int moduleIndex = pixelId->eta_module(chargedDiodes.element()->identify()); + // Merge ganged pixel + for (SiChargedDiodeIterator i_chargedDiode=chargedDiodes.begin(); i_chargedDiode!=chargedDiodes.end(); ++i_chargedDiode) { + InDetDD::SiCellId cellID = chargedDiodes.element()->cellIdFromIdentifier(chargedDiodes.getId((*i_chargedDiode).first)); + InDetDD::SiCellId gangedCell = chargedDiodes.element()->gangedCell(cellID); + Identifier gangedID = chargedDiodes.element()->identifierFromCellId(gangedCell); + if (gangedCell.isValid()) { + SiChargedDiode *gangedChargeDiode = chargedDiodes.find(gangedID); + int phiGanged = pixelId->phi_index(gangedID); + int phiThis = pixelId->phi_index(chargedDiodes.getId((*i_chargedDiode).first)); + + if (gangedChargeDiode) { // merge charges + bool maskGanged = ((phiGanged>159) && (phiGanged<168)); + bool maskThis = ((phiThis>159) && (phiThis<168)); + // mask the one ganged pixel that does not correspond to the readout electronics. + // not really sure this is needed + if (maskGanged && maskThis) { + ATH_MSG_ERROR("FEI3SimTool: both ganged pixels are in the mask out region -> BUG!"); + } + if (maskGanged) { + (*i_chargedDiode).second.add(gangedChargeDiode->totalCharge()); // merged org pixel + SiHelper::maskOut(*gangedChargeDiode,true); + } + else { + gangedChargeDiode->add((*i_chargedDiode).second.totalCharge()); // merged org pixel + SiHelper::maskOut((*i_chargedDiode).second,true); + } + } + } + } + for (SiChargedDiodeIterator i_chargedDiode=chargedDiodes.begin(); i_chargedDiode!=chargedDiodes.end(); ++i_chargedDiode) { Identifier diodeID = chargedDiodes.getId((*i_chargedDiode).first); @@ -71,15 +101,13 @@ void FEI3SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle } if (bunchSim<0 || bunchSim>m_TimeSvc->getTimeBCN()) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } - else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim); } + else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim); } } else { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } - //=============== // Filter events - //=============== if (SiHelper::isMaskOut((*i_chargedDiode).second)) { continue; } if (SiHelper::isDisabled((*i_chargedDiode).second)) { continue; } @@ -88,6 +116,7 @@ void FEI3SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle continue; } + // charge to ToT conversion double tot = m_pixelCalibSvc->getTotMean(diodeID,(*i_chargedDiode).second.charge()); double totsig = m_pixelCalibSvc->getTotRes(diodeID,tot); diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx index 2335f0ee3f60033af6d21ef40028476eb27d0de5..de08274927e9dcb7ebbb254db5a8b5d6a4766967 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx @@ -59,7 +59,7 @@ void FEI4SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle std::vector<int> row, col; const int maxRow = p_design->rowsPerCircuit(); const int maxCol = p_design->columnsPerCircuit(); - std::vector<std::vector<int>> FEI4Map(maxRow+1,std::vector<int>(maxCol+1)); + std::vector<std::vector<int>> FEI4Map(maxRow+16,std::vector<int>(maxCol+16)); for (SiChargedDiodeIterator i_chargedDiode=chargedDiodes.begin(); i_chargedDiode!=chargedDiodes.end(); ++i_chargedDiode) { @@ -89,9 +89,7 @@ void FEI4SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } - //=============== // Filter events - //=============== if (SiHelper::isMaskOut((*i_chargedDiode).second)) { continue; } if (SiHelper::isDisabled((*i_chargedDiode).second)) { continue; } diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/Ibl3DBichselChargeTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/Ibl3DBichselChargeTool.h deleted file mode 100644 index bc3b96ddcaf0d10790cb1e62670fca2455504b65..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/Ibl3DBichselChargeTool.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef PIXELDIGITIZATION_Ibl3DBichselChargeTool_H -#define PIXELDIGITIZATION_Ibl3DBichselChargeTool_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "SubChargesTool.h" -#include "IChargeCollProbSvc.h" -#include "GaudiKernel/ITHistSvc.h" -#include "TH1.h" -#include "TH2.h" - - -// Base class -class PixelID; - -namespace InDetDD { - class SiDetectorElement; -} - -namespace CLHEP { - class HepRandomEngine; -} - -class BichselSimTool; - -class Ibl3DBichselChargeTool : public SubChargesTool { - -public: - - // Constructor: - Ibl3DBichselChargeTool( const std::string& type, const std::string& name,const IInterface* parent); - - - /** AlgTool initialize */ - virtual StatusCode initialize(); - - /** AlgTool finalize */ - virtual StatusCode finalize(); - - /** Destructor */ - virtual ~Ibl3DBichselChargeTool(); - - virtual StatusCode charge(const TimedHitPtr<SiHit> &phit, - SiChargedDiodeCollection& chargedDiodes, - const InDetDD::SiDetectorElement &Module); - - //Constants that can be set by user - int m_numberOfSteps; //number of steps for particle traveling perpendicular to detector element - - bool m_doBichsel; // re-do charge deposition following Bichsel model - double m_doBichselBetaGammaCut; // Momentum cut on beta-gamma - bool m_doDeltaRay; // implement Bichsel Model into delta-ray, which does not have truth particle link. - // We will assume all delta-ray is electron, with all energy deposited in silicon layer. So the 4-momentum can be reconstructed using energy and direction - bool m_doPU; // whether we do Bichsel model for PU - ToolHandle<BichselSimTool> m_BichselSimTool; // if yes, you need to load related tool here - -private: - /** empty constructor, make private */ - Ibl3DBichselChargeTool(); -private: - ServiceHandle<IChargeCollProbSvc> m_chargeCollSvc; - - }; - - -#endif // PIXELDIGITIZATION_Ibl3DBichselChargeTool_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/Ibl3DChargeTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/Ibl3DChargeTool.cxx deleted file mode 100644 index fea97a10d88cbc9c6773d4c9a1bbde98f57e17cb..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/Ibl3DChargeTool.cxx +++ /dev/null @@ -1,215 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// Ibl3DChargeTool.cxx -// Implementation file for class Ibl3DChargeTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "Ibl3DChargeTool.h" -#include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/PixelModuleDesign.h" -#include "InDetSimEvent/SiHit.h" -#include "InDetIdentifier/PixelID.h" -#include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" - -#include "HepMC/GenEvent.h" -#include "HepMC/GenVertex.h" -#include "HepMC/GenParticle.h" -#include "AtlasCLHEP_RandomGenerators/RandGaussZiggurat.h" - -using namespace InDetDD; - - -// Constructor with parameters: -Ibl3DChargeTool::Ibl3DChargeTool(const std::string& type, const std::string& name,const IInterface* parent): - SubChargesTool(type,name,parent), - m_numberOfSteps(50), - m_chargeCollSvc("ChargeCollProbSvc",name) -{ - declareProperty("ChargeCollProbSvc",m_chargeCollSvc); - declareProperty("numberOfSteps",m_numberOfSteps,"Number of steps for Ibl3D module"); -} - -class DetCondCFloat; - -// Destructor: -Ibl3DChargeTool::~Ibl3DChargeTool() -{ -} - -//---------------------------------------------------------------------- -// Initialize -//---------------------------------------------------------------------- -StatusCode Ibl3DChargeTool::initialize() { - StatusCode sc = SubChargesTool::initialize(); - if (sc.isFailure()) { - ATH_MSG_FATAL ( "Ibl3DChargeTool::initialize() failed"); - return sc ; - } - - // -- Get ChargeCollProb Service - sc = m_chargeCollSvc.retrieve(); - if (sc.isFailure()) { - ATH_MSG_ERROR ( "Could not retrieve ChargeCollProbSvc" ); - } - - ATH_MSG_DEBUG ( "Ibl3DChargeTool::initialize()"); - return sc ; -} - -//---------------------------------------------------------------------- -// finalize -//---------------------------------------------------------------------- -StatusCode Ibl3DChargeTool::finalize() { - StatusCode sc = AthAlgTool::finalize(); - if (sc.isFailure()) { - ATH_MSG_FATAL ( "Ibl3DChargeTool::finalize() failed"); - return sc ; - } - ATH_MSG_DEBUG ( "Ibl3DChargeTool::finalize()"); - return sc ; -} - -//---------------------------------------------------------------------- -// charge -//---------------------------------------------------------------------- -StatusCode Ibl3DChargeTool::charge(const TimedHitPtr<SiHit> &phit, - SiChargedDiodeCollection& chargedDiodes, - const InDetDD::SiDetectorElement &Module) -{ - - if (!Module.isBarrel()) { return StatusCode::SUCCESS; } - const PixelModuleDesign *p_design= static_cast<const PixelModuleDesign*>(&(Module.design())); - if (p_design->getReadoutTechnology()!=InDetDD::PixelModuleDesign::FEI4) { return StatusCode::SUCCESS; } - if (p_design->numberOfCircuits()>1) { return StatusCode::SUCCESS; } - - ATH_MSG_VERBOSE("Applying IBL3D charge processor"); - double sensorThickness = Module.design().thickness(); - double stepsize = sensorThickness/m_numberOfSteps; - const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); - electronHolePairsPerEnergy = siProperties.electronHolePairsPerEnergy(); - - // Charge Collection Probability Map bin size - const double x_bin_size = 0.001; - const double y_bin_size = 0.001; - - std::string readout; - - // determine which readout is used - // FEI4 : 50 X 250 microns - double pixel_size_x = Module.width()/p_design->rows(); - double pixel_size_y = Module.length()/p_design->columns(); - double module_size_x = Module.width(); - double module_size_y = Module.length(); - - const CLHEP::Hep3Vector pos=phit->localStartPosition(); - const CLHEP::Hep3Vector cs=phit->localEndPosition(); - - double xEta=pos[SiHit::xEta]; - double xPhi=pos[SiHit::xPhi]; - const double xDep=pos[SiHit::xDep]; - - double xEtaf = cs[SiHit::xEta]; - double xPhif = cs[SiHit::xPhi]; - const double xDepf = cs[SiHit::xDep]; - - double cEta=xEtaf-xEta; - double cPhi=xPhif-xPhi; - const double cDep=xDepf-xDep; - - // calculate the effective number of steps - double length=sqrt(cEta*cEta+cPhi*cPhi+cDep*cDep); - const int nsteps=int(length/stepsize)+1; - double es=phit->energyLoss()/static_cast<double>(nsteps); - double stepEta = cEta / nsteps; - double stepPhi = cPhi / nsteps; - double stepDep = cDep / nsteps; - - // We split the G4 step into several sub steps. The charge will be deposited at the mid point - // of these steps - for(int istep =0; istep < nsteps; istep++) { - // This will be the position of the deposited charge - double xEta1 = xEta + stepEta * (istep + 0.5); - double xPhi1 = xPhi + stepPhi * (istep + 0.5); - double depD = xDep + stepDep * (istep + 0.5); - - double spess = 0.5 * sensorThickness - Module.design().readoutSide() * depD; - if (spess<0) spess=0; - - CLHEP::Hep3Vector chargepos; - chargepos.setX(xPhi1); chargepos.setY(xEta1); chargepos.setZ(spess); - - bool coord = Module.isModuleFrame(); - - ATH_MSG_DEBUG("ismoduleframe "<<coord << " -- pos (x,y,z) = " << chargepos.x() << ", " << chargepos.y() << ", " << chargepos.z()); - - // -- change origin of coordinates to the left bottom of module - double x_new = chargepos.x() + module_size_x/2.; - double y_new = chargepos.y() + module_size_y/2.; - - // -- change from module frame to pixel frame - int nPixX = int(x_new/pixel_size_x); - int nPixY = int(y_new/pixel_size_y); - ATH_MSG_DEBUG(" -- nPixX = "<<nPixX<<" nPixY = "<<nPixY); - double x_pix = x_new - pixel_size_x*(nPixX); - double y_pix = y_new - pixel_size_y*(nPixY); - // -- change origin of coordinates to the center of the pixel - double x_pix_center = x_pix - pixel_size_x/2; - double y_pix_center = y_pix - pixel_size_y/2; - ATH_MSG_DEBUG(" -- current hit position w.r.t. pixel center = "<<x_pix_center<<" "<<y_pix_center); - - double x_neighbor; double y_neighbor; CLHEP::Hep3Vector pos_neighbor; - // -- Calculate signal in current pixel and in the neighboring ones - // -- loop in the x-coordinate - for (int i=-1; i<=1; i++){ - x_neighbor = x_pix_center - i*pixel_size_x; - // -- loop in the y-coordinate - for (int j=-1; j<=1; j++){ - y_neighbor = y_pix_center - j*pixel_size_y; - - //ATH_MSG_INFO(" (i, j) "<<i<<" "<<j<<" before cut x_neighbor " << x_neighbor << " y_neighbor "<<y_neighbor); - // -- check if the neighbor falls inside the charge collection prob map window - if ( (fabs(x_neighbor)<pixel_size_x) && (fabs(y_neighbor)<pixel_size_y) ){ - - // -- change origin of coordinates to the bottom left of the charge - // collection prob map "window", i.e. shift of 1-pixel twd bottom left - double x_neighbor_map = x_neighbor + pixel_size_x; - double y_neighbor_map = y_neighbor + pixel_size_y; - - int x_bin_cc_map = static_cast<int>(x_neighbor_map / x_bin_size); - int y_bin_cc_map = static_cast<int>(y_neighbor_map / y_bin_size); - - // -- retrieve the charge collection probability from Svc - // -- swap x and y bins to match Map coord convention - double ccprob_neighbor = m_chargeCollSvc->getProbMapEntry("FEI4",y_bin_cc_map,x_bin_cc_map); - if ( ccprob_neighbor == -1. ) return StatusCode::FAILURE; - //ATH_MSG_INFO(" (i, j) "<<i<<" "<<j<<" y_bin_cc_map "<<y_bin_cc_map << " x_bin_cc_map " << x_bin_cc_map << " charge_coll neighbor "<<ccprob_neighbor); - - double ed=es*electronHolePairsPerEnergy*ccprob_neighbor; - - // -- pixel coordinates --> module coordinates - //double x_mod = x_neighbor - half_pixel_size_x + pixel_size_x*nPixX -module_size_x/2.; - //double y_mod = y_neighbor - half_pixel_size_y + pixel_size_y*nPixY -module_size_y/2.; - double x_mod = x_neighbor + pixel_size_x/2 + pixel_size_x*nPixX -module_size_x/2.; - double y_mod = y_neighbor + pixel_size_y/2 + pixel_size_y*nPixY -module_size_y/2.; - SiLocalPosition chargePos = Module.hitLocalToLocal(y_mod,x_mod); - //ATH_MSG_INFO(" Si3D charge pos "<<chargePos<<" ed "<<ed); - - SiSurfaceCharge scharge(chargePos,SiCharge(ed,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); - SiCellId diode = Module.cellIdOfPosition(scharge.position()); - SiCharge charge = scharge.charge(); - if (diode.isValid()) { - chargedDiodes.add(diode,charge); - } - } - } - } - } - return StatusCode::SUCCESS; -} - diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/Ibl3DChargeTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/Ibl3DChargeTool.h deleted file mode 100644 index 3348f2afc780aabceae09fcedb52cf010e71cf3a..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/Ibl3DChargeTool.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef PIXELDIGITIZATION_Ibl3DChargeTool_H -#define PIXELDIGITIZATION_Ibl3DChargeTool_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "SubChargesTool.h" -#include "IChargeCollProbSvc.h" -#include "GaudiKernel/ITHistSvc.h" -#include "TH1.h" -#include "TH2.h" - - -// Base class -class PixelID; - -namespace InDetDD { - class SiDetectorElement; -} - -namespace CLHEP { - class HepRandomEngine; -} - -class Ibl3DChargeTool : public SubChargesTool { - -public: - - // Constructor: - Ibl3DChargeTool( const std::string& type, const std::string& name,const IInterface* parent); - - - /** AlgTool initialize */ - virtual StatusCode initialize(); - - /** AlgTool finalize */ - virtual StatusCode finalize(); - - /** Destructor */ - virtual ~Ibl3DChargeTool(); - - virtual StatusCode charge(const TimedHitPtr<SiHit> &phit, - SiChargedDiodeCollection& chargedDiodes, - const InDetDD::SiDetectorElement &Module); - - //Constants that can be set by user - int m_numberOfSteps; //number of steps for particle traveling perpendicular to detector element - -private: - /** empty constructor, make private */ - Ibl3DChargeTool(); -private: - ServiceHandle<IChargeCollProbSvc> m_chargeCollSvc; - - }; - - -#endif // PIXELDIGITIZATION_Ibl3DChargeTool_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/IblPlanarBichselChargeTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/IblPlanarBichselChargeTool.h deleted file mode 100644 index 195e18f9caa859b8adae6afbe8f1824c24b4d9b8..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/IblPlanarBichselChargeTool.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// IblPlanarBichselChargeTool.h -// Header file for class IblPlanarBichselChargeTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -// -// Configurable Parameters -// -// -numberOfSteps Geant4:number of steps for IblPlanar -// -numberOfCharges Geant4:number of charges for IblPlanar -// -diffusionConstant Geant4:Diffusion Constant for IblPlanar -// -////////////////////////////////////////////////////////////////// - -#ifndef PIXELDIGITIZATION_IblPlanarBichselChargeTool_H -#define PIXELDIGITIZATION_IblPlanarBichselChargeTool_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "SubChargesTool.h" - -// Base class -class PixelID; - -namespace InDetDD { - class SiDetectorElement; -} - -namespace CLHEP { - class HepRandomEngine; -} - -class BichselSimTool; - -class IblPlanarBichselChargeTool : public SubChargesTool { - -public: - - // Constructor: - IblPlanarBichselChargeTool( const std::string& type, const std::string& name,const IInterface* parent); - - /** AlgTool initialize */ - virtual StatusCode initialize(); - - /** AlgTool finalize */ - virtual StatusCode finalize(); - - /** Destructor */ - virtual ~IblPlanarBichselChargeTool(); - - virtual StatusCode charge(const TimedHitPtr<SiHit> &phit, - SiChargedDiodeCollection& chargedDiodes, - const InDetDD::SiDetectorElement &Module); - - //Constants that can be set by user - int m_numberOfSteps; //number of steps for particle traveling perpendicular to detector element - int m_numberOfCharges; - double m_diffusionConstant; - - bool m_doBichsel; // re-do charge deposition following Bichsel model - double m_doBichselBetaGammaCut; // Momentum cut on beta-gamma - bool m_doDeltaRay; // implement Bichsel Model into delta-ray, which does not have truth particle link. - // We will assume all delta-ray is electron, with all energy deposited in silicon layer. So the 4-momentum can be reconstructed using energy and direction - bool m_doPU; // whether we apply Bichsel model on PU - ToolHandle<BichselSimTool> m_BichselSimTool; // if yes, you need to load related tool here - -private: - /** empty constructor, make private */ - IblPlanarBichselChargeTool(); - -void simulateBow(const InDetDD::SiDetectorElement * element,double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const; -private: - - }; - - -#endif // PIXELDIGITIZATION_IblPlanarBichselChargeTool_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/IblPlanarChargeTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/IblPlanarChargeTool.cxx deleted file mode 100644 index dd283aa6f2a3dcb97fd339d6902f79ab80f7f4cc..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/IblPlanarChargeTool.cxx +++ /dev/null @@ -1,222 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// IblPlanarChargeTool.cxx -// Implementation file for class IblPlanarChargeTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "IblPlanarChargeTool.h" -#include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/PixelModuleDesign.h" -#include "InDetSimEvent/SiHit.h" -#include "InDetIdentifier/PixelID.h" -#include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" - -#include "HepMC/GenEvent.h" -#include "HepMC/GenVertex.h" -#include "HepMC/GenParticle.h" -#include "AtlasCLHEP_RandomGenerators/RandGaussZiggurat.h" - -using namespace InDetDD; - - -// Constructor with parameters: -IblPlanarChargeTool::IblPlanarChargeTool(const std::string& type, const std::string& name,const IInterface* parent): - SubChargesTool(type,name,parent), - m_numberOfSteps(50), - m_numberOfCharges(10), - m_diffusionConstant(.007) - -{ - declareProperty("numberOfSteps",m_numberOfSteps,"Geant4:number of steps for IblPlanar"); - declareProperty("numberOfCharges",m_numberOfCharges,"Geant4:number of charges for IblPlanar"); - declareProperty("diffusionConstant",m_diffusionConstant,"Geant4:Diffusion Constant for IblPlanar"); - -} - -class DetCondCFloat; - -// Destructor: -IblPlanarChargeTool::~IblPlanarChargeTool() { } - -//---------------------------------------------------------------------- -// Initialize -//---------------------------------------------------------------------- -StatusCode IblPlanarChargeTool::initialize() { - StatusCode sc = SubChargesTool::initialize(); - if (sc.isFailure()) { - ATH_MSG_FATAL ( "IblPlanarChargeTool::initialize() failed"); - return sc ; - } - ATH_MSG_DEBUG ( "IblPlanarChargeTool::initialize()"); - return sc ; -} - -//---------------------------------------------------------------------- -// finalize -//---------------------------------------------------------------------- -StatusCode IblPlanarChargeTool::finalize() { - StatusCode sc = AthAlgTool::finalize(); - if (sc.isFailure()) { - ATH_MSG_FATAL ( "IblPlanarChargeTool::finalize() failed"); - return sc ; - } - ATH_MSG_DEBUG ( "IblPlanarChargeTool::finalize()"); - return sc ; -} - -//---------------------------------------------------------------------- -// charge -//---------------------------------------------------------------------- -StatusCode IblPlanarChargeTool::charge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module) { - - if (!Module.isBarrel()) { return StatusCode::SUCCESS; } - const PixelModuleDesign *p_design= static_cast<const PixelModuleDesign*>(&(Module.design())); - if (p_design->getReadoutTechnology()==InDetDD::PixelModuleDesign::FEI3) { return StatusCode::SUCCESS; } // just allowing ITk - if (p_design->numberOfCircuits()<2) { return StatusCode::SUCCESS; } - - ATH_MSG_DEBUG("Applying IBLPLANAR charge processor"); - const HepMcParticleLink McLink = HepMcParticleLink(phit->trackNumber(),phit.eventId()); - const HepMC::GenParticle* genPart= McLink.cptr(); - bool delta_hit = true; - if (genPart) delta_hit = false; - double sensorThickness = Module.design().thickness(); - const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); - electronHolePairsPerEnergy = siProperties.electronHolePairsPerEnergy(); -/* - const PixelModuleDesign *p_design= dynamic_cast<const PixelModuleDesign *>(&(Module.design() ) ); - double pixel_size_x = Module.width()/p_design->rows(); - double pixel_size_y = Module.length()/p_design->columns(); - double module_size_x = Module.width(); - double module_size_y = Module.length(); - ATH_MSG_INFO("IBLPLANAR: PixelSize = (" << pixel_size_x << "," << pixel_size_y << ")"); - ATH_MSG_INFO("IBLPLANAR: ModuleSize = (" << module_size_x << "," << module_size_y << ")"); -*/ - double stepsize = sensorThickness/m_numberOfSteps; - double tanLorentz = Module.getTanLorentzAnglePhi(); - const CLHEP::Hep3Vector pos=phit->localStartPosition(); - const CLHEP::Hep3Vector cs=phit->localEndPosition(); - - double xEta=pos[SiHit::xEta]; - double xPhi=pos[SiHit::xPhi]; - const double xDep=pos[SiHit::xDep]; - - double xEtaf = cs[SiHit::xEta]; - double xPhif = cs[SiHit::xPhi]; - const double xDepf = cs[SiHit::xDep]; - - if (!m_disableDistortions && !delta_hit) simulateBow(&Module,xPhi,xEta,xDep,xPhif,xEtaf,xDepf); - - double cEta=xEtaf-xEta; - double cPhi=xPhif-xPhi; - const double cDep=xDepf-xDep; - - double length=sqrt(cEta*cEta+cPhi*cPhi+cDep*cDep); - const int nsteps=int(length/stepsize)+1; - const int ncharges=this->m_numberOfCharges*this->m_numberOfSteps/nsteps+1; - - double stepEta = cEta / nsteps; - double stepPhi = cPhi / nsteps; - double stepDep = cDep / nsteps; - - double e1=phit->energyLoss()/static_cast<double>(nsteps*ncharges); - - double coLorentz=sqrt(1+pow(tanLorentz,2)); - - for(int istep =0; istep < nsteps; istep++) { - double xEta1 = xEta + stepEta * (istep + 0.5); - double xPhi1 = xPhi + stepPhi * (istep + 0.5); - double depD = xDep + stepDep * (istep + 0.5); - - // Distance between charge and readout side. p_design->readoutSide() is - // +1 if readout side is in +ve depth axis direction and visa-versa. - double spess = 0.5 * sensorThickness - Module.design().readoutSide() * depD; - if (spess<0) spess=0; - - for(int i=0 ; i<ncharges ; i++) { - - // diffusion sigma - double rdif=this->m_diffusionConstant*sqrt(spess*coLorentz/0.3); - - // position at the surface - double xPhiD=xPhi1+spess*tanLorentz+rdif*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); - double xEtaD=xEta1+rdif*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); - - // Slim Edge for IBL planar sensors: - // TODO: Access these from somewhere - if(std::abs(xEtaD) > 20.440)e1=0.; - if(std::abs(xEtaD)< 20.440 && std::abs(xEtaD)> 20.200){ - if(xEtaD>0){ - e1=e1*(68.13-xEtaD*3.333); - xEtaD = xEtaD - 0.250; - }else{ - e1=e1*(68.13+xEtaD*3.333); - xEtaD = xEtaD + 0.250; - } - } - if(std::abs(xEtaD)< 20.200 && std::abs(xEtaD)> 20.100){ - if(xEtaD>0){ - e1=e1*(41.2-xEtaD*2.); - xEtaD = xEtaD - 0.250; - }else{ - e1=e1*(41.2+xEtaD*2.); - xEtaD = xEtaD + 0.250; - } - } - - - // Get the charge position in Reconstruction local coordinates. - SiLocalPosition chargePos = Module.hitLocalToLocal(xEtaD, xPhiD); - - // The parametrization of the sensor efficiency (if needed) - double ed=e1*this->electronHolePairsPerEnergy; - - //The following lines are adapted from SiDigitization's Inserter class - SiSurfaceCharge scharge(chargePos,SiCharge(ed,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); - - SiCellId diode = Module.cellIdOfPosition(scharge.position()); - - SiCharge charge = scharge.charge(); - - if (diode.isValid()) { - chargedDiodes.add(diode,charge); - } - } - } - return StatusCode::SUCCESS; -} - -void IblPlanarChargeTool::simulateBow(const InDetDD::SiDetectorElement * element, - double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const { - - // The corrections are assumed to be in the reconstruction local frame, so - // we must convertfrom the hit local frame to the reconstruction local frame. - // In fact the frames are the same for the pixel barrel so these gymnastics are not - // really needed but its safer to do it properly. - - // If tool is NONE we apply no correction. - if (m_pixDistoTool.empty()) return; - Amg::Vector3D dir(element->hitPhiDirection() * (xf - xi), - element->hitEtaDirection() * (yf - yi), - element->hitDepthDirection() * (zf - zi)); - - Amg::Vector2D locposi = element->hitLocalToLocal(yi, xi); - Amg::Vector2D locposf = element->hitLocalToLocal(yf, xf); - - Amg::Vector2D newLocposi = m_pixDistoTool->correctSimulation(element->identify(), locposi, dir); - Amg::Vector2D newLocposf = m_pixDistoTool->correctSimulation(element->identify(), locposf, dir); - - // Extract new coordinates and convert back to hit frame. - xi = newLocposi[Trk::x] * element->hitPhiDirection(); - yi = newLocposi[Trk::y] * element->hitEtaDirection(); - - xf = newLocposf[Trk::x] * element->hitPhiDirection(); - yf = newLocposf[Trk::y] * element->hitEtaDirection(); - -} - diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/IblPlanarChargeTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/IblPlanarChargeTool.h deleted file mode 100644 index 25b554b8442742a5383ef4c9a9b75c367705c18a..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/IblPlanarChargeTool.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// IblPlanarChargeTool.h -// Header file for class IblPlanarChargeTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -// -// Configurable Parameters -// -// -numberOfSteps Geant4:number of steps for IblPlanar -// -numberOfCharges Geant4:number of charges for IblPlanar -// -diffusionConstant Geant4:Diffusion Constant for IblPlanar -// -////////////////////////////////////////////////////////////////// - -#ifndef PIXELDIGITIZATION_IblPlanarChargeTool_H -#define PIXELDIGITIZATION_IblPlanarChargeTool_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "SubChargesTool.h" - -// Base class -class PixelID; - -namespace InDetDD { - class SiDetectorElement; -} - -namespace CLHEP { - class HepRandomEngine; -} - -class IblPlanarChargeTool : public SubChargesTool { - -public: - - // Constructor: - IblPlanarChargeTool( const std::string& type, const std::string& name,const IInterface* parent); - - /** AlgTool initialize */ - virtual StatusCode initialize(); - - /** AlgTool finalize */ - virtual StatusCode finalize(); - - /** Destructor */ - virtual ~IblPlanarChargeTool(); - - virtual StatusCode charge(const TimedHitPtr<SiHit> &phit, - SiChargedDiodeCollection& chargedDiodes, - const InDetDD::SiDetectorElement &Module); - - //Constants that can be set by user - int m_numberOfSteps; //number of steps for particle traveling perpendicular to detector element - int m_numberOfCharges; - double m_diffusionConstant; - - - -private: - /** empty constructor, make private */ - IblPlanarChargeTool(); - -void simulateBow(const InDetDD::SiDetectorElement * element,double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const; -private: - - }; - - -#endif // PIXELDIGITIZATION_IblPlanarChargeTool_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/Ibl3DBichselChargeTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/Pixel3DChargeTool.cxx similarity index 73% rename from InnerDetector/InDetDigitization/PixelDigitization/src/Ibl3DBichselChargeTool.cxx rename to InnerDetector/InDetDigitization/PixelDigitization/src/Pixel3DChargeTool.cxx index 379523876870925fd396ad744aa2c237a151d78c..a3afb8b46d64863f3feffc4c0785f7cb224538bc 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/Ibl3DBichselChargeTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/Pixel3DChargeTool.cxx @@ -3,16 +3,17 @@ */ /////////////////////////////////////////////////////////////////// -// Ibl3DBichselChargeTool.cxx -// Implementation file for class Ibl3DBichselChargeTool +// Pixel3DChargeTool.cxx +// Implementation file for class Pixel3DChargeTool /////////////////////////////////////////////////////////////////// // (c) ATLAS Detector software /////////////////////////////////////////////////////////////////// -#include "Ibl3DBichselChargeTool.h" +#include "Pixel3DChargeTool.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" #include "InDetSimEvent/SiHit.h" +#include "SiDigitization/SiSurfaceCharge.h" #include "InDetIdentifier/PixelID.h" #include "GeneratorObjects/HepMcParticleLink.h" #include "SiPropertiesSvc/SiliconProperties.h" @@ -22,14 +23,13 @@ #include "HepMC/GenParticle.h" #include "AtlasCLHEP_RandomGenerators/RandGaussZiggurat.h" -#include "BichselSimTool.h" #include "TLorentzVector.h" using namespace InDetDD; // Constructor with parameters: -Ibl3DBichselChargeTool::Ibl3DBichselChargeTool(const std::string& type, const std::string& name,const IInterface* parent): +Pixel3DChargeTool::Pixel3DChargeTool(const std::string& type, const std::string& name,const IInterface* parent): SubChargesTool(type,name,parent), m_numberOfSteps(50), m_doBichsel(false), @@ -40,7 +40,7 @@ Ibl3DBichselChargeTool::Ibl3DBichselChargeTool(const std::string& type, const st m_chargeCollSvc("ChargeCollProbSvc",name) { declareProperty("ChargeCollProbSvc",m_chargeCollSvc); - declareProperty("numberOfSteps",m_numberOfSteps,"Number of steps for Ibl3D module"); + declareProperty("numberOfSteps",m_numberOfSteps,"Number of steps for Pixel3D module"); declareProperty("doBichsel", m_doBichsel, "re-do charge deposition following Bichsel model"); declareProperty("doBichselBetaGammaCut", m_doBichselBetaGammaCut, "minimum beta-gamma for particle to be re-simulated through Bichsel Model"); declareProperty("doDeltaRay", m_doDeltaRay, "whether we simulate delta-ray using Bichsel model"); @@ -51,45 +51,45 @@ Ibl3DBichselChargeTool::Ibl3DBichselChargeTool(const std::string& type, const st class DetCondCFloat; // Destructor: -Ibl3DBichselChargeTool::~Ibl3DBichselChargeTool() { } +Pixel3DChargeTool::~Pixel3DChargeTool() { } //---------------------------------------------------------------------- // Initialize //---------------------------------------------------------------------- -StatusCode Ibl3DBichselChargeTool::initialize() { +StatusCode Pixel3DChargeTool::initialize() { CHECK(SubChargesTool::initialize()); // -- Get ChargeCollProb Service CHECK(m_chargeCollSvc.retrieve()); - ATH_MSG_INFO("You are using Ibl3DBichselChargeTool, not Ibl3DChargeTool"); + ATH_MSG_INFO("You are using Pixel3DChargeTool, not Pixel3DChargeTool"); if(m_doBichsel){ - ATH_MSG_INFO("Bichsel Digitization is turned ON in Ibl3DBichselChargeTool!"); + ATH_MSG_INFO("Bichsel Digitization is turned ON in Pixel3DChargeTool!"); CHECK(m_BichselSimTool.retrieve()); } else { - ATH_MSG_INFO("Bichsel Digitization is turned OFF in Ibl3DBichselChargeTool!"); + ATH_MSG_INFO("Bichsel Digitization is turned OFF in Pixel3DChargeTool!"); } m_doDeltaRay = (m_doBichsel && m_doDeltaRay); // if we don't do Bichsel model, no re-simulation on delta-ray at all! - ATH_MSG_DEBUG("Ibl3DBichselChargeTool::initialize()"); + ATH_MSG_DEBUG("Pixel3DChargeTool::initialize()"); return StatusCode::SUCCESS; } //---------------------------------------------------------------------- // finalize //---------------------------------------------------------------------- -StatusCode Ibl3DBichselChargeTool::finalize() { - ATH_MSG_DEBUG("Ibl3DBichselChargeTool::finalize()"); +StatusCode Pixel3DChargeTool::finalize() { + ATH_MSG_DEBUG("Pixel3DChargeTool::finalize()"); return StatusCode::SUCCESS; } //---------------------------------------------------------------------- // charge //---------------------------------------------------------------------- -StatusCode Ibl3DBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module) { +StatusCode Pixel3DChargeTool::charge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module) { if (!Module.isBarrel()) { return StatusCode::SUCCESS; } const PixelModuleDesign *p_design= static_cast<const PixelModuleDesign*>(&(Module.design())); @@ -104,7 +104,7 @@ StatusCode Ibl3DBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, SiChar double sensorThickness = Module.design().thickness(); double stepsize = sensorThickness/m_numberOfSteps; const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); - electronHolePairsPerEnergy = siProperties.electronHolePairsPerEnergy(); + double eleholePairEnergy = siProperties.electronHolePairsPerEnergy(); // Charge Collection Probability Map bin size const double x_bin_size = 0.001; @@ -243,9 +243,15 @@ StatusCode Ibl3DBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, SiChar // double xEta1 = xEta + stepEta * (istep + 0.5); // double xPhi1 = xPhi + stepPhi * (istep + 0.5); // double depD = xDep + stepDep * (istep + 0.5); - double xEta1 = xEta + 1.0*iHitRecord.first/iTotalLength*cEta; - double xPhi1 = xPhi + 1.0*iHitRecord.first/iTotalLength*cPhi; - double depD = xDep + 1.0*iHitRecord.first/iTotalLength*cDep; + + double xEta1 = xEta; + double xPhi1 = xPhi; + double depD = xDep; + if (iTotalLength) { + xEta1 += 1.0*iHitRecord.first/iTotalLength*cEta; + xPhi1 += 1.0*iHitRecord.first/iTotalLength*cPhi; + depD += 1.0*iHitRecord.first/iTotalLength*cDep; + } double es_current = 1.0*iHitRecord.second/1.E+6; @@ -278,48 +284,47 @@ StatusCode Ibl3DBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, SiChar // -- Calculate signal in current pixel and in the neighboring ones // -- loop in the x-coordinate for (int i=-1; i<=1; i++){ - x_neighbor = x_pix_center - i*pixel_size_x; - // -- loop in the y-coordinate - for (int j=-1; j<=1; j++){ - y_neighbor = y_pix_center - j*pixel_size_y; - - //ATH_MSG_INFO(" (i, j) "<<i<<" "<<j<<" before cut x_neighbor " << x_neighbor << " y_neighbor "<<y_neighbor); - // -- check if the neighbor falls inside the charge collection prob map window - if ( (fabs(x_neighbor)<pixel_size_x) && (fabs(y_neighbor)<pixel_size_y) ){ - - // -- change origin of coordinates to the bottom left of the charge - // collection prob map "window", i.e. shift of 1-pixel twd bottom left - double x_neighbor_map = x_neighbor + pixel_size_x; - double y_neighbor_map = y_neighbor + pixel_size_y; - - int x_bin_cc_map = static_cast<int>(x_neighbor_map / x_bin_size); - int y_bin_cc_map = static_cast<int>(y_neighbor_map / y_bin_size); - - // -- retrieve the charge collection probability from Svc - // -- swap x and y bins to match Map coord convention - double ccprob_neighbor = m_chargeCollSvc->getProbMapEntry("FEI4",y_bin_cc_map,x_bin_cc_map); - if ( ccprob_neighbor == -1. ) return StatusCode::FAILURE; - //ATH_MSG_INFO(" (i, j) "<<i<<" "<<j<<" y_bin_cc_map "<<y_bin_cc_map << " x_bin_cc_map " << x_bin_cc_map << " charge_coll neighbor "<<ccprob_neighbor); - - // double ed=es*electronHolePairsPerEnergy*ccprob_neighbor; - double ed=es_current*electronHolePairsPerEnergy*ccprob_neighbor; - - // -- pixel coordinates --> module coordinates - //double x_mod = x_neighbor - half_pixel_size_x + pixel_size_x*nPixX -module_size_x/2.; - //double y_mod = y_neighbor - half_pixel_size_y + pixel_size_y*nPixY -module_size_y/2.; - double x_mod = x_neighbor + pixel_size_x/2 + pixel_size_x*nPixX -module_size_x/2.; - double y_mod = y_neighbor + pixel_size_y/2 + pixel_size_y*nPixY -module_size_y/2.; - SiLocalPosition chargePos = Module.hitLocalToLocal(y_mod,x_mod); - //ATH_MSG_INFO(" Si3D charge pos "<<chargePos<<" ed "<<ed); - - SiSurfaceCharge scharge(chargePos,SiCharge(ed,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); - SiCellId diode = Module.cellIdOfPosition(scharge.position()); - SiCharge charge = scharge.charge(); - if (diode.isValid()) { - chargedDiodes.add(diode,charge); - } + x_neighbor = x_pix_center - i*pixel_size_x; + // -- loop in the y-coordinate + for (int j=-1; j<=1; j++){ + y_neighbor = y_pix_center - j*pixel_size_y; + + //ATH_MSG_INFO(" (i, j) "<<i<<" "<<j<<" before cut x_neighbor " << x_neighbor << " y_neighbor "<<y_neighbor); + // -- check if the neighbor falls inside the charge collection prob map window + if ( (fabs(x_neighbor)<pixel_size_x) && (fabs(y_neighbor)<pixel_size_y) ){ + + // -- change origin of coordinates to the bottom left of the charge + // collection prob map "window", i.e. shift of 1-pixel twd bottom left + double x_neighbor_map = x_neighbor + pixel_size_x; + double y_neighbor_map = y_neighbor + pixel_size_y; + + int x_bin_cc_map = static_cast<int>(x_neighbor_map / x_bin_size); + int y_bin_cc_map = static_cast<int>(y_neighbor_map / y_bin_size); + + // -- retrieve the charge collection probability from Svc + // -- swap x and y bins to match Map coord convention + double ccprob_neighbor = m_chargeCollSvc->getProbMapEntry("FEI4",y_bin_cc_map,x_bin_cc_map); + if ( ccprob_neighbor == -1. ) return StatusCode::FAILURE; + //ATH_MSG_INFO(" (i, j) "<<i<<" "<<j<<" y_bin_cc_map "<<y_bin_cc_map << " x_bin_cc_map " << x_bin_cc_map << " charge_coll neighbor "<<ccprob_neighbor); + + double ed=es_current*eleholePairEnergy*ccprob_neighbor; + + // -- pixel coordinates --> module coordinates + //double x_mod = x_neighbor - half_pixel_size_x + pixel_size_x*nPixX -module_size_x/2.; + //double y_mod = y_neighbor - half_pixel_size_y + pixel_size_y*nPixY -module_size_y/2.; + double x_mod = x_neighbor + pixel_size_x/2 + pixel_size_x*nPixX -module_size_x/2.; + double y_mod = y_neighbor + pixel_size_y/2 + pixel_size_y*nPixY -module_size_y/2.; + SiLocalPosition chargePos = Module.hitLocalToLocal(y_mod,x_mod); + //ATH_MSG_INFO(" Si3D charge pos "<<chargePos<<" ed "<<ed); + + SiSurfaceCharge scharge(chargePos,SiCharge(ed,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); + SiCellId diode = Module.cellIdOfPosition(scharge.position()); + SiCharge charge = scharge.charge(); + if (diode.isValid()) { + chargedDiodes.add(diode,charge); } } + } } } diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/Pixel3DChargeTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/Pixel3DChargeTool.h new file mode 100644 index 0000000000000000000000000000000000000000..508eb7d339811e50a76fd0533901ea63f254cddc --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/Pixel3DChargeTool.h @@ -0,0 +1,38 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef PIXELDIGITIZATION_Pixel3DChargeTool_H +#define PIXELDIGITIZATION_Pixel3DChargeTool_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "SubChargesTool.h" +#include "IChargeCollProbSvc.h" +#include "GaudiKernel/ITHistSvc.h" + +#include "BichselSimTool.h" + +class Pixel3DChargeTool : public SubChargesTool { + + public: + Pixel3DChargeTool( const std::string& type, const std::string& name,const IInterface* parent); + virtual StatusCode initialize(); + virtual StatusCode finalize(); + virtual ~Pixel3DChargeTool(); + + virtual StatusCode charge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module); + + private: + Pixel3DChargeTool(); + + int m_numberOfSteps; + bool m_doBichsel; // re-do charge deposition following Bichsel model + double m_doBichselBetaGammaCut; // Momentum cut on beta-gamma + bool m_doDeltaRay; // implement Bichsel Model into delta-ray, which does not have truth particle link. + // We will assume all delta-ray is electron, with all energy deposited in silicon layer. So the 4-momentum can be reconstructed using energy and direction + bool m_doPU; // whether we do Bichsel model for PU + ToolHandle<BichselSimTool> m_BichselSimTool; // if yes, you need to load related tool here + ServiceHandle<IChargeCollProbSvc> m_chargeCollSvc; +}; + +#endif // PIXELDIGITIZATION_Pixel3DChargeTool_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelBarrelBichselChargeTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelBarrelBichselChargeTool.cxx deleted file mode 100644 index ff0eeb9d785282ec0314137aed7b43bdcbd59b88..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelBarrelBichselChargeTool.cxx +++ /dev/null @@ -1,597 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// PixelBarrelBichselChargeTool.cxx -// Implementation file for class PixelBarrelBichselChargeTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef __BICHSEL_TIMER__ -// #define __BICHSEL_TIMER__ -#endif - -#include "PixelBarrelBichselChargeTool.h" -#include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/PixelModuleDesign.h" -#include "InDetSimEvent/SiHit.h" -#include "InDetIdentifier/PixelID.h" -#include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" -//#include "GeoPrimitives/GeoPrimitivesHelpers.h" -#include "HepMC/GenEvent.h" -#include "HepMC/GenVertex.h" -#include "HepMC/GenParticle.h" -#include "AtlasCLHEP_RandomGenerators/RandGaussZiggurat.h" - -#include "BichselSimTool.h" -#include "TLorentzVector.h" - -#include <chrono> - -using namespace InDetDD; - -// Constructor with parameters: -PixelBarrelBichselChargeTool::PixelBarrelBichselChargeTool(const std::string& type, const std::string& name,const IInterface* parent): - SubChargesTool(type,name,parent), - m_numberOfSteps(50), - m_numberOfCharges(10), - m_diffusionConstant(.007), - m_doBichsel(false), - //m_doBichselMomentumCut(1000.), // need to change to beta-gamma cut - m_doBichselBetaGammaCut(0.1), // replace momentum cut - m_doDeltaRay(false), // need validation - m_doPU(true), - m_BichselSimTool("BichselSimTool"), - m_OutputFileName("EnergyDeposition.root"), - m_doHITPlots(false), - f_output(0), - h_Length(0), - h_hitTime(0), - h_EnergyDepositionBichsel(0), - h_EnergyDepositionNominal(0), - h_EnergyDepositionDeltaRay(0), - h_EnergyDepositionDeltaRay_Bichsel(0), - h_EnergyDepositionDeltaRay_Nominal(0), - h_isRealBichsel_DeltaRay(0), - h_isRealBichsel_Primary(0), - h_largestEnergyDeposition(0), - h_twolargestEnergyDeposition(0), - h_timer_execute(0), - h_timer_BichselSim(0), - h_timer_DigiLayer(0), - h_timer_diffuse(0), - h_hitCategory(0) -{ - declareProperty("numberOfSteps",m_numberOfSteps,"Geant4:number of steps for PixelBarrel"); - declareProperty("numberOfCharges",m_numberOfCharges,"Geant4:number of charges for PixelBarrel"); - declareProperty("diffusionConstant",m_diffusionConstant,"Geant4:Diffusion Constant for PixelBarrel"); - declareProperty("doBichsel", m_doBichsel, "re-do charge deposition following Bichsel model"); - //declareProperty("doBichselMomentumCut", m_doBichselMomentumCut, "minimum MOMENTUM for particle to be re-simulated through Bichsel Model"); - declareProperty("doBichselBetaGammaCut", m_doBichselBetaGammaCut, "minimum beta-gamma for particle to be re-simulated through Bichsel Model"); - declareProperty("doDeltaRay", m_doDeltaRay, "whether we simulate delta-ray using Bichsel model"); - declareProperty("doPU", m_doPU, "Whether we apply Bichsel model on PU"); - declareProperty("BichselSimTool", m_BichselSimTool, "tool that implements Bichsel model"); - declareProperty("OutputFileName", m_OutputFileName, "name of output file for customized study during digitization"); - declareProperty("doHITPlots", m_doHITPlots, "whether we make hit plots"); -} - -class DetCondCFloat; - -// Destructor: -PixelBarrelBichselChargeTool::~PixelBarrelBichselChargeTool() { } - -//---------------------------------------------------------------------- -// Initialize -//---------------------------------------------------------------------- -StatusCode PixelBarrelBichselChargeTool::initialize() { - - CHECK(SubChargesTool::initialize()); - ATH_MSG_INFO("You are using PixelBarrelBichselChargeTool, not PixelBarrelChargeTool"); - - if (m_doBichsel) { - ATH_MSG_INFO("Bichsel Digitization is turned ON in PixelBarrelBichselChargeTool!"); - CHECK(m_BichselSimTool.retrieve()); - } - else { - ATH_MSG_INFO("Bichsel Digitization is turned OFF in PixelBarrelBichselChargeTool!"); - } - - m_doDeltaRay = (m_doBichsel && m_doDeltaRay); // if we don't do Bichsel model, no re-simulation on delta-ray at all! - - if(m_doHITPlots){ - f_output = new TFile(m_OutputFileName.data(), "RECREATE"); - - ATH_MSG_INFO("Initializing diagnosing root file ..."); - - h_Length = new TH1D("Length", "Length", 500, 0, 1000); - h_hitTime = new TH1D("HitTime", "HitTime", 2000, -100, 100); - h_EnergyDepositionNominal = new TH1D("EnergyDepositionNominal", "EnergyDepositionNominal", 500, 0, 1000); - h_EnergyDepositionBichsel = new TH1D("EnergyDepositionBichsel", "EnergyDepositionBichsel", 500, 0, 1000); - h_EnergyDepositionDeltaRay = new TH1D("EnergyDepositionDeltaRay", "EnergyDepositionDeltaRay", 500, 0, 1000); - h_EnergyDepositionDeltaRay_Bichsel = new TH1D("EnergyDepositionDeltaRay_Bichsel", "EnergyDepositionDeltaRay_Bichsel", 500, 0, 1000); - h_EnergyDepositionDeltaRay_Nominal = new TH1D("EnergyDepositionDeltaRay_Nominal", "EnergyDepositionDeltaRay_Nominal", 500, 0, 1000); - - h_largestEnergyDeposition = new TH1D("largestEnergyDeposition", "largestEnergyDeposition", 100, 0, 1); - h_twolargestEnergyDeposition = new TH1D("twolargestEnergyDeposition", "twolargestEnergyDeposition", 100, 0, 1); - - h_isRealBichsel_DeltaRay = new TH1D("isRealBichsel_DeltaRay", "isRealBichsel_DeltaRay", 2, -0.5, 1.5); - h_isRealBichsel_Primary = new TH1D("isRealBichsel_Primary", "isRealBichsel_Primary", 2, -0.5, 1.5); - - h_dEdxBetaGammaMap_Bichsel.clear(); - h_dEdxBetaGammaMap_Bichsel["proton"] = new TH2D("BetaGamma_dEdx_Bichsel_proton", "BetaGamma_dEdx_Bichsel_proton", 600, -1, 5, 600, 0, 3000); - h_dEdxBetaGammaMap_Bichsel["pion"] = new TH2D("BetaGamma_dEdx_Bichsel_pion", "BetaGamma_dEdx_Bichsel_pion", 600, -1, 5, 600, 0, 3000); - h_dEdxBetaGammaMap_Bichsel["electron"] = new TH2D("BetaGamma_dEdx_Bichsel_electron", "BetaGamma_dEdx_Bichsel_electron", 600, -1, 5, 600, 0, 3000); - h_dEdxBetaGammaMap_Bichsel["kaon"] = new TH2D("BetaGamma_dEdx_Bichsel_kaon", "BetaGamma_dEdx_Bichsel_kaon", 600, -1, 5, 600, 0, 3000); - h_dEdxBetaGammaMap_Bichsel["muon"] = new TH2D("BetaGamma_dEdx_Bichsel_muon", "BetaGamma_dEdx_Bichsel_muon", 600, -1, 5, 600, 0, 3000); - - h_dEdxBetaGammaMap_Nominal.clear(); - h_dEdxBetaGammaMap_Nominal["proton"] = new TH2D("BetaGamma_dEdx_Nominal_proton", "BetaGamma_dEdx_Nominal_proton", 600, -1, 5, 600, 0, 3000); - h_dEdxBetaGammaMap_Nominal["pion"] = new TH2D("BetaGamma_dEdx_Nominal_pion", "BetaGamma_dEdx_Nominal_pion", 600, -1, 5, 600, 0, 3000); - h_dEdxBetaGammaMap_Nominal["electron"] = new TH2D("BetaGamma_dEdx_Nominal_electron", "BetaGamma_dEdx_Nominal_electron", 600, -1, 5, 600, 0, 3000); - h_dEdxBetaGammaMap_Nominal["kaon"] = new TH2D("BetaGamma_dEdx_Nominal_kaon", "BetaGamma_dEdx_Nominal_kaon", 600, -1, 5, 600, 0, 3000); - h_dEdxBetaGammaMap_Nominal["muon"] = new TH2D("BetaGamma_dEdx_Nominal_muon", "BetaGamma_dEdx_Nominal_muon", 600, -1, 5, 600, 0, 3000); - - h_dEdxMomentumMap_Bichsel.clear(); - h_dEdxMomentumMap_Bichsel["proton"] = new TH2D("Momentum_dEdx_Bichsel_proton", "Momentum_dEdx_Bichsel_proton", 400, -1, 3, 600, 0, 3000); - h_dEdxMomentumMap_Bichsel["pion"] = new TH2D("Momentum_dEdx_Bichsel_pion", "Momentum_dEdx_Bichsel_pion", 400, -1, 3, 600, 0, 3000); - h_dEdxMomentumMap_Bichsel["electron"] = new TH2D("Momentum_dEdx_Bichsel_electron", "Momentum_dEdx_Bichsel_electron", 400, -1, 3, 600, 0, 3000); - h_dEdxMomentumMap_Bichsel["kaon"] = new TH2D("Momentum_dEdx_Bichsel_kaon", "Momentum_dEdx_Bichsel_kaon", 400, -1, 3, 600, 0, 3000); - h_dEdxMomentumMap_Bichsel["muon"] = new TH2D("Momentum_dEdx_Bichsel_muon", "Momentum_dEdx_Bichsel_muon", 400, -1, 3, 600, 0, 3000); - - h_dEdxMomentumMap_Nominal.clear(); - h_dEdxMomentumMap_Nominal["proton"] = new TH2D("Momentum_dEdx_Nominal_proton", "Momentum_dEdx_Nominal_proton", 400, -1, 3, 600, 0, 3000); - h_dEdxMomentumMap_Nominal["pion"] = new TH2D("Momentum_dEdx_Nominal_pion", "Momentum_dEdx_Nominal_pion", 400, -1, 3, 600, 0, 3000); - h_dEdxMomentumMap_Nominal["electron"] = new TH2D("Momentum_dEdx_Nominal_electron", "Momentum_dEdx_Nominal_electron", 400, -1, 3, 600, 0, 3000); - h_dEdxMomentumMap_Nominal["kaon"] = new TH2D("Momentum_dEdx_Nominal_kaon", "Momentum_dEdx_Nominal_kaon", 400, -1, 3, 600, 0, 3000); - h_dEdxMomentumMap_Nominal["muon"] = new TH2D("Momentum_dEdx_Nominal_muon", "Momentum_dEdx_Nominal_muon", 400, -1, 3, 600, 0, 3000); - - // timers - h_timer_execute = new TH1D("timer_execute", "timer_execute", 20000, 0, 20000); - h_timer_BichselSim = new TH1D("timer_BichselSim", "timer_BichselSim", 20000, 0, 20000); - h_timer_DigiLayer = new TH1D("timer_DigiLayer", "timer_DigiLayer", 20000, 0, 20000); - h_timer_diffuse = new TH1D("timer_diffuse", "timer_diffuse", 20000, 0, 20000); - - // hit categories - std::vector<std::string> hitCategoryList = { - "Total", - "DoBichsel", - "NoBichsel", - "HasMCParticleLink", - "UnknwonParticleType", - "BelowBetaGammCut", - "NoMCParticleLink", - "HS-doBichsel", - "InTimePU-doBichsel", - "HS", - "InTimePU", - }; - int nbins = hitCategoryList.size(); - h_hitCategory = new TH1D("hit_category", "hit_category", nbins, 0, nbins); - h_hitCategory->Sumw2(); - for(unsigned index = 0; index < hitCategoryList.size(); index++){ - h_hitCategory->GetXaxis()->SetBinLabel(index+1, hitCategoryList[index].data()); - } - - } - - ATH_MSG_DEBUG ( "PixelBarrelBichselChargeTool::initialize()"); - return StatusCode::SUCCESS; -} - -//---------------------------------------------------------------------- -// finalize -//---------------------------------------------------------------------- -StatusCode PixelBarrelBichselChargeTool::finalize() { - - if(m_doHITPlots){ - f_output->Write(); - } - - ATH_MSG_DEBUG("PixelBarrelBichselChargeTool::finalize()"); - return StatusCode::SUCCESS; -} - -//---------------------------------------------------------------------- -// charge -//---------------------------------------------------------------------- -StatusCode PixelBarrelBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module) { -#ifdef __BICHSEL_TIMER__ - auto timer_execute_start = std::chrono::high_resolution_clock::now(); -#endif - - if (!Module.isBarrel()) { return StatusCode::SUCCESS; } - const PixelModuleDesign *p_design= static_cast<const PixelModuleDesign*>(&(Module.design())); - if (p_design->getReadoutTechnology()!=InDetDD::PixelModuleDesign::FEI3) { return StatusCode::SUCCESS; } - - ATH_MSG_DEBUG("Applying PixelBarrel charge processor"); - const HepMcParticleLink McLink = HepMcParticleLink(phit->trackNumber(),phit.eventId()); - const HepMC::GenParticle* genPart= McLink.cptr(); - bool delta_hit = true; - if (genPart) delta_hit = false; - double sensorThickness = Module.design().thickness(); - const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); - electronHolePairsPerEnergy = siProperties.electronHolePairsPerEnergy(); - - double stepsize = sensorThickness/m_numberOfSteps; - double tanLorentz = Module.getTanLorentzAnglePhi(); - const CLHEP::Hep3Vector pos=phit->localStartPosition(); - const CLHEP::Hep3Vector cs=phit->localEndPosition(); - - double xEta=pos[SiHit::xEta]; - double xPhi=pos[SiHit::xPhi]; - const double xDep=pos[SiHit::xDep]; - - double xEtaf = cs[SiHit::xEta]; - double xPhif = cs[SiHit::xPhi]; - const double xDepf = cs[SiHit::xDep]; - - if (!m_disableDistortions && !delta_hit) simulateBow(&Module,xPhi,xEta,xDep,xPhif,xEtaf,xDepf); - - double cEta=xEtaf-xEta; - double cPhi=xPhif-xPhi; - const double cDep=xDepf-xDep; - - double length=sqrt(cEta*cEta+cPhi*cPhi+cDep*cDep); - const int nsteps=int(length/stepsize)+1; - const int ncharges=this->m_numberOfCharges*this->m_numberOfSteps/nsteps+1; - - //double stepEta = cEta / nsteps; - //double stepPhi = cPhi / nsteps; - //double stepDep = cDep / nsteps; - - //double e1=phit->energyLoss()/static_cast<double>(nsteps*ncharges); - - double coLorentz=sqrt(1+pow(tanLorentz,2)); - - ////////////////////////////////////////////////////// - // *** For Bichsel *** // - ////////////////////////////////////////////////////// - - double iTotalLength = length*1000.; // mm -> micrometer - - // ultimate feed in to the diffusion (to surface) part - std::vector<std::pair<double,double> > trfHitRecord; trfHitRecord.clear(); - - // -1 ParticleType means we are unable to run Bichel simulation for this case - int ParticleType = -1; - if(m_doBichsel){ - - ParticleType = delta_hit ? (m_doDeltaRay ? 4 : -1) : m_BichselSimTool->trfPDG(genPart->pdg_id()); - - if(ParticleType != -1){ // this is a protection in case delta_hit == true (a delta ray) - TLorentzVector genPart_4V; - - if(genPart){ // non-delta-ray - genPart_4V.SetPtEtaPhiM(genPart->momentum().perp(), genPart->momentum().eta(), genPart->momentum().phi(), genPart->momentum().m()); - double iBetaGamma = genPart_4V.Beta() * genPart_4V.Gamma(); - //if(genPart_4V.P()/CLHEP::MeV < m_doBichselMomentumCut) ParticleType = -1; - if(iBetaGamma < m_doBichselBetaGammaCut) ParticleType = -1; - } - else{ // delta-ray. - double k = phit->energyLoss()/CLHEP::MeV; // unit of MeV - double m = 0.511; // unit of MeV - double iBetaGamma = TMath::Sqrt(k*(2*m+k))/m; - - if(iBetaGamma < m_doBichselBetaGammaCut) ParticleType = -1; - } - - // In-time PU - if(!m_doPU){ - if(phit.eventId() != 0) ParticleType = -1; - } - - // Out-of-time PU - // We don't cut on the out-of-time PU, since studies show that the fraction is too small - - } - } - - bool m_isRealBichsel = false; -#ifdef __BICHSEL_TIMER__ - auto timer_DigiLayer_start = std::chrono::high_resolution_clock::now(); -#endif - if(ParticleType != -1){ // yes, good to go with Bichsel - // I don't know why genPart->momentum() goes crazy ... - TLorentzVector genPart_4V; - double iBetaGamma; - - if(genPart){ - genPart_4V.SetPtEtaPhiM(genPart->momentum().perp(), genPart->momentum().eta(), genPart->momentum().phi(), genPart->momentum().m()); - iBetaGamma = genPart_4V.Beta() * genPart_4V.Gamma(); - } - else{ - double k = phit->energyLoss()/CLHEP::MeV; // unit of MeV - double m = 0.511; // unit of MeV - iBetaGamma = TMath::Sqrt(k*(2*m+k))/m; - } - - int iParticleType = ParticleType; - //double iTotalLength = length*1000.; // mm -> micrometer - - // begin simulation -#ifdef __BICHSEL_TIMER__ - auto timer_BichselSim_start = std::chrono::high_resolution_clock::now(); -#endif - std::vector<std::pair<double,double> > rawHitRecord = m_BichselSimTool->BichselSim(iBetaGamma, iParticleType, iTotalLength, genPart ? (genPart->momentum().e()/CLHEP::MeV) : (phit->energyLoss()/CLHEP::MeV) ); -#ifdef __BICHSEL_TIMER__ - auto timer_BichselSim_end = std::chrono::high_resolution_clock::now(); - std::chrono::duration<double, std::micro> timer_BichselSim_elapse = timer_BichselSim_end - timer_BichselSim_start; - if(m_doHITPlots){ - h_timer_BichselSim->Fill( timer_BichselSim_elapse.count() ); - } -#endif - - // check if returned simulation result makes sense - if(rawHitRecord.size() == 0){ // deal with rawHitRecord==0 specifically -- no energy deposition - std::pair<double,double> specialHit; - specialHit.first = 0.; specialHit.second = 0.; - trfHitRecord.push_back(specialHit); - } - else if( (rawHitRecord.size() == 1) && (rawHitRecord[0].first == -1.) && (rawHitRecord[0].second == -1.) ){ // special flag returned from BichselSim meaning it FAILs - for(int istep = 0; istep < nsteps; istep++){ // do the same thing as old digitization method - std::pair<double,double> specialHit; - specialHit.first = 1.0*iTotalLength/nsteps * (istep + 0.5); specialHit.second = phit->energyLoss()*1.E+6/nsteps; - trfHitRecord.push_back(specialHit); - } - } - else{ // cluster thousands hits to ~20 groups - trfHitRecord = m_BichselSimTool->ClusterHits(rawHitRecord, nsteps); - m_isRealBichsel = true; - } - } - else{ // same as old digitization method - //double iTotalLength = length*1000.; // mm -> micrometer - for(int istep = 0; istep < nsteps; istep++){ // do the same thing as old digitization method - std::pair<double,double> specialHit; - specialHit.first = 1.0*iTotalLength/nsteps * (istep + 0.5); specialHit.second = phit->energyLoss()*1.E+6/nsteps; - trfHitRecord.push_back(specialHit); - } - } - -#ifdef __BICHSEL_TIMER__ - auto timer_DigiLayer_end = std::chrono::high_resolution_clock::now(); - std::chrono::duration<double, std::micro> timer_DigiLayer_elapse = timer_DigiLayer_end - timer_DigiLayer_start; - if(m_doHITPlots){ - h_timer_DigiLayer->Fill( timer_DigiLayer_elapse.count() ); - } -#endif - - // *** Finsih Bichsel *** // - - // *** Fill histograms *** // - - if(m_doHITPlots){ - // hit category - h_hitCategory->Fill("Total", 1); - - if(phit.eventId() == 0) h_hitCategory->Fill("HS", 1); - else h_hitCategory->Fill("InTimePU", 1); - - if(ParticleType != -1){ // do bichsel model eventually - h_hitCategory->Fill("DoBichsel", 1); - - if(phit.eventId() == 0) h_hitCategory->Fill("HS-doBichsel", 1); - else h_hitCategory->Fill("InTimePU-doBichsel", 1); - } - else{ - h_hitCategory->Fill("NoBichsel", 1); - } - - if(!delta_hit){ // not a delta-ray - h_hitCategory->Fill("HasMCParticleLink", 1); - - if(m_BichselSimTool->trfPDG(genPart->pdg_id()) == -1) // unknown particle type - h_hitCategory->Fill("UnknwonParticleType", 1); - else if(ParticleType == -1) // below beta-gamma threshold - h_hitCategory->Fill("BelowBetaGammCut", 1); - } - else{ - h_hitCategory->Fill("NoMCParticleLink", 1); - } - - - if( (ParticleType != -1) && (!delta_hit) ){ // only primary particles that goes through Bichsel Model - TLorentzVector genPart_4V; - genPart_4V.SetPtEtaPhiM(genPart->momentum().perp(), genPart->momentum().eta(), genPart->momentum().phi(), genPart->momentum().m()); - double iBetaGamma = genPart_4V.Beta() * genPart_4V.Gamma(); - - float sumEnergyLoss = 0.; - for(unsigned int index = 0; index < trfHitRecord.size(); index++){ - sumEnergyLoss += (trfHitRecord[index].second / 1000.); // eV -> keV - } - - h_Length->Fill(iTotalLength); // micrometer - h_hitTime->Fill(phit->meanTime()); // hit time around current event Bunch-Xing time in ns - - if(iTotalLength > 280.){ - double dEdx_Nominal = phit->energyLoss() * 1000. / (iTotalLength/1000.); - h_EnergyDepositionNominal->Fill(dEdx_Nominal); // keV per mm - - double dEdx_Bichsel = sumEnergyLoss / (iTotalLength/1000.); - h_EnergyDepositionBichsel->Fill(dEdx_Bichsel); // keV per mm - - h_isRealBichsel_Primary->Fill(m_isRealBichsel); - - // show the distribution - TH1D* util = new TH1D("util", "util", 20, 0, 1); - for(unsigned int index = 0; index < trfHitRecord.size(); index++){ - util->Fill(trfHitRecord[index].first/iTotalLength, (trfHitRecord[index].second / 1000.)/sumEnergyLoss); - } - - //h_largestEnergyDeposition->Fill(util->GetBinContent(util->GetMaximumBin())); - - std::vector<double> util_vector; - for(int index = 1; index <= util->GetNbinsX(); index++){ - util_vector.push_back(util->GetBinContent(index)); - } - - std::sort(util_vector.begin(), util_vector.end()); - std::reverse(util_vector.begin(), util_vector.end()); - - h_largestEnergyDeposition->Fill(util_vector[0]); - h_twolargestEnergyDeposition->Fill(util_vector[0] + util_vector[1]); - - // std::cout << "-------------" << std::endl; - // for(unsigned int index = 1; index <= util->GetNbinsX(); index++){ - // std::cout << util->GetBinContent(index) << " "; - // } - // std::cout << std::endl; - - delete util; - - if(ParticleType == 1){ - h_dEdxBetaGammaMap_Bichsel["proton"]->Fill(TMath::Log10(iBetaGamma), dEdx_Bichsel); - h_dEdxBetaGammaMap_Nominal["proton"]->Fill(TMath::Log10(iBetaGamma), dEdx_Nominal); - h_dEdxMomentumMap_Bichsel["proton"]->Fill(TMath::Log10(genPart_4V.P()/1000.), dEdx_Bichsel); - h_dEdxMomentumMap_Nominal["proton"]->Fill(TMath::Log10(genPart_4V.P()/1000.), dEdx_Nominal); - } - else if(ParticleType == 2){ - h_dEdxBetaGammaMap_Bichsel["pion"]->Fill(TMath::Log10(iBetaGamma), dEdx_Bichsel); - h_dEdxBetaGammaMap_Nominal["pion"]->Fill(TMath::Log10(iBetaGamma), dEdx_Nominal); - h_dEdxMomentumMap_Bichsel["pion"]->Fill(TMath::Log10(genPart_4V.P()/1000.), dEdx_Bichsel); - h_dEdxMomentumMap_Nominal["pion"]->Fill(TMath::Log10(genPart_4V.P()/1000.), dEdx_Nominal); - } - else if(ParticleType == 4){ - h_dEdxBetaGammaMap_Bichsel["electron"]->Fill(TMath::Log10(iBetaGamma), dEdx_Bichsel); - h_dEdxBetaGammaMap_Nominal["electron"]->Fill(TMath::Log10(iBetaGamma), dEdx_Nominal); - h_dEdxMomentumMap_Bichsel["electron"]->Fill(TMath::Log10(genPart_4V.P()/1000.), dEdx_Bichsel); - h_dEdxMomentumMap_Nominal["electron"]->Fill(TMath::Log10(genPart_4V.P()/1000.), dEdx_Nominal); - } - else if(ParticleType == 5){ - h_dEdxBetaGammaMap_Bichsel["kaon"]->Fill(TMath::Log10(iBetaGamma), dEdx_Bichsel); - h_dEdxBetaGammaMap_Nominal["kaon"]->Fill(TMath::Log10(iBetaGamma), dEdx_Nominal); - h_dEdxMomentumMap_Bichsel["kaon"]->Fill(TMath::Log10(genPart_4V.P()/1000.), dEdx_Bichsel); - h_dEdxMomentumMap_Nominal["kaon"]->Fill(TMath::Log10(genPart_4V.P()/1000.), dEdx_Nominal); - } - else if(ParticleType == 6){ - h_dEdxBetaGammaMap_Bichsel["muon"]->Fill(TMath::Log10(iBetaGamma), dEdx_Bichsel); - h_dEdxBetaGammaMap_Nominal["muon"]->Fill(TMath::Log10(iBetaGamma), dEdx_Nominal); - h_dEdxMomentumMap_Bichsel["muon"]->Fill(TMath::Log10(genPart_4V.P()/1000.), dEdx_Bichsel); - h_dEdxMomentumMap_Nominal["muon"]->Fill(TMath::Log10(genPart_4V.P()/1000.), dEdx_Nominal); - } - } - } - - if(delta_hit){ // only secondary particles - if(iTotalLength > 280.){ - h_EnergyDepositionDeltaRay->Fill(phit->energyLoss() * 1000); // unit of keV - - if(ParticleType != -1){ // only secondary particles that go through Bichsel Model - float sumEnergyLoss = 0.; - for(unsigned int index = 0; index < trfHitRecord.size(); index++){ - sumEnergyLoss += (trfHitRecord[index].second / 1000.); // eV -> keV - } - - double dEdx_Nominal = phit->energyLoss() * 1000. / (iTotalLength/1000.); - double dEdx_Bichsel = sumEnergyLoss / (iTotalLength/1000.); - - h_isRealBichsel_DeltaRay->Fill(m_isRealBichsel); - - h_EnergyDepositionDeltaRay_Nominal->Fill(dEdx_Nominal); - h_EnergyDepositionDeltaRay_Bichsel->Fill(dEdx_Bichsel); - } - } - } - - } - - // *** Now diffuse charges to surface *** // -#ifdef __BICHSEL_TIMER__ - auto timer_diffuse_start = std::chrono::high_resolution_clock::now(); -#endif - - for(unsigned int istep = 0; istep < trfHitRecord.size(); istep++){ - std::pair<double,double> iHitRecord = trfHitRecord[istep]; - - // double xEta1 = xEta + stepEta * (istep + 0.5); - // double xPhi1 = xPhi + stepPhi * (istep + 0.5); - // double depD = xDep + stepDep * (istep + 0.5); - double xEta1 = xEta + 1.0*iHitRecord.first/iTotalLength*cEta; - double xPhi1 = xPhi + 1.0*iHitRecord.first/iTotalLength*cPhi; - double depD = xDep + 1.0*iHitRecord.first/iTotalLength*cDep; - - // Distance between charge and readout side. p_design->readoutSide() is - // +1 if readout side is in +ve depth axis direction and visa-versa. - double spess = 0.5 * sensorThickness - Module.design().readoutSide() * depD; - if (spess<0) spess=0; - - for(int i=0 ; i<ncharges ; i++) { - - // diffusion sigma - double rdif=this->m_diffusionConstant*sqrt(spess*coLorentz/0.3); - - // position at the surface - double xPhiD=xPhi1+spess*tanLorentz+rdif*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); - double xEtaD=xEta1+rdif*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); - - // Get the charge position in Reconstruction local coordinates. - SiLocalPosition chargePos = Module.hitLocalToLocal(xEtaD, xPhiD); - - // The parametrization of the sensor efficiency (if needed) - // double ed=e1*this->electronHolePairsPerEnergy; - double ed=(1.0*iHitRecord.second/1.E+6/ncharges)*this->electronHolePairsPerEnergy; - - //The following lines are adapted from SiDigitization's Inserter class - SiSurfaceCharge scharge(chargePos,SiCharge(ed,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); - - SiCellId diode = Module.cellIdOfPosition(scharge.position()); - - SiCharge charge = scharge.charge(); - - if (diode.isValid()) { - chargedDiodes.add(diode,charge); - } - } - } - -#ifdef __BICHSEL_TIMER__ - auto timer_diffuse_end = std::chrono::high_resolution_clock::now(); - std::chrono::duration<double, std::micro> timer_diffuse_elapse = timer_diffuse_end - timer_diffuse_start; - if(m_doHITPlots){ - h_timer_diffuse->Fill( timer_diffuse_elapse.count() ); - } -#endif - -#ifdef __BICHSEL_TIMER__ - auto timer_execute_end = std::chrono::high_resolution_clock::now(); - std::chrono::duration<double, std::micro> timer_execute_elapse = timer_execute_end - timer_execute_start; - if(m_doHITPlots){ - h_timer_execute->Fill( timer_execute_elapse.count() ); - } -#endif - - return StatusCode::SUCCESS; -} - -void PixelBarrelBichselChargeTool::simulateBow(const InDetDD::SiDetectorElement * element, - double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const { - - // The corrections are assumed to be in the reconstruction local frame, so - // we must convertfrom the hit local frame to the reconstruction local frame. - // In fact the frames are the same for the pixel barrel so these gymnastics are not - // really needed but its safer to do it properly. - - // If tool is NONE we apply no correction. - if (m_pixDistoTool.empty()) return; - Amg::Vector3D dir(element->hitPhiDirection() * (xf - xi), - element->hitEtaDirection() * (yf - yi), - element->hitDepthDirection() * (zf - zi)); - - Amg::Vector2D locposi = element->hitLocalToLocal(yi, xi); - Amg::Vector2D locposf = element->hitLocalToLocal(yf, xf); - - Amg::Vector2D newLocposi = m_pixDistoTool->correctSimulation(element->identify(), locposi, dir); - Amg::Vector2D newLocposf = m_pixDistoTool->correctSimulation(element->identify(), locposf, dir); - - // Extract new coordinates and convert back to hit frame. - xi = newLocposi[Trk::x] * element->hitPhiDirection(); - yi = newLocposi[Trk::y] * element->hitEtaDirection(); - - xf = newLocposf[Trk::x] * element->hitPhiDirection(); - yf = newLocposf[Trk::y] * element->hitEtaDirection(); - -} - diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelBarrelBichselChargeTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelBarrelBichselChargeTool.h deleted file mode 100644 index e0773ed2ee8e1010f28f9610b32bb5eda69ca7e9..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelBarrelBichselChargeTool.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// PixelBarrelBichselChargeTool.h -// Header file for class PixelBarrelBichselChargeTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -// -// Configurable Parameters -// -// -numberOfSteps Geant4:number of steps for PixelBarrel -// -numberOfCharges Geant4:number of charges for PixelBarrel -// -diffusionConstant Geant4:Diffusion Constant for PixelBarrel -// -doBichsel : re-do charge deposition following Bichsel model -// -BichselMomentumCut : minimum MOMENTUM for particle to be re-simulated through Bichsel Model -// -BichselSimTool : tool that implements Bichsel model -// -////////////////////////////////////////////////////////////////// - -#ifndef PIXELDIGITIZATION_PixelBarrelBichselChargeTool_H -#define PIXELDIGITIZATION_PixelBarrelBichselChargeTool_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "SubChargesTool.h" -#include "GaudiKernel/ToolHandle.h" - -#include "TFile.h" -#include "TH1D.h" -#include "TH2D.h" - -// Base class -class PixelID; - -namespace InDetDD { - class SiDetectorElement; -} - -namespace CLHEP { - class HepRandomEngine; -} - -class BichselSimTool; - -class PixelBarrelBichselChargeTool : public SubChargesTool { - -public: - - // Constructor: - PixelBarrelBichselChargeTool( const std::string& type, const std::string& name,const IInterface* parent); - - - /** AlgTool initialize */ - virtual StatusCode initialize(); - - /** AlgTool finalize */ - virtual StatusCode finalize(); - - /** Destructor */ - virtual ~PixelBarrelBichselChargeTool(); - - virtual StatusCode charge(const TimedHitPtr<SiHit> &phit, - SiChargedDiodeCollection& chargedDiodes, - const InDetDD::SiDetectorElement &Module); - - //Constants that can be set by user - int m_numberOfSteps; //number of steps for particle traveling perpendicular to detector element - int m_numberOfCharges; - double m_diffusionConstant; - bool m_doBichsel; // re-do charge deposition following Bichsel model ? - //double m_doBichselMomentumCut; // minimum MOMENTUM for particle to be re-simulated through Bichsel Model. Unit in MeV - double m_doBichselBetaGammaCut; // replace momentum cut - bool m_doDeltaRay; // implement Bichsel Model into delta-ray, which does not have truth particle link. - // We will assume all delta-ray is electron, with all energy deposited in silicon layer. So the 4-momentum can be reconstructed using energy and direction - bool m_doPU; // Whether we apply Bichsel model on non-HS particles - ToolHandle<BichselSimTool> m_BichselSimTool; // if yes, you need to load related tool here - std::string m_OutputFileName; // name of output file for customized study during digitization - bool m_doHITPlots; // validation plots on HIT level - -private: - /** empty constructor, make private */ - PixelBarrelBichselChargeTool(); - - TFile* f_output; - - TH1D* h_Length; - TH1D* h_hitTime; - TH1D* h_EnergyDepositionBichsel; - TH1D* h_EnergyDepositionNominal; - TH1D* h_EnergyDepositionDeltaRay; - TH1D* h_EnergyDepositionDeltaRay_Bichsel; - TH1D* h_EnergyDepositionDeltaRay_Nominal; - TH1D* h_isRealBichsel_DeltaRay; - TH1D* h_isRealBichsel_Primary; // check if it is a real Bichsel model implementation - std::map<std::string, TH2D*> h_dEdxBetaGammaMap_Bichsel; // x in log-scale - std::map<std::string, TH2D*> h_dEdxBetaGammaMap_Nominal; - std::map<std::string, TH2D*> h_dEdxMomentumMap_Bichsel; - std::map<std::string, TH2D*> h_dEdxMomentumMap_Nominal; - TH1D* h_largestEnergyDeposition; - TH1D* h_twolargestEnergyDeposition; - - TH1D* h_timer_execute; // for the whole execute function - TH1D* h_timer_BichselSim; // only for the BichselSim() function - TH1D* h_timer_DigiLayer; // for whole layer's deposition distribution - TH1D* h_timer_diffuse; // for whole layer's diffusion - - TH1D* h_hitCategory; // distribution of the categories for HITs - -void simulateBow(const InDetDD::SiDetectorElement * element,double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const; -private: - - }; - - -#endif // PIXELDIGITIZATION_PixelBarrelBichselChargeTool_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelBarrelChargeTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelBarrelChargeTool.cxx deleted file mode 100644 index 49db36f33caa0b601b6209fe3c3b99ef9bf2a52f..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelBarrelChargeTool.cxx +++ /dev/null @@ -1,196 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// PixelBarrelChargeTool.cxx -// Implementation file for class PixelBarrelChargeTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "PixelBarrelChargeTool.h" -#include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/PixelModuleDesign.h" -#include "InDetSimEvent/SiHit.h" -#include "InDetIdentifier/PixelID.h" -#include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" -//#include "GeoPrimitives/GeoPrimitivesHelpers.h" -#include "HepMC/GenEvent.h" -#include "HepMC/GenVertex.h" -#include "HepMC/GenParticle.h" -#include "AtlasCLHEP_RandomGenerators/RandGaussZiggurat.h" - -using namespace InDetDD; - - -// Constructor with parameters: -PixelBarrelChargeTool::PixelBarrelChargeTool(const std::string& type, const std::string& name,const IInterface* parent): - SubChargesTool(type,name,parent), - m_numberOfSteps(50), - m_numberOfCharges(10), - m_diffusionConstant(.007) - -{ - declareProperty("numberOfSteps",m_numberOfSteps,"Geant4:number of steps for PixelBarrel"); - declareProperty("numberOfCharges",m_numberOfCharges,"Geant4:number of charges for PixelBarrel"); - declareProperty("diffusionConstant",m_diffusionConstant,"Geant4:Diffusion Constant for PixelBarrel"); - -} - -class DetCondCFloat; - -// Destructor: -PixelBarrelChargeTool::~PixelBarrelChargeTool() -{ -} - -//---------------------------------------------------------------------- -// Initialize -//---------------------------------------------------------------------- -StatusCode PixelBarrelChargeTool::initialize() { - StatusCode sc = SubChargesTool::initialize(); - if (sc.isFailure()) { - ATH_MSG_FATAL ( "PixelBarrelChargeTool::initialize() failed"); - return sc ; - } - ATH_MSG_DEBUG ( "PixelBarrelChargeTool::initialize()"); - return sc ; -} - -//---------------------------------------------------------------------- -// finalize -//---------------------------------------------------------------------- -StatusCode PixelBarrelChargeTool::finalize() { - StatusCode sc = AthAlgTool::finalize(); - if (sc.isFailure()) { - ATH_MSG_FATAL ( "PixelBarrelChargeTool::finalize() failed"); - return sc ; - } - ATH_MSG_DEBUG ( "PixelBarrelChargeTool::finalize()"); - return sc ; -} - -//---------------------------------------------------------------------- -// charge -//---------------------------------------------------------------------- -StatusCode PixelBarrelChargeTool::charge(const TimedHitPtr<SiHit> &phit, - SiChargedDiodeCollection& chargedDiodes, - const InDetDD::SiDetectorElement &Module) -{ - - if (!Module.isBarrel()) { return StatusCode::SUCCESS; } - const PixelModuleDesign *p_design= static_cast<const PixelModuleDesign*>(&(Module.design())); - if (p_design->getReadoutTechnology()!=InDetDD::PixelModuleDesign::FEI3) { return StatusCode::SUCCESS; } - - ATH_MSG_DEBUG("Applying PixelBarrel charge processor"); - const HepMcParticleLink McLink = HepMcParticleLink(phit->trackNumber(),phit.eventId()); - const HepMC::GenParticle* genPart= McLink.cptr(); - bool delta_hit = true; - if (genPart) delta_hit = false; - double sensorThickness = Module.design().thickness(); - const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); - electronHolePairsPerEnergy = siProperties.electronHolePairsPerEnergy(); - - double stepsize = sensorThickness/m_numberOfSteps; - double tanLorentz = Module.getTanLorentzAnglePhi(); - const CLHEP::Hep3Vector pos=phit->localStartPosition(); - const CLHEP::Hep3Vector cs=phit->localEndPosition(); - - double xEta=pos[SiHit::xEta]; - double xPhi=pos[SiHit::xPhi]; - const double xDep=pos[SiHit::xDep]; - - double xEtaf = cs[SiHit::xEta]; - double xPhif = cs[SiHit::xPhi]; - const double xDepf = cs[SiHit::xDep]; - - if (!m_disableDistortions && !delta_hit) simulateBow(&Module,xPhi,xEta,xDep,xPhif,xEtaf,xDepf); - - double cEta=xEtaf-xEta; - double cPhi=xPhif-xPhi; - const double cDep=xDepf-xDep; - - double length=sqrt(cEta*cEta+cPhi*cPhi+cDep*cDep); - const int nsteps=int(length/stepsize)+1; - const int ncharges=this->m_numberOfCharges*this->m_numberOfSteps/nsteps+1; - - double stepEta = cEta / nsteps; - double stepPhi = cPhi / nsteps; - double stepDep = cDep / nsteps; - - double e1=phit->energyLoss()/static_cast<double>(nsteps*ncharges); - - double coLorentz=sqrt(1+pow(tanLorentz,2)); - - for(int istep =0; istep < nsteps; istep++) { - double xEta1 = xEta + stepEta * (istep + 0.5); - double xPhi1 = xPhi + stepPhi * (istep + 0.5); - double depD = xDep + stepDep * (istep + 0.5); - - // Distance between charge and readout side. p_design->readoutSide() is - // +1 if readout side is in +ve depth axis direction and visa-versa. - double spess = 0.5 * sensorThickness - Module.design().readoutSide() * depD; - if (spess<0) spess=0; - - for(int i=0 ; i<ncharges ; i++) { - - // diffusion sigma - double rdif=this->m_diffusionConstant*sqrt(spess*coLorentz/0.3); - - // position at the surface - double xPhiD=xPhi1+spess*tanLorentz+rdif*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); - double xEtaD=xEta1+rdif*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); - - // Get the charge position in Reconstruction local coordinates. - SiLocalPosition chargePos = Module.hitLocalToLocal(xEtaD, xPhiD); - - // The parametrization of the sensor efficiency (if needed) - double ed=e1*this->electronHolePairsPerEnergy; - - //The following lines are adapted from SiDigitization's Inserter class - SiSurfaceCharge scharge(chargePos,SiCharge(ed,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); - - SiCellId diode = Module.cellIdOfPosition(scharge.position()); - - SiCharge charge = scharge.charge(); - - if (diode.isValid()) { - - chargedDiodes.add(diode,charge); - } - } - } - return StatusCode::SUCCESS; -} - -void PixelBarrelChargeTool::simulateBow(const InDetDD::SiDetectorElement * element, - double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const { - - // The corrections are assumed to be in the reconstruction local frame, so - // we must convertfrom the hit local frame to the reconstruction local frame. - // In fact the frames are the same for the pixel barrel so these gymnastics are not - // really needed but its safer to do it properly. - - // If tool is NONE we apply no correction. - if (m_pixDistoTool.empty()) return; - Amg::Vector3D dir(element->hitPhiDirection() * (xf - xi), - element->hitEtaDirection() * (yf - yi), - element->hitDepthDirection() * (zf - zi)); - - Amg::Vector2D locposi = element->hitLocalToLocal(yi, xi); - Amg::Vector2D locposf = element->hitLocalToLocal(yf, xf); - - Amg::Vector2D newLocposi = m_pixDistoTool->correctSimulation(element->identify(), locposi, dir); - Amg::Vector2D newLocposf = m_pixDistoTool->correctSimulation(element->identify(), locposf, dir); - - // Extract new coordinates and convert back to hit frame. - xi = newLocposi[Trk::x] * element->hitPhiDirection(); - yi = newLocposi[Trk::y] * element->hitEtaDirection(); - - xf = newLocposf[Trk::x] * element->hitPhiDirection(); - yf = newLocposf[Trk::y] * element->hitEtaDirection(); - -} - diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelBarrelChargeTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelBarrelChargeTool.h deleted file mode 100644 index e13ac2997ec0bf82622a42acf09d28e22c232a80..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelBarrelChargeTool.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// PixelBarrelChargeTool.h -// Header file for class PixelBarrelChargeTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -// -// Configurable Parameters -// -// -numberOfSteps Geant4:number of steps for PixelBarrel -// -numberOfCharges Geant4:number of charges for PixelBarrel -// -diffusionConstant Geant4:Diffusion Constant for PixelBarrel -// -////////////////////////////////////////////////////////////////// - -#ifndef PIXELDIGITIZATION_PixelBarrelChargeTool_H -#define PIXELDIGITIZATION_PixelBarrelChargeTool_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "SubChargesTool.h" - -// Base class -class PixelID; - -namespace InDetDD { - class SiDetectorElement; -} - -namespace CLHEP { - class HepRandomEngine; -} - -class PixelBarrelChargeTool : public SubChargesTool { - -public: - - // Constructor: - PixelBarrelChargeTool( const std::string& type, const std::string& name,const IInterface* parent); - - - /** AlgTool initialize */ - virtual StatusCode initialize(); - - /** AlgTool finalize */ - virtual StatusCode finalize(); - - /** Destructor */ - virtual ~PixelBarrelChargeTool(); - - virtual StatusCode charge(const TimedHitPtr<SiHit> &phit, - SiChargedDiodeCollection& chargedDiodes, - const InDetDD::SiDetectorElement &Module); - - //Constants that can be set by user - int m_numberOfSteps; //number of steps for particle traveling perpendicular to detector element - int m_numberOfCharges; - double m_diffusionConstant; - -private: - /** empty constructor, make private */ - PixelBarrelChargeTool(); - -void simulateBow(const InDetDD::SiDetectorElement * element,double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const; -private: - - }; - - -#endif // PIXELDIGITIZATION_PixelBarrelChargeTool_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.cxx index e00db669635edc7b7dffd90e5971e43f25448162..ceaace5d57a225ecf4b8c43827bd664eba96f850 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.cxx @@ -112,10 +112,7 @@ StatusCode PixelDigitizationTool::finalize() { StatusCode PixelDigitizationTool::processAllSubEvents() { - //=============== // Prepare event - //=============== - // Create Output Containers ATH_MSG_DEBUG("Prepare event"); CHECK(prepareEvent(0)); @@ -136,9 +133,7 @@ StatusCode PixelDigitizationTool::processAllSubEvents() { ATH_MSG_DEBUG("SiTrackerHitCollection found with"<<p_collection->size()<<" hits"); // loop on the hit collections } - //=============== // Digitize hits - //=============== CHECK(digitizeEvent()); ATH_MSG_DEBUG("Digitize success!"); @@ -265,6 +260,7 @@ StatusCode PixelDigitizationTool::digitizeEvent() { } } } + delete chargedDiodes; ATH_MSG_DEBUG("non-hits processed"); return StatusCode::SUCCESS; @@ -325,10 +321,7 @@ void PixelDigitizationTool::addSDO(SiChargedDiodeCollection* collection) { StatusCode PixelDigitizationTool::prepareEvent(unsigned int) { ATH_MSG_VERBOSE("PixelDigitizationTool::prepareEvent()"); - //=============== // Prepare event - //=============== - // Create Output Containers if (!m_rdoContainer.isValid()) { if (!(m_rdoContainer=CxxUtils::make_unique<PixelRDO_Container>(m_detID->wafer_hash_max())).isValid()) { ATH_MSG_FATAL("Could not create PixelRDO_Container"); @@ -359,9 +352,7 @@ StatusCode PixelDigitizationTool::prepareEvent(unsigned int) { StatusCode PixelDigitizationTool::mergeEvent() { ATH_MSG_VERBOSE("PixelDigitizationTool::mergeEvent()"); - //=============== // Digitize hits - //=============== CHECK(digitizeEvent()); for (std::vector<SiHitCollection*>::iterator it = hitCollPtrs.begin();it!=hitCollPtrs.end();it++) { diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h index 760ebb63838a2a02b2583f13cbb9ee7d9751a331..f9a9cb39b92adda34749be64ae00373032b1fe7f 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h @@ -23,7 +23,6 @@ #include "StoreGate/WriteHandle.h" #include "InDetSimData/InDetSimDataCollection.h" -// STSTST #include "SiDigitization/ISiChargedDiodesProcessorTool.h" #include "PixelProcessorTool.h" #include "SubChargesTool.h" #include "FrontEndSimTool.h" @@ -64,7 +63,6 @@ class PixelDigitizationTool : public PileUpToolBase { bool m_onlyHitElements; -// STSTST ToolHandleArray<ISiChargedDiodesProcessorTool> m_diodesProcsTool; ToolHandleArray<PixelProcessorTool> m_processorTool; ToolHandleArray<SubChargesTool> m_chargeTool; ToolHandleArray<FrontEndSimTool> m_fesimTool; diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelECBichselChargeTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelECBichselChargeTool.cxx deleted file mode 100644 index 2b45c962abfeedec62a901f70956d22df65e4664..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelECBichselChargeTool.cxx +++ /dev/null @@ -1,284 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// PixelECBichselChargeTool.cxx -// Implementation file for class PixelECBichselChargeTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "PixelECBichselChargeTool.h" -#include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/PixelModuleDesign.h" -#include "InDetSimEvent/SiHit.h" -#include "InDetIdentifier/PixelID.h" -#include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" -//#include "GeoPrimitives/GeoPrimitivesHelpers.h" -#include "HepMC/GenEvent.h" -#include "HepMC/GenVertex.h" -#include "HepMC/GenParticle.h" -#include "AtlasCLHEP_RandomGenerators/RandGaussZiggurat.h" - -#include "BichselSimTool.h" -#include "TLorentzVector.h" - -using namespace InDetDD; - - -// Constructor with parameters: -PixelECBichselChargeTool::PixelECBichselChargeTool(const std::string& type, const std::string& name,const IInterface* parent): - SubChargesTool(type,name,parent), - m_numberOfSteps(50), - m_numberOfCharges(10), - m_diffusionConstant(.007), - m_doBichsel(false), - //m_doBichselMomentumCut(1000.), - m_doBichselBetaGammaCut(0.1), - m_doPU(true), - m_BichselSimTool("BichselSimTool") -{ - declareProperty("numberOfSteps",m_numberOfSteps,"Geant4:number of steps for PixelEC"); - declareProperty("numberOfCharges",m_numberOfCharges,"Geant4:number of charges for PixelEC"); - declareProperty("diffusionConstant",m_diffusionConstant,"Geant4:Diffusion Constant for PixelEC"); - declareProperty("doBichsel", m_doBichsel, "re-do charge deposition following Bichsel model"); - //declareProperty("doBichselMomentumCut", m_doBichselMomentumCut, "minimum MOMENTUM for particle to be re-simulated through Bichsel Model"); - declareProperty("doBichselBetaGammaCut", m_doBichselBetaGammaCut, "minimum beta-gamma for particle to be re-simulated through Bichsel Model"); - declareProperty("doPU", m_doPU, "whether we apply Bichsel model on PU"); - declareProperty("BichselSimTool", m_BichselSimTool, "tool that implements Bichsel model"); -} - -class DetCondCFloat; - -// Destructor: -PixelECBichselChargeTool::~PixelECBichselChargeTool() { } - -//---------------------------------------------------------------------- -// Initialize -//---------------------------------------------------------------------- -StatusCode PixelECBichselChargeTool::initialize() { - - CHECK(SubChargesTool::initialize()); - ATH_MSG_INFO("You are using PixelECBichselChargeTool, not PixelECChargeTool"); - - if(m_doBichsel){ - ATH_MSG_INFO("Bichsel Digitization is turned ON in PixelECBichselChargeTool!"); - CHECK(m_BichselSimTool.retrieve()); - } - else{ - ATH_MSG_INFO("Bichsel Digitization is turned OFF in PixelECBichselChargeTool!"); - } - - ATH_MSG_DEBUG("PixelECBichselChargeTool::initialize()"); - return StatusCode::SUCCESS; -} - -//---------------------------------------------------------------------- -// finalize -//---------------------------------------------------------------------- -StatusCode PixelECBichselChargeTool::finalize() { - return StatusCode::SUCCESS; -} - -//---------------------------------------------------------------------- -// charge -//---------------------------------------------------------------------- -StatusCode PixelECBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module) { - - if (!Module.isEndcap()) { return StatusCode::SUCCESS; } - const PixelModuleDesign *p_design= static_cast<const PixelModuleDesign*>(&(Module.design())); - if (p_design->getReadoutTechnology()!=InDetDD::PixelModuleDesign::FEI3) { return StatusCode::SUCCESS; } - - ATH_MSG_DEBUG("Applying PixelEC charge processor"); - const HepMcParticleLink McLink = HepMcParticleLink(phit->trackNumber(),phit.eventId()); - const HepMC::GenParticle* genPart= McLink.cptr(); - bool delta_hit = true; - if (genPart) delta_hit = false; - double sensorThickness = Module.design().thickness(); - const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); - electronHolePairsPerEnergy = siProperties.electronHolePairsPerEnergy(); - - double stepsize = sensorThickness/m_numberOfSteps; - double tanLorentz = Module.getTanLorentzAnglePhi(); - const CLHEP::Hep3Vector pos=phit->localStartPosition(); - const CLHEP::Hep3Vector cs=phit->localEndPosition(); - - double xEta=pos[SiHit::xEta]; - double xPhi=pos[SiHit::xPhi]; - const double xDep=pos[SiHit::xDep]; - - double xEtaf = cs[SiHit::xEta]; - double xPhif = cs[SiHit::xPhi]; - const double xDepf = cs[SiHit::xDep]; - - if (!m_disableDistortions && !delta_hit) simulateBow(&Module,xPhi,xEta,xDep,xPhif,xEtaf,xDepf); - - double cEta=xEtaf-xEta; - double cPhi=xPhif-xPhi; - const double cDep=xDepf-xDep; - - double length=sqrt(cEta*cEta+cPhi*cPhi+cDep*cDep); - const int nsteps=int(length/stepsize)+1; - const int ncharges=this->m_numberOfCharges*this->m_numberOfSteps/nsteps+1; - - //double stepEta = cEta / nsteps; - //double stepPhi = cPhi / nsteps; - //double stepDep = cDep / nsteps; - - //double e1=phit->energyLoss()/static_cast<double>(nsteps*ncharges); - - double coLorentz=sqrt(1+pow(tanLorentz,2)); - - ////////////////////////////////////////////////////// - // *** For Bichsel *** // - ////////////////////////////////////////////////////// - - double iTotalLength = length*1000.; // mm -> micrometer - - // ultimate feed in to the diffusion (to surface) part - std::vector<std::pair<double,double> > trfHitRecord; trfHitRecord.clear(); - - // -1 ParticleType means we are unable to run Bichel simulation for this case - int ParticleType = -1; - if(m_doBichsel){ - ParticleType = delta_hit ? -1 : m_BichselSimTool->trfPDG(genPart->pdg_id()); - if(ParticleType != -1){ // this is a protection in case delta_hit == true (a delta ray) - //if(genPart->momentum().perp()/CLHEP::MeV < m_doBichselMomentumCut) ParticleType = -1; - - TLorentzVector genPart_4V; - genPart_4V.SetPtEtaPhiM(genPart->momentum().perp(), genPart->momentum().eta(), genPart->momentum().phi(), genPart->momentum().m()); - double iBetaGamma = genPart_4V.Beta() * genPart_4V.Gamma(); - - //if(genPart_4V.P()/CLHEP::MeV < m_doBichselMomentumCut) ParticleType = -1; - if(iBetaGamma < m_doBichselBetaGammaCut) ParticleType = -1; - } - - if(!m_doPU){ - if(phit.eventId() != 0) ParticleType = -1; - } - } - - if(ParticleType != -1){ // yes, good to go with Bichsel - // parameter initialization - //double iBetaGamma = genPart->momentum().mag()/genPart->momentum().m(); // use 4-vector mass - //double iBetaGamma = genPart->momentum().beta() * genPart->momentum().gamma(); - - // I don't know why genPart->momentum() goes crazy ... - TLorentzVector genPart_4V; - genPart_4V.SetPtEtaPhiM(genPart->momentum().perp(), genPart->momentum().eta(), genPart->momentum().phi(), genPart->momentum().m()); - double iBetaGamma = genPart_4V.Beta() * genPart_4V.Gamma(); - - int iParticleType = ParticleType; - //double iTotalLength = length*1000.; // mm -> micrometer - - // begin simulation - std::vector<std::pair<double,double> > rawHitRecord = m_BichselSimTool->BichselSim(iBetaGamma, iParticleType, iTotalLength, genPart->momentum().e()/CLHEP::MeV); - - // check if returned simulation result makes sense - if(rawHitRecord.size() == 0){ // deal with rawHitRecord==0 specifically -- no energy deposition - std::pair<double,double> specialHit; - specialHit.first = 0.; specialHit.second = 0.; - trfHitRecord.push_back(specialHit); - } - else if( (rawHitRecord.size() == 1) && (rawHitRecord[0].first == -1.) && (rawHitRecord[0].second == -1.) ){ // special flag returned from BichselSim meaning it FAILs - for(int istep = 0; istep < nsteps; istep++){ // do the same thing as old digitization method - std::pair<double,double> specialHit; - specialHit.first = 1.0*iTotalLength/nsteps * (istep + 0.5); specialHit.second = phit->energyLoss()*1.E+6/nsteps; - trfHitRecord.push_back(specialHit); - } - } - else{ // cluster thousands hits to ~20 groups - trfHitRecord = m_BichselSimTool->ClusterHits(rawHitRecord, nsteps); - } - } - else{ // same as old digitization method - //double iTotalLength = length*1000.; // mm -> micrometer - for(int istep = 0; istep < nsteps; istep++){ // do the same thing as old digitization method - std::pair<double,double> specialHit; - specialHit.first = 1.0*iTotalLength/nsteps * (istep + 0.5); specialHit.second = phit->energyLoss()*1.E+6/nsteps; - trfHitRecord.push_back(specialHit); - } - } - - // *** Finsih Bichsel *** // - - // *** Now diffuse charges to surface *** // - - for(unsigned int istep = 0; istep < trfHitRecord.size(); istep++){ - std::pair<double,double> iHitRecord = trfHitRecord[istep]; - - // double xEta1 = xEta + stepEta * (istep + 0.5); - // double xPhi1 = xPhi + stepPhi * (istep + 0.5); - // double depD = xDep + stepDep * (istep + 0.5); - double xEta1 = xEta + 1.0*iHitRecord.first/iTotalLength*cEta; - double xPhi1 = xPhi + 1.0*iHitRecord.first/iTotalLength*cPhi; - double depD = xDep + 1.0*iHitRecord.first/iTotalLength*cDep; - - // Distance between charge and readout side. p_design->readoutSide() is - // +1 if readout side is in +ve depth axis direction and visa-versa. - double spess = 0.5 * sensorThickness - Module.design().readoutSide() * depD; - if (spess<0) spess=0; - - for(int i=0 ; i<ncharges ; i++) { - - // diffusion sigma - double rdif=this->m_diffusionConstant*sqrt(spess*coLorentz/0.3); - - // position at the surface - double xPhiD=xPhi1+spess*tanLorentz+rdif*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); - double xEtaD=xEta1+rdif*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); - - // Get the charge position in Reconstruction local coordinates. - SiLocalPosition chargePos = Module.hitLocalToLocal(xEtaD, xPhiD); - - // The parametrization of the sensor efficiency (if needed) - // double ed=e1*this->electronHolePairsPerEnergy; - double ed=(1.0*iHitRecord.second/1.E+6/ncharges)*this->electronHolePairsPerEnergy; - - //The following lines are adapted from SiDigitization's Inserter class - SiSurfaceCharge scharge(chargePos,SiCharge(ed,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); - - SiCellId diode = Module.cellIdOfPosition(scharge.position()); - - SiCharge charge = scharge.charge(); - - if (diode.isValid()) { - chargedDiodes.add(diode,charge); - } - } - } - - return StatusCode::SUCCESS; -} - -void PixelECBichselChargeTool::simulateBow(const InDetDD::SiDetectorElement * element, - double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const { - - // The corrections are assumed to be in the reconstruction local frame, so - // we must convertfrom the hit local frame to the reconstruction local frame. - // In fact the frames are the same for the pixel barrel so these gymnastics are not - // really needed but its safer to do it properly. - - // If tool is NONE we apply no correction. - if (m_pixDistoTool.empty()) return; - Amg::Vector3D dir(element->hitPhiDirection() * (xf - xi), - element->hitEtaDirection() * (yf - yi), - element->hitDepthDirection() * (zf - zi)); - - Amg::Vector2D locposi = element->hitLocalToLocal(yi, xi); - Amg::Vector2D locposf = element->hitLocalToLocal(yf, xf); - - Amg::Vector2D newLocposi = m_pixDistoTool->correctSimulation(element->identify(), locposi, dir); - Amg::Vector2D newLocposf = m_pixDistoTool->correctSimulation(element->identify(), locposf, dir); - - // Extract new coordinates and convert back to hit frame. - xi = newLocposi[Trk::x] * element->hitPhiDirection(); - yi = newLocposi[Trk::y] * element->hitEtaDirection(); - - xf = newLocposf[Trk::x] * element->hitPhiDirection(); - yf = newLocposf[Trk::y] * element->hitEtaDirection(); - -} - diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelECBichselChargeTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelECBichselChargeTool.h deleted file mode 100644 index 279b4b32afa525da8021cc431d44911574ff2a0c..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelECBichselChargeTool.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// PixelECBichselChargeTool.h -// Header file for class PixelECBichselChargeTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -// -// Configurable Parameters -// -// -numberOfSteps Geant4:number of steps for PixelEC -// -numberOfCharges Geant4:number of charges for PixelEC -// -diffusionConstant Geant4:Diffusion Constant for PixelEC -// -doBichsel : re-do charge deposition following Bichsel model -// -BichselMomentumCut : minimum MOMENTUM for particle to be re-simulated through Bichsel Model -// -BichselSimTool : tool that implements Bichsel model -// -////////////////////////////////////////////////////////////////// - -#ifndef PIXELDIGITIZATION_PixelECBichselChargeTool_H -#define PIXELDIGITIZATION_PixelECBichselChargeTool_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "SubChargesTool.h" -#include "GaudiKernel/ToolHandle.h" - -// Base class -class PixelID; - -namespace InDetDD { - class SiDetectorElement; -} - -namespace CLHEP { - class HepRandomEngine; -} - -class BichselSimTool; - -class PixelECBichselChargeTool : public SubChargesTool { - -public: - - // Constructor: - PixelECBichselChargeTool( const std::string& type, const std::string& name,const IInterface* parent); - - - /** AlgTool initialize */ - virtual StatusCode initialize(); - - /** AlgTool finalize */ - virtual StatusCode finalize(); - - /** Destructor */ - virtual ~PixelECBichselChargeTool(); - - virtual StatusCode charge(const TimedHitPtr<SiHit> &phit, - SiChargedDiodeCollection& chargedDiodes, - const InDetDD::SiDetectorElement &Module); - - //Constants that can be set by user - int m_numberOfSteps; //number of steps for particle traveling perpendicular to detector element - int m_numberOfCharges; - double m_diffusionConstant; - bool m_doBichsel; // re-do charge deposition following Bichsel model ? - //double m_doBichselMomentumCut; // minimum MOMENTUM for particle to be re-simulated through Bichsel Model. Unit in MeV - double m_doBichselBetaGammaCut; // replace momentum cut - bool m_doPU; // whether apply Bichsel model on PU - ToolHandle<BichselSimTool> m_BichselSimTool; // if yes, you need to load related tool here - -private: - /** empty constructor, make private */ - PixelECBichselChargeTool(); - -void simulateBow(const InDetDD::SiDetectorElement * element,double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const; -private: - - }; - - -#endif // PIXELDIGITIZATION_PixelECBichselChargeTool_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelECChargeTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelECChargeTool.cxx deleted file mode 100644 index 10114dabed21357d550185afa2aefbce9c95a048..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelECChargeTool.cxx +++ /dev/null @@ -1,197 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// PixelECChargeTool.cxx -// Implementation file for class PixelECChargeTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "PixelECChargeTool.h" -#include "InDetReadoutGeometry/SiDetectorElement.h" -#include "InDetReadoutGeometry/PixelModuleDesign.h" -#include "InDetSimEvent/SiHit.h" -#include "InDetIdentifier/PixelID.h" -#include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" - -#include "HepMC/GenEvent.h" -#include "HepMC/GenVertex.h" -#include "HepMC/GenParticle.h" -#include "AtlasCLHEP_RandomGenerators/RandGaussZiggurat.h" - -using namespace InDetDD; - - -// Constructor with parameters: -PixelECChargeTool::PixelECChargeTool(const std::string& type, const std::string& name,const IInterface* parent): - SubChargesTool(type,name,parent), - m_numberOfSteps(50), - m_numberOfCharges(10), - m_diffusionConstant(.007) - -{ - declareProperty("numberOfSteps",m_numberOfSteps,"Geant4:number of steps for PixelEC"); - declareProperty("numberOfCharges",m_numberOfCharges,"Geant4:number of charges for PixelEC"); - declareProperty("diffusionConstant",m_diffusionConstant,"Geant4:Diffusion Constant for PixelEC"); - -} - -class DetCondCFloat; - -// Destructor: -PixelECChargeTool::~PixelECChargeTool() -{ -} - -//---------------------------------------------------------------------- -// Initialize -//---------------------------------------------------------------------- -StatusCode PixelECChargeTool::initialize() { - StatusCode sc = SubChargesTool::initialize(); - if (sc.isFailure()) { - ATH_MSG_FATAL ( "PixelECChargeTool::initialize() failed"); - return sc ; - } - ATH_MSG_DEBUG ( "PixelECChargeTool::initialize()"); - return sc ; -} - -//---------------------------------------------------------------------- -// finalize -//---------------------------------------------------------------------- -StatusCode PixelECChargeTool::finalize() { - StatusCode sc = AthAlgTool::finalize(); - if (sc.isFailure()) { - ATH_MSG_FATAL ( "PixelECChargeTool::finalize() failed"); - return sc ; - } - ATH_MSG_DEBUG ( "PixelECChargeTool::finalize()"); - return sc ; -} - -//---------------------------------------------------------------------- -// charge -//---------------------------------------------------------------------- -StatusCode PixelECChargeTool::charge(const TimedHitPtr<SiHit> &phit, - SiChargedDiodeCollection& chargedDiodes, - const InDetDD::SiDetectorElement &Module) -{ - - if (!Module.isEndcap()) { return StatusCode::SUCCESS; } - const PixelModuleDesign *p_design= static_cast<const PixelModuleDesign*>(&(Module.design())); - if (p_design->getReadoutTechnology()!=InDetDD::PixelModuleDesign::FEI3) { return StatusCode::SUCCESS; } - - ATH_MSG_DEBUG("Applying PixelEC charge processor"); - const HepMcParticleLink McLink = HepMcParticleLink(phit->trackNumber(),phit.eventId()); - const HepMC::GenParticle* genPart= McLink.cptr(); - bool delta_hit = true; - if (genPart) delta_hit = false; - double sensorThickness = Module.design().thickness(); - const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); - electronHolePairsPerEnergy = siProperties.electronHolePairsPerEnergy(); - - double stepsize = sensorThickness/m_numberOfSteps; - double tanLorentz = Module.getTanLorentzAnglePhi(); - const CLHEP::Hep3Vector pos=phit->localStartPosition(); - const CLHEP::Hep3Vector cs=phit->localEndPosition(); - - double xEta=pos[SiHit::xEta]; - double xPhi=pos[SiHit::xPhi]; - const double xDep=pos[SiHit::xDep]; - - double xEtaf = cs[SiHit::xEta]; - double xPhif = cs[SiHit::xPhi]; - const double xDepf = cs[SiHit::xDep]; - - if (!m_disableDistortions && !delta_hit) simulateBow(&Module,xPhi,xEta,xDep,xPhif,xEtaf,xDepf); - - double cEta=xEtaf-xEta; - double cPhi=xPhif-xPhi; - const double cDep=xDepf-xDep; - - double length=sqrt(cEta*cEta+cPhi*cPhi+cDep*cDep); - const int nsteps=int(length/stepsize)+1; - const int ncharges=this->m_numberOfCharges*this->m_numberOfSteps/nsteps+1; - - double stepEta = cEta / nsteps; - double stepPhi = cPhi / nsteps; - double stepDep = cDep / nsteps; - - double e1=phit->energyLoss()/static_cast<double>(nsteps*ncharges); - - double coLorentz=sqrt(1+pow(tanLorentz,2)); - - for(int istep =0; istep < nsteps; istep++) { - double xEta1 = xEta + stepEta * (istep + 0.5); - double xPhi1 = xPhi + stepPhi * (istep + 0.5); - double depD = xDep + stepDep * (istep + 0.5); - - // Distance between charge and readout side. p_design->readoutSide() is - // +1 if readout side is in +ve depth axis direction and visa-versa. - double spess = 0.5 * sensorThickness - Module.design().readoutSide() * depD; - if (spess<0) spess=0; - - for(int i=0 ; i<ncharges ; i++) { - - // diffusion sigma - double rdif=this->m_diffusionConstant*sqrt(spess*coLorentz/0.3); - - // position at the surface - double xPhiD=xPhi1+spess*tanLorentz+rdif*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); - double xEtaD=xEta1+rdif*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); - - // Get the charge position in Reconstruction local coordinates. - SiLocalPosition chargePos = Module.hitLocalToLocal(xEtaD, xPhiD); - - // The parametrization of the sensor efficiency (if needed) - double ed=e1*this->electronHolePairsPerEnergy; - - //The following lines are adapted from SiDigitization's Inserter class - SiSurfaceCharge scharge(chargePos,SiCharge(ed,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); - - SiCellId diode = Module.cellIdOfPosition(scharge.position()); - - SiCharge charge = scharge.charge(); - - if (diode.isValid()) { - - chargedDiodes.add(diode,charge); - - } - } - } - return StatusCode::SUCCESS; -} - -void PixelECChargeTool::simulateBow(const InDetDD::SiDetectorElement * element, - double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const { - - // The corrections are assumed to be in the reconstruction local frame, so - // we must convertfrom the hit local frame to the reconstruction local frame. - // In fact the frames are the same for the pixel barrel so these gymnastics are not - // really needed but its safer to do it properly. - - // If tool is NONE we apply no correction. - if (m_pixDistoTool.empty()) return; - Amg::Vector3D dir(element->hitPhiDirection() * (xf - xi), - element->hitEtaDirection() * (yf - yi), - element->hitDepthDirection() * (zf - zi)); - - Amg::Vector2D locposi = element->hitLocalToLocal(yi, xi); - Amg::Vector2D locposf = element->hitLocalToLocal(yf, xf); - - Amg::Vector2D newLocposi = m_pixDistoTool->correctSimulation(element->identify(), locposi, dir); - Amg::Vector2D newLocposf = m_pixDistoTool->correctSimulation(element->identify(), locposf, dir); - - // Extract new coordinates and convert back to hit frame. - xi = newLocposi[Trk::x] * element->hitPhiDirection(); - yi = newLocposi[Trk::y] * element->hitEtaDirection(); - - xf = newLocposf[Trk::x] * element->hitPhiDirection(); - yf = newLocposf[Trk::y] * element->hitEtaDirection(); - -} - diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelECChargeTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelECChargeTool.h deleted file mode 100644 index 2d8824fc7c91a6b4e2d327bbaa5343b8e655e015..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelECChargeTool.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// PixelECChargeTool.cxx -// Implementation file for class PixelECChargeTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -// -// Configurable Parameters: -// -numberOfSteps Geant4:number of steps for PixelEC -// -numberOfCharges Geant4:number of charges for PixelEC -// -diffusionConstant Geant4:Diffusion Constant for PixelEC -// -////////////////////////////////////////////////////////////////// - - - -#ifndef PIXELDIGITIZATION_PixelECChargeTool_H -#define PIXELDIGITIZATION_PixelECChargeTool_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "SubChargesTool.h" - -// Base class -class PixelID; - -namespace InDetDD { - class SiDetectorElement; -} - -namespace CLHEP { - class HepRandomEngine; -} - -class PixelECChargeTool : public SubChargesTool { - -public: - - // Constructor: - PixelECChargeTool( const std::string& type, const std::string& name,const IInterface* parent); - - - /** AlgTool initialize */ - virtual StatusCode initialize(); - - /** AlgTool finalize */ - virtual StatusCode finalize(); - - /** Destructor */ - virtual ~PixelECChargeTool(); - - virtual StatusCode charge(const TimedHitPtr<SiHit> &phit, - SiChargedDiodeCollection& chargedDiodes, - const InDetDD::SiDetectorElement &Module); - - //Constants that can be set by user - int m_numberOfSteps; //number of steps for particle traveling perpendicular to detector element - int m_numberOfCharges; - double m_diffusionConstant; - -private: - /** empty constructor, make private */ - PixelECChargeTool(); - -void simulateBow(const InDetDD::SiDetectorElement * element,double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const; -private: - - }; - - -#endif // PIXELDIGITIZATION_PixelECChargeTool_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelGangedMerger.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelGangedMerger.cxx deleted file mode 100644 index cdc5552fcd64f5be8b298e19d0b62f389c7fd616..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelGangedMerger.cxx +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// PixelGangedMerger.cxx -// Implementation file for class PixelGangedMerger -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "PixelGangedMerger.h" -#include "SiDigitization/SiHelper.h" - -PixelGangedMerger::PixelGangedMerger(const std::string& type, const std::string& name,const IInterface* parent): - PixelProcessorTool(type,name,parent), - m_pixelID(0) -{ -} - -PixelGangedMerger::~PixelGangedMerger() {} - -StatusCode PixelGangedMerger::initialize() { - CHECK(PixelProcessorTool::initialize()); - - CHECK(detStore()->retrieve(m_pixelID,"PixelID")); - - ATH_MSG_DEBUG("PixelGangedMerger::initialize()"); - return StatusCode::SUCCESS; -} - -StatusCode PixelGangedMerger::finalize() { - ATH_MSG_DEBUG("PixelGangedMerger::finalize()"); - return StatusCode::SUCCESS; -} - -void PixelGangedMerger::process(SiChargedDiodeCollection &collection) { - // loop over the collection and check if the diode is a ganged pixel - // if ganged, find its ganged partner and merge/copy charge - // we need: - // * check if ID is ganged - // * given an ID, find its ganged partner - // * create new charge - Identifier gangedID; - for(SiChargedDiodeIterator i_chargedDiode=collection.begin(); i_chargedDiode!=collection.end(); ++i_chargedDiode) { - - if (isGanged(collection.getId((*i_chargedDiode).first),collection.element(),gangedID)) { - SiTotalCharge thisTotalCharge = (*i_chargedDiode).second.totalCharge(); - SiChargedDiode *gangedChargeDiode = collection.find(gangedID); - int phiGanged = m_pixelID->phi_index(gangedID); - int phiThis = m_pixelID->phi_index(collection.getId((*i_chargedDiode).first)); - - if (gangedChargeDiode) { // merge charges - bool maskGanged = ((phiGanged>159) && (phiGanged<168)); - bool maskThis = ((phiThis>159) && (phiThis<168)); - // mask the one ganged pixel that does not correspond to the readout electronics. - // not really sure this is needed - if (maskGanged && maskThis) { - ATH_MSG_ERROR("PixelGangedMerger: both ganged pixels are in the mask out region -> BUG!"); - } - if (maskGanged) { - (*i_chargedDiode).second.add(gangedChargeDiode->totalCharge()); // merged org pixel - // gangedChargeDiode->add(thisTotalCharge); // merged ganged pixel - SiHelper::maskOut(*gangedChargeDiode,true); - } - else { - gangedChargeDiode->add((*i_chargedDiode).second.totalCharge()); // merged org pixel - // gangedChargeDiode->add(thisTotalCharge); // merged ganged pixel - SiHelper::maskOut((*i_chargedDiode).second,true); - } - } - } - } -} - -bool PixelGangedMerger::isGanged(const Identifier& rdoID, const InDetDD::SiDetectorElement* element, Identifier& gangedID) const { - InDetDD::SiCellId cellID = element->cellIdFromIdentifier(rdoID); - // gangedCell will be invalid if cell was not ganged. - InDetDD::SiCellId gangedCell = element->gangedCell(cellID); - // Convert to identifier - // The following will create an invalid ID if gangedCell is invalid. - gangedID = element->identifierFromCellId(gangedCell); - return gangedCell.isValid(); -} - - diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelGangedMerger.h b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelGangedMerger.h deleted file mode 100644 index 7175e12c3a7551d681e907e521c9714d163cd6b7..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelGangedMerger.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// PixelGangedMerger.h -// Header file for class PixelGangedMerger -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -#ifndef PIXELDIGITIZATION_PIXELGANGEDMERGER_H -#define PIXELDIGITIZATION_PIXELGANGEDMERGER_H - -#include "PixelProcessorTool.h" -#include "InDetIdentifier/PixelID.h" - -class PixelGangedMerger:public PixelProcessorTool { - - public: - PixelGangedMerger( const std::string& type, const std::string& name,const IInterface* parent); - - virtual ~PixelGangedMerger(); - virtual StatusCode initialize(); - virtual StatusCode finalize(); - virtual void process(SiChargedDiodeCollection &collection); - - bool isGanged(const Identifier& rdoID, const InDetDD::SiDetectorElement* element, Identifier& gangedID) const; - - private: - PixelGangedMerger(); - const PixelID *m_pixelID; - -}; -#endif // PIXELDIGITIZATION_PIXELGANGEDMERGER_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/IblPlanarBichselChargeTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelPlanarChargeTool.cxx similarity index 66% rename from InnerDetector/InDetDigitization/PixelDigitization/src/IblPlanarBichselChargeTool.cxx rename to InnerDetector/InDetDigitization/PixelDigitization/src/PixelPlanarChargeTool.cxx index 5510ae5398a2fe8d3d1bc88d744af7d63c8ed542..73c556a0b3f7c8426474d4245160c7be17f83d54 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/IblPlanarBichselChargeTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelPlanarChargeTool.cxx @@ -3,121 +3,100 @@ */ /////////////////////////////////////////////////////////////////// -// IblPlanarBichselChargeTool.cxx -// Implementation file for class IblPlanarBichselChargeTool +// PixelPlanarChargeTool.cxx +// Implementation file for class PixelPlanarChargeTool /////////////////////////////////////////////////////////////////// // (c) ATLAS Detector software /////////////////////////////////////////////////////////////////// -#include "IblPlanarBichselChargeTool.h" +#include "PixelPlanarChargeTool.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" +#include "SiDigitization/SiSurfaceCharge.h" #include "InDetSimEvent/SiHit.h" #include "InDetIdentifier/PixelID.h" #include "GeneratorObjects/HepMcParticleLink.h" #include "SiPropertiesSvc/SiliconProperties.h" - #include "HepMC/GenEvent.h" #include "HepMC/GenVertex.h" #include "HepMC/GenParticle.h" #include "AtlasCLHEP_RandomGenerators/RandGaussZiggurat.h" -#include "BichselSimTool.h" #include "TLorentzVector.h" using namespace InDetDD; - -// Constructor with parameters: -IblPlanarBichselChargeTool::IblPlanarBichselChargeTool(const std::string& type, const std::string& name,const IInterface* parent): - SubChargesTool(type,name,parent), - m_numberOfSteps(50), - m_numberOfCharges(10), - m_diffusionConstant(.007), +PixelPlanarChargeTool::PixelPlanarChargeTool(const std::string& type, const std::string& name,const IInterface* parent): + SubChargesTool(type,name,parent), + m_numberOfSteps(50), + m_numberOfCharges(10), + m_diffusionConstant(.007), m_doBichsel(false), - m_doBichselBetaGammaCut(0.1), // momentum cut on beta-gamma + m_doBichselBetaGammaCut(0.1), // replace momentum cut m_doDeltaRay(false), // need validation - m_doPU(true), + m_doPU(true), m_BichselSimTool("BichselSimTool") { - declareProperty("numberOfSteps",m_numberOfSteps,"Geant4:number of steps for IblPlanar"); - declareProperty("numberOfCharges",m_numberOfCharges,"Geant4:number of charges for IblPlanar"); - declareProperty("diffusionConstant",m_diffusionConstant,"Geant4:Diffusion Constant for IblPlanar"); + declareProperty("numberOfSteps",m_numberOfSteps,"Geant4:number of steps for PixelPlanar"); + declareProperty("numberOfCharges",m_numberOfCharges,"Geant4:number of charges for PixelPlanar"); + declareProperty("diffusionConstant",m_diffusionConstant,"Geant4:Diffusion Constant for PixelPlanar"); declareProperty("doBichsel", m_doBichsel, "re-do charge deposition following Bichsel model"); declareProperty("doBichselBetaGammaCut", m_doBichselBetaGammaCut, "minimum beta-gamma for particle to be re-simulated through Bichsel Model"); declareProperty("doDeltaRay", m_doDeltaRay, "whether we simulate delta-ray using Bichsel model"); - declareProperty("doPU", m_doPU, "wheter we apply Bichsel model on PU"); + declareProperty("doPU", m_doPU, "Whether we apply Bichsel model on PU"); declareProperty("BichselSimTool", m_BichselSimTool, "tool that implements Bichsel model"); } class DetCondCFloat; -// Destructor: -IblPlanarBichselChargeTool::~IblPlanarBichselChargeTool() { } - -//---------------------------------------------------------------------- -// Initialize -//---------------------------------------------------------------------- -StatusCode IblPlanarBichselChargeTool::initialize() { - CHECK(SubChargesTool::initialize()); +PixelPlanarChargeTool::~PixelPlanarChargeTool() { } - ATH_MSG_DEBUG("IblPlanarBichselChargeTool::initialize()"); +StatusCode PixelPlanarChargeTool::initialize() { + CHECK(SubChargesTool::initialize()); + ATH_MSG_INFO("You are using PixelPlanarChargeTool, not PixelPlanarChargeTool"); - ATH_MSG_INFO("You are using IblPlanarBichselChargeTool, not IblPlanarChargeTool"); - - if(m_doBichsel){ - ATH_MSG_INFO("Bichsel Digitization is turned ON in IblPlanarBichselChargeTool!"); + if (m_doBichsel) { + ATH_MSG_INFO("Bichsel Digitization is turned ON in PixelPlanarChargeTool!"); CHECK(m_BichselSimTool.retrieve()); } - else{ - ATH_MSG_INFO("Bichsel Digitization is turned OFF in IblPlanarBichselChargeTool!"); + else { + ATH_MSG_INFO("Bichsel Digitization is turned OFF in PixelPlanarChargeTool!"); } m_doDeltaRay = (m_doBichsel && m_doDeltaRay); // if we don't do Bichsel model, no re-simulation on delta-ray at all! - return StatusCode::SUCCESS; + ATH_MSG_DEBUG ( "PixelPlanarChargeTool::initialize()"); + return StatusCode::SUCCESS; } -//---------------------------------------------------------------------- -// finalize -//---------------------------------------------------------------------- -StatusCode IblPlanarBichselChargeTool::finalize() { - ATH_MSG_DEBUG("IblPlanarBichselChargeTool::finalize()"); - return StatusCode::SUCCESS; +StatusCode PixelPlanarChargeTool::finalize() { + ATH_MSG_DEBUG("PixelPlanarChargeTool::finalize()"); + return StatusCode::SUCCESS; } -//---------------------------------------------------------------------- -// charge -//---------------------------------------------------------------------- -StatusCode IblPlanarBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module) { +StatusCode PixelPlanarChargeTool::charge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module) { - if (!Module.isBarrel()) { return StatusCode::SUCCESS; } + // if (!Module.isBarrel()) { return StatusCode::SUCCESS; } const PixelModuleDesign *p_design= static_cast<const PixelModuleDesign*>(&(Module.design())); - if (p_design->getReadoutTechnology()==InDetDD::PixelModuleDesign::FEI3) { return StatusCode::SUCCESS; } // just allowing ITk + + // So far, this is only discriminating variable from 3D sensor. if (p_design->numberOfCircuits()<2) { return StatusCode::SUCCESS; } + if (Module.isDBM()) { return StatusCode::SUCCESS; } - ATH_MSG_DEBUG("Applying IBLPLANAR charge processor"); + ATH_MSG_DEBUG("Applying PixelPlanar charge processor"); const HepMcParticleLink McLink = HepMcParticleLink(phit->trackNumber(),phit.eventId()); const HepMC::GenParticle* genPart= McLink.cptr(); bool delta_hit = true; if (genPart) delta_hit = false; double sensorThickness = Module.design().thickness(); const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); - electronHolePairsPerEnergy = siProperties.electronHolePairsPerEnergy(); -/* - const PixelModuleDesign *p_design= dynamic_cast<const PixelModuleDesign *>(&(Module.design() ) ); - double pixel_size_x = Module.width()/p_design->rows(); - double pixel_size_y = Module.length()/p_design->columns(); - double module_size_x = Module.width(); - double module_size_y = Module.length(); - ATH_MSG_INFO("IBLPLANAR: PixelSize= (" << pixel_size_x << "," << pixel_size_y << ")"); - ATH_MSG_INFO("IBLPLANAR: ModuleSize= (" << module_size_x << "," << module_size_y << ")"); -*/ + double eleholePairEnergy = siProperties.electronHolePairsPerEnergy(); + double stepsize = sensorThickness/m_numberOfSteps; double tanLorentz = Module.getTanLorentzAnglePhi(); const CLHEP::Hep3Vector pos=phit->localStartPosition(); const CLHEP::Hep3Vector cs=phit->localEndPosition(); - + double xEta=pos[SiHit::xEta]; double xPhi=pos[SiHit::xPhi]; const double xDep=pos[SiHit::xDep]; @@ -145,7 +124,6 @@ StatusCode IblPlanarBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, Si ////////////////////////////////////////////////////// // *** For Bichsel *** // ////////////////////////////////////////////////////// - double iTotalLength = length*1000.; // mm -> micrometer // ultimate feed in to the diffusion (to surface) part @@ -163,7 +141,6 @@ StatusCode IblPlanarBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, Si if(genPart){ // non-delta-ray genPart_4V.SetPtEtaPhiM(genPart->momentum().perp(), genPart->momentum().eta(), genPart->momentum().phi(), genPart->momentum().m()); double iBetaGamma = genPart_4V.Beta() * genPart_4V.Gamma(); - //if(genPart_4V.P()/CLHEP::MeV < m_doBichselMomentumCut) ParticleType = -1; if(iBetaGamma < m_doBichselBetaGammaCut) ParticleType = -1; } else{ // delta-ray. @@ -174,14 +151,16 @@ StatusCode IblPlanarBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, Si if(iBetaGamma < m_doBichselBetaGammaCut) ParticleType = -1; } + // In-time PU if(!m_doPU){ if(phit.eventId() != 0) ParticleType = -1; } + // Out-of-time PU + // We don't cut on the out-of-time PU, since studies show that the fraction is too small } } - // bool m_isRealBichsel = false; if(ParticleType != -1){ // yes, good to go with Bichsel // I don't know why genPart->momentum() goes crazy ... TLorentzVector genPart_4V; @@ -218,31 +197,35 @@ StatusCode IblPlanarBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, Si } else{ // cluster thousands hits to ~20 groups trfHitRecord = m_BichselSimTool->ClusterHits(rawHitRecord, nsteps); - // m_isRealBichsel = true; } } else{ // same as old digitization method //double iTotalLength = length*1000.; // mm -> micrometer for(int istep = 0; istep < nsteps; istep++){ // do the same thing as old digitization method - std::pair<double,double> specialHit; - specialHit.first = 1.0*iTotalLength/nsteps * (istep + 0.5); specialHit.second = phit->energyLoss()*1.E+6/nsteps; - trfHitRecord.push_back(specialHit); + std::pair<double,double> specialHit; + specialHit.first = 1.0*iTotalLength/nsteps * (istep + 0.5); specialHit.second = phit->energyLoss()*1.E+6/nsteps; + trfHitRecord.push_back(specialHit); } } // *** Finsih Bichsel *** // // *** Now diffuse charges to surface *** // - for(unsigned int istep = 0; istep < trfHitRecord.size(); istep++){ std::pair<double,double> iHitRecord = trfHitRecord[istep]; // double xEta1 = xEta + stepEta * (istep + 0.5); // double xPhi1 = xPhi + stepPhi * (istep + 0.5); // double depD = xDep + stepDep * (istep + 0.5); - double xEta1 = xEta + 1.0*iHitRecord.first/iTotalLength*cEta; - double xPhi1 = xPhi + 1.0*iHitRecord.first/iTotalLength*cPhi; - double depD = xDep + 1.0*iHitRecord.first/iTotalLength*cDep; + + double xEta1 = xEta; + double xPhi1 = xPhi; + double depD = xDep; + if (iTotalLength) { + xEta1 += 1.0*iHitRecord.first/iTotalLength*cEta; + xPhi1 += 1.0*iHitRecord.first/iTotalLength*cPhi; + depD += 1.0*iHitRecord.first/iTotalLength*cDep; + } // Distance between charge and readout side. p_design->readoutSide() is // +1 if readout side is in +ve depth axis direction and visa-versa. @@ -263,32 +246,33 @@ StatusCode IblPlanarBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, Si // Slim Edge for IBL planar sensors: // TODO: Access these from somewhere - if(std::abs(xEtaD) > 20.440)e1_current=0.; - if(std::abs(xEtaD)< 20.440 && std::abs(xEtaD)> 20.200){ - if(xEtaD>0){ - e1_current=e1_current*(68.13-xEtaD*3.333); - xEtaD = xEtaD - 0.250; - }else{ - e1_current=e1_current*(68.13+xEtaD*3.333); - xEtaD = xEtaD + 0.250; - } - } - if(std::abs(xEtaD)< 20.200 && std::abs(xEtaD)> 20.100){ - if(xEtaD>0){ - e1_current=e1_current*(41.2-xEtaD*2.); - xEtaD = xEtaD - 0.250; - }else{ - e1_current=e1_current*(41.2+xEtaD*2.); - xEtaD = xEtaD + 0.250; - } + if (p_design->getReadoutTechnology()==InDetDD::PixelModuleDesign::FEI4) { + if(std::abs(xEtaD) > 20.440)e1_current=0.; + if(std::abs(xEtaD)< 20.440 && std::abs(xEtaD)> 20.200){ + if(xEtaD>0){ + e1_current=e1_current*(68.13-xEtaD*3.333); + xEtaD = xEtaD - 0.250; + }else{ + e1_current=e1_current*(68.13+xEtaD*3.333); + xEtaD = xEtaD + 0.250; + } + } + if(std::abs(xEtaD)< 20.200 && std::abs(xEtaD)> 20.100){ + if(xEtaD>0){ + e1_current=e1_current*(41.2-xEtaD*2.); + xEtaD = xEtaD - 0.250; + }else{ + e1_current=e1_current*(41.2+xEtaD*2.); + xEtaD = xEtaD + 0.250; + } + } } // Get the charge position in Reconstruction local coordinates. SiLocalPosition chargePos = Module.hitLocalToLocal(xEtaD, xPhiD); // The parametrization of the sensor efficiency (if needed) - // double ed=e1*this->electronHolePairsPerEnergy; - double ed=e1_current*this->electronHolePairsPerEnergy; + double ed=e1_current*eleholePairEnergy; //The following lines are adapted from SiDigitization's Inserter class SiSurfaceCharge scharge(chargePos,SiCharge(ed,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); @@ -300,13 +284,12 @@ StatusCode IblPlanarBichselChargeTool::charge(const TimedHitPtr<SiHit> &phit, Si if (diode.isValid()) { chargedDiodes.add(diode,charge); } - } + } } return StatusCode::SUCCESS; } -void IblPlanarBichselChargeTool::simulateBow(const InDetDD::SiDetectorElement * element, - double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const { +void PixelPlanarChargeTool::simulateBow(const InDetDD::SiDetectorElement * element, double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const { // The corrections are assumed to be in the reconstruction local frame, so // we must convertfrom the hit local frame to the reconstruction local frame. @@ -315,9 +298,7 @@ void IblPlanarBichselChargeTool::simulateBow(const InDetDD::SiDetectorElement * // If tool is NONE we apply no correction. if (m_pixDistoTool.empty()) return; - Amg::Vector3D dir(element->hitPhiDirection() * (xf - xi), - element->hitEtaDirection() * (yf - yi), - element->hitDepthDirection() * (zf - zi)); + Amg::Vector3D dir(element->hitPhiDirection()*(xf-xi), element->hitEtaDirection()*(yf-yi), element->hitDepthDirection()*(zf-zi)); Amg::Vector2D locposi = element->hitLocalToLocal(yi, xi); Amg::Vector2D locposf = element->hitLocalToLocal(yf, xf); @@ -331,6 +312,5 @@ void IblPlanarBichselChargeTool::simulateBow(const InDetDD::SiDetectorElement * xf = newLocposf[Trk::x] * element->hitPhiDirection(); yf = newLocposf[Trk::y] * element->hitEtaDirection(); - } diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelPlanarChargeTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelPlanarChargeTool.h new file mode 100644 index 0000000000000000000000000000000000000000..4912eb4955d0791155d951b020019c980a435b42 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelPlanarChargeTool.h @@ -0,0 +1,59 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// PixelPlanarChargeTool.h +// Header file for class PixelPlanarChargeTool +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +// +// Configurable Parameters +// +// -numberOfSteps Geant4:number of steps for PixelPlanar +// -numberOfCharges Geant4:number of charges for PixelPlanar +// -diffusionConstant Geant4:Diffusion Constant for PixelPlanar +// -doBichsel : re-do charge deposition following Bichsel model +// -BichselMomentumCut : minimum MOMENTUM for particle to be re-simulated through Bichsel Model +// -BichselSimTool : tool that implements Bichsel model +// +////////////////////////////////////////////////////////////////// + +#ifndef PIXELDIGITIZATION_PixelPlanarChargeTool_H +#define PIXELDIGITIZATION_PixelPlanarChargeTool_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "SubChargesTool.h" + +#include "BichselSimTool.h" + +class PixelPlanarChargeTool : public SubChargesTool { + + public: + PixelPlanarChargeTool( const std::string& type, const std::string& name,const IInterface* parent); + virtual StatusCode initialize(); + virtual StatusCode finalize(); + virtual ~PixelPlanarChargeTool(); + + virtual StatusCode charge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module); + + private: + PixelPlanarChargeTool(); + + int m_numberOfSteps; + int m_numberOfCharges; + double m_diffusionConstant; + + bool m_doBichsel; // re-do charge deposition following Bichsel model ? + double m_doBichselBetaGammaCut; // replace momentum cut + bool m_doDeltaRay; // implement Bichsel Model into delta-ray, which does not have truth particle link. + + // We will assume all delta-ray is electron, with all energy deposited in silicon layer. So the 4-momentum can be reconstructed using energy and direction + bool m_doPU; // Whether we apply Bichsel model on non-HS particles + ToolHandle<BichselSimTool> m_BichselSimTool; // if yes, you need to load related tool here + + void simulateBow(const InDetDD::SiDetectorElement * element,double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const; +}; + +#endif // PIXELDIGITIZATION_PixelPlanarChargeTool_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelProcessorTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelProcessorTool.h index 28629f1864445ec153ea3772d5144250c745387d..a72d7b7cba8ec0166e2b30242b8d325f387a3b64 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelProcessorTool.h +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelProcessorTool.h @@ -13,11 +13,6 @@ #include "AthenaKernel/IAtRndmGenSvc.h" #include "SiDigitization/SiChargedDiodeCollection.h" -// STSSTST #include "InDetRawData/InDetRawDataCLASS_DEF.h" - -// STSSTST #include "InDetConditionsSummaryService/IInDetConditionsSvc.h" -// STSSTST #include "PixelConditionsServices/IPixelCalibSvc.h" -// STSSTST #include "TimeSvc.h" static const InterfaceID IID_IPixelProcessorTool("PixelProcessorTool", 1, 0); diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/SubChargesTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/SubChargesTool.h index 98fab8d83a35bf17356bae4d6522ee55a160381e..ff0b412368939428fb9d87b7b9129427672aaa00 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/SubChargesTool.h +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/SubChargesTool.h @@ -8,148 +8,92 @@ /////////////////////////////////////////////////////////////////// // (c) ATLAS Detector software /////////////////////////////////////////////////////////////////// -// Forms a superclass for the technology dependent charge generator tools, -// which are in turn called from PixelDistortionsSimpleSurfaceChargesGenerator. -/////////////////////////////////////////////////////////////////// -// -// Configurable Parameters: -// -SiPropertiesSvc SiPropertiesSvc -// -RndmSvc Random Number Service used in SCT & Pixel digitization -// -RndmEngine Random engine name -// -DisableDistortions Disable simulation of module distortions -// -////////////////////////////////////////////////////////////////// - #ifndef PIXELDIGITIZATION_SubChargesTool_H #define PIXELDIGITIZATION_SubChargesTool_H #include "AthenaBaseComps/AthAlgTool.h" -#include "InDetSimEvent/SiHit.h" -#include "HitManagement/TimedHitPtr.h" -#include "SiDigitization/SiChargedDiodeCollection.h" -#include "SiDigitization/SiSurfaceCharge.h" -#include "SiPropertiesSvc/ISiPropertiesSvc.h" #include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/ToolHandle.h" #include "CLHEP/Random/RandomEngine.h" #include "AtlasCLHEP_RandomGenerators/RandGaussZiggurat.h" #include "AthenaKernel/IAtRndmGenSvc.h" -#include "PixelConditionsTools/IModuleDistortionsTool.h" -#include "GaudiKernel/ToolHandle.h" - -// Base class -class ISiPropertiesSvc; -class PixelID; -namespace InDetDD { - class SiDetectorElement; -} - -namespace CLHEP { - class HepRandomEngine; -} +#include "HitManagement/TimedHitPtr.h" +#include "SiDigitization/SiChargedDiodeCollection.h" +#include "SiPropertiesSvc/ISiPropertiesSvc.h" +#include "PixelConditionsTools/IModuleDistortionsTool.h" static const InterfaceID IID_ISubChargesTool("SubChargesTool", 1, 0); -class SubChargesTool : public AthAlgTool,virtual public IAlgTool { - -public: - - // Constructor: - SubChargesTool( const std::string& type, const std::string& name,const IInterface* parent) : - AthAlgTool(type,name,parent), - m_siPropertiesSvc("PixelSiPropertiesSvc",name), - m_rndmSvc("AtDSFMTGenSvc",name), - m_rndmEngineName("PixelDigitization"), - m_rndmEngine(0), - m_disableDistortions(false), - m_pixDistoTool("PixelDistortionsTool") -{ - declareInterface< SubChargesTool >( this ); - declareProperty("SiPropertiesSvc",m_siPropertiesSvc,"SiPropertiesSvc"); - declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in SCT & Pixel digitization"); - declareProperty("RndmEngine", m_rndmEngineName, "Random engine name"); - declareProperty("DisableDistortions",m_disableDistortions,"Disable simulation of module distortions"); -} - - /** AlgTool InterfaceID */ - //static const InterfaceID& interfaceID() ; - static const InterfaceID& interfaceID( ){ return IID_ISubChargesTool; } - - /** AlgTool initialize */ - virtual StatusCode initialize() { - StatusCode sc = AthAlgTool::initialize(); - if ( !m_siPropertiesSvc.retrieve().isSuccess() ) { - ATH_MSG_FATAL ( "Unable to retrieve SiPropertiesSvc" ); - return StatusCode::FAILURE; - } - ATH_MSG_DEBUG ( "Retrieved SiPropertiesSvc" ); - - if ( m_rndmSvc.retrieve().isFailure() ) { - ATH_MSG_ERROR ( " Can't get RndmSvc " ); - return StatusCode::FAILURE; - } else { ATH_MSG_DEBUG ( "Retrieved RndmSvc" ); - - } - // - // get the PixelDigitization random stream - // - ATH_MSG_DEBUG ( "Getting random number engine : <" << m_rndmEngineName << ">" ); - m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName); - if (m_rndmEngine==0) { - ATH_MSG_ERROR ( "Could not find RndmEngine : " << m_rndmEngineName ); - return StatusCode::FAILURE; - } else { ATH_MSG_DEBUG ( " Found RndmEngine : " << m_rndmEngineName ); - } - - ATH_MSG_DEBUG("Getting distortions tool"); - if (!m_disableDistortions) { - if (!m_pixDistoTool.empty()) { - sc = m_pixDistoTool.retrieve(); - if (sc.isFailure()) { - ATH_MSG_ERROR("Can't get pixel distortions tool"); - return sc; - } - ATH_MSG_DEBUG("Distortions tool retrieved"); - } else ATH_MSG_DEBUG("No distortions tool selected"); - } - return sc; +class SubChargesTool:public AthAlgTool,virtual public IAlgTool { + + public: + SubChargesTool( const std::string& type, const std::string& name,const IInterface* parent) : + AthAlgTool(type,name,parent), + m_siPropertiesSvc("PixelSiPropertiesSvc",name), + m_rndmSvc("AtDSFMTGenSvc",name), + m_rndmEngineName("PixelDigitization"), + m_rndmEngine(nullptr), + m_disableDistortions(false), + m_pixDistoTool("PixelDistortionsTool") + { + declareInterface<SubChargesTool>(this); + declareProperty("SiPropertiesSvc", m_siPropertiesSvc, "SiPropertiesSvc"); + declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in SCT & Pixel digitization"); + declareProperty("RndmEngine", m_rndmEngineName, "Random engine name"); + declareProperty("DisableDistortions",m_disableDistortions, "Disable simulation of module distortions"); } - /** AlgTool finalize */ - virtual StatusCode finalize() {return StatusCode::FAILURE;} - - /** Destructor */ - virtual ~SubChargesTool() {} - - /** Pure virtual method overwritten by each technology subclass. Produces and adds the surface - * charges to chargedDiodes for the given hit and module. - */ - virtual StatusCode charge(const TimedHitPtr<SiHit> &phit, - SiChargedDiodeCollection& chargedDiodes, - const InDetDD::SiDetectorElement &Module) = 0; - - - - - - -private: - /** empty constructor, make private */ - SubChargesTool(); - - -protected: - - ServiceHandle< ISiPropertiesSvc > m_siPropertiesSvc; - ServiceHandle<IAtRndmGenSvc> m_rndmSvc; - std::string m_rndmEngineName; - CLHEP::HepRandomEngine* m_rndmEngine; - double electronHolePairsPerEnergy; - bool m_disableDistortions; - ToolHandle<IModuleDistortionsTool> m_pixDistoTool; -private: - const InDetDD::SiDetectorElement * m_module; - }; + static const InterfaceID& interfaceID() { return IID_ISubChargesTool; } + + virtual StatusCode initialize() { + CHECK(AthAlgTool::initialize()); + + CHECK(m_siPropertiesSvc.retrieve()); + + CHECK(m_rndmSvc.retrieve()); + + m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName); + if (!m_rndmEngine) { + ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName); + return StatusCode::FAILURE; + } + else { + ATH_MSG_DEBUG("Found RndmEngine : " << m_rndmEngineName); + } + + if (!m_disableDistortions) { + ATH_MSG_DEBUG("Getting distortions tool"); + if (!m_pixDistoTool.empty()) { + CHECK(m_pixDistoTool.retrieve()); + ATH_MSG_DEBUG("Distortions tool retrieved"); + } + else { + ATH_MSG_DEBUG("No distortions tool selected"); + } + } + return StatusCode::SUCCESS; + } + + virtual StatusCode finalize() {return StatusCode::FAILURE;} + virtual ~SubChargesTool() {} + virtual StatusCode charge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module) = 0; + + private: + SubChargesTool(); + + protected: + ServiceHandle<ISiPropertiesSvc> m_siPropertiesSvc; + ServiceHandle<IAtRndmGenSvc> m_rndmSvc; + std::string m_rndmEngineName; + CLHEP::HepRandomEngine *m_rndmEngine; + + bool m_disableDistortions; + ToolHandle<IModuleDistortionsTool> m_pixDistoTool; + + private: + const InDetDD::SiDetectorElement *m_module; +}; #endif // PIXELDIGITIZATION_SubChargesTool_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/TimeSvc.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/TimeSvc.cxx index 78b9115a8d2360bfe3c50d713da2a92fd3beb9a5..d2eb4419df8d7f1088ed56eb3eab57dc62406cea 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/TimeSvc.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/TimeSvc.cxx @@ -120,29 +120,29 @@ int TimeSvc::relativeBunch2009(const double threshold, const double intimethresh return BCID; } -//==================================================================== // This is the new parameterization based on the 2015 collision data. -//==================================================================== int TimeSvc::relativeBunch2015(const SiTotalCharge &totalCharge, int barrel_ec, int layer_disk, int moduleID) const { - //================================= - // 2016.03.29 Soshi.Tsuno@cern.ch - // - // The time walk effect is directly tuned with timing scan data (collision) in 2015. - // - // See reference in the talk, - // https://indico.cern.ch/event/516099/contributions/1195889/attachments/1252177/1846815/pixelOffline_timing_04.04.2016_soshi.pdf - // - // Ideally, it could be directly parameterized as a function of given ToT. - // However, the ToT calibration was changed over 2015-2016, where newly calibrated ToT value was not available for 2016. - // For instance, the b-layer charge tuning was changed from ToT30@MIP (2015) to ToT18@MIP (2016). - // Thus the time walk effect needs to be parameterized with more universal value, that is, charge information. - // But it was non-trivial because of the migration effect between the border in ToT. - // - // Here in 2015 version, we apply the threshold of the 60% total charge to get a certain ToT value, - // which most describes the data timing structure. - // - // 60% working point tune-2 + /** + * 2016.03.29 Soshi.Tsuno@cern.ch + * + * The time walk effect is directly tuned with timing scan data (collision) in 2015. + * + * See reference in the talk, + * https://indico.cern.ch/event/516099/contributions/1195889/attachments/1252177/1846815/pixelOffline_timing_04.04.2016_soshi.pdf + * + * Ideally, it could be directly parameterized as a function of given ToT. + * However, the ToT calibration was changed over 2015-2016, where newly calibrated ToT value was not available for 2016. + * For instance, the b-layer charge tuning was changed from ToT30@MIP (2015) to ToT18@MIP (2016). + * Thus the time walk effect needs to be parameterized with more universal value, that is, charge information. + * But it was non-trivial because of the migration effect between the border in ToT. + * + * Here in 2015 version, we apply the threshold of the 60% total charge to get a certain ToT value, + * which most describes the data timing structure. + * + * 60% working point tune-2 + */ + double prob = 0.0; if (barrel_ec==0 && layer_disk==1) { if (abs(moduleID)==0) { diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/components/PixelDigitization_entries.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/components/PixelDigitization_entries.cxx index d090a2c6a7c3b3a573ce99bcb134f34943527b62..3b201d2cfc833bd5d68b27d0b8fa63168017a2e7 100755 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/components/PixelDigitization_entries.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/components/PixelDigitization_entries.cxx @@ -3,20 +3,13 @@ #include "src/PixelDigitization.h" #include "src/PixelDigitizationTool.h" #include "src/PixelNoisyCellGenerator.h" -#include "src/PixelGangedMerger.h" #include "src/PixelChargeSmearer.h" #include "src/PixelDiodeCrossTalkGenerator.h" #include "src/PixelRandomDisabledCellGenerator.h" #include "src/TimeSvc.h" -#include "src/PixelBarrelChargeTool.h" -#include "src/PixelBarrelBichselChargeTool.h" -#include "src/PixelECChargeTool.h" -#include "src/PixelECBichselChargeTool.h" +#include "src/PixelPlanarChargeTool.h" +#include "src/Pixel3DChargeTool.h" #include "src/DBMChargeTool.h" -#include "src/IblPlanarChargeTool.h" -#include "src/IblPlanarBichselChargeTool.h" -#include "src/Ibl3DChargeTool.h" -#include "src/Ibl3DBichselChargeTool.h" #include "src/ChargeCollProbSvc.h" #include "src/BichselSimTool.h" #include "src/FEI4SimTool.h" @@ -26,22 +19,14 @@ DECLARE_ALGORITHM_FACTORY(PixelDigitization) DECLARE_TOOL_FACTORY(BichselSimTool) DECLARE_TOOL_FACTORY(PixelDigitizationTool) DECLARE_TOOL_FACTORY(PixelNoisyCellGenerator) -DECLARE_TOOL_FACTORY(PixelGangedMerger) DECLARE_TOOL_FACTORY(PixelChargeSmearer) DECLARE_TOOL_FACTORY(PixelDiodeCrossTalkGenerator) DECLARE_TOOL_FACTORY(PixelRandomDisabledCellGenerator) -DECLARE_TOOL_FACTORY(PixelBarrelChargeTool) -DECLARE_TOOL_FACTORY(PixelBarrelBichselChargeTool) -DECLARE_TOOL_FACTORY(PixelECChargeTool) -DECLARE_TOOL_FACTORY(PixelECBichselChargeTool) +DECLARE_TOOL_FACTORY(PixelPlanarChargeTool) +DECLARE_TOOL_FACTORY(Pixel3DChargeTool) DECLARE_TOOL_FACTORY(DBMChargeTool) -DECLARE_TOOL_FACTORY(IblPlanarChargeTool) -DECLARE_TOOL_FACTORY(IblPlanarBichselChargeTool) -DECLARE_TOOL_FACTORY(Ibl3DChargeTool) -DECLARE_TOOL_FACTORY(Ibl3DBichselChargeTool) DECLARE_TOOL_FACTORY(FEI4SimTool) DECLARE_TOOL_FACTORY(FEI3SimTool) -//DECLARE_TOOL_FACTORY(SubChargesTool) DECLARE_SERVICE_FACTORY(ChargeCollProbSvc) DECLARE_SERVICE_FACTORY(TimeSvc) @@ -50,22 +35,14 @@ DECLARE_FACTORY_ENTRIES(PixelDigitization) { DECLARE_TOOL(BichselSimTool) DECLARE_TOOL(PixelDigitizationTool) DECLARE_TOOL(PixelNoisyCellGenerator) - DECLARE_TOOL(PixelGangedMerger) DECLARE_TOOL(PixelChargeSmearer) DECLARE_TOOL(PixelDiodeCrossTalkGenerator) DECLARE_TOOL(PixelRandomDisabledCellGenerator) - DECLARE_TOOL(PixelBarrelChargeTool) - DECLARE_TOOL(PixelBarrelBichselChargeTool) - DECLARE_TOOL(PixelECChargeTool) - DECLARE_TOOL(PixelECBichselChargeTool) + DECLARE_TOOL(PixelPlanarChargeTool) + DECLARE_TOOL(Pixel3DChargeTool) DECLARE_TOOL(DBMChargeTool) - DECLARE_TOOL(IblPlanarChargeTool) - DECLARE_TOOL(IblPlanarBichselChargeTool) - DECLARE_TOOL(Ibl3DChargeTool) - DECLARE_TOOL(Ibl3DBichselChargeTool) DECLARE_TOOL(FEI4SimTool) DECLARE_TOOL(FEI3SimTool) - // DECLARE_TOOL(SubChargesTool) DECLARE_SERVICE(ChargeCollProbSvc) DECLARE_SERVICE(TimeSvc) } diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt index c43b1d506ab1dba0768e9bb168eaacae155e4e08..ea0451f42a1d29529fed5b47eee5e4b14d08cd0b 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt @@ -66,7 +66,10 @@ if( IS_DIRECTORY ${CMAKE_SOURCE_DIR}/Database/AthenaPOOL/AthenaPoolUtilities ) endif() find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) - run_tpcnv_test( InDetEventTPCnv_16.6.2.1 ESD-16.6.2.1 ) + set( INDETEVENTATHENAPOOL_REFERENCE_TAG + InDetEventAthenaPoolReference-01-00-00 ) + run_tpcnv_test( InDetEventTPCnv_16.6.2.1 ESD-16.6.2.1 + REFERENCE_TAG ${INDETEVENTATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) endif() diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/share/InDetEventTPCnv_16.6.2.1.ref b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/share/InDetEventTPCnv_16.6.2.1.ref deleted file mode 100644 index 7c5bd007799a47d763a467bb077d9b2da4b53856..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/share/InDetEventTPCnv_16.6.2.1.ref +++ /dev/null @@ -1,775 +0,0 @@ -Mon Apr 18 19:57:38 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "InDetEventAthenaPool/InDetEventTPCnv_16.6.2.1_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 7.69 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 19:58:51 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p2 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p2 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 6DC29E7E-4252-6B28-9911-944EFB3FA45B -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root File version:52600 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 6DC29E7E-4252-6B28-9911-944EFB3FA45B -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D0EBDE98-1E0D-E011-B6D0-003048F0E778 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root File version:52600 -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Folder /TagInfo will be taken from file metadata -IOVDbSvc INFO Found 15 metadata containers in input file, 1 will be used -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventAthenaPool/run/InDetEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventAthenaPool/run/InDetEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventAthenaPool/run/InDetEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventAthenaPool/run/InDetEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -IOVDbSvc INFO Added taginfo remove for /TagInfo -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventAthenaPool/run/InDetEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventAthenaPool/run/InDetEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-00 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-02-01-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-00, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2676 64.1319 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7032 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.506 136.131 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 15508Kb Time = 0.46S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-DC3-07 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-DC3-07, Name: DC3, Layout: Final, Code Version: 3.06.00, Description: DC3 Geometry -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 13312Kb Time = 0.25S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-R13-02 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x1dae220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-R13-02, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 22200Kb Time = 0.3S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.05S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-02-01-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-02-01-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-02-01-00> default MuonVersion is <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.01.Initial> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.01.Initial> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-02-01-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ASZT table in Oracle -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 21 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 4 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 215 -MuGM:ProcPosition INFO *** N. of stations described in mysql 220 -MuGM:ProcPosition INFO *** N. of types 28 size of jtypvec 28 -MuGM:ProcPosition INFO *** : 220 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1678 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-02-01-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.01.Initial -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1678 child volumes -MuGM:MuonFactory INFO *** 1670 independent elements and -MuGM:MuonFactory INFO *** 11928 elements cloned or shared -MuGM:MuonFactory INFO *** 215 kinds of stations -MuGM:MuonFactory INFO *** 1678 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1678 MuonStations -MuGM:MuonFactory INFO *** 2168 MDT Readout Elements 1108 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1678 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1678/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 21472Kb Time = 1.55S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 1024Kb Time = 0.01S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16177 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D0EBDE98-1E0D-E011-B6D0-003048F0E778 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D0EBDE98-1E0D-E011-B6D0-003048F0E778 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root File version:52600 -PoolSvc INFO Failed to find container POOLContainer(DataHeader) to create POOL collection. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -ClassIDSvc INFO getRegistryEntries: read 703 CLIDRegistry entries for module ALL -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 105200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-DR-BS7T-ANom-11 set from input file -ClassIDSvc INFO getRegistryEntries: read 36 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventAthenaPool/run/InDetEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventAthenaPool/run/InDetEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to InDetAlign_Nominal for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventAthenaPool/run/InDetEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/InnerDetector/InDetEventCnv/InDetEventAthenaPool/run/InDetEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TRTAlign_Nominal for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusTemporaryEmpty for folder /TRT/Cond/Status -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusPermanentAllBoardsBarrelIndividual for folder /TRT/Cond/StatusPermanent -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 8E91164C-1E3C-DB11-8CAB-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -GeoModelSvc WARNING *** *** Geometry configured through jobOptions does not match TagInfo tags! *** *** -GeoModelSvc INFO ** Job Option configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-02-01-00 -GeoModelSvc INFO * InDet tag: -GeoModelSvc INFO * Pixel tag: -GeoModelSvc INFO * SCT tag: -GeoModelSvc INFO * TRT tag: -GeoModelSvc INFO * LAr tag: -GeoModelSvc INFO * Tile tag: -GeoModelSvc INFO * Muon tag: -GeoModelSvc INFO * Calo tag: -GeoModelSvc INFO * MagField tag: -GeoModelSvc INFO * CavernInfra tag: -GeoModelSvc INFO * ForwardDetectors tag: -GeoModelSvc INFO ** TAG INFO configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-10-00-00 -AthenaEventLoopMgr INFO ===>>> start processing event #1, run #105200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 138 CLIDRegistry entries for module ALL -PixelClusterCon... INFO PixelClusterContainerCnv::initialize() -PixelClusterCon... INFO PixelClusterContainerCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 449 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 51 CLIDRegistry entries for module ALL -SCT_ClusterCont... INFO SCT_ClusterContainerCnv::initialize() -SCT_ClusterCont... INFO SCT_ClusterContainerCnv::initialize() -TRT_DriftCircle... INFO TRT_DriftCircleContainerCnv::initialize() -TRT_DriftCircle... INFO TRT_DriftCircleContainerCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 6 CLIDRegistry entries for module ALL -PixelRDO_Contai... INFO PixelRDO_ContainerCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 28 CLIDRegistry entries for module ALL -TRT_RDO_Contain... INFO TRT_RDO_ContainerCnv::initialize() -AthenaEventLoopMgr INFO ===>>> done processing event #1, run #105200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 8E91164C-1E3C-DB11-8CAB-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #2, run #105200 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #2, run #105200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #3, run #105200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #3, run #105200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #4, run #105200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #4, run #105200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #5, run #105200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #5, run #105200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #6, run #105200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #6, run #105200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #7, run #105200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #7, run #105200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #8, run #105200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #8, run #105200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #9, run #105200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #9, run #105200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #10, run #105200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #10, run #105200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-16.6.2.1.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D0EBDE98-1E0D-E011-B6D0-003048F0E778 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.75 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.39 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.51 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.65 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.44 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 36/36/6732 (( 0.72 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.53 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.57 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Folder /TagInfo (AttrListColl) db-read 0/2 objs/chan/bytes 2/0/0 (( 0.00 ))s -IOVDbSvc INFO Total payload read from COOL: 30844 bytes in (( 4.57 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 1.66 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 2.91 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot=0.999 [ms] #= 1 -ChronoStatSvc INFO Time User : Tot= 123 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/CMakeLists.txt b/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/CMakeLists.txt index 0cc5970305df07c2d1e90bb204210e6d76d9a61b..a66d9c330e5d4e1588246387e1d2dde155adccaf 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/CMakeLists.txt +++ b/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/CMakeLists.txt @@ -43,7 +43,10 @@ endif() find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) - run_tpcnv_test( InDetSimEventTPCnv_HITS HITS.04919495._000416 ) + set( INDETSIMEVENTATHENAPOOL_REFERENCE_TAG + InDetSimEventAthenaPoolReference-01-00-00 ) + run_tpcnv_test( InDetSimEventTPCnv_HITS HITS.04919495._000416 + REFERENCE_TAG ${INDETSIMEVENTATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) endif() diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPostProcessing.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPostProcessing.py index 82052b31777250ca0f2c78847a85016b5a853b7c..3477bf974dd90ad227b3ed46caf69781009a102e 100755 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPostProcessing.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPostProcessing.py @@ -268,7 +268,7 @@ class InDetTrigTrackingxAODCnv_EF( InDet__TrigTrackingxAODCnv ): creatorTool = InDetTrigParticleCreatorToolWithSummary - if "_FTF" in name: + if "_FTF" or "_FTK" in name: creatorTool = InDetTrigParticleCreatorToolFTF elif "_IDTrig" in name and type=="electron": creatorTool = InDetTrigParticleCreatorToolWithSummaryTRTPid diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/CMakeLists.txt b/InnerDetector/InDetSimUtils/TRT_TR_Process/CMakeLists.txt index 88ac699cf69b22a87f19a6c8bf291d924ca3f18b..4f8ee4b99fc346773335f0848317408facf9cece 100644 --- a/InnerDetector/InDetSimUtils/TRT_TR_Process/CMakeLists.txt +++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/CMakeLists.txt @@ -16,7 +16,7 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/IdDictDetDescr Simulation/G4Atlas/G4AtlasInterfaces Simulation/G4Sim/SimHelpers - Simulation/G4Utilities/Geo2G4 + Simulation/G4Utilities/GeoMaterial2G4 Simulation/Tools/AtlasCLHEP_RandomGenerators Tools/PathResolver ) @@ -31,7 +31,7 @@ atlas_add_component( TRT_TR_Process src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel StoreGateLib SGtests IdDictDetDescr G4AtlasInterfaces SimHelpers Geo2G4Lib AtlasCLHEP_RandomGenerators PathResolver ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel StoreGateLib SGtests IdDictDetDescr G4AtlasInterfaces SimHelpers GeoMaterial2G4 AtlasCLHEP_RandomGenerators PathResolver ) # Install files from the package: atlas_install_headers( TRT_TR_Process ) diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/cmt/requirements b/InnerDetector/InDetSimUtils/TRT_TR_Process/cmt/requirements index 77ddb019de1c201922f455f978c30526868e1ffa..92ea80d3f2169157536fb4f6617b92eea1e01a50 100644 --- a/InnerDetector/InDetSimUtils/TRT_TR_Process/cmt/requirements +++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/cmt/requirements @@ -16,14 +16,14 @@ use AthenaKernel AthenaKernel-* Control use AtlasCLHEP AtlasCLHEP-* External use AtlasCLHEP_RandomGenerators AtlasCLHEP_RandomGenerators-* Simulation/Tools use Geant4 Geant4-* External -use Geo2G4 Geo2G4-* Simulation/G4Utilities +use GeoMaterial2G4 GeoMaterial2G4-* Simulation/G4Utilities use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel use IdDictDetDescr IdDictDetDescr-* DetectorDescription use SimHelpers SimHelpers-* Simulation/G4Sim use G4AtlasInterfaces G4AtlasInterfaces-* Simulation/G4Atlas use AthenaBaseComps AthenaBaseComps-* Control use StoreGate StoreGate-* Control -use PathResolver PathResolver-* Tools +use PathResolver PathResolver-* Tools end_private @@ -44,6 +44,6 @@ apply_pattern declare_python_modules files="*.py" #======================================================= private -#macro TRT_TR_Process_linkopts "-lGeo2G4" +#macro TRT_TR_Process_linkopts "-lGeoMaterial2G4" end_private diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.cxx b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.cxx index dd2d71f4bd64d86d6ba845c89e6f0706d5b170da..4c3c12c9da39c20014fed3c8a88f672123e2fe71 100644 --- a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.cxx +++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.cxx @@ -16,7 +16,7 @@ #include "AthenaBaseComps/AthMsgStreamMacros.h" #include "GeoModelInterfaces/AbsMaterialManager.h"//Material Manager #include "GeoModelInterfaces/StoredMaterialManager.h"//Material Manager -#include "Geo2G4/Geo2G4MaterialFactory.h" //Converting GeoMaterial -> G4Material +#include "GeoMaterial2G4/Geo2G4MaterialFactory.h" //Converting GeoMaterial -> G4Material #include "PathResolver/PathResolver.h" #include "StoreGate/DataHandle.h" #include "StoreGate/StoreGateSvc.h"//Detector Store diff --git a/LArCalorimeter/LArExample/TestLArHardwareID/CMakeLists.txt b/LArCalorimeter/LArExample/TestLArHardwareID/CMakeLists.txt index 2b950d8e2df3291e8d55faee9de3a12c7a8040dd..253dd9e54653e702f53588c37f3a2cd75f26feff 100644 --- a/LArCalorimeter/LArExample/TestLArHardwareID/CMakeLists.txt +++ b/LArCalorimeter/LArExample/TestLArHardwareID/CMakeLists.txt @@ -29,5 +29,4 @@ atlas_add_component( TestLArHardwareID # Install files from the package: atlas_install_headers( TestLArHardwareID ) atlas_install_joboptions( share/*.py ) -atlas_install_runtime( share/FCal-online-map.txt ) diff --git a/LArCalorimeter/LArG4/LArG4Barrel/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4Barrel/CMakeLists.txt index 680a9fdfa2f3c677aaa77371ded73eb616ebe903..855dd81f2be5fbe9b1de7ec9c59ae942bb542b1c 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4Barrel/CMakeLists.txt @@ -7,14 +7,13 @@ atlas_subdir( LArG4Barrel ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Calorimeter/CaloG4Sim LArCalorimeter/LArG4/LArG4Code PRIVATE + Calorimeter/CaloG4Sim Control/AthenaKernel Control/CxxUtils Control/StoreGate GaudiKernel - LArCalorimeter/LArG4/LArG4RunControl LArCalorimeter/LArGeoModel/LArHV Tools/PathResolver ) @@ -24,11 +23,13 @@ find_package( Geant4 ) find_package( XercesC ) # Component(s) in the package: -atlas_add_library( LArG4Barrel +atlas_add_component( LArG4Barrel src/*.cc + src/components/*.cxx PUBLIC_HEADERS LArG4Barrel INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} LArG4Code CaloG4SimLib StoreGateLib SGtests PRIVATE_LINK_LIBRARIES AthenaKernel CxxUtils GaudiKernel LArG4RunControl LArHV PathResolver ) +atlas_install_python_modules( python/*.py ) diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/AccMap.h b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/AccMap.h deleted file mode 100644 index fa4f5b0083be67bbe66d8aa9950de3b3c60bd2b7..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/AccMap.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef AccMap_h -#define AccMap_h - -#include "LArG4Barrel/CurrMap.h" - -#include <map> -#include <vector> -#include <string> - -typedef std::map<int, CurrMap*> curr_map; - -class AccMap { - public: - ~AccMap(); - static AccMap* GetAccMap(); - void SetDirectory(std::string dir); - void Reset(); - int Region(int region, int sampling, int eta); - void SetMap(int ifold, int ielecregion); - void SetMap(int ifold, int region, int sampling, int eta); - CurrMap* Map() {return m_curr;} - float GetXmin(int ifold) { - if (ifold<m_nmax && ifold >=0) return m_xmin[ifold]; - else return -999.;} - float GetXmax(int ifold) { - if (ifold<m_nmax && ifold >=0) return m_xmax[ifold]; - else return -999.;} - float GetYmin(int ifold) { - if (ifold<m_nmax && ifold >=0) return m_ymin[ifold]; - else return -999.;} - float GetYmax(int ifold) { - if (ifold<m_nmax && ifold >=0) return m_ymax[ifold]; - else return -999.;} - private: - AccMap(); - static AccMap* s_thePointer; - curr_map m_theMap; - std::string m_directory; -// current map info - CurrMap* m_curr; - int m_fold; - int m_region; - int m_eta; - int m_sampling; - int m_elecregion; - int m_nmax; - std::vector<float> m_xmin; - std::vector<float> m_xmax; - std::vector<float> m_ymin; - std::vector<float> m_ymax; -}; -#endif diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/CurrMap.h b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/CurrMap.h deleted file mode 100644 index d3b8361214f410e7608f8db1aaf230a8582c2fad..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/CurrMap.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef CurrMap_h -#define CurrMap_h - -#include <string> - -class CurrMap { - public: - CurrMap(std::string filename, double xnorm); - ~CurrMap(); - int GetNx() { return m_nx;} - float GetXmin() { return m_xmin;} - float GetXmax() { return m_xmax;} - float GetDx() { return m_dx;} - int GetNy() { return m_ny;} - float GetYmin() { return m_ymin;} - float GetYmax() { return m_ymax;} - float GetDy() { return m_dy;} - float GetGap(int ix,int iy) {return m_gap[iy*m_nx+ix];} - float GetCurr0(int ix,int iy) {return m_curr0[iy*m_nx+ix];} - float GetCurr1(int ix,int iy) {return m_curr1[iy*m_nx+ix];} - float GetCurr2(int ix,int iy) {return m_curr2[iy*m_nx+ix];} - void GetAll(double x, double y, double* gap, double* curr0,double* curr1,double* curr2); - private: - CurrMap(const CurrMap&);//coverity issue fix. Declared, but not implemented - CurrMap& operator=(const CurrMap&);//coverity issue fix. Declared, but not implemented - int m_nx,m_ny; - float m_xmin,m_xmax,m_dx,m_ymin,m_ymax,m_dy; - float *m_gap,*m_curr0,*m_curr1,*m_curr2; - float m_norm; - -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelCalculator.h b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelCalculator.h deleted file mode 100644 index 5362de5d0f31359fbb7b75e4e5074199b7b7f3d9..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelCalculator.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArBarrelCalculator.hh -// The Cell Identifier for the EM Barrel readout cells - -// Adapted from code written by Gaston Parrour -// Adaptation by Sylvain Negroni - -// 12-Jul-2002 WGS: Added LArG4Identifier. - -// 18-03-2005 G.Unal: major revision to include new current maps -class LArG4BirksLaw; -#ifndef LARBARRELCALCULATOR_H -#define LARBARRELCALCULATOR_H - -#include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVCalculator.h" -#include "LArG4Code/LArVG4DetectorParameters.h" -#include "LArG4Barrel/LArBarrelGeometry.h" - -#include <stdexcept> -#include <vector> -#include <string> -#include <memory> - -class G4Step; -class AccMap; -class MapEta; - -class LArBarrelCalculator : public LArVCalculator -{ -public: - - // Accessor method for singleton pattern. - static LArBarrelCalculator* GetCalculator(); - - // Destructor - ~LArBarrelCalculator(); - - LArBarrelCalculator (const LArBarrelCalculator&) = delete; - LArBarrelCalculator& operator= (const LArBarrelCalculator&) = delete; - - virtual G4bool Process(const G4Step* a_step){return Process(a_step, m_hdata);} - virtual G4bool Process(const G4Step* a_step, std::vector<LArHitData>& hdata); - - // - // get functions: - // - virtual G4float OOTcut() const { return m_OOTcut; } - - virtual int getNumHits() const {return m_nhits;} - virtual const LArG4Identifier& identifier(int i=0) const { - if (i<0||i>=m_nhits) throw std::range_error("Hit asked is out of range"); - if(static_cast<int>(m_hdata.size())<=i) throw std::range_error("No such hit yet"); - return m_hdata[i].id; } - virtual G4double time(int i=0) const { - if (i<0||i>=m_nhits) throw std::range_error("Hit asked is out of range"); - if(static_cast<int>(m_hdata.size())<=i) throw std::range_error("No such hit yet"); - return m_hdata[i].time; } - virtual G4double energy(int i=0) const { - if (i<0||i>=m_nhits) throw std::range_error("Hit asked is out of range"); - if(static_cast<int>(m_hdata.size())<=i) throw std::range_error("No such hit yet"); - return m_hdata[i].energy; }; - virtual G4bool isInTime(int i=0) const { - if (i<0||i>=m_nhits) throw std::range_error("Hit asked is out of range"); - return m_isInTime[i]; } - virtual G4bool isOutOfTime(int i=0) const { - if (i<0||i>=m_nhits) throw std::range_error("Hit asked is out of range"); - return ( ! m_isInTime[i] ); } - - inline void detectorName(std::string name) { m_detectorName=name; } - -protected: - // The constructor is protected according to the 'singleton' design - // pattern. - LArBarrelCalculator(); - -private: - - static LArBarrelCalculator* m_instance; - - LArVG4DetectorParameters* m_parameters; - LArG4::Barrel::Geometry* m_geometry; - AccMap* m_accmap; - std::unique_ptr<MapEta> m_etamap1; - std::unique_ptr<MapEta> m_etamap2; - std::unique_ptr<MapEta> m_etamap3; - - G4float m_OOTcut; - - // RUN Options - bool m_IflCur; - bool m_IflMapTrans; - bool m_IflXtalk; - - double m_dstep; - - const LArG4BirksLaw *m_birksLaw; - bool m_doHV; - - - // detector name, for translated geometry - std::string m_detectorName; - - // global EMBarrel dimensions - double m_etaMaxBarrel; - double m_zMinBarrel; - double m_zMaxBarrel; - // global Accordion dimensions - double m_rMinAccordion; - double m_rMaxAccordion; - // half thickness of absorber and electrode - double m_ThickAbs; - double m_ThickEle; - // GU 11/06/2003 total number of cells in phi - int m_NCellTot; - int m_NCellMax; - // to handle small difference (mostly phi wrapping and +-z symmetry) - // between atlas and test beam - bool m_testbeam; - - // The results of the Process calculation: - int m_nhits; // number of hits - //std::vector<LArG4Identifier> m_identifier; // hit identifier - //std::vector<G4double> m_energy; // energy (or current) - //std::vector<G4double> m_time; // time - std::vector<LArHitData> m_hdata; - - std::vector<G4bool> m_isInTime; // hit in time ? - LArG4Identifier m_identifier2; - LArG4Identifier m_identifier_xt1; - LArG4Identifier m_identifier_xt2; - -// Hv values -// 0,1 = positive/negative barrel -// 0->1023 = electrode number -// 0->6 = eta region number (0.2 granularity) (1.2 to 1.475 in same eta bin) -// 0,1 = below, above the electrode (according to phi in global Atlas frame) - - double m_hv[2][1024][7][2]; - - G4bool FiducialCuts(G4double,G4double,G4double); - - void InitHV(); - double ScaleHV(double, double, double, double); - -}; - -#endif // LARBARRELCALCULATOR_H diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelGeometry.h b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelGeometry.h index 81b2e70a25f78b06324cd5c7085b0b5eb5f4e265..7f9369b24f042c560a8ed8b948d78173ab5df50f 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelGeometry.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelGeometry.h @@ -4,10 +4,9 @@ // LArBarrelGeometry.hh -#ifndef LARBARRELGEOMETRY_H -#define LARBARRELGEOMETRY_H +#ifndef LARG4BARREL_LARBARRELGEOMETRY_H +#define LARG4BARREL_LARBARRELGEOMETRY_H -//#include "LArG4Code/LArVCalculator.h" #include "LArG4Code/LArG4Identifier.h" #include "LArG4Code/LArVG4DetectorParameters.h" #include "G4ThreeVector.hh" @@ -29,155 +28,159 @@ class LArStraightElectrodes; namespace LArG4 { -namespace Barrel { - -class Geometry { - - public: - - // Accessor method for singleton pattern. - static Geometry* GetInstance(); - - virtual ~Geometry(); - -// Full identifier computation from a G4 step - LArG4Identifier CalculateIdentifier( const G4Step* ,std::string strDetector=""); - LArG4Identifier CalculateECAMIdentifier( const G4Step* , const G4int indEcam, std::string strDetector="",const bool inSTAC=true,int zside=1); - -// Get geometry informations (filled with findCell) -// cellID = 1 valid, 0 invalid -// sampling = sampling number (1 to 3) -// region = 0 (eta<1.) or 1 (1.4<eta<1.475) -// etaBin = cell number in eta -// phiBin = cell number in phi -// phiGap = gap number in phi (0 to 1023) -// nstraight = straight section number (0 to 13) -// nfold = closest fold number (0 to 14) -// distElec = distance to electode (signed) -// distAbs = distance to absorber (signed) -// x0,y0 = local coordinates in first cell frame (to be used for current maps) - int cellID() { return m_cellID;}; - G4int sampling() { return m_sampling;}; - G4int region() { return m_region;}; - G4int etaBin() { return m_etaBin;}; - G4int phiBin() { return m_phiBin;}; - G4int phiGap() { return m_phiGap;}; - G4int nstraight() {return m_nstraight;}; - G4int nfold() {return m_nfold;}; - G4double distElec() { return m_distElec;}; - G4double distAbs() { return m_distAbs;}; - G4double x0() {return m_x0;}; - G4double y0() {return m_y0;}; - G4double xl() {return m_xl;}; - G4int etaMap() {return m_etaMap;}; - G4int sampMap() {return m_sampMap;}; - - // Given a point compute all quantities (cell number, distance to electrode, etc...) - void findCell( const double & x, const double & y, const double & z, - const double & r, const double & eta, const double & phi, const bool detail, - std::string strDetector=""); - - bool CheckLArIdentifier(int sampling,int region, int eta,int phi); - bool CheckDMIdentifier(int type, int sampling, int region, int eta, int phi); - - - private: - - //copy constructor - Geometry(const Geometry& );//coverity issue fix. Declared, but not implemented - Geometry& operator=(const Geometry&);//coverity issue fix. Declared, but not implemented - - static Geometry* m_instance; - - bool m_FIRST; - - // global EMBarrel dimensions - double m_rMinAccordion; - double m_rMaxAccordion; - double m_zMinBarrel; - double m_zMaxBarrel; - double m_etaMaxBarrel; - - // GU 11/06/2003 total number of cells in phi - int m_NCellTot; // either 64 or 1024 for TestBeam or Atlas - int m_NCellMax; // 1024 - - // Accordion parameters - int m_Nbrt; // number of straight sections (=14) - int m_Nbrt1; // number of folds (=15) - - // Accordion parameters, refering to the neutral fibre - double m_gam0 ; //phi position for the first absorber neutral fiber - double m_rint_eleFib ; //2.78 - double *m_rc, *m_phic, *m_xc, *m_yc, *m_delta;// double m_rc[15] ; // R and - int m_parity; - //double m_phic[15] ; // phi positions of center of fold for first absorber - // double m_xc[15]; // corresponding x,y values - // double m_yc[15]; - //double m_delta[15]; // zig-zag angles - // to access G4 geometry - LArCoudeElectrodes* m_coudeelec; - LArCoudeAbsorbers* m_coudeabs; - LArStraightElectrodes* m_electrode; - LArStraightAbsorbers* m_absorber; - - // to handle small difference (mostly phi wrapping and +-z symmetry) - // between atlas and test beam - bool m_testbeam; - - // output of computations (everything in half barrel frame except m_zSide) - int m_cellID; // 0 if not valid cell - G4int m_sampling; // sampling number (1 to 3) - G4int m_region; // region number (0 or 1) - G4int m_etaBin; // cell number in eta - G4int m_phiBin; // cell number in phi - G4int m_zSide; // side (+-1 for +-z) - G4int m_phiGap; // number (0 to 1024) of closest electrode - G4int m_nstraight; // number of straight section (0 to 13) - G4int m_nfold; // number of closest fold (0 to 14) - G4double m_distElec; // algebric distance to electrode - G4double m_distAbs; // algebric distance to absorber - G4double m_xl; // normalized lenght along electrode - G4double m_x0; // - G4double m_y0; // coordinates in local cell frame (down absorber with phi=0) - G4int m_sampMap; // sampling number not taking into account readout strips - G4int m_etaMap; // eta number not taking into account readout strips - - bool m_iflSAG; - - // intermediate values for phi cell computation - G4int m_NRphi; - G4double m_Rmin; - G4double m_Rmax; - G4double m_Rphi[5000]; - G4double m_dR; - double m_2pi; - -// function to compute distance to electrode - double Distance_Ele(const double &x, const double &y, - const int &PhiC, int &Num_Straight, const int &Num_Coude, - double &xl); - // function to compute distance to absorber - double Distance_Abs(const double &x, const double &y, - const int &nabs, const int &Num_Straight, const int &Num_Coude); - -// longitudinal and eta segmentation of electrodes - G4int SampSeg(G4double,G4double,G4double,G4int&,G4int&,G4int&,G4int&,G4int&); - -// phi vs r of first absorber in nominal geometry - void GetRphi(); - G4double Phi0(G4double); - G4int PhiGap(const double &, const double &, const double &); - - protected: - - Geometry(); - - -} ; - -} //end of Barrel namespace + namespace Barrel { + + class Geometry { + + public: + + // Accessor method for singleton pattern. + static Geometry* GetInstance(); + + virtual ~Geometry(); + + // Full identifier computation from a G4 step + LArG4Identifier CalculateIdentifier( const G4Step* ,std::string strDetector="") const; + LArG4Identifier CalculateECAMIdentifier( const G4Step* , const G4int indEcam, std::string strDetector="",const bool inSTAC=true,int zside=1) const; + + // Get geometry informations (filled with findCell) + // cellID = 1 valid, 0 invalid + // sampling = sampling number (1 to 3) + // region = 0 (eta<1.) or 1 (1.4<eta<1.475) + // etaBin = cell number in eta + // phiBin = cell number in phi + // phiGap = gap number in phi (0 to 1023) + // nstraight = straight section number (0 to 13) + // nfold = closest fold number (0 to 14) + // distElec = distance to electode (signed) + // distAbs = distance to absorber (signed) + // x0,y0 = local coordinates in first cell frame (to be used for current maps) + int cellID() const { return m_cellID;}; + G4int sampling() const { return m_sampling;}; + G4int region() const { return m_region;}; + G4int etaBin() const { return m_etaBin;}; + G4int phiBin() const { return m_phiBin;}; + G4int phiGap() const { return m_phiGap;}; + G4int nstraight() const {return m_nstraight;}; + G4int nfold() const {return m_nfold;}; + G4double distElec() const { return m_distElec;}; + G4double distAbs() const { return m_distAbs;}; + G4double x0() const {return m_x0;}; + G4double y0() const {return m_y0;}; + G4double xl() const {return m_xl;}; + G4int etaMap() const {return m_etaMap;}; + G4int sampMap() const {return m_sampMap;}; + + // Given a point compute all quantities (cell number, distance to electrode, etc...) + void findCell( const double & x, const double & y, const double & z, + const double & r, const double & eta, const double & phi, const bool detail, + std::string strDetector="") const; //FIXME non-const function + + bool CheckLArIdentifier(int sampling,int region, int eta,int phi) const; + bool CheckDMIdentifier(int type, int sampling, int region, int eta, int phi) const; + + + private: + + //copy constructor + Geometry(const Geometry& );//coverity issue fix. Declared, but not implemented + Geometry& operator=(const Geometry&);//coverity issue fix. Declared, but not implemented + + static Geometry* m_instance; + + mutable bool m_FIRST; // FIXME needed due to lazy initialization + + // global EMBarrel dimensions + double m_rMinAccordion; + double m_rMaxAccordion; + double m_zMinBarrel; + double m_zMaxBarrel; + double m_etaMaxBarrel; + + // GU 11/06/2003 total number of cells in phi + int m_NCellTot; // either 64 or 1024 for TestBeam or Atlas + int m_NCellMax; // 1024 + + // Accordion parameters + int m_Nbrt; // number of straight sections (=14) + int m_Nbrt1; // number of folds (=15) + + // Accordion parameters, refering to the neutral fibre + double m_gam0 ; //phi position for the first absorber neutral fiber + double m_rint_eleFib ; //2.78 + double *m_rc, *m_phic, *m_xc, *m_yc, *m_delta;// double m_rc[15] ; // R and + int m_parity; + //double m_phic[15] ; // phi positions of center of fold for first absorber + // double m_xc[15]; // corresponding x,y values + // double m_yc[15]; + //double m_delta[15]; // zig-zag angles + // to access G4 geometry + mutable LArCoudeElectrodes* m_coudeelec; // FIXME needed due to lazy initialization + mutable LArCoudeAbsorbers* m_coudeabs; // FIXME needed due to lazy initialization + mutable LArStraightElectrodes* m_electrode; // FIXME needed due to lazy initialization + mutable LArStraightAbsorbers* m_absorber; // FIXME needed due to lazy initialization + + // to handle small difference (mostly phi wrapping and +-z symmetry) + // between atlas and test beam + bool m_testbeam; + + // output of computations (everything in half barrel frame except m_zSide) + mutable int m_cellID; // 0 if not valid cell + mutable G4int m_sampling; // sampling number (1 to 3) + mutable G4int m_region; // region number (0 or 1) + mutable G4int m_etaBin; // cell number in eta + mutable G4int m_phiBin; // cell number in phi + mutable G4int m_zSide; // side (+-1 for +-z) + mutable G4int m_phiGap; // number (0 to 1024) of closest electrode + mutable G4int m_nstraight; // number of straight section (0 to 13) + mutable G4int m_nfold; // number of closest fold (0 to 14) + mutable G4double m_distElec; // algebric distance to electrode + mutable G4double m_distAbs; // algebric distance to absorber + mutable G4double m_xl; // normalized lenght along electrode + mutable G4double m_x0; // + mutable G4double m_y0; // coordinates in local cell frame (down absorber with phi=0) + mutable G4int m_sampMap; // sampling number not taking into account readout strips + mutable G4int m_etaMap; // eta number not taking into account readout strips + + bool m_iflSAG; + + // intermediate values for phi cell computation + G4int m_NRphi; + G4double m_Rmin; + G4double m_Rmax; + G4double m_Rphi[5000]; + G4double m_dR; + double m_2pi; + + // function to compute distance to electrode + double Distance_Ele(const double &x, const double &y, + const int &PhiC, int &Num_Straight, const int &Num_Coude, + double &xl) const; + // function to compute distance to absorber + double Distance_Abs(const double &x, const double &y, + const int &nabs, const int &Num_Straight, const int &Num_Coude) const; + + // longitudinal and eta segmentation of electrodes + G4int SampSeg(G4double,G4double,G4double,G4int&,G4int&,G4int&,G4int&,G4int&) const; + + /// phi vs r of first absorber in nominal geometry + + /// Initialize r-phi reference map (called from constructor) + void GetRphi(); + /// + G4double Phi0(G4double) const; + /// + G4int PhiGap(const double &, const double &, const double &) const; + + protected: + + Geometry(); + + + } ; + + } //end of Barrel namespace } // end of LArG4 namespace -#endif // LARBARRELGEOMETRY_H +#endif // LARG4BARREL_LARBARRELGEOMETRY_H diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelPresamplerCalculator.h b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelPresamplerCalculator.h deleted file mode 100644 index 918c3fabc684ecf450d2030d3ed42d62f02800d5..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelPresamplerCalculator.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArBarrelPresamplerCalculator.hh -// Prepared 05-Dec-2002 Bill Seligman - -// A first pass at determing hit cell ID in the LAr barrel presampler. - -#ifndef LARG4BARREL_LARBARRELPRESAMPLERCALCULATOR_H -#define LARG4BARREL_LARBARRELPRESAMPLERCALCULATOR_H - -#include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVCalculator.h" -#include "LArG4Code/LArVG4DetectorParameters.h" - -#include "globals.hh" -#include <stdexcept> -// Forward declarations. -class G4Step; -class PsMap; -class LArG4BirksLaw; - -namespace LArG4 { - namespace BarrelPresampler { - // Forward declaration - class Geometry; - } -} - -class LArBarrelPresamplerCalculator : public LArVCalculator { - -public: - - // Accessor for pointer to the singleton. - static LArBarrelPresamplerCalculator* GetCalculator(); - ~LArBarrelPresamplerCalculator(); - - ///////////////////////////////////////////// - // The interface for LArVCalculator. - - virtual G4float OOTcut() const { return m_OOTcut; } - - virtual G4bool Process(const G4Step* a_step){return Process(a_step, m_hdata);} - virtual G4bool Process(const G4Step* a_step, std::vector<LArHitData>& hdata); - - virtual int getNumHits() const {return m_nhits;} - virtual const LArG4Identifier& identifier(int i=0) const { - if (i<0||i>=m_nhits) throw std::range_error("Hit asked is out of range"); - if(static_cast<int>(m_hdata.size())<=i) throw std::range_error("No such hit yet"); - return m_hdata[i].id; } - virtual G4double time(int i=0) const { - if (i<0||i>=m_nhits) throw std::range_error("Hit asked is out of range"); - if(static_cast<int>(m_hdata.size())<=i) throw std::range_error("No such hit yet"); - return m_hdata[i].time; } - virtual G4double energy(int i=0) const { - if (i<0||i>=m_nhits) throw std::range_error("Hit asked is out of range"); - if(static_cast<int>(m_hdata.size())<=i) throw std::range_error("No such hit yet"); - return m_hdata[i].energy; }; - virtual G4bool isInTime(int i=0) const { - if (i<0||i>=m_nhits) throw std::range_error("Hit asked is out of range"); - return m_isInTime[i]; } - virtual G4bool isOutOfTime(int i=0) const { - if (i<0||i>=m_nhits) throw std::range_error("Hit asked is out of range"); - return ( ! m_isInTime[i] ); } - - inline void detectorName(std::string name) { m_detectorName=name; } - -protected: - // The constructor is protected according to the singleton design - // pattern. - LArBarrelPresamplerCalculator(); - -private: - - //copy constructor - LArBarrelPresamplerCalculator(const LArBarrelPresamplerCalculator&);//coverity issue fix. Declared, but not implemented - LArBarrelPresamplerCalculator& operator=(const LArBarrelPresamplerCalculator&);//coverity issue fix. Declared, but not implemented - static LArBarrelPresamplerCalculator* m_instance; - - // Pointer to detector parameters routine. - LArVG4DetectorParameters* m_parameters; - - // Class for calculating the identifier. - LArG4::BarrelPresampler::Geometry* m_geometry; - - PsMap* m_psmap; - - // RUN Options - bool m_IflCur; - - const LArG4BirksLaw *m_birksLaw; - - // Store the out-of-time cut from the description: - G4float m_OOTcut; - - // The results of the Process calculation: - int m_nhits; // number of hits - //std::vector<LArG4Identifier> m_identifier; // hit identifier - //std::vector<G4double> m_energy; // energy (or current) - //std::vector<G4double> m_time; // time - std::vector<LArHitData> m_hdata; - - std::vector<G4bool> m_isInTime; // hit in time ? - LArG4Identifier m_identifier2; - - // detector name, for translated geometry - std::string m_detectorName; - - bool m_testbeam; - -}; - -#endif // __LArBarrelPresamplerCalculator_H__ diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelPresamplerGeometry.h b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelPresamplerGeometry.h index 87ecc77e34c7e60f40a9b154f78f07a2c17cd220..cda691da6fe000ccc490906d20406e5ddc90ed65 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelPresamplerGeometry.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelPresamplerGeometry.h @@ -4,10 +4,9 @@ // LArBarrelPresamplerGeometry.hh -#ifndef LARBARRELPRESAMPLERGEOMETRY_H -#define LARBARRELPRESAMPLERGEOMETRY_H +#ifndef LARG4BARREL_LARBARRELPRESAMPLERGEOMETRY_H +#define LARG4BARREL_LARBARRELPRESAMPLERGEOMETRY_H -//#include "LArG4Code/LArVCalculator.h" #include "LArG4Code/LArG4Identifier.h" #include "LArG4Code/LArVG4DetectorParameters.h" @@ -20,77 +19,77 @@ class G4Step; namespace LArG4 { -namespace BarrelPresampler { + namespace BarrelPresampler { -class Geometry { - - public: + class Geometry { - // Accessor method for singleton pattern. - static Geometry* GetInstance(); - virtual ~Geometry(); + public: - G4int itb; + // Accessor method for singleton pattern. + static Geometry* GetInstance(); + virtual ~Geometry(); - private: + mutable G4int itb; // FIXME due to lazy initialization + + private: #include "LArG4Barrel/PresParameterDef.h" - static Geometry* m_instance; - - // end z of the various modules - G4double m_end_module[8]; - G4double m_zminPS; - G4double m_zpres; - G4double m_cat_th; - // z of first cathode in each module - G4double m_first_cathod[8]; - // tilt of electrodes - G4double m_tilt[8]; - // number of gaps per cell - G4int m_ngap_cell[8]; - // pitch in z of gaps - G4double m_pitch[8]; - // number of cells per modules - G4int m_ncell_module[8]; - // total LAr thickness - G4double m_halfThickLAr; - - // Pointer to detector parameters routine. - LArVG4DetectorParameters* m_parameters; - - G4int m_sampling; - G4int m_region; - G4int m_etaBin; - G4int m_phiBin; - G4int m_gap; - G4int m_module; - G4double m_distElec; - G4double m_xElec; - G4double m_dist; - - protected: - - Geometry(); - - public: - - LArG4Identifier CalculateIdentifier( const G4Step*, std::string strDetector="" ); - LArG4Identifier CalculatePSActiveIdentifier( const G4Step* , const G4int indPS , const G4int itb ); - LArG4Identifier CalculatePS_DMIdentifier( const G4Step* , const G4int indPS , const G4int itb); - bool findCell(G4double,G4double,G4double); - G4int etaBin() {return m_etaBin;}; - G4int phiBin() {return m_phiBin;}; - G4int sampling() {return m_sampling;}; - G4int region() {return m_region;}; - G4int module() {return m_module;}; - G4int gap() {return m_gap;}; - G4double distElec() {return m_distElec;}; - G4double xElec() {return m_xElec;}; - G4double dtrans() {return m_dist;}; - -} ; - -} //end of Barrel namespace + static Geometry* m_instance; + + // end z of the various modules + G4double m_end_module[8]; + G4double m_zminPS; + G4double m_zpres; + G4double m_cat_th; + // z of first cathode in each module + G4double m_first_cathod[8]; + // tilt of electrodes + G4double m_tilt[8]; + // number of gaps per cell + G4int m_ngap_cell[8]; + // pitch in z of gaps + G4double m_pitch[8]; + // number of cells per modules + G4int m_ncell_module[8]; + // total LAr thickness + G4double m_halfThickLAr; + + // Pointer to detector parameters routine. + LArVG4DetectorParameters* m_parameters; + + mutable G4int m_sampling; + mutable G4int m_region; + mutable G4int m_etaBin; + mutable G4int m_phiBin; + mutable G4int m_gap; + mutable G4int m_module; + mutable G4double m_distElec; + mutable G4double m_xElec; + mutable G4double m_dist; + + protected: + + Geometry(); + + public: + + LArG4Identifier CalculateIdentifier( const G4Step*, std::string strDetector="" ) const; + LArG4Identifier CalculatePSActiveIdentifier( const G4Step* , const G4int indPS , const G4int itb ) const; + LArG4Identifier CalculatePS_DMIdentifier( const G4Step* , const G4int indPS , const G4int itb) const; + bool findCell(G4double,G4double,G4double) const; + G4int etaBin() const {return m_etaBin;}; + G4int phiBin() const {return m_phiBin;}; + G4int sampling() const {return m_sampling;}; + G4int region() const {return m_region;}; + G4int module() const {return m_module;}; + G4int gap() const {return m_gap;}; + G4double distElec() const {return m_distElec;}; + G4double xElec() const {return m_xElec;}; + G4double dtrans() const {return m_dist;}; + + } ; + + } //end of Barrel namespace } // end of LArG4 namespace -#endif // LARBARRELGEOMETRY_H +#endif // LARG4BARREL_LARBARRELPRESAMPLERGEOMETRY_H diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArCoudeAbsorbers.h b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArCoudeAbsorbers.h deleted file mode 100644 index 9dd790a286d8d3c4d4e9c495be4d784e81fbc482..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArCoudeAbsorbers.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LArCoudeAbsorbers_H -#define LArCoudeAbsorbers_H - -#include "LArG4Barrel/PhysicalVolumeAccessor.h" -#include <string> - -class LArCoudeAbsorbers { -private: - static PhysicalVolumeAccessor* s_theCoudes; - double m_xcent[1024][15]; - double m_ycent[1024][15]; - double m_phirot[1024][15]; - bool m_filled; - static LArCoudeAbsorbers* s_instance; -public: - static LArCoudeAbsorbers* GetInstance(std::string strDetector="") ; - double XCentCoude(int stackid, int cellid) ; - double YCentCoude(int stackid, int cellid) ; - double PhiRot(int stackid, int cellid); -protected: - LArCoudeAbsorbers(std::string strDetector="") ; -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArCoudeElectrodes.h b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArCoudeElectrodes.h deleted file mode 100644 index e5c837eabd369e0e764c7f2eb300874845228b6b..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArCoudeElectrodes.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LArCoudeElectrodes_H -#define LArCoudeElectrodes_H - -#include "LArG4Barrel/PhysicalVolumeAccessor.h" -#include <string> - -class LArCoudeElectrodes { -private: - static PhysicalVolumeAccessor* s_theCoudes; - double m_xcent[1024][15]; - double m_ycent[1024][15]; - double m_phirot[1024][15]; - bool m_filled; - static LArCoudeElectrodes* s_instance; -public: - static LArCoudeElectrodes* GetInstance(std::string strDetector="") ; - double XCentCoude(int stackid, int cellid) ; - double YCentCoude(int stackid, int cellid) ; - double PhiRot(int stackid, int cellid); -protected: - LArCoudeElectrodes(std::string strDetector="") ; -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArCoudes.h b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArCoudes.h deleted file mode 100644 index 1f4a27106043e2d465d08adeaeda24e89209fbdd..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArCoudes.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LArCoudes_H -#define LArCoudes_H - -#include "LArG4Barrel/PhysicalVolumeAccessor.h" - -class LArCoudes { -private: - static PhysicalVolumeAccessor* s_theCoudes; -public: - LArCoudes(std::string strDetector="") ; - double XCentCoude(int stackid, int cellid) ; - double YCentCoude(int stackid, int cellid) ; -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArStraightAbsorbers.h b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArStraightAbsorbers.h deleted file mode 100644 index f7430c0d9ca0a089ff0dbb9c8e4f329b23c26e2b..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArStraightAbsorbers.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LArStraightAbsorbers_H -#define LArStraightAbsorbers_H - -#include "LArG4Barrel/PhysicalVolumeAccessor.h" -#include <string> - -class LArStraightAbsorbers { -private: - static PhysicalVolumeAccessor* s_theAbsorbers; - double m_xcent[1024][14]; - double m_ycent[1024][14]; - double m_cosu[1024][14]; - double m_sinu[1024][14]; - double m_halflength[1024][14]; - bool m_filled; - static LArStraightAbsorbers* s_instance; - int m_parity; -public: - static LArStraightAbsorbers* GetInstance(std::string strDetector="") ; - double XCentAbs(int stackid, int cellid) ; - double YCentAbs(int stackid, int cellid) ; - double SlantAbs(int stackid, int cellid) ; - double HalfLength(int stackid, int cellid); - double Cosu(int stackid, int cellid); - double Sinu(int stackid, int cellid); -protected: - LArStraightAbsorbers(std::string strDetector="") ; -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArStraightElectrodes.h b/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArStraightElectrodes.h deleted file mode 100644 index d515f981bc3040b1e4db58fe2d64b2363744f0cd..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArStraightElectrodes.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LArStraightElectrodes_H -#define LArStraightElectrodes_H - -#include "LArG4Barrel/PhysicalVolumeAccessor.h" -#include <string> - -class LArStraightElectrodes { -private: - static PhysicalVolumeAccessor* s_theElectrodes; - double m_xcent[1024][14]; - double m_ycent[1024][14]; - double m_cosu[1024][14]; - double m_sinu[1024][14]; - double m_halflength[1024][14]; - bool m_filled; - static LArStraightElectrodes* s_instance; - int m_parity; -public: - static LArStraightElectrodes* GetInstance(std::string strDetector="") ; - double XCentEle(int stackid, int cellid) ; - double YCentEle(int stackid, int cellid) ; - double SlantEle(int stackid, int cellid) ; - double HalfLength(int stackid, int cellid); - double Cosu(int stackid, int cellid); - double Sinu(int stackid, int cellid); -protected: - LArStraightElectrodes(std::string strDetector="") ; -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4Barrel/cmt/requirements b/LArCalorimeter/LArG4/LArG4Barrel/cmt/requirements index 24c48b6a18d90875eaa312e558fb3d29eb9f1ef1..b79eee09af315af70e27f37a933a66e376f6fd04 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/cmt/requirements +++ b/LArCalorimeter/LArG4/LArG4Barrel/cmt/requirements @@ -9,15 +9,16 @@ author Mikhail Leltchouk <lelchuk@nevis.columbia.edu> use AtlasPolicy AtlasPolicy-* use LArG4Code LArG4Code-* LArCalorimeter/LArG4 -use CaloG4Sim CaloG4Sim-* Calorimeter use Geant4 Geant4-* External # For reading the e-field files for charge collection. # Build the library (and export the headers) -library LArG4Barrel *.cc -apply_pattern installed_library +library LArG4Barrel *.cc components/*.cxx +apply_pattern component_library +apply_pattern declare_python_modules files="*.py" + #macro_append cppflags " -g -O0 " #macro_append LArG4Barrel_cppflags " -DLARG4NOROOT -O -Wno-unused" @@ -26,6 +27,7 @@ use CxxUtils CxxUtils-* Control use AthenaKernel AthenaKernel-* Control use StoreGate StoreGate-* Control use GaudiInterface GaudiInterface-* External -use LArG4RunControl LArG4RunControl-* LArCalorimeter/LArG4 +#use LArG4RunControl LArG4RunControl-* LArCalorimeter/LArG4 use LArHV LArHV-* LArCalorimeter/LArGeoModel use PathResolver PathResolver-* Tools +use CaloG4Sim CaloG4Sim-* Calorimeter diff --git a/LArCalorimeter/LArG4/LArG4Barrel/python/LArG4BarrelConfig.py b/LArCalorimeter/LArG4/LArG4Barrel/python/LArG4BarrelConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..3e08b24620b81486851febccab3d379d2947e53d --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Barrel/python/LArG4BarrelConfig.py @@ -0,0 +1,29 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon import CfgMgr + +def getBarrelCryostatCalibrationCalculator(name="BarrelCryostatCalibrationCalculator", **kwargs): + return CfgMgr.LArG4__BarrelCryostat__CalibrationCalculator(name, **kwargs) + +def getBarrelCryostatCalibrationLArCalculator(name="BarrelCryostatCalibrationLArCalculator", **kwargs): + return CfgMgr.LArG4__BarrelCryostat__CalibrationLArCalculator(name, **kwargs) + +def getBarrelCryostatCalibrationMixedCalculator(name="BarrelCryostatCalibrationMixedCalculator", **kwargs): + return CfgMgr.LArG4__BarrelCryostat__CalibrationMixedCalculator(name, **kwargs) + +def getDMCalibrationCalculator(name="DMCalibrationCalculator", **kwargs): + return CfgMgr.LArG4__DM__CalibrationCalculator(name, **kwargs) + +def getBarrelCalibrationCalculator(name="BarrelCalibrationCalculator", **kwargs): + return CfgMgr.LArG4__Barrel__CalibrationCalculator(name, **kwargs) + +def getBarrelPresamplerCalibrationCalculator(name="BarrelPresamplerCalibrationCalculator", **kwargs): + return CfgMgr.LArG4__BarrelPresampler__CalibrationCalculator(name, **kwargs) + +def getEMBCalculator(name="EMBCalculator", **kwargs): + return CfgMgr.LArBarrelCalculator(name, **kwargs) + +def getEMBPresamplerCalculator(name="EMBPresamplerCalculator", **kwargs): + return CfgMgr.LArBarrelPresamplerCalculator(name, **kwargs) + + diff --git a/LArCalorimeter/LArG4/LArG4Barrel/python/LArG4BarrelConfigDb.py b/LArCalorimeter/LArG4/LArG4Barrel/python/LArG4BarrelConfigDb.py new file mode 100644 index 0000000000000000000000000000000000000000..422edbe1be4d2db60ddd21b807d18ea399dc27b8 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Barrel/python/LArG4BarrelConfigDb.py @@ -0,0 +1,13 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.CfgGetter import addService + +addService("LArG4Barrel.LArG4BarrelConfig.getBarrelCryostatCalibrationCalculator","BarrelCryostatCalibrationCalculator") +addService("LArG4Barrel.LArG4BarrelConfig.getBarrelCryostatCalibrationLArCalculator","BarrelCryostatCalibrationLArCalculator") +addService("LArG4Barrel.LArG4BarrelConfig.getBarrelCryostatCalibrationMixedCalculator","BarrelCryostatCalibrationMixedCalculator") +addService("LArG4Barrel.LArG4BarrelConfig.getDMCalibrationCalculator","DMCalibrationCalculator") +addService("LArG4Barrel.LArG4BarrelConfig.getBarrelCalibrationCalculator","BarrelCalibrationCalculator") +addService("LArG4Barrel.LArG4BarrelConfig.getBarrelPresamplerCalibrationCalculator","BarrelPresamplerCalibrationCalculator") + +addService("LArG4Barrel.LArG4BarrelConfig.getEMBCalculator","EMBCalculator") +addService("LArG4Barrel.LArG4BarrelConfig.getEMBPresamplerCalculator","EMBPresamplerCalculator") diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/AccMap.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/AccMap.cc index d089e10b51c30fbcc3b73222e1b1f19df058b467..480dafd06c1124b9d8776c39d2d30dbf5ffeb9f2 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/AccMap.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/AccMap.cc @@ -2,14 +2,14 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4Barrel/AccMap.h" +#include "AccMap.h" #include <iostream> #include <sstream> #ifndef LARG4_STAND_ALONE #include "PathResolver/PathResolver.h" #endif -AccMap* AccMap::s_thePointer=0; +AccMap* AccMap::s_thePointer=nullptr; AccMap::AccMap() { @@ -37,45 +37,45 @@ AccMap::AccMap() #endif for (int iregion=0;iregion<10;iregion++) { -// accordion folds + // accordion folds for (int ifold=i1[iregion]; ifold<=i2[iregion]; ifold++) { - std::ostringstream fn; - fn << "fold"<<ifold<<"_region"<<iregion<<".map"; - std::string filename = fn.str(); - std::string fileLocation; + std::ostringstream fn; + fn << "fold"<<ifold<<"_region"<<iregion<<".map"; + std::string filename = fn.str(); + std::string fileLocation; #ifdef LARG4_STAND_ALONE - fileLocation=m_directory+"/"+filename; + fileLocation=m_directory+"/"+filename; #else - //fileLocation=larLocation+"/calo_data/"+filename; - fileLocation=larLocation+"/"+filename; + //fileLocation=larLocation+"/calo_data/"+filename; + fileLocation=larLocation+"/"+filename; #endif -// std::cout << " try to open map " << fileLocation << std::endl; - CurrMap* cm = new CurrMap(fileLocation,xnorm); - int code=10*ifold+iregion; - m_theMap[code]=cm; + // std::cout << " try to open map " << fileLocation << std::endl; + CurrMap* cm = new CurrMap(fileLocation,xnorm); + int code=10*ifold+iregion; + m_theMap[code]=cm; -// add some rounding safety in edges of map - m_xmin[ifold]=cm->GetXmin()+0.1; - m_xmax[ifold]=cm->GetXmax()-0.1; - m_ymin[ifold]=cm->GetYmin()+0.1; - m_ymax[ifold]=cm->GetYmax()-0.1; + // add some rounding safety in edges of map + m_xmin[ifold]=cm->GetXmin()+0.1; + m_xmax[ifold]=cm->GetXmax()-0.1; + m_ymin[ifold]=cm->GetYmin()+0.1; + m_ymax[ifold]=cm->GetYmax()-0.1; } -// straight section + // straight section for (int istr=1; istr<=2; istr++) { - std::ostringstream fn; - fn << "straight"<<istr<<"_region"<<iregion<<".map"; + std::ostringstream fn; + fn << "straight"<<istr<<"_region"<<iregion<<".map"; std::string filename = fn.str(); - std::string fileLocation; + std::string fileLocation; #ifdef LARG4_STAND_ALONE - fileLocation=m_directory+"/"+filename; + fileLocation=m_directory+"/"+filename; #else - //fileLocation=larLocation+"/calo_data/"+filename; - fileLocation=larLocation+"/"+filename; + //fileLocation=larLocation+"/calo_data/"+filename; + fileLocation=larLocation+"/"+filename; #endif -// std::cout << " try to open map " << fileLocation << std::endl; - CurrMap* cm = new CurrMap(fileLocation,xnorm); - int code=10*(20+istr)+iregion; - m_theMap[code]=cm; + // std::cout << " try to open map " << fileLocation << std::endl; + CurrMap* cm = new CurrMap(fileLocation,xnorm); + int code=10*(20+istr)+iregion; + m_theMap[code]=cm; } } @@ -83,7 +83,7 @@ AccMap::AccMap() AccMap* AccMap::GetAccMap() { - if (s_thePointer==0) s_thePointer=new AccMap(); + if (s_thePointer==nullptr) s_thePointer=new AccMap(); return s_thePointer; } @@ -98,49 +98,49 @@ void AccMap::Reset() void AccMap::SetMap(int ifold, int region, int sampling, int eta) { - if (m_eta==eta && m_sampling==sampling && m_fold==ifold && m_region==region) return; - SetMap(ifold,Region(region,sampling,eta)); -// std::cout << "after SetMap " << region << " " << eta << " " << sampling -// << " " << " elecregion is " << m_elecregion << std::endl; - m_eta=eta; - m_sampling=sampling; - m_fold=ifold; - m_region=region; + if (m_eta==eta && m_sampling==sampling && m_fold==ifold && m_region==region) return; + SetMap(ifold,Region(region,sampling,eta)); + // std::cout << "after SetMap " << region << " " << eta << " " << sampling + // << " " << " elecregion is " << m_elecregion << std::endl; + m_eta=eta; + m_sampling=sampling; + m_fold=ifold; + m_region=region; } void AccMap::SetMap(int ifold, int ielecregion) { - if (m_fold==ifold && m_elecregion==ielecregion) return; - m_fold=ifold; - m_elecregion=ielecregion; - int code=10*ifold+ielecregion; -// std::cout << " code is " << code << std::endl; - if (m_theMap.find(code) != m_theMap.end()) - m_curr = m_theMap[code]; - else { - std::cout << " Code " << code << " not found in map ..." << std::endl; - m_curr=0; - } + if (m_fold==ifold && m_elecregion==ielecregion) return; + m_fold=ifold; + m_elecregion=ielecregion; + int code=10*ifold+ielecregion; + // std::cout << " code is " << code << std::endl; + if (m_theMap.find(code) != m_theMap.end()) + m_curr = m_theMap[code]; + else { + std::cout << " Code " << code << " not found in map ..." << std::endl; + m_curr=0; + } } -int AccMap::Region(int region, int sampling, int eta) +int AccMap::Region(int region, int sampling, int eta) const { int elecregion=0; -// logic to compute region vs eta and sampling... + // logic to compute region vs eta and sampling... if (region==0) { if (sampling==1) { - if (eta<256) elecregion=0; - else elecregion=1; - } + if (eta<256) elecregion=0; + else elecregion=1; + } else if (sampling==2) { - if (eta<32) elecregion=2; - else elecregion=3; + if (eta<32) elecregion=2; + else elecregion=3; } else { - if (eta<9 || eta==26) elecregion=4; - if ((eta>8 && eta<13) || (eta>15 && eta<19)) elecregion=5; - if ((eta>12 && eta < 16) || (eta>18 && eta<21)) elecregion=6; - if ((eta>20 && eta < 26)) elecregion=7; + if (eta<9 || eta==26) elecregion=4; + if ((eta>8 && eta<13) || (eta>15 && eta<19)) elecregion=5; + if ((eta>12 && eta < 16) || (eta>18 && eta<21)) elecregion=6; + if ((eta>20 && eta < 26)) elecregion=7; } } else { @@ -152,5 +152,5 @@ int AccMap::Region(int region, int sampling, int eta) void AccMap::SetDirectory(std::string dir) { - m_directory=dir; + m_directory=dir; } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/AccMap.h b/LArCalorimeter/LArG4/LArG4Barrel/src/AccMap.h new file mode 100644 index 0000000000000000000000000000000000000000..e3b3ac6dd1ddce2785bd849d6f3f6359edd44d86 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/AccMap.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef AccMap_h +#define AccMap_h + +#include "CurrMap.h" + +#include <map> +#include <vector> +#include <string> + +typedef std::map<int, CurrMap*> curr_map; + +class AccMap { +public: + ~AccMap(); + static AccMap* GetAccMap(); + void SetDirectory(std::string dir); + void Reset(); + int Region(int region, int sampling, int eta) const; + void SetMap(int ifold, int ielecregion); + void SetMap(int ifold, int region, int sampling, int eta); + CurrMap* Map() const {return m_curr;} + float GetXmin(int ifold) const { + if (ifold<m_nmax && ifold >=0) return m_xmin[ifold]; + else return -999.;} + float GetXmax(int ifold) const { + if (ifold<m_nmax && ifold >=0) return m_xmax[ifold]; + else return -999.;} + float GetYmin(int ifold) const { + if (ifold<m_nmax && ifold >=0) return m_ymin[ifold]; + else return -999.;} + float GetYmax(int ifold) const { + if (ifold<m_nmax && ifold >=0) return m_ymax[ifold]; + else return -999.;} +private: + AccMap(); + static AccMap* s_thePointer; + curr_map m_theMap; + std::string m_directory; + // current map info + CurrMap* m_curr; + int m_fold; + int m_region; + int m_eta; + int m_sampling; + int m_elecregion; + int m_nmax; + std::vector<float> m_xmin; + std::vector<float> m_xmax; + std::vector<float> m_ymin; + std::vector<float> m_ymax; +}; +#endif diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationCalculator.cc index 8a6014ed2ed32b0b699c5c002f23ae0d46c6e90f..462c93386a1ed7c2f86c3e371bc5b890d6a047fb 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationCalculator.cc @@ -10,28 +10,27 @@ // // // G. Pospelov (8-Fev-2006) ==> -// In 11.0.X geometry of barrel cryostat was changed: -// "Many of the individual cylinders and cones which were separate logical -// volumes have become one single piece." (c) J. Boudreau. -// Names of volumes were changed also. So original code was changed to adopt -// calculator to the new geometry. It's temporary solution, somedays db +// In 11.0.X geometry of barrel cryostat was changed: +// "Many of the individual cylinders and cones which were separate logical +// volumes have become one single piece." (c) J. Boudreau. +// Names of volumes were changed also. So original code was changed to adopt +// calculator to the new geometry. It's temporary solution, somedays db // oriented version will be written. // // This calculator is intended to apply to the following volumes // LArMgr::LAr::Barrel::Cryostat::Cylinder::* // LArMgr::LAr::Barrel::Cryostat::InnerWall // LArMgr::LAr::Barrel::Cryostat::Sector::* - + #define DEBUG_VOLUMES #undef DEBUG_HITS #undef DEBUG_MAPS -#include "LArG4Barrel/CryostatCalibrationCalculator.h" -#include "LArG4Barrel/CryostatCalibrationLArCalculator.h" +#include "CryostatCalibrationCalculator.h" +#include "CryostatCalibrationLArCalculator.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/VCalibrationCalculator.h" #include "G4Step.hh" #include "G4StepPoint.hh" @@ -47,8 +46,6 @@ namespace LArG4 { namespace BarrelCryostat { - VCalibrationCalculator* CalibrationCalculator::m_backupCalculator = 0; - /////////////////////////////////////////////////////////// // Tables /////////////////////////////////////////////////////////// @@ -126,41 +123,41 @@ namespace LArG4 { // ========== Sampling 1 ============= static const RegionInfo_t region010[] = - // inner warm wall and solenoid - // region etamin etamax deta dphi + // inner warm wall and solenoid + // region etamin etamax deta dphi { { 0, 0.0, 1.5, 0.1, M_PI/32. }, - { 4, 1.5, 1.6, 0.1, M_PI/32. }, + { 4, 1.5, 1.6, 0.1, M_PI/32. }, { 5, 1.5, 1.8, 0.1, M_PI/32. }, { 6, 1.3, 3.2, 0.1, M_PI/32. } }; #if 0 static const RegionInfo_t region011[] = - // inner cold wall - // region etamin etamax deta dphi + // inner cold wall + // region etamin etamax deta dphi { { 1, 0.0, 1.5, 0.1, M_PI/32. }, - { 4, 1.5, 1.6, 0.1, M_PI/32. }, + { 4, 1.5, 1.6, 0.1, M_PI/32. }, { 5, 1.5, 1.8, 0.1, M_PI/32. } }; #endif static const RegionInfo_t region012[] = - // inner warm wall, cones, cables and services in front of EMEC - // region etamin etamax deta dphi - { { 4, 1.5, 1.6, 0.1, M_PI/32. }, + // inner warm wall, cones, cables and services in front of EMEC + // region etamin etamax deta dphi + { { 4, 1.5, 1.6, 0.1, M_PI/32. }, { 5, 1.5, 1.8, 0.1, M_PI/32. }, { 6, 1.3, 3.2, 0.1, M_PI/32. } }; // ========== Sampling 2 ============= static const RegionInfo_t region020[] = - // outer warm and cold walls in front of Tile-barrel - // region etamin etamax deta dphi - { { 0, 0.0, 1.0, 0.1, M_PI/32. }, + // outer warm and cold walls in front of Tile-barrel + // region etamin etamax deta dphi + { { 0, 0.0, 1.0, 0.1, M_PI/32. }, { 2, 1.0, 1.5, 0.1, M_PI/32. } }; static const RegionInfo_t region021[] = - // outer warm and cold walls behind of Tile-barrel but - // in front of Tile-extended-barrel, cables and services - // region etamin etamax deta dphi - { { 1, 0.0, 1.0, 0.1, M_PI/32. }, + // outer warm and cold walls behind of Tile-barrel but + // in front of Tile-extended-barrel, cables and services + // region etamin etamax deta dphi + { { 1, 0.0, 1.0, 0.1, M_PI/32. }, { 2, 1.0, 1.5, 0.1, M_PI/32. } }; // Region->Volume, based on a range of copy numbers. Note that @@ -168,207 +165,207 @@ namespace LArG4 { static const CopyNumberInfo_t info1[] = { - // ------------- region inner warm wall and solenoid ------------ - // copy number range (low, high) -// { 1, 1, -// // Det Sub Typ Sam -// { 10, 4, 1, 1, -// sizeof(region010)/sizeof(RegionInfo_t), -// region010 } -// }, - // copy number range (low, high) - { 56, 60, - // Det Sub Typ Sam - { 10, 4, 1, 1, - sizeof(region010)/sizeof(RegionInfo_t), - region010 } - }, - // ------------------ region inner cold wall, Cyl ----------------- - // copy number range (low, high) -// { 4, 5, -// // Det Sub Typ Sam -// { 10, 4, 1, 1, -// sizeof(region011)/sizeof(RegionInfo_t), -// region011 } -// }, - // copy number range (low, high) -// { 55, 55, -// // Det Sub Typ Sam -// { 10, 4, 1, 1, -// sizeof(region011)/sizeof(RegionInfo_t), -// region011 } -// }, - // copy number range (low, high) -// { 61, 61, -// // Det Sub Typ Sam -// { 10, 4, 1, 1, -// sizeof(region011)/sizeof(RegionInfo_t), -// region011 } -// // 84 bolts inside this cylinder have the same name -// // and the same copy#=61 => Edeposits in bolts are collected -// -// }, + // ------------- region inner warm wall and solenoid ------------ + // copy number range (low, high) + // { 1, 1, + // // Det Sub Typ Sam + // { 10, 4, 1, 1, + // sizeof(region010)/sizeof(RegionInfo_t), + // region010 } + // }, + // copy number range (low, high) + { 56, 60, + // Det Sub Typ Sam + { 10, 4, 1, 1, + sizeof(region010)/sizeof(RegionInfo_t), + region010 } + }, + // ------------------ region inner cold wall, Cyl ----------------- + // copy number range (low, high) + // { 4, 5, + // // Det Sub Typ Sam + // { 10, 4, 1, 1, + // sizeof(region011)/sizeof(RegionInfo_t), + // region011 } + // }, + // copy number range (low, high) + // { 55, 55, + // // Det Sub Typ Sam + // { 10, 4, 1, 1, + // sizeof(region011)/sizeof(RegionInfo_t), + // region011 } + // }, + // copy number range (low, high) + // { 61, 61, + // // Det Sub Typ Sam + // { 10, 4, 1, 1, + // sizeof(region011)/sizeof(RegionInfo_t), + // region011 } + // // 84 bolts inside this cylinder have the same name + // // and the same copy#=61 => Edeposits in bolts are collected + // + // }, // --- region: inner warm walls, cables and services in front of EMEC - // copy number range (low, high) -// { 17, 19, -// // Det Sub Typ Sam -// { 10, 4, 1, 1, -// sizeof(region012)/sizeof(RegionInfo_t), -// region012 } -// }, -// { 50, 52, -// // Det Sub Typ Sam -// { 10, 4, 1, 1, -// sizeof(region012)/sizeof(RegionInfo_t), -// region012 } -// }, + // copy number range (low, high) + // { 17, 19, + // // Det Sub Typ Sam + // { 10, 4, 1, 1, + // sizeof(region012)/sizeof(RegionInfo_t), + // region012 } + // }, + // { 50, 52, + // // Det Sub Typ Sam + // { 10, 4, 1, 1, + // sizeof(region012)/sizeof(RegionInfo_t), + // region012 } + // }, // ---------------- outer warm and cold walls, cables and services - // copy number range (low, high) -// { 3, 3, -// // Det Sub Typ Sam -// { 10, 4, 1, 2, -// sizeof(region021)/sizeof(RegionInfo_t), -// region021 } -// }, - { 6, 6, - // Det Sub Typ Sam - { 10, 4, 1, 2, - sizeof(region020)/sizeof(RegionInfo_t), - region020 } - }, - { 7, 10, - // Det Sub Typ Sam - { 10, 4, 1, 2, - sizeof(region021)/sizeof(RegionInfo_t), - region021 } - }, - { 11, 11, - // Det Sub Typ Sam - { 10, 4, 1, 2, - sizeof(region020)/sizeof(RegionInfo_t), - region020 } - }, - { 12, 12, - // Det Sub Typ Sam - { 10, 4, 1, 2, - sizeof(region021)/sizeof(RegionInfo_t), - region021 } - }, - { 14, 16, - // Det Sub Typ Sam - { 10, 4, 1, 2, - sizeof(region021)/sizeof(RegionInfo_t), - region021 } - }, -// { 48, 48, -// // Det Sub Typ Sam -// { 10, 4, 1, 2, -// sizeof(region021)/sizeof(RegionInfo_t), -// region021 } -// }, - // --------------- Half::Cylinder (Old name, info4 was moved to here) - // --- placed inside LAr of each Half Barrel ------ - // copy number range (low, high) - { 20, 20, // outer of acco in the center - // Det Sub Typ Sam - { 10, 4, 1, 2, - sizeof(region020)/sizeof(RegionInfo_t), - region020 } - }, - { 24, 44, // 24 - 44 outer support-rings - // Det Sub Typ Sam - { 10, 4, 1, 2, - sizeof(region020)/sizeof(RegionInfo_t), - region020 } - }, + // copy number range (low, high) + // { 3, 3, + // // Det Sub Typ Sam + // { 10, 4, 1, 2, + // sizeof(region021)/sizeof(RegionInfo_t), + // region021 } + // }, + { 6, 6, + // Det Sub Typ Sam + { 10, 4, 1, 2, + sizeof(region020)/sizeof(RegionInfo_t), + region020 } + }, + { 7, 10, + // Det Sub Typ Sam + { 10, 4, 1, 2, + sizeof(region021)/sizeof(RegionInfo_t), + region021 } + }, + { 11, 11, + // Det Sub Typ Sam + { 10, 4, 1, 2, + sizeof(region020)/sizeof(RegionInfo_t), + region020 } + }, + { 12, 12, + // Det Sub Typ Sam + { 10, 4, 1, 2, + sizeof(region021)/sizeof(RegionInfo_t), + region021 } + }, + { 14, 16, + // Det Sub Typ Sam + { 10, 4, 1, 2, + sizeof(region021)/sizeof(RegionInfo_t), + region021 } + }, + // { 48, 48, + // // Det Sub Typ Sam + // { 10, 4, 1, 2, + // sizeof(region021)/sizeof(RegionInfo_t), + // region021 } + // }, + // --------------- Half::Cylinder (Old name, info4 was moved to here) + // --- placed inside LAr of each Half Barrel ------ + // copy number range (low, high) + { 20, 20, // outer of acco in the center + // Det Sub Typ Sam + { 10, 4, 1, 2, + sizeof(region020)/sizeof(RegionInfo_t), + region020 } + }, + { 24, 44, // 24 - 44 outer support-rings + // Det Sub Typ Sam + { 10, 4, 1, 2, + sizeof(region020)/sizeof(RegionInfo_t), + region020 } + }, }; static const CopyNumberInfo_t info2[] = { - //----region: inner wall --------------------- - { 1, 1, - // Det Sub Typ Sam - { 10, 4, 1, 1, - sizeof(region010)/sizeof(RegionInfo_t), - region010 } - }, + //----region: inner wall --------------------- + { 1, 1, + // Det Sub Typ Sam + { 10, 4, 1, 1, + sizeof(region010)/sizeof(RegionInfo_t), + region010 } + }, }; static const CopyNumberInfo_t info3[] = { - // ---------------Sectors ----------------- - // copy number range (low, high) - { 12, 12, // legs - // Det Sub Typ Sam - { 10, 4, 1, 2, - sizeof(region021)/sizeof(RegionInfo_t), - region021 } - }, - { 7, 7, // ears - // Det Sub Typ Sam - { 10, 4, 1, 2, - sizeof(region021)/sizeof(RegionInfo_t), - region021 } - }, - { 1, 1, // Ti blocks 11 - 34 (copy number arbitrary) - // Det Sub Typ Sam - { 10, 4, 1, 1, - sizeof(region012)/sizeof(RegionInfo_t), - region012 } - }, + // ---------------Sectors ----------------- + // copy number range (low, high) + { 12, 12, // legs + // Det Sub Typ Sam + { 10, 4, 1, 2, + sizeof(region021)/sizeof(RegionInfo_t), + region021 } + }, + { 7, 7, // ears + // Det Sub Typ Sam + { 10, 4, 1, 2, + sizeof(region021)/sizeof(RegionInfo_t), + region021 } + }, + { 1, 1, // Ti blocks 11 - 34 (copy number arbitrary) + // Det Sub Typ Sam + { 10, 4, 1, 1, + sizeof(region012)/sizeof(RegionInfo_t), + region012 } + }, }; -// static const CopyNumberInfo_t info4[] = -// { -// // --------------- Half::Cylinder ----------------- -// // --- placed inside LAr of each Half Barrel ------ -// // copy number range (low, high) -// { 20, 20, // outer of acco in the center -// // Det Sub Typ Sam -// { 10, 4, 1, 2, -// sizeof(region020)/sizeof(RegionInfo_t), -// region020 } -// }, -// { 24, 44, // 24 - 44 outer support-rings -// // Det Sub Typ Sam -// { 10, 4, 1, 2, -// sizeof(region020)/sizeof(RegionInfo_t), -// region020 } -// }, -// }; + // static const CopyNumberInfo_t info4[] = + // { + // // --------------- Half::Cylinder ----------------- + // // --- placed inside LAr of each Half Barrel ------ + // // copy number range (low, high) + // { 20, 20, // outer of acco in the center + // // Det Sub Typ Sam + // { 10, 4, 1, 2, + // sizeof(region020)/sizeof(RegionInfo_t), + // region020 } + // }, + // { 24, 44, // 24 - 44 outer support-rings + // // Det Sub Typ Sam + // { 10, 4, 1, 2, + // sizeof(region020)/sizeof(RegionInfo_t), + // region020 } + // }, + // }; // Copy number range->Volume, based on name static const VolumeInfo_t volume1 = { "LAr::Barrel::Cryostat::Cylinder", - sizeof(info1) / sizeof(CopyNumberInfo_t), - info1 + sizeof(info1) / sizeof(CopyNumberInfo_t), + info1 }; -// static const VolumeInfo_t volume2 = -// { "LAr::Barrel::Cryostat::Cone", -// sizeof(info2) / sizeof(CopyNumberInfo_t), -// info2 -// }; + // static const VolumeInfo_t volume2 = + // { "LAr::Barrel::Cryostat::Cone", + // sizeof(info2) / sizeof(CopyNumberInfo_t), + // info2 + // }; static const VolumeInfo_t volume2 = { "LAr::Barrel::Cryostat::InnerWall", - sizeof(info2) / sizeof(CopyNumberInfo_t), - info2 + sizeof(info2) / sizeof(CopyNumberInfo_t), + info2 }; static const VolumeInfo_t volume3 = { "LAr::Barrel::Cryostat::Sector", - sizeof(info3) / sizeof(CopyNumberInfo_t), - info3 + sizeof(info3) / sizeof(CopyNumberInfo_t), + info3 }; -// static const VolumeInfo_t volume4 = -// { "LAr::Barrel::Cryostat::Half::Cylinder", -// sizeof(info4) / sizeof(CopyNumberInfo_t), -// info4 -// }; - + // static const VolumeInfo_t volume4 = + // { "LAr::Barrel::Cryostat::Half::Cylinder", + // sizeof(info4) / sizeof(CopyNumberInfo_t), + // info4 + // }; + static const VolumeInfo_t volumes[] = { volume1, volume2, volume3}; static const G4int numberOfVolumes = sizeof(volumes) / sizeof(VolumeInfo_t); @@ -384,288 +381,292 @@ namespace LArG4 { // Methods /////////////////////////////////////////////////////////// - CalibrationCalculator::CalibrationCalculator() + CalibrationCalculator::CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_backupCalculator("BarrelCryostatCalibrationLArCalculator",name) { + declareProperty("BackupCalculator",m_backupCalculator); + } + + StatusCode CalibrationCalculator::initialize(){ // Get the "backup" calculator. - if ( m_backupCalculator == 0) - m_backupCalculator = new CalibrationLArCalculator(); + ATH_CHECK(m_backupCalculator.retrieve()); #if defined (DEBUG_HITS) || defined (DEBUG_MAPS) G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator - " - << " notInitialized=" - << notInitialized - << ", numberOfVolumes=" << numberOfVolumes - << ", sizeof(volumes)=" << sizeof(volumes) - << ", sizeof(VolumeInfo_t)=" << sizeof(VolumeInfo_t) - << G4endl; + << " notInitialized=" + << notInitialized + << ", numberOfVolumes=" << numberOfVolumes + << ", sizeof(volumes)=" << sizeof(volumes) + << ", sizeof(VolumeInfo_t)=" << sizeof(VolumeInfo_t) + << G4endl; #endif // Intialize the maps. if ( notInitialized ) - { - notInitialized = false; + { + notInitialized = false; - // For each volume managed by this calculator... - for (G4int v = 0; v != numberOfVolumes; v++) - { - const VolumeInfo_t& volume = volumes[v]; + // For each volume managed by this calculator... + for (G4int v = 0; v != numberOfVolumes; v++) + { + const VolumeInfo_t& volume = volumes[v]; #if defined (DEBUG_HITS) || defined (DEBUG_MAPS) - G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator - " - << " volume '" - << volume.volumeName - << "' has number of entries=" << volume.numberOfCopies - << G4endl; + G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator - " + << " volume '" + << volume.volumeName + << "' has number of entries=" << volume.numberOfCopies + << G4endl; #endif - identifierMap_t identifierMap; - const CopyNumberInfo_t* copyInfo = volume.copyInfo; - - // For each range copy numbers that can be found in a volume with this name... - for (G4int c = 0; c != volume.numberOfCopies; c++, copyInfo++) - { - // For each copy in the range of copy numbers - for (G4int copy = copyInfo->copyNumberLow; - copy <= copyInfo->copyNumberHigh; - copy++) - { + identifierMap_t identifierMap; + const CopyNumberInfo_t* copyInfo = volume.copyInfo; + + // For each range copy numbers that can be found in a volume with this name... + for (G4int c = 0; c != volume.numberOfCopies; c++, copyInfo++) + { + // For each copy in the range of copy numbers + for (G4int copy = copyInfo->copyNumberLow; + copy <= copyInfo->copyNumberHigh; + copy++) + { #if defined (DEBUG_HITS) || defined (DEBUG_MAPS) - G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator - " - << " adding copy=" << copy - << " to identifierMap" - << G4endl; + G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator - " + << " adding copy=" << copy + << " to identifierMap" + << G4endl; #endif - // Add to the map that's based on copy number. - identifierMap[copy] = &(copyInfo->identifierInfo); - } - } + // Add to the map that's based on copy number. + identifierMap[copy] = &(copyInfo->identifierInfo); + } + } - // Add to the map that's based on volume name; it - // contains maps based on copy number. - volumeMap[volume.volumeName] = identifierMap; + // Add to the map that's based on volume name; it + // contains maps based on copy number. + volumeMap[volume.volumeName] = identifierMap; #if defined (DEBUG_HITS) || defined (DEBUG_MAPS) - G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator - " - << " volume '" - << volume.volumeName - << "' added to map." - << G4endl; + G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator - " + << " volume '" + << volume.volumeName + << "' added to map." + << G4endl; #endif - } - } // if not initialized + } + } // if not initialized #if defined (DEBUG_HITS) || defined (DEBUG_MAPS) G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator - " - << G4endl - << " initialization complete; map size=" - << volumeMap.size() - << G4endl; + << G4endl + << " initialization complete; map size=" + << volumeMap.size() + << G4endl; #endif + return StatusCode::SUCCESS; } - CalibrationCalculator::~CalibrationCalculator() + CalibrationCalculator::~CalibrationCalculator() { // Cleanup pointers. - delete m_backupCalculator; - m_backupCalculator = 0; + //delete m_backupCalculator; + //m_backupCalculator = 0; } - - G4bool CalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) + G4bool CalibrationCalculator::Process(const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process) const { // Use the calculators to determine the energies and the // identifier associated with this G4Step. Note that the // default is to process both the energy and the ID. - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } + if ( process == kEnergyAndID || process == kOnlyEnergy ) + { + m_energyCalculator.Energies( step, energies ); + } else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); - m_identifier.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. + identifier.clear(); + if ( process == kEnergyAndID || process == kOnlyID ) + { + // Calculate the identifier. - // First, find the physical volume copy number, and the - // logical volume name. + // First, find the physical volume copy number, and the + // logical volume name. - G4VPhysicalVolume* physical = a_step->GetPreStepPoint()->GetPhysicalVolume(); - G4int copyNumber = physical->GetCopyNo(); - G4String volumeName = physical->GetLogicalVolume()->GetName(); + G4VPhysicalVolume* physical = step->GetPreStepPoint()->GetPhysicalVolume(); + G4int copyNumber = physical->GetCopyNo(); + G4String volumeName = physical->GetLogicalVolume()->GetName(); #ifdef DEBUG_HITS - G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::Process - " - << G4endl - << " searching for volume '" - << volumeName - << "' copyNumber=" - << copyNumber - << G4endl; + G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::Process - " + << G4endl + << " searching for volume '" + << volumeName + << "' copyNumber=" + << copyNumber + << G4endl; #endif - if(volumeName.index("LArMgr::") == 0) volumeName.erase(0,8); - if(volumeName.index("LAr::Barrel::Cryostat::Sector")==0) { // ears, legs, Ti blocks - volumeName = "LAr::Barrel::Cryostat::Sector"; - if(copyNumber != 7 && copyNumber !=12) copyNumber=1; // assignment arbitrary copyNumber to Ti block - }else if(volumeName.index("LAr::Barrel::Cryostat::Cylinder")==0){ - volumeName = "LAr::Barrel::Cryostat::Cylinder"; - }else if(volumeName.index("LAr::Barrel::Cryostat::InnerWall")==0){ - volumeName = "LAr::Barrel::Cryostat::InnerWall"; - copyNumber = 1; // assignment arbitrary copyNumber - } - - // Search the maps for this volume/copy number combination. - volumeMap_ptr_t v = volumeMap.find( volumeName ); - if ( v != volumeMap.end() ) - { - - // Recall that maps are made from pair <key,value>, and - // you access a pair with the "first" and "second" - // members. In this case, "second" is a map. We don't - // need to copy the entire map; it's enough to get its - // reference. - - identifierMap_t& identifierMap = (*v).second; - identifierMap_ptr_t i = identifierMap.find( copyNumber ); - - if ( i != identifierMap.end() ) - { - const IdentifierInfo_t* info = (*i).second; - - // Find our (x,y,z) location from the G4Step. - - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - G4ThreeVector startPoint = pre_step_point->GetPosition(); - G4ThreeVector endPoint = post_step_point->GetPosition(); - G4ThreeVector p = (startPoint + endPoint) * 0.5; - - // Determine the geometric eta and phi. Note that we do not - // adjust for any endcap shifts; the values are assigned to - // the volumes based on their design positions. - - G4double eta = fabs( p.pseudoRapidity() ); - G4double phi = p.phi(); - // For this calculation, we need 0<phi<2*PI. (The - // official ATLAS standard of -PI<phi<PI is - // meaningless here.) - if ( phi < 0 ) phi += 2*M_PI; - - // The region can depend on eta. Search through the - // list of regions within this IdentifierInfo record - // to find which one has etaMin<eta<etaMax. - - G4int regions = info->numberOfRegions; - const RegionInfo_t* region = info->regionInfoArray; + if(volumeName.index("LArMgr::") == 0) volumeName.erase(0,8); + if(volumeName.index("LAr::Barrel::Cryostat::Sector")==0) { // ears, legs, Ti blocks + volumeName = "LAr::Barrel::Cryostat::Sector"; + if(copyNumber != 7 && copyNumber !=12) copyNumber=1; // assignment arbitrary copyNumber to Ti block + }else if(volumeName.index("LAr::Barrel::Cryostat::Cylinder")==0){ + volumeName = "LAr::Barrel::Cryostat::Cylinder"; + }else if(volumeName.index("LAr::Barrel::Cryostat::InnerWall")==0){ + volumeName = "LAr::Barrel::Cryostat::InnerWall"; + copyNumber = 1; // assignment arbitrary copyNumber + } + + // Search the maps for this volume/copy number combination. + volumeMap_ptr_t v = volumeMap.find( volumeName ); + if ( v != volumeMap.end() ) + { + + // Recall that maps are made from pair <key,value>, and + // you access a pair with the "first" and "second" + // members. In this case, "second" is a map. We don't + // need to copy the entire map; it's enough to get its + // reference. + + identifierMap_t& identifierMap = (*v).second; + identifierMap_ptr_t i = identifierMap.find( copyNumber ); + + if ( i != identifierMap.end() ) + { + const IdentifierInfo_t* info = (*i).second; + + // Find our (x,y,z) location from the G4Step. + + G4StepPoint* pre_step_point = step->GetPreStepPoint(); + G4StepPoint* post_step_point = step->GetPostStepPoint(); + G4ThreeVector startPoint = pre_step_point->GetPosition(); + G4ThreeVector endPoint = post_step_point->GetPosition(); + G4ThreeVector p = (startPoint + endPoint) * 0.5; + + // Determine the geometric eta and phi. Note that we do not + // adjust for any endcap shifts; the values are assigned to + // the volumes based on their design positions. + + G4double eta = fabs( p.pseudoRapidity() ); + G4double phi = p.phi(); + // For this calculation, we need 0<phi<2*PI. (The + // official ATLAS standard of -PI<phi<PI is + // meaningless here.) + if ( phi < 0 ) phi += 2*M_PI; + + // The region can depend on eta. Search through the + // list of regions within this IdentifierInfo record + // to find which one has etaMin<eta<etaMax. + + G4int regions = info->numberOfRegions; + const RegionInfo_t* region = info->regionInfoArray; #ifdef DEBUG_HITS - G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::Process - " - << G4endl - << " found volume, number of regions=" - << regions - << " eta=" << eta << " phi=" << phi - << G4endl; + G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::Process - " + << G4endl + << " found volume, number of regions=" + << regions + << " eta=" << eta << " phi=" << phi + << G4endl; #endif - G4int r; - for ( r = 0; r < regions; r++, region++ ) - { - if ( eta > region->etaMin && - eta < region->etaMax ) - break; - } - - // If the following statement is not true, we're in - // trouble. It means that the eta of our energy - // deposit is outside the assumed eta limits of the - // volume. - - if ( r < regions ) - { - // Convert eta and phi to their integer equivalents for the - // identifier. - - G4int etaInteger = G4int( (eta - region->etaMin) / region->deltaEta ); - G4int phiInteger = G4int( phi / region->deltaPhi ); -// phiInteger should be less than 64 - if (phiInteger > 63) phiInteger = 0; + G4int r; + for ( r = 0; r < regions; r++, region++ ) + { + if ( eta > region->etaMin && + eta < region->etaMax ) + break; + } + + // If the following statement is not true, we're in + // trouble. It means that the eta of our energy + // deposit is outside the assumed eta limits of the + // volume. + + if ( r < regions ) + { + // Convert eta and phi to their integer equivalents for the + // identifier. + + G4int etaInteger = G4int( (eta - region->etaMin) / region->deltaEta ); + G4int phiInteger = G4int( phi / region->deltaPhi ); + // phiInteger should be less than 64 + if (phiInteger > 63) phiInteger = 0; #ifdef DEBUG_HITS - G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::Process - " - << G4endl - << " found region=" - << region->regionNumber - << " eta bin=" << etaInteger << " phi bin=" << phiInteger - << G4endl; + G4cout << "LArG4::BarrelCryostat::CalibrationCalculator::Process - " + << G4endl + << " found region=" + << region->regionNumber + << " eta bin=" << etaInteger << " phi bin=" << phiInteger + << G4endl; #endif - // The sign of subdet will depend on whether z is positive - // or negative. - G4int subDetSign = 1; - if ( p.z() < 0 ) subDetSign = -1; - - // A quick check against a bad value of etaMin. - if ( etaInteger >= 0 ) - { - // Build the full identifier. - m_identifier << info->detector - << info->subdet * subDetSign - << info->type - << info->sampling - << region->regionNumber - << etaInteger - << phiInteger; - - } // etaInteger valid - } // eta valid - } // copy number valid - } // volume name valid - - // If a volume is not found on one of the above tables, try - // the "backup identifier" calculator. - - if ( m_identifier == LArG4Identifier() ) - { + // The sign of subdet will depend on whether z is positive + // or negative. + G4int subDetSign = 1; + if ( p.z() < 0 ) subDetSign = -1; + + // A quick check against a bad value of etaMin. + if ( etaInteger >= 0 ) + { + // Build the full identifier. + identifier << info->detector + << info->subdet * subDetSign + << info->type + << info->sampling + << region->regionNumber + << etaInteger + << phiInteger; + + } // etaInteger valid + } // eta valid + } // copy number valid + } // volume name valid + + // If a volume is not found on one of the above tables, try + // the "backup identifier" calculator. + + if ( identifier == LArG4Identifier() ) + { #if defined (DEBUG_HITS) || defined (DEBUG_VOLUMES) - std::cout << "LArG4::BarrelCryostat::CalibrationCalculator::Process" - << std::endl - << " volume '" - << volumeName - << "' copy# " - << copyNumber - << " not found on tables, using backup calculator" - << std::endl; + std::cout << "LArG4::BarrelCryostat::CalibrationCalculator::Process" + << std::endl + << " volume '" + << volumeName + << "' copy# " + << copyNumber + << " not found on tables, using backup calculator" + << std::endl; #endif - m_backupCalculator->Process(a_step, kOnlyID); - m_identifier = m_backupCalculator->identifier(); - } - } // calculate identifier - + m_backupCalculator->Process(step, identifier, energies, process); + } + } // calculate identifier + #ifdef DEBUG_HITS - //G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); + //G4double energy = accumulate(energies.begin(),energies.end(),0.); std::cout << "LArG4::BarrelCryostat::CalibrationCalculator::Process" - << " vName " << a_step->GetPreStepPoint()->GetPhysicalVolume()->GetName() - << " ID=" << std::string(m_identifier) -// << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + << " vName " << step->GetPreStepPoint()->GetPhysicalVolume()->GetName() + << " ID=" << std::string(identifier) + // << " energy=" << energy + << " energies=(" << energies[0] + << "," << energies[1] + << "," << energies[2] + << "," << energies[3] << ")" + << std::endl; #endif // Check for bad result. - if ( m_identifier == LArG4Identifier() ) - return false; + if ( identifier == LArG4Identifier() ) + return false; return true; } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/CryostatCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationCalculator.h similarity index 73% rename from LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/CryostatCalibrationCalculator.h rename to LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationCalculator.h index f841bf25dff7cc376ca2ecd73d019323380dbbe6..6e1ce58a556a175459ae29616f7c760b7342e1ee 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/CryostatCalibrationCalculator.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationCalculator.h @@ -6,7 +6,7 @@ // Prepared 24-Feb-2004 Bill Seligman // This class calculates the values needed for calibration hits in the -// simulation. +// simulation. // A "calculator" is used in much the same way as a hand-held // calculator might be. The user supplies a value and hits 'Enter' @@ -22,7 +22,7 @@ #ifndef LArG4_BarrelCryostat_CalibrationCalculator_H #define LArG4_BarrelCryostat_CalibrationCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" @@ -42,12 +42,13 @@ namespace LArG4 { namespace BarrelCryostat { - class CalibrationCalculator : public VCalibrationCalculator { + class CalibrationCalculator : public LArCalibCalculatorSvcImp { public: - - CalibrationCalculator(); + + CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize() override final; virtual ~CalibrationCalculator(); - + // The Process method returns a boolean value. If it's true, the // hit can be used by Geant4; if it's false, there's something wrong // with the energy deposit and it should be ignored. @@ -59,28 +60,18 @@ namespace LArG4 { // yet, but you can never tell). Use the enum (defined in // VCalibrationCalculator.h) to control any special processing. - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } - private: - - // The values calculated by Process(). - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process = kEnergyAndID) const override final; + private: // Energy calculator CaloG4::SimulationEnergies m_energyCalculator; // If we can't find the volume in this calculator, try a // "backup" calculator. - static VCalibrationCalculator* m_backupCalculator; + ServiceHandle<ILArCalibCalculatorSvc> m_backupCalculator; }; diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationLArCalculator.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationLArCalculator.cc index aac4cd3dce641b4fdf2d2841761398735cbf785f..6f8f533d72dcebd742c811d6a0e39eabc05aaa4b 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationLArCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationLArCalculator.cc @@ -12,11 +12,10 @@ #undef DEBUG_HITS #define DEBUG_VOLUMES -#include "LArG4Barrel/CryostatCalibrationLArCalculator.h" +#include "CryostatCalibrationLArCalculator.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/VCalibrationCalculator.h" -#include "LArG4Code/CalibrationDefaultCalculator.h" +//#include "LArG4Code/CalibrationDefaultCalculator.h" #include "G4Step.hh" #include "G4StepPoint.hh" @@ -33,273 +32,275 @@ namespace LArG4 { namespace BarrelCryostat { - VCalibrationCalculator* CalibrationLArCalculator::m_defaultCalculator = 0; - /////////////////////////////////////////////////////////// // Methods /////////////////////////////////////////////////////////// - CalibrationLArCalculator::CalibrationLArCalculator() + CalibrationLArCalculator::CalibrationLArCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_parameters(nullptr) + , m_defaultCalculator("CalibrationDefaultCalculator",name) { + declareProperty("DefaultCalculator",m_defaultCalculator); + } + + StatusCode CalibrationLArCalculator::initialize(){ // Get the default calculator (hopefully a temporary piece of code): - if ( m_defaultCalculator == 0) - m_defaultCalculator = new CalibrationDefaultCalculator(); + ATH_CHECK(m_defaultCalculator.retrieve()); // Access source of detector parameters. m_parameters = LArVG4DetectorParameters::GetInstance(); - + return StatusCode::SUCCESS; } - CalibrationLArCalculator::~CalibrationLArCalculator() + CalibrationLArCalculator::~CalibrationLArCalculator() { // Cleanup pointers. - delete m_defaultCalculator; - m_defaultCalculator = 0; + //delete m_defaultCalculator; + //m_defaultCalculator = 0; } - - G4bool CalibrationLArCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) + G4bool CalibrationLArCalculator::Process(const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process) const { // Use the calculators to determine the energies and the // identifier associated with this G4Step. Note that the // default is to process both the energy and the ID. - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } + if ( process == kEnergyAndID || process == kOnlyEnergy ) + { + m_energyCalculator.Energies( step, energies ); + } else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); - - - m_identifier.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. - - // Note: - // LArG4::BarrelCryostat::CryostatCalibrationCalculator uses - // a table-based approach to determine the identifier. The - // following code uses an "if-statement" approach. - - // The fixed parameters (only a couple of which are readily - // accessible from the database): - - // static ? - static const double oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. - static const double oneOverDphi = 32./M_PI; // 1/Dphi - - static const double rhoMinPresamplerMother = 1385.*CLHEP::mm; - static const double rhoMiddlePresampler = (1385.*CLHEP::mm + 1447.*CLHEP::mm)/2.; - // from PresParameterDef.icc - // rMinPresamplerMother = 1385*CLHEP::mm; - // rMaxPresamplerMother = 1447*CLHEP::mm - 0.001*CLHEP::mm; - - static const double rhoAlignmentSafety = 10.*CLHEP::mm; - static const double rhoInFrontOfColdWall = rhoMinPresamplerMother - rhoAlignmentSafety; - static double RIN_AC = INT_MIN; - if ( RIN_AC < 0.) - RIN_AC = m_parameters->GetValue("LArEMBRadiusInnerAccordion"); // 1500.024*CLHEP::mm; from ACCG - static const double RCUT12 = 1593.9*CLHEP::mm; - static const double RCUT23 = 1866.1*CLHEP::mm; - static double ROUT_AC = INT_MIN; - if ( ROUT_AC < 0. ) - ROUT_AC = m_parameters->GetValue("LArEMBRadiusOuterAccordion"); // 1960.*CLHEP::mm; - static const double rhoOuterAccordionWithSafety = ROUT_AC - rhoAlignmentSafety; - static double LArEMBZmax = INT_MIN; - if ( LArEMBZmax < 0. ) + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); + + + identifier.clear(); + if ( process == kEnergyAndID || process == kOnlyID ) + { + // Calculate the identifier. + + // Note: + // LArG4::BarrelCryostat::CryostatCalibrationCalculator uses + // a table-based approach to determine the identifier. The + // following code uses an "if-statement" approach. + + // The fixed parameters (only a couple of which are readily + // accessible from the database): + + // static ? + static const double oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. + static const double oneOverDphi = 32./M_PI; // 1/Dphi + + static const double rhoMinPresamplerMother = 1385.*CLHEP::mm; + static const double rhoMiddlePresampler = (1385.*CLHEP::mm + 1447.*CLHEP::mm)/2.; + // from PresParameterDef.icc + // rMinPresamplerMother = 1385*CLHEP::mm; + // rMaxPresamplerMother = 1447*CLHEP::mm - 0.001*CLHEP::mm; + + static const double rhoAlignmentSafety = 10.*CLHEP::mm; + static const double rhoInFrontOfColdWall = rhoMinPresamplerMother - rhoAlignmentSafety; + static double RIN_AC = INT_MIN; + if ( RIN_AC < 0.) + RIN_AC = m_parameters->GetValue("LArEMBRadiusInnerAccordion"); // 1500.024*CLHEP::mm; from ACCG + static const double RCUT12 = 1593.9*CLHEP::mm; + static const double RCUT23 = 1866.1*CLHEP::mm; + static double ROUT_AC = INT_MIN; + if ( ROUT_AC < 0. ) + ROUT_AC = m_parameters->GetValue("LArEMBRadiusOuterAccordion"); // 1960.*CLHEP::mm; + static const double rhoOuterAccordionWithSafety = ROUT_AC - rhoAlignmentSafety; + static double LArEMBZmax = INT_MIN; + if ( LArEMBZmax < 0. ) LArEMBZmax = m_parameters->GetValue("LArEMBZmax"); // 3165.*CLHEP::mm - const double zMaxAccordionWithSafety = LArEMBZmax - 10.*CLHEP::mm; + const double zMaxAccordionWithSafety = LArEMBZmax - 10.*CLHEP::mm; - // Calculate the mid-point of the step, and the simple geometry variables. + // Calculate the mid-point of the step, and the simple geometry variables. - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - G4StepPoint* post_step_point = a_step->GetPostStepPoint(); + G4StepPoint* pre_step_point = step->GetPreStepPoint(); + G4StepPoint* post_step_point = step->GetPostStepPoint(); - G4ThreeVector startPoint = pre_step_point->GetPosition(); - G4ThreeVector endPoint = post_step_point->GetPosition(); - G4ThreeVector p = (startPoint + endPoint) * 0.5; + G4ThreeVector startPoint = pre_step_point->GetPosition(); + G4ThreeVector endPoint = post_step_point->GetPosition(); + G4ThreeVector p = (startPoint + endPoint) * 0.5; - G4double rho = p.perp(); - G4double eta = fabs( p.pseudoRapidity() ); - G4double phi = p.phi(); - if ( phi < 0. ) phi += 2.*M_PI; // Normalize for phiBin calculation + G4double rho = p.perp(); + G4double eta = fabs( p.pseudoRapidity() ); + G4double phi = p.phi(); + if ( phi < 0. ) phi += 2.*M_PI; // Normalize for phiBin calculation - // subdet = +/-4 "+" or " -" according to sign of Z in World coorinate - G4int subdet = ( p.z() > 0.) ? 4 : -4; - G4int phiBin = (int) ( phi * oneOverDphi ); + // subdet = +/-4 "+" or " -" according to sign of Z in World coorinate + G4int subdet = ( p.z() > 0.) ? 4 : -4; + G4int phiBin = (int) ( phi * oneOverDphi ); if (phiBin>63) phiBin=0; - // Initialize identifier variables with (invalid) default - // values (INT_MIN is defined in <climits>). - G4int type = INT_MIN; - G4int sampling = INT_MIN; - G4int region = INT_MIN; - G4int etaBin = INT_MIN; + // Initialize identifier variables with (invalid) default + // values (INT_MIN is defined in <climits>). + G4int type = INT_MIN; + G4int sampling = INT_MIN; + G4int region = INT_MIN; + G4int etaBin = INT_MIN; - if(std::fabs(p.z())< 10 && eta < 0.1 && rho > rhoMinPresamplerMother && rho < ROUT_AC ) - { - // type = 2 dead materials in "internal" cracks: + if(std::fabs(p.z())< 10 && eta < 0.1 && rho > rhoMinPresamplerMother && rho < ROUT_AC ) + { + // type = 2 dead materials in "internal" cracks: // real crack for nominal geometry at this level is +-3mm // add some margin to allow for misalignement - type = 2; - - // sampling = 0,1,2,3 (follow the corresponding calorimeter structure) - if ( rho < RIN_AC ) { sampling = 0; } - else if ( rho < RCUT12 ) { sampling = 1; } - else if ( rho < RCUT23 ) { sampling = 2; } - else { sampling = 3; } - - // region = 0 - between two halves of EMB, - region = 0; - etaBin = 0; - } - else - { - // type = 1 dead materials outside accordion and active presampler layers - type = 1; - - if( eta < 1.5 ) - { + type = 2; + + // sampling = 0,1,2,3 (follow the corresponding calorimeter structure) + if ( rho < RIN_AC ) { sampling = 0; } + else if ( rho < RCUT12 ) { sampling = 1; } + else if ( rho < RCUT23 ) { sampling = 2; } + else { sampling = 3; } + + // region = 0 - between two halves of EMB, + region = 0; + etaBin = 0; + } + else + { + // type = 1 dead materials outside accordion and active presampler layers + type = 1; + + if( eta < 1.5 ) + { if ( rho < rhoInFrontOfColdWall ) // and in LAr::Barrel::MotherVolume - // The region is defined correctly for a radial mis-alignments - // up to 10mm because ColdWallThickness >= 20mm and - // rhoAlignmentSafety = 10.*mm; - // The E-deposit in the Cold Wall itself is handled by - // another calculator. - { - sampling = 1; - region = 0; - etaBin = (int) ( eta * oneOverDeta ); - } - else if ( rho < rhoMiddlePresampler ) - // The region is defined correctly for a radial mis-alignments - // up to (1447.*mm - 1385.*mm)/2 - // The E-deposit in the Presampler itself is handled by - // other calculator. - { - sampling = 1; - region = 2; - etaBin = (int) ( eta * oneOverDeta ); - } - else if ( rho < rhoOuterAccordionWithSafety && + // The region is defined correctly for a radial mis-alignments + // up to 10mm because ColdWallThickness >= 20mm and + // rhoAlignmentSafety = 10.*mm; + // The E-deposit in the Cold Wall itself is handled by + // another calculator. + { + sampling = 1; + region = 0; + etaBin = (int) ( eta * oneOverDeta ); + } + else if ( rho < rhoMiddlePresampler ) + // The region is defined correctly for a radial mis-alignments + // up to (1447.*mm - 1385.*mm)/2 + // The E-deposit in the Presampler itself is handled by + // other calculator. + { + sampling = 1; + region = 2; + etaBin = (int) ( eta * oneOverDeta ); + } + else if ( rho < rhoOuterAccordionWithSafety && fabs( p.z()) < zMaxAccordionWithSafety ) - // The region is defined correctly for a radial mis-alignments - // up to 10mm because rhoAlignmentSafety = 10.*mm; - // The E-deposit in the Barrel Accordion itself is handled by - // other calculator. - { - sampling = 1; - region = 3; - etaBin = (int) ( eta * oneOverDeta ); - } - else // rho > ROUT_AC or |z| >= zMaxAccordionWithSafety - { - sampling = 2; - - if( eta < 1.0 ) - { - region = 0; - etaBin = (int) ( eta * oneOverDeta ); - } - else // 1.0 <= eta < 1.5 - { - region = 2; - etaBin = (int) ( (eta-1.) * oneOverDeta ); - } - } - } - else if ( eta < 1.6 ) - { - sampling = 1; - region = 4; - etaBin = (int) ( (eta-1.5) * oneOverDeta ); - } - else if ( eta < 1.8 ) - { - sampling = 1; - region = 5; - etaBin = (int) ( (eta-1.6) * oneOverDeta ); - } - else if ( eta < 3.2 ) - { - sampling = 1; - region = 6; - etaBin = (int) ( (eta-1.8) * oneOverDeta ); - } - } - - // This is a "quick fix" for a complex issue: We're still - // developing code for the cryostat. What if, somehow, we have - // a G4Step in a LAr volume that isn't handled by the above - // code? Answer: Use the default calibration calculator (the - // same one used for volumes without sensitive detectors) to get - // the identifier. - - if ( type == INT_MIN || - region == INT_MIN || - sampling == INT_MIN || - etaBin == INT_MIN || - phiBin < 0 ) - { + // The region is defined correctly for a radial mis-alignments + // up to 10mm because rhoAlignmentSafety = 10.*mm; + // The E-deposit in the Barrel Accordion itself is handled by + // other calculator. + { + sampling = 1; + region = 3; + etaBin = (int) ( eta * oneOverDeta ); + } + else // rho > ROUT_AC or |z| >= zMaxAccordionWithSafety + { + sampling = 2; + + if( eta < 1.0 ) + { + region = 0; + etaBin = (int) ( eta * oneOverDeta ); + } + else // 1.0 <= eta < 1.5 + { + region = 2; + etaBin = (int) ( (eta-1.) * oneOverDeta ); + } + } + } + else if ( eta < 1.6 ) + { + sampling = 1; + region = 4; + etaBin = (int) ( (eta-1.5) * oneOverDeta ); + } + else if ( eta < 1.8 ) + { + sampling = 1; + region = 5; + etaBin = (int) ( (eta-1.6) * oneOverDeta ); + } + else if ( eta < 3.2 ) + { + sampling = 1; + region = 6; + etaBin = (int) ( (eta-1.8) * oneOverDeta ); + } + } + + // This is a "quick fix" for a complex issue: We're still + // developing code for the cryostat. What if, somehow, we have + // a G4Step in a LAr volume that isn't handled by the above + // code? Answer: Use the default calibration calculator (the + // same one used for volumes without sensitive detectors) to get + // the identifier. + + if ( type == INT_MIN || + region == INT_MIN || + sampling == INT_MIN || + etaBin == INT_MIN || + phiBin < 0 ) + { #if defined (DEBUG_VOLUMES) || defined (DEBUG_HITS) - static const G4int messageMax = 10; - static G4int messageCount = 0; - if ( messageCount++ < messageMax ) - { - std::cout << "LArG4::BarrelCryostat::CalibrationLArCalculator::Process" - << " (error " << messageCount << " of " << messageMax << " max displayed)" - << std::endl - << " G4Step in LAr at unexpected place: (x,y,z) [mm] = (" - << p.x()/CLHEP::mm << "," - << p.y()/CLHEP::mm << "," - << p.z()/CLHEP::mm - << "); eta=" << eta - << ", phi=" << phi << std::endl - << " using default calculator" - << std::endl; - } + static const G4int messageMax = 10; + static G4int messageCount = 0; + if ( messageCount++ < messageMax ) + { + std::cout << "LArG4::BarrelCryostat::CalibrationLArCalculator::Process" + << " (error " << messageCount << " of " << messageMax << " max displayed)" + << std::endl + << " G4Step in LAr at unexpected place: (x,y,z) [mm] = (" + << p.x()/CLHEP::mm << "," + << p.y()/CLHEP::mm << "," + << p.z()/CLHEP::mm + << "); eta=" << eta + << ", phi=" << phi << std::endl + << " using default calculator" + << std::endl; + } #endif - m_defaultCalculator->Process(a_step, kOnlyID); - m_identifier = m_defaultCalculator->identifier(); - } - else - { - // Append the cell ID to the (empty) identifier. - m_identifier << 10 // Calorimeter - << subdet // LAr +/-4 where "+" or " -" according to - // the sign of Z in World coorinate - << type - << sampling - << region - << etaBin - << phiBin; - } - } - + m_defaultCalculator->Process(step, identifier, energies, process); + } + else + { + // Append the cell ID to the (empty) identifier. + identifier << 10 // Calorimeter + << subdet // LAr +/-4 where "+" or " -" according to + // the sign of Z in World coorinate + << type + << sampling + << region + << etaBin + << phiBin; + } + } + #ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); + G4double energy = accumulate(energies.begin(),energies.end(),0.); std::cout << "LArG4::BarrelCryostat::CalibrationLArCalculator::Process" - << " ID=" << std::string(m_identifier) - << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + << " ID=" << std::string(identifier) + << " energy=" << energy + << " energies=(" << energies[0] + << "," << energies[1] + << "," << energies[2] + << "," << energies[3] << ")" + << std::endl; #endif // Check for bad result. - if ( m_identifier == LArG4Identifier() ) - return false; + if ( identifier == LArG4Identifier() ) + return false; return true; } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/CryostatCalibrationLArCalculator.h b/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationLArCalculator.h similarity index 71% rename from LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/CryostatCalibrationLArCalculator.h rename to LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationLArCalculator.h index 512e56cb422e2904a6495ba16589d3c628e98aec..a034ae12ee80f17dd24f55331cfbccecd4aed057 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/CryostatCalibrationLArCalculator.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationLArCalculator.h @@ -6,7 +6,7 @@ // Prepared 13-Aug-2004 Bill Seligman // This class calculates the values needed for calibration hits in the -// simulation. +// simulation. // A "calculator" is used in much the same way as a hand-held // calculator might be. The user supplies a value and hits 'Enter' @@ -21,7 +21,7 @@ #ifndef LArG4_BarrelCryostat_CalibrationLArCalculator_H #define LArG4_BarrelCryostat_CalibrationLArCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "LArG4Code/LArVG4DetectorParameters.h" @@ -43,12 +43,13 @@ namespace LArG4 { namespace BarrelCryostat { - class CalibrationLArCalculator : public VCalibrationCalculator { + class CalibrationLArCalculator : public LArCalibCalculatorSvcImp { public: - - CalibrationLArCalculator(); + + CalibrationLArCalculator(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize() override final; virtual ~CalibrationLArCalculator(); - + // The Process method returns a boolean value. If it's true, the // hit can be used by Geant4; if it's false, there's something wrong // with the energy deposit and it should be ignored. @@ -59,31 +60,18 @@ namespace LArG4 { // escaped energy), or only the energy (no known application // yet, but you can never tell). Use the enum (defined in // VCalibrationCalculator.h) to control any special processing. - - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process = kEnergyAndID) const override final; private: - - // The values calculated by Process(). - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; - // Energy calculator CaloG4::SimulationEnergies m_energyCalculator; // Access to parameters. LArVG4DetectorParameters* m_parameters; - // For the default calculator (hopefully temporary). - static VCalibrationCalculator* m_defaultCalculator; + ServiceHandle<ILArCalibCalculatorSvc> m_defaultCalculator; }; diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationMixedCalculator.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationMixedCalculator.cc index 2b05a10bd8dca809547f555b91677703a9ca2e28..e667b12826d7a0b25c79557917fb54d0315fa74e 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationMixedCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationMixedCalculator.cc @@ -12,11 +12,10 @@ #undef DEBUG_HITS #define DEBUG_VOLUMES -#include "LArG4Barrel/CryostatCalibrationMixedCalculator.h" -#include "LArG4Barrel/CryostatCalibrationLArCalculator.h" +#include "CryostatCalibrationMixedCalculator.h" +#include "CryostatCalibrationLArCalculator.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/VCalibrationCalculator.h" #include "G4Step.hh" #include "G4StepPoint.hh" @@ -33,29 +32,30 @@ namespace LArG4 { namespace BarrelCryostat { - VCalibrationCalculator* CalibrationMixedCalculator::m_backupCalculator = 0; - /////////////////////////////////////////////////////////// // Methods /////////////////////////////////////////////////////////// - CalibrationMixedCalculator::CalibrationMixedCalculator() + CalibrationMixedCalculator::CalibrationMixedCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_backupCalculator("BarrelCryostatCalibrationLArCalculator",name) { - // Get a "backup" calculator. - if ( m_backupCalculator == 0) - m_backupCalculator = new CalibrationLArCalculator(); + declareProperty("BackupCalculator", m_backupCalculator); + } - // Access source of detector parameters. - m_parameters = LArVG4DetectorParameters::GetInstance(); + StatusCode CalibrationMixedCalculator::initialize() { + // Get a "backup" calculator. + ATH_CHECK(m_backupCalculator.retrieve()); + return StatusCode::SUCCESS; } - CalibrationMixedCalculator::~CalibrationMixedCalculator() + CalibrationMixedCalculator::~CalibrationMixedCalculator() { // Cleanup pointers. - delete m_backupCalculator; - m_backupCalculator = 0; + //delete m_backupCalculator; + //m_backupCalculator = 0; } // This calculator is intended to apply to the following volumes that have "mixed" identifiers: @@ -76,60 +76,60 @@ namespace LArG4 { // See also Simulation/G4Atlas/G4AtlasApps/python/atlas_calo.py and // LArG4/LArG4Barrel/src/CryostatCalibrationCalculator.cxx - G4bool CalibrationMixedCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) + G4bool CalibrationMixedCalculator::Process(const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process) const { // Use the calculators to determine the energies and the // identifier associated with this G4Step. Note that the // default is to process both the energy and the ID. - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } + if ( process == kEnergyAndID || process == kOnlyEnergy ) + { + m_energyCalculator.Energies( step, energies ); + } else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); - m_identifier.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. + identifier.clear(); + if ( process == kEnergyAndID || process == kOnlyID ) + { + // Calculate the identifier. - // Note: - // LArG4::BarrelCryostat::CryostatCalibrationCalculator uses - // a table-based approach to determine the identifier. The - // following code uses an "if-statement" approach. + // Note: + // LArG4::BarrelCryostat::CryostatCalibrationCalculator uses + // a table-based approach to determine the identifier. The + // following code uses an "if-statement" approach. - // The fixed parameters (only a couple of which are readily - // accessible from the database): + // The fixed parameters (only a couple of which are readily + // accessible from the database): - static const double oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. - static const double oneOverDphi = 32./M_PI; // 1/Dphi + static const double oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. + static const double oneOverDphi = 32./M_PI; // 1/Dphi - // Calculate the mid-point of the step, and the simple geometry variables. - G4VPhysicalVolume* physical = a_step->GetPreStepPoint()->GetPhysicalVolume(); - //G4int copyNumber = physical->GetCopyNo(); - G4String volumeName = physical->GetLogicalVolume()->GetName(); + // Calculate the mid-point of the step, and the simple geometry variables. + G4VPhysicalVolume* physical = step->GetPreStepPoint()->GetPhysicalVolume(); + //G4int copyNumber = physical->GetCopyNo(); + G4String volumeName = physical->GetLogicalVolume()->GetName(); - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - G4StepPoint* post_step_point = a_step->GetPostStepPoint(); + G4StepPoint* pre_step_point = step->GetPreStepPoint(); + G4StepPoint* post_step_point = step->GetPostStepPoint(); - G4ThreeVector startPoint = pre_step_point->GetPosition(); - G4ThreeVector endPoint = post_step_point->GetPosition(); - G4ThreeVector p = (startPoint + endPoint) * 0.5; + G4ThreeVector startPoint = pre_step_point->GetPosition(); + G4ThreeVector endPoint = post_step_point->GetPosition(); + G4ThreeVector p = (startPoint + endPoint) * 0.5; - G4double rho = p.perp(); - G4double eta = fabs( p.pseudoRapidity() ); - G4double phi = p.phi(); - if ( phi < 0. ) phi += 2.*M_PI; // Normalize for phiBin calculation + G4double rho = p.perp(); + G4double eta = fabs( p.pseudoRapidity() ); + G4double phi = p.phi(); + if ( phi < 0. ) phi += 2.*M_PI; // Normalize for phiBin calculation - // Initialize identifier variables with (invalid) default - // values (INT_MIN is defined in <climits>). - G4int sampling = INT_MIN; - G4int region = INT_MIN; - G4int etaBin = INT_MIN; + // Initialize identifier variables with (invalid) default + // values (INT_MIN is defined in <climits>). + G4int sampling = INT_MIN; + G4int region = INT_MIN; + G4int etaBin = INT_MIN; // subdet = +/-4 "+" or " -" according to sign of Z in World coorinate G4int subdet = ( p.z() > 0.) ? 4 : -4; G4int type = 1; @@ -145,7 +145,7 @@ namespace LArG4 { { sampling = 1; region = 1; - etaBin = (int) ( eta * oneOverDeta ); + etaBin = (int) ( eta * oneOverDeta ); } else { @@ -160,7 +160,7 @@ namespace LArG4 { { sampling = 1; region = 1; - etaBin = (int) ( eta * oneOverDeta ); + etaBin = (int) ( eta * oneOverDeta ); } else { @@ -188,62 +188,61 @@ namespace LArG4 { etaBin = (int) ( (eta-1.3) * oneOverDeta ); } - // What if we have a G4Step that isn't handled by the above - // code? Answer: Use a "backup" calculator to try to - // process the step. + // What if we have a G4Step that isn't handled by the above + // code? Answer: Use a "backup" calculator to try to + // process the step. - if ( type == INT_MIN || - region == INT_MIN || - sampling == INT_MIN || - etaBin == INT_MIN || - phiBin < 0 ) - { + if ( type == INT_MIN || + region == INT_MIN || + sampling == INT_MIN || + etaBin == INT_MIN || + phiBin < 0 ) + { #if defined (DEBUG_VOLUMES) || defined (DEBUG_HITS) - static const G4int messageMax = 10; - static G4int messageCount = 0; - if ( messageCount++ < messageMax ) - { - std::cout << "LArG4::BarrelCryostat::CalibrationMixedCalculator::Process" - << " (error " << messageCount << " of " << messageMax << " max displayed)" - << std::endl - << " G4Step in '" - << a_step->GetPreStepPoint()->GetPhysicalVolume()->GetName() - << "', using backup calculator" - << std::endl; - } + static const G4int messageMax = 10; + static G4int messageCount = 0; + if ( messageCount++ < messageMax ) + { + std::cout << "LArG4::BarrelCryostat::CalibrationMixedCalculator::Process" + << " (error " << messageCount << " of " << messageMax << " max displayed)" + << std::endl + << " G4Step in '" + << step->GetPreStepPoint()->GetPhysicalVolume()->GetName() + << "', using backup calculator" + << std::endl; + } #endif - m_backupCalculator->Process(a_step, kOnlyID); - m_identifier = m_backupCalculator->identifier(); - } - else - { - // Append the cell ID to the (empty) identifier. - m_identifier << 10 // Calorimeter - << subdet // LAr +/-4 where "+" or " -" according to - // the sign of Z in World coorinate - << type - << sampling - << region - << etaBin - << phiBin; - } - } - + m_backupCalculator->Process(step, identifier, energies, process); + } + else + { + // Append the cell ID to the (empty) identifier. + identifier << 10 // Calorimeter + << subdet // LAr +/-4 where "+" or " -" according to + // the sign of Z in World coorinate + << type + << sampling + << region + << etaBin + << phiBin; + } + } + #ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); + G4double energy = accumulate(energies.begin(),energies.end(),0.); std::cout << "LArG4::BarrelCryostat::CalibrationMixedCalculator::Process" - << " ID=" << std::string(m_identifier) - << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + << " ID=" << std::string(identifier) + << " energy=" << energy + << " energies=(" << energies[0] + << "," << energies[1] + << "," << energies[2] + << "," << energies[3] << ")" + << std::endl; #endif // Check for bad result. - if ( m_identifier == LArG4Identifier() ) - return false; + if ( identifier == LArG4Identifier() ) + return false; return true; } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/CryostatCalibrationMixedCalculator.h b/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationMixedCalculator.h similarity index 67% rename from LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/CryostatCalibrationMixedCalculator.h rename to LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationMixedCalculator.h index 0f433750f253e6a47794ca52239e4627031318b3..f796b9271d0b330b1f29aeff713c560fd97e76c2 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/CryostatCalibrationMixedCalculator.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/CryostatCalibrationMixedCalculator.h @@ -6,7 +6,7 @@ // Prepared 13-Aug-2004 Bill Seligman // This class calculates the values needed for calibration hits in the -// simulation. +// simulation. // A "calculator" is used in much the same way as a hand-held // calculator might be. The user supplies a value and hits 'Enter' @@ -21,9 +21,8 @@ #ifndef LArG4_BarrelCryostat_CalibrationMixedCalculator_H #define LArG4_BarrelCryostat_CalibrationMixedCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVG4DetectorParameters.h" #include "CaloG4Sim/SimulationEnergies.h" @@ -42,12 +41,13 @@ namespace LArG4 { namespace BarrelCryostat { - class CalibrationMixedCalculator : public VCalibrationCalculator { + class CalibrationMixedCalculator : public LArCalibCalculatorSvcImp { public: - - CalibrationMixedCalculator(); + + CalibrationMixedCalculator(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize() override final; virtual ~CalibrationMixedCalculator(); - + // The Process method returns a boolean value. If it's true, the // hit can be used by Geant4; if it's false, there's something wrong // with the energy deposit and it should be ignored. @@ -58,32 +58,15 @@ namespace LArG4 { // escaped energy), or only the energy (no known application // yet, but you can never tell). Use the enum (defined in // VCalibrationCalculator.h) to control any special processing. - - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process = kEnergyAndID) const override final; private: - - // The values calculated by Process(). - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; - // Energy calculator CaloG4::SimulationEnergies m_energyCalculator; - // Access to parameters. - LArVG4DetectorParameters* m_parameters; - - // Define a "backup" calculator. - static VCalibrationCalculator* m_backupCalculator; - + ServiceHandle<ILArCalibCalculatorSvc> m_backupCalculator; }; } // namespace BarrelCryostat diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/CurrMap.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/CurrMap.cc index acbbe17d87315a56eb919afcbf36d848bf69cd3a..8279a740dc654e7f042d83b6a188c5c58f73d079 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/CurrMap.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/CurrMap.cc @@ -2,83 +2,83 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4Barrel/CurrMap.h" +#include "CurrMap.h" #include <stdlib.h> #include <iostream> #include <stdio.h> -CurrMap::CurrMap(std::string filename,double xnorm) +CurrMap::CurrMap(std::string filename,double xnorm) { -// normalisation to convert nA from the map back to MeV -// use average in straight section: -// this assumes that the electronic calibration is such -// that Sum ai*(ADC-PED) gives the initial current for a triangular -// signal of drift time ~475 ns - m_norm = xnorm; - m_nx=0; - m_ny=0; - m_xmin=0.; - m_xmax=0.; - m_dx=0.; - m_ymin=0.; - m_ymax=0.; - m_dy=0.; - - m_gap=0; - m_curr0=0; - m_curr1=0; - m_curr2=0; - - - FILE * fp = fopen(filename.c_str(),"r"); - if(fp){ - char line[81]; - fgets(line,80,fp); - sscanf(&line[0],"%d%f%f%d%f%f",&m_nx,&m_xmin,&m_xmax,&m_ny,&m_ymin,&m_ymax); - - if(m_nx>0 && m_ny>0 && m_nx<10000 && m_ny<10000) {//coverity issue. This is a tainted variable protection, 10000 can be changed if required. - m_dx = (m_xmax-m_xmin)/((float) m_nx); - m_dy = (m_ymax-m_ymin)/((float) m_ny); - //std::cout << " nx,xmin,xmax,ny,ymin,ymax " << m_nx << " " << m_xmin << " " << m_xmax << " " - // << m_ny << " " << m_ymin << " " << m_ymax << std::endl; - - m_gap = new float[m_nx*m_ny]; - m_curr0 = new float[m_nx*m_ny]; - m_curr1 = new float[m_nx*m_ny]; - m_curr2 = new float[m_nx*m_ny]; - - for (int i=0; i<m_nx;i++) - { - for (int j=0; j<m_ny;j++) { - m_gap[j*m_nx+i]=0.; - m_curr0[j*m_nx+i]=0; - m_curr1[j*m_nx+i]=0; - m_curr2[j*m_nx+i]=0; - } - } - - int ix,iy; - float gap,cur1,cur2,cur3; - while (fgets(line,80,fp)) { - sscanf(&line[0],"%d%d%f%f%f%f",&ix,&iy,&gap,&cur1,&cur2,&cur3); - if(ix >= 0 && ix < m_nx && iy >= 0 && iy < m_ny){ - m_gap[iy*m_nx+ix]=gap; - m_curr0[iy*m_nx+ix]=cur1/m_norm; - m_curr1[iy*m_nx+ix]=cur2/m_norm; - m_curr2[iy*m_nx+ix]=cur3/m_norm; - // std::cout << "read " << ix << " " << iy << " " << m_curr0[iy*m_nx+ix] << std::endl; - } - } - } - else{ - std::cout << "Error in CurrMap::CurrMap: nx or ny out of limits." << std::endl; - } - fclose(fp); - } - else{ - - std::cout << "Error in CurrMap::CurrMap: The file could not be open." << std::endl; - } + // normalisation to convert nA from the map back to MeV + // use average in straight section: + // this assumes that the electronic calibration is such + // that Sum ai*(ADC-PED) gives the initial current for a triangular + // signal of drift time ~475 ns + m_norm = xnorm; + m_nx=0; + m_ny=0; + m_xmin=0.; + m_xmax=0.; + m_dx=0.; + m_ymin=0.; + m_ymax=0.; + m_dy=0.; + + m_gap=0; + m_curr0=0; + m_curr1=0; + m_curr2=0; + + + FILE * fp = fopen(filename.c_str(),"r"); + if(fp){ + char line[81]; + fgets(line,80,fp); + sscanf(&line[0],"%d%f%f%d%f%f",&m_nx,&m_xmin,&m_xmax,&m_ny,&m_ymin,&m_ymax); + + if(m_nx>0 && m_ny>0 && m_nx<10000 && m_ny<10000) {//coverity issue. This is a tainted variable protection, 10000 can be changed if required. + m_dx = (m_xmax-m_xmin)/((float) m_nx); + m_dy = (m_ymax-m_ymin)/((float) m_ny); + //std::cout << " nx,xmin,xmax,ny,ymin,ymax " << m_nx << " " << m_xmin << " " << m_xmax << " " + // << m_ny << " " << m_ymin << " " << m_ymax << std::endl; + + m_gap = new float[m_nx*m_ny]; + m_curr0 = new float[m_nx*m_ny]; + m_curr1 = new float[m_nx*m_ny]; + m_curr2 = new float[m_nx*m_ny]; + + for (int i=0; i<m_nx;i++) + { + for (int j=0; j<m_ny;j++) { + m_gap[j*m_nx+i]=0.; + m_curr0[j*m_nx+i]=0; + m_curr1[j*m_nx+i]=0; + m_curr2[j*m_nx+i]=0; + } + } + + int ix,iy; + float gap,cur1,cur2,cur3; + while (fgets(line,80,fp)) { + sscanf(&line[0],"%d%d%f%f%f%f",&ix,&iy,&gap,&cur1,&cur2,&cur3); + if(ix >= 0 && ix < m_nx && iy >= 0 && iy < m_ny){ + m_gap[iy*m_nx+ix]=gap; + m_curr0[iy*m_nx+ix]=cur1/m_norm; + m_curr1[iy*m_nx+ix]=cur2/m_norm; + m_curr2[iy*m_nx+ix]=cur3/m_norm; + // std::cout << "read " << ix << " " << iy << " " << m_curr0[iy*m_nx+ix] << std::endl; + } + } + } + else{ + std::cout << "Error in CurrMap::CurrMap: nx or ny out of limits." << std::endl; + } + fclose(fp); + } + else{ + + std::cout << "Error in CurrMap::CurrMap: The file could not be open." << std::endl; + } } @@ -93,100 +93,100 @@ CurrMap::~CurrMap() } -void CurrMap::GetAll(double x, double y, double* gap, double* curr0, double* curr1, double* curr2) +void CurrMap::GetAll(double x, double y, double* gap, double* curr0, double* curr1, double* curr2) const { - *gap=0; - *curr0=0; - *curr1=0; - *curr2=0; - - if (m_nx==0 || m_ny ==0) return; - if (x<m_xmin ) x=m_xmin; - if (x>=m_xmax ) x=m_xmax-0.0001; - if (y<m_ymin ) y=m_ymin; - if (y>=m_ymax ) y=m_ymax-0.0001; - - int ix,iy; - ix = (int) ((x-m_xmin)/m_dx); - iy = (int) ((y-m_ymin)/m_dy); - - if ( (ix+1) < m_nx && (iy+1) < m_ny) { - float x0 = ((float) ix)*m_dx+m_xmin; - float x1 = x0+m_dx; - float y0 = ((float) iy)*m_dy+m_ymin; - float y1 = y0+m_dy; - float w[4]; - w[0]=(x1-x)*(y1-y); - w[1]=(x-x0)*(y1-y); - w[2]=(x1-x)*(y-y0); - w[3]=(x-x0)*(y-y0); - - float sumw=0.; - for (int i=0;i<2;i++) { - for (int j=0;j<2;j++) { - int n=ix+i+(iy+j)*m_nx; - if (m_curr0[n]>0) { - int m=i+2*j; - sumw +=w[m]; - *gap += m_gap[n]*w[m]; - *curr0 += m_curr0[n]*w[m]; - *curr1 += m_curr1[n]*w[m]; - *curr2 += m_curr2[n]*w[m]; - } - } - } - if (sumw>0.) { - *gap = *gap/sumw; - *curr0 = *curr0/sumw; - *curr1 = *curr1/sumw; - *curr2 = *curr2/sumw; - } - else { -// try to recover a non zero current by moving in the map - int jy=-1; - int jx=-1; - int idistm=100; - for (int iiy=iy-7;iiy<iy+8;iiy++) { - for (int iix=ix-7;iix<ix+8;iix++) { - if (iiy>=0 && iiy<m_ny && iix>=0 && iix<m_nx) { - if (m_curr0[iix+iiy*m_nx]>0) { - int idist=(iix-ix)*(iix-ix)+(iiy-iy)*(iiy-iy); - if(idist<idistm) { - idistm=idist; - jx=iix; - jy=iiy; - } - } - } - } - } - if (idistm<100 && jx>=0 && jy>=0) { - *gap = m_gap[jx+jy*m_nx]; - *curr0 = m_curr0[jx+jy*m_nx]; - *curr1 = m_curr1[jx+jy*m_nx]; - *curr2 = m_curr2[jx+jy*m_nx]; - } else { - *gap=0; - *curr0=0; - *curr1=0; - *curr2=0; - } - } - } - else { -// on the edges of the map, no linear interpolation - int n=ix+iy*m_nx; - if (m_curr0[n]<1e-6 && (ix+1) <m_nx) n=ix+1 +iy*m_nx; - if (m_curr0[n]<1e-6 && (ix-1) >0 ) n=ix-1 +iy*m_nx; - if (m_curr0[n]<1e-6 && (iy+1) <m_ny) n=ix+(iy+1)*m_nx; - if (m_curr0[n]<1e-6 && (iy-1) <0) n=ix+(iy-1)*m_nx; - if (m_curr0[n]<1e-6 && (ix+1) < m_nx && (iy+1) < m_ny) n=ix+1+(iy+1)*m_nx; - if (m_curr0[n]<1e-6 && (ix-1) >0 && (iy+1) < m_ny) n=ix-1+(iy+1)*m_nx; - if (m_curr0[n]<1e-6 && (ix+1) < m_nx && (iy-1) >0 ) n=ix+1+(iy-1)*m_nx; - if (m_curr0[n]<1e-6 && (ix-1) >0 && (iy-1) >0 ) n=ix-1+(iy-1)*m_nx; - *gap = m_gap[n]; - *curr0 = m_curr0[n]; - *curr1 = m_curr1[n]; - *curr2 = m_curr2[n]; - } + *gap=0; + *curr0=0; + *curr1=0; + *curr2=0; + + if (m_nx==0 || m_ny ==0) return; + if (x<m_xmin ) x=m_xmin; + if (x>=m_xmax ) x=m_xmax-0.0001; + if (y<m_ymin ) y=m_ymin; + if (y>=m_ymax ) y=m_ymax-0.0001; + + int ix,iy; + ix = (int) ((x-m_xmin)/m_dx); + iy = (int) ((y-m_ymin)/m_dy); + + if ( (ix+1) < m_nx && (iy+1) < m_ny) { + float x0 = ((float) ix)*m_dx+m_xmin; + float x1 = x0+m_dx; + float y0 = ((float) iy)*m_dy+m_ymin; + float y1 = y0+m_dy; + float w[4]; + w[0]=(x1-x)*(y1-y); + w[1]=(x-x0)*(y1-y); + w[2]=(x1-x)*(y-y0); + w[3]=(x-x0)*(y-y0); + + float sumw=0.; + for (int i=0;i<2;i++) { + for (int j=0;j<2;j++) { + int n=ix+i+(iy+j)*m_nx; + if (m_curr0[n]>0) { + int m=i+2*j; + sumw +=w[m]; + *gap += m_gap[n]*w[m]; + *curr0 += m_curr0[n]*w[m]; + *curr1 += m_curr1[n]*w[m]; + *curr2 += m_curr2[n]*w[m]; + } + } + } + if (sumw>0.) { + *gap = *gap/sumw; + *curr0 = *curr0/sumw; + *curr1 = *curr1/sumw; + *curr2 = *curr2/sumw; + } + else { + // try to recover a non zero current by moving in the map + int jy=-1; + int jx=-1; + int idistm=100; + for (int iiy=iy-7;iiy<iy+8;iiy++) { + for (int iix=ix-7;iix<ix+8;iix++) { + if (iiy>=0 && iiy<m_ny && iix>=0 && iix<m_nx) { + if (m_curr0[iix+iiy*m_nx]>0) { + int idist=(iix-ix)*(iix-ix)+(iiy-iy)*(iiy-iy); + if(idist<idistm) { + idistm=idist; + jx=iix; + jy=iiy; + } + } + } + } + } + if (idistm<100 && jx>=0 && jy>=0) { + *gap = m_gap[jx+jy*m_nx]; + *curr0 = m_curr0[jx+jy*m_nx]; + *curr1 = m_curr1[jx+jy*m_nx]; + *curr2 = m_curr2[jx+jy*m_nx]; + } else { + *gap=0; + *curr0=0; + *curr1=0; + *curr2=0; + } + } + } + else { + // on the edges of the map, no linear interpolation + int n=ix+iy*m_nx; + if (m_curr0[n]<1e-6 && (ix+1) <m_nx) n=ix+1 +iy*m_nx; + if (m_curr0[n]<1e-6 && (ix-1) >0 ) n=ix-1 +iy*m_nx; + if (m_curr0[n]<1e-6 && (iy+1) <m_ny) n=ix+(iy+1)*m_nx; + if (m_curr0[n]<1e-6 && (iy-1) <0) n=ix+(iy-1)*m_nx; + if (m_curr0[n]<1e-6 && (ix+1) < m_nx && (iy+1) < m_ny) n=ix+1+(iy+1)*m_nx; + if (m_curr0[n]<1e-6 && (ix-1) >0 && (iy+1) < m_ny) n=ix-1+(iy+1)*m_nx; + if (m_curr0[n]<1e-6 && (ix+1) < m_nx && (iy-1) >0 ) n=ix+1+(iy-1)*m_nx; + if (m_curr0[n]<1e-6 && (ix-1) >0 && (iy-1) >0 ) n=ix-1+(iy-1)*m_nx; + *gap = m_gap[n]; + *curr0 = m_curr0[n]; + *curr1 = m_curr1[n]; + *curr2 = m_curr2[n]; + } } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/CurrMap.h b/LArCalorimeter/LArG4/LArG4Barrel/src/CurrMap.h new file mode 100644 index 0000000000000000000000000000000000000000..bdaafd4ca24cf8835e4cf252e613821ec701fb61 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/CurrMap.h @@ -0,0 +1,37 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4BARREL_CurrMap_h +#define LARG4BARREL_CurrMap_h + +#include <string> + +class CurrMap { + public: + CurrMap(std::string filename, double xnorm); + ~CurrMap(); + int GetNx() const { return m_nx;} + float GetXmin() const { return m_xmin;} + float GetXmax() const { return m_xmax;} + float GetDx() const { return m_dx;} + int GetNy() const { return m_ny;} + float GetYmin() const { return m_ymin;} + float GetYmax() const { return m_ymax;} + float GetDy() const { return m_dy;} + float GetGap(int ix,int iy) const {return m_gap[iy*m_nx+ix];} + float GetCurr0(int ix,int iy) const {return m_curr0[iy*m_nx+ix];} + float GetCurr1(int ix,int iy) const {return m_curr1[iy*m_nx+ix];} + float GetCurr2(int ix,int iy) const {return m_curr2[iy*m_nx+ix];} + void GetAll(double x, double y, double* gap, double* curr0,double* curr1,double* curr2) const; + private: + CurrMap(const CurrMap&);//coverity issue fix. Declared, but not implemented + CurrMap& operator=(const CurrMap&);//coverity issue fix. Declared, but not implemented + int m_nx,m_ny; + float m_xmin,m_xmax,m_dx,m_ymin,m_ymax,m_dy; + float *m_gap,*m_curr0,*m_curr1,*m_curr2; + float m_norm; + +}; + +#endif // LARG4BARREL_CurrMap_h diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/DMCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/DMCalibrationCalculator.cc index 7b82eb0b5f809bc6c64426b8c767817d2a4479d5..121232716fc28da343d2a91fdc22f327bad3ab68 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/DMCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/DMCalibrationCalculator.cc @@ -3,17 +3,16 @@ */ // LArG4::DM:CalibrationCalculator -// Prepared 11-apr-2006 G.Unal +// Prepared 11-apr-2006 G.Unal // This class calculates the values needed for calibration hits in the // simulation for steps in the Dead Matter between Barrel and End-Cap cryostats // #define DEBUG_HITS -#include "LArG4Barrel/DMCalibrationCalculator.h" +#include "DMCalibrationCalculator.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/VCalibrationCalculator.h" #include "G4Step.hh" #include "G4StepPoint.hh" @@ -30,133 +29,132 @@ namespace LArG4 { namespace DM { - /////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////// // Methods /////////////////////////////////////////////////////////// - CalibrationCalculator::CalibrationCalculator() + CalibrationCalculator::CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name,pSvcLocator) { } - CalibrationCalculator::~CalibrationCalculator() + CalibrationCalculator::~CalibrationCalculator() { } - - G4bool CalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) + G4bool CalibrationCalculator::Process(const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process) const { // Use the calculators to determine the energies and the // identifier associated with this G4Step. Note that the // default is to process both the energy and the ID. - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } + if ( process == kEnergyAndID || process == kOnlyEnergy ) + { + m_energyCalculator.Energies( step, energies ); + } else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); - m_identifier.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { -// Calculate the identifier. + identifier.clear(); + if ( process == kEnergyAndID || process == kOnlyID ) + { + // Calculate the identifier. -// static ? - static const double oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. - static const double oneOverDphi = 32./M_PI; // 1/Dphi + // static ? + static const double oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. + static const double oneOverDphi = 32./M_PI; // 1/Dphi -// Calculate the mid-point of the step, and the simple geometry variables. + // Calculate the mid-point of the step, and the simple geometry variables. - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - G4StepPoint* post_step_point = a_step->GetPostStepPoint(); + G4StepPoint* pre_step_point = step->GetPreStepPoint(); + G4StepPoint* post_step_point = step->GetPostStepPoint(); - G4ThreeVector startPoint = pre_step_point->GetPosition(); - G4ThreeVector endPoint = post_step_point->GetPosition(); - G4ThreeVector p = (startPoint + endPoint) * 0.5; + G4ThreeVector startPoint = pre_step_point->GetPosition(); + G4ThreeVector endPoint = post_step_point->GetPosition(); + G4ThreeVector p = (startPoint + endPoint) * 0.5; - //G4double rho = p.perp(); - G4double eta = fabs( p.pseudoRapidity() ); - G4double phi = p.phi(); - if ( phi < 0. ) phi += 2.*M_PI; // Normalize for phiBin calculation + //G4double rho = p.perp(); + G4double eta = fabs( p.pseudoRapidity() ); + G4double phi = p.phi(); + if ( phi < 0. ) phi += 2.*M_PI; // Normalize for phiBin calculation #ifdef DEBUG_HITS - std::cout << " DMCalibrationCalculator rho,eta,phi " << p.perp() << " " << eta << " " << phi << std::endl; + ATH_MSG_DEBUG("Process: rho,eta,phi " << p.perp() << " " << eta << " " << phi); #endif - // subdet = +/-4 "+" or " -" according to sign of Z in World coorinate - G4int subdet = ( p.z() > 0.) ? 4 : -4; - G4int phiBin = (int) ( phi * oneOverDphi ); + // subdet = +/-4 "+" or " -" according to sign of Z in World coorinate + G4int subdet = ( p.z() > 0.) ? 4 : -4; + G4int phiBin = (int) ( phi * oneOverDphi ); if (phiBin>63) phiBin=63; G4int type = 1; - // Initialize identifier variables with (invalid) default - // values (INT_MIN is defined in <climits>). - G4int sampling = INT_MIN; - G4int region = INT_MIN; - G4int etaBin = INT_MIN; + // Initialize identifier variables with (invalid) default + // values (INT_MIN is defined in <climits>). + G4int sampling = INT_MIN; + G4int region = INT_MIN; + G4int etaBin = INT_MIN; if (eta < 1.0) { - sampling = 2; - region = 1; - etaBin = (int) ( eta * oneOverDeta ); + sampling = 2; + region = 1; + etaBin = (int) ( eta * oneOverDeta ); } else if (eta < 1.5) { - sampling = 2; - region = 2; - etaBin = (int) ( (eta-1.) * oneOverDeta ); + sampling = 2; + region = 2; + etaBin = (int) ( (eta-1.) * oneOverDeta ); } else if (eta < 1.6) { - sampling = 1; - region = 4; - etaBin = 0; + sampling = 1; + region = 4; + etaBin = 0; } else if (eta < 1.8) { - sampling = 1; - region = 5; - etaBin = (int) ( (eta-1.5) * oneOverDeta ); + sampling = 1; + region = 5; + etaBin = (int) ( (eta-1.5) * oneOverDeta ); } else if (eta < 3.2) { - sampling = 1; - region = 6; - etaBin = (int) ( (eta-1.3) * oneOverDeta ); + sampling = 1; + region = 6; + etaBin = (int) ( (eta-1.3) * oneOverDeta ); } else { - std::cout << " DM::CalibrationCalculator hit above 3.2 in eta !!! " << std::endl; - return false; + ATH_MSG_WARNING("hit above 3.2 in eta !!!"); + return false; } -// Append the cell ID to the (empty) identifier. - m_identifier << 10 // Calorimeter - << subdet // LAr +/-4 where "+" or " -" according to - // the sign of Z in World coorinate - << type - << sampling - << region - << etaBin - << phiBin; + // Append the cell ID to the (empty) identifier. + identifier << 10 // Calorimeter + << subdet // LAr +/-4 where "+" or " -" according to + // the sign of Z in World coorinate + << type + << sampling + << region + << etaBin + << phiBin; + + } - } - #ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); - std::cout << "LArG4::DM::CalibrationCalculator::Process" - << " ID=" << std::string(m_identifier) - << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + G4double energy = accumulate(energies.begin(),energies.end(),0.); + ATH_MSG_DEBUG("Process:" + << " ID=" << std::string(identifier) + << " energy=" << energy + << " energies=(" << energies[0] + << "," << energies[1] + << "," << energies[2] + << "," << energies[3] << ")"); #endif // Check for bad result. - if ( m_identifier == LArG4Identifier() ) - return false; + if ( identifier == LArG4Identifier() ) + return false; return true; } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/DMCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4Barrel/src/DMCalibrationCalculator.h similarity index 67% rename from LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/DMCalibrationCalculator.h rename to LArCalorimeter/LArG4/LArG4Barrel/src/DMCalibrationCalculator.h index 32d33885be32ac6825de908093400df9195db65e..69d6e40dc4128485b997c5d0a1a1c9ddb85014a4 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/DMCalibrationCalculator.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/DMCalibrationCalculator.h @@ -11,7 +11,7 @@ #ifndef LArG4_DM_CalibrationCalculator_H #define LArG4_DM_CalibrationCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" @@ -31,12 +31,12 @@ namespace LArG4 { namespace DM { - class CalibrationCalculator : public VCalibrationCalculator { + class CalibrationCalculator : public LArCalibCalculatorSvcImp { public: - - CalibrationCalculator(); + + CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator); virtual ~CalibrationCalculator(); - + // The Process method returns a boolean value. If it's true, the // hit can be used by Geant4; if it's false, there's something wrong // with the energy deposit and it should be ignored. @@ -47,23 +47,11 @@ namespace LArG4 { // escaped energy), or only the energy (no known application // yet, but you can never tell). Use the enum (defined in // VCalibrationCalculator.h) to control any special processing. - - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process = kEnergyAndID) const override final; private: - - // The values calculated by Process(). - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; - // Energy calculator CaloG4::SimulationEnergies m_energyCalculator; diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalculator.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalculator.cc index e417dccfe4bde2edcd96d8eca4ab115911846fb0..b1bbebbe16d0ce5f23d3595e674fbc1574250961 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalculator.cc @@ -2,7 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ - // The Cell Identifier for the EM Barrel readout cells // Adapted from code written by Gaston Parrour @@ -13,14 +12,14 @@ // #define DEBUGSTEP // #define DEBUGSTEP2 -#include "LArG4Barrel/LArBarrelCalculator.h" -#include "LArG4Barrel/AccMap.h" -#include "LArG4Barrel/MapEta.h" +#include "LArBarrelCalculator.h" +#include "AccMap.h" +#include "MapEta.h" -#include "LArG4Code/LArVG4DetectorParameters.h" #include "LArG4Code/LArG4BirksLaw.h" +#include "LArG4Code/LArVG4DetectorParameters.h" -#include "LArG4RunControl/LArG4BarrelOptions.h" +//#include "LArG4RunControl/LArG4BarrelOptions.h" #include "G4ThreeVector.hh" #include "G4StepPoint.hh" @@ -49,248 +48,224 @@ namespace Units = Athena::Units; - -LArBarrelCalculator* LArBarrelCalculator::m_instance = 0; - -// ============================================================================== -LArBarrelCalculator* LArBarrelCalculator::GetCalculator() -{ - if (m_instance == 0) m_instance = new LArBarrelCalculator(); - return m_instance; -} - // ================================================================================ -LArBarrelCalculator::LArBarrelCalculator() - : m_IflCur(true) - , m_IflMapTrans(true) - , m_IflXtalk(true) - , m_dstep(.2*CLHEP::mm) - , m_birksLaw(NULL) - , m_doHV(false) - , m_detectorName("LArMgr") - , m_nhits(0) +LArBarrelCalculator::LArBarrelCalculator(const std::string& name, ISvcLocator* pSvcLocator) + : LArCalculatorSvcImp(name, pSvcLocator) + , m_geometry(nullptr) + , m_accmap(nullptr) + , m_IflCur(true) + , m_IflMapTrans(true) + , m_IflXtalk(true) + , m_dstep(.2*CLHEP::mm) + , m_birksLaw(nullptr) + , m_doHV(false) + , m_detectorName("LArMgr") + , m_testbeam(false) { - std::cout << "LArBarrelCalculator: Beginning initialisation " << std::endl; + ATH_MSG_DEBUG("LArBarrelCalculator: Beginning construction "); // define RUN conditions for the Barrel + declareProperty("EMBCurr",m_IflCur); + declareProperty("EMBEtaTrans",m_IflMapTrans); + declareProperty("EMBXtalk",m_IflXtalk); + declareProperty("EMBdstep", m_dstep); + declareProperty("EMBHVEnable",m_doHV); + declareProperty("DetectorName",m_detectorName); +} - ISvcLocator *svcLocator = Gaudi::svcLocator(); - StoreGateSvc *detStore; - LArG4BarrelOptions *barrelOptions; - - StatusCode status = svcLocator->service("DetectorStore", detStore); - - if(status.isFailure()) - std::cout << "LArBarrelCalculator::LArBarrelCalculator() unable to get Detector Store! Using default values.\n"; - else { - status = detStore->retrieve(barrelOptions, "LArG4BarrelOptions"); - - if(status.isFailure()) - std::cout << "LArBarrelCalculator::LArBarrelCalculator() unable to get LArG4BarrelOptions! Using default values.\n"; - else { - m_IflCur = barrelOptions->EMBCurr(); - m_IflMapTrans = barrelOptions->EMBEtaTrans(); - m_IflXtalk = barrelOptions->EMBXtalk(); - - m_dstep = barrelOptions->EMBdstep(); - - bool IflBirks = barrelOptions->EMBBirksLaw(); - if (IflBirks) { - const double Birks_LAr_density = 1.396; - const double Birks_k = barrelOptions->EMBBirksk(); - m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,Birks_k); - } - m_doHV=barrelOptions->EMBHVEnable(); - } +StatusCode LArBarrelCalculator::initialize() +{ + ATH_MSG_DEBUG("LArBarrelCalculator: Beginning initialization "); + if (m_BirksLaw) { + const double Birks_LAr_density = 1.396; + m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,m_Birksk); } - m_identifier2 = LArG4Identifier(); - m_identifier_xt1 = LArG4Identifier(); - m_identifier_xt2 = LArG4Identifier(); - -// Access source of detector parameters. - m_parameters = LArVG4DetectorParameters::GetInstance(); + // Access source of detector parameters. + LArVG4DetectorParameters* m_parameters = LArVG4DetectorParameters::GetInstance(); -// Get the out-of-time cut from the detector parameters routine. - m_OOTcut = m_parameters->GetValue("LArExpHallOutOfTimeCut"); - std::cout << "**** OutOfTime cut " << m_OOTcut << std::endl; + // Get the out-of-time cut from the detector parameters routine. + m_OOTcut = m_parameters->GetValue("LArExpHallOutOfTimeCut"); //FIXME should be done via configurables + ATH_MSG_DEBUG("**** OutOfTime cut " << m_OOTcut); -// Main Barrel parameters -// All the UNITS are implicitly the GEANT4 ONES e.g. mm, rad, etc ... + // Main Barrel parameters + // All the UNITS are implicitly the GEANT4 ONES e.g. mm, rad, etc ... m_etaMaxBarrel = m_parameters->GetValue("LArEMBMaxEtaAcceptance"); m_zMinBarrel = m_parameters->GetValue("LArEMBfiducialMothZmin"); m_zMaxBarrel = m_parameters->GetValue("LArEMBfiducialMothZmax"); m_NCellMax = (int) (m_parameters->GetValue("LArEMBnoOFPhysPhiCell")); m_rMinAccordion = m_parameters->GetValue("LArEMBRadiusInnerAccordion"); - m_rMaxAccordion = m_parameters->GetValue("LArEMBFiducialRmax"); + m_rMaxAccordion = m_parameters->GetValue("LArEMBFiducialRmax"); -// absorbers and electrodes thickness + // absorbers and electrodes thickness m_ThickAbs = 0.5*( m_parameters->GetValue("LArEMBThickAbsGlue") - +m_parameters->GetValue("LArEMBThickAbsIron") - +m_parameters->GetValue("LArEMBThickAbsLead")); + +m_parameters->GetValue("LArEMBThickAbsIron") + +m_parameters->GetValue("LArEMBThickAbsLead")); G4double check = 0.5*( m_parameters->GetValue("LArEMBThinAbsGlue") - +m_parameters->GetValue("LArEMBThinAbsIron") - +m_parameters->GetValue("LArEMBThinAbsLead")); + +m_parameters->GetValue("LArEMBThinAbsIron") + +m_parameters->GetValue("LArEMBThinAbsLead")); - if (fabs(check-m_ThickAbs)>0.001) { - std::cout << " LArBarrelCalculator: WARNING THin and Thick Abs have difference thickness !" << std::endl; - } + if (fabs(check-m_ThickAbs)>0.001) + { + ATH_MSG_WARNING("Thin and Thick Abs have difference thickness!"); + } m_ThickEle= 0.5*( m_parameters->GetValue("LArEMBThickElecCopper") - +m_parameters->GetValue("LArEMBThickElecKapton")); + +m_parameters->GetValue("LArEMBThickElecKapton")); -// === GU 11/06/2003 total number of cells in phi -// to distinguish 1 module (testbeam case) from full Atlas - m_testbeam=false; + // === GU 11/06/2003 total number of cells in phi + // to distinguish 1 module (testbeam case) from full Atlas m_NCellTot = (int) (m_parameters->GetValue("LArEMBnoOFPhysPhiCell")); - if (m_NCellTot != 1024) { - m_NCellMax=1024; - m_testbeam=true; - } -// === -// access geometry computation class - m_geometry = LArG4::Barrel::Geometry::GetInstance(); - -// access current maps if required - if (m_IflCur) - std::cout << " LArBarrelCalculator: start reading of current maps" << std::endl; - if (m_IflCur) m_accmap = AccMap::GetAccMap(); - else m_accmap = 0; - if (m_IflCur) { - m_etamap1 = CxxUtils::make_unique<MapEta>(1); - m_etamap2 = CxxUtils::make_unique<MapEta>(2); - if (m_IflMapTrans) m_etamap3 = CxxUtils::make_unique<MapEta>(3); - } - if (m_IflCur) - std::cout << " LArBarrelCalculator: end of reading current maps" << std::endl; - -// Initialize HV values - InitHV(); - - std::cout << " LArBarrelCalculator: m_NCellMax " << m_NCellMax << std::endl; - std::cout << " LArBarrelCalculator: m_NCellTot " << m_NCellTot << std::endl; - std::cout << " LArBarrelCalculator: m_rMinAccordion " << m_rMinAccordion << std::endl; - std::cout << " LArBarrelCalculator: m_rMaxAccordion " << m_rMaxAccordion << std::endl; - std::cout << " LArBarrelCalculator: m_zMinBarrel " << m_zMinBarrel << std::endl; - std::cout << " LArBarrelCalculator: m_zMaxBarrel " << m_zMaxBarrel << std::endl; - std::cout << " LArBarrelCalculator: m_etaMaxBarrel " << m_etaMaxBarrel << std::endl; - std::cout << " LArBarrelCalculator: m_ThickAbs " << m_ThickAbs << std::endl; - std::cout << " LArBarrelCalculator: m_ThickEle " << m_ThickEle << std::endl; - if(m_IflCur) std::cout <<" LArBarrelCalculator: Deposited Energy dE/dX Corrected ==> CURRENT Option ON"<<std::endl; - else std::cout << " LArBarrelCalculator: Crude Deposited Energy dE/dX NO CURRENT option"<< std::endl; - if (m_IflCur && m_IflMapTrans) std::cout<<" LArBarrelCalculator: Compute effect of E field around eta=0.8 " << std::endl; - else std::cout <<" LArBarrelCalculator: Ignore effect of E field around eta=0.8 " << std::endl; - if(m_birksLaw) { - std::cout << " LArBarrelCalculator: Birks' law ON " << std::endl; - std::cout << " LArBarrelCalculator: parameter k " << m_birksLaw->k() << std::endl; - } - else - std::cout << " LArBarrelCalculator: Birks' law OFF" << std::endl; + if (m_NCellTot != 1024) + { + m_NCellMax=1024; + m_testbeam=true; + } + // === + // access geometry computation class + m_geometry = LArG4::Barrel::Geometry::GetInstance(); + + // access current maps if required + if (m_IflCur) + { + ATH_MSG_DEBUG(" LArBarrelCalculator: start reading of current maps"); + m_accmap = AccMap::GetAccMap(); + m_etamap1 = CxxUtils::make_unique<MapEta>(1); + m_etamap2 = CxxUtils::make_unique<MapEta>(2); + if (m_IflMapTrans) m_etamap3 = CxxUtils::make_unique<MapEta>(3); + ATH_MSG_DEBUG(" LArBarrelCalculator: end of reading current maps"); + } + // Initialize HV values + this->InitHV(); + + ATH_MSG_DEBUG(" LArBarrelCalculator: s_NCellMax " << m_NCellMax); + ATH_MSG_DEBUG(" LArBarrelCalculator: s_NCellTot " << m_NCellTot); + ATH_MSG_DEBUG(" LArBarrelCalculator: s_rMinAccordion " << m_rMinAccordion); + ATH_MSG_DEBUG(" LArBarrelCalculator: s_rMaxAccordion " << m_rMaxAccordion); + ATH_MSG_DEBUG(" LArBarrelCalculator: s_zMinBarrel " << m_zMinBarrel); + ATH_MSG_DEBUG(" LArBarrelCalculator: s_zMaxBarrel " << m_zMaxBarrel); + ATH_MSG_DEBUG(" LArBarrelCalculator: s_etaMaxBarrel " << m_etaMaxBarrel); + ATH_MSG_DEBUG(" LArBarrelCalculator: s_ThickAbs " << m_ThickAbs); + ATH_MSG_DEBUG(" LArBarrelCalculator: s_ThickEle " << m_ThickEle); + if(m_IflCur) ATH_MSG_DEBUG(" LArBarrelCalculator: Deposited Energy dE/dX Corrected ==> CURRENT Option ON"); + else ATH_MSG_DEBUG(" LArBarrelCalculator: Crude Deposited Energy dE/dX NO CURRENT option"); + if (m_IflCur && m_IflMapTrans) ATH_MSG_DEBUG(" LArBarrelCalculator: Compute effect of E field around eta=0.8 "); + else ATH_MSG_DEBUG(" LArBarrelCalculator: Ignore effect of E field around eta=0.8 "); + if(m_BirksLaw) + { + ATH_MSG_DEBUG(" LArBarrelCalculator: Birks' law ON "); + ATH_MSG_DEBUG(" LArBarrelCalculator: parameter k " << m_birksLaw->k()); + } + else + { + ATH_MSG_DEBUG(" LArBarrelCalculator: Birks' law OFF"); + } + return StatusCode::SUCCESS; } // ============================================================================ -LArBarrelCalculator::~LArBarrelCalculator() +StatusCode LArBarrelCalculator::finalize() { - if (m_birksLaw) delete m_birksLaw; + if (m_BirksLaw) delete m_birksLaw; + return StatusCode::SUCCESS; } // ============================================================================= -G4bool LArBarrelCalculator::Process(const G4Step* step, std::vector<LArHitData>& hdata) +G4bool LArBarrelCalculator::Process(const G4Step* step, std::vector<LArHitData>& hdata) const { - m_nhits = 0; - //m_identifier.clear(); - //m_energy.clear(); - //m_time.clear(); hdata.clear(); - m_isInTime.clear(); -// check the Step content is non trivial + LArG4Identifier identifier2; + LArG4Identifier identifier_xt1; + LArG4Identifier identifier_xt2; + + // check the Step content is non trivial G4double thisStepEnergyDeposit = step->GetTotalEnergyDeposit(); G4double thisStepLength = step->GetStepLength() / Units::mm; #ifdef DEBUGSTEP - std::cout << "****** LArBarrelCalculator: Step energy,length " - << thisStepEnergyDeposit << " " << thisStepLength << std::endl; + ATH_MSG_DEBUG("****** LArBarrelCalculator: Step energy,length " + << thisStepEnergyDeposit << " " << thisStepLength); #endif - if(thisStepEnergyDeposit <= 0. || thisStepLength <= 0.) - { + if(thisStepEnergyDeposit <= 0. || thisStepLength <= 0.) + { #ifdef DEBUGSTEP2 - std::cout << " Invalid hit trivial content" << std::endl; + ATH_MSG_DEBUG(" Invalid hit trivial content"); #endif - return false; - } + return false; + } -// Get Step geometrical parameters (first and end) + // Get Step geometrical parameters (first and end) G4StepPoint *thisStepPoint = step->GetPreStepPoint(); G4StepPoint *thisStepBackPoint = step->GetPostStepPoint(); G4ThreeVector startPoint = thisStepPoint->GetPosition(); G4ThreeVector endPoint = thisStepBackPoint->GetPosition(); #ifdef DEBUGSTEP - std::cout << " Beginning step position " - << startPoint.x() << " " << startPoint.y() << " " << startPoint.z() << std::endl; + ATH_MSG_DEBUG(" Beginning step position " + << startPoint.x() << " " << startPoint.y() << " " << startPoint.z()); #endif -// find zside from volume name + // find zside from volume name G4int zSide = 1; if (!m_testbeam) { - const G4NavigationHistory* g4navigation = thisStepPoint->GetTouchable()->GetHistory(); - G4int ndep = g4navigation->GetDepth(); - for (G4int ii=0;ii<=ndep;ii++) { - G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); - G4String vname = v1->GetName(); - if ( vname.find("NegPhysical") != std::string::npos) zSide=-1; - } + const G4NavigationHistory* g4navigation = thisStepPoint->GetTouchable()->GetHistory(); + G4int ndep = g4navigation->GetDepth(); + for (G4int ii=0;ii<=ndep;ii++) { + G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); + G4String vname = v1->GetName(); + if ( vname.find("NegPhysical") != std::string::npos) zSide=-1; + } } -// BACK directly into the LOCAL half_Barrel Z > 0. PART (mother "stac_phys1") + // BACK directly into the LOCAL half_Barrel Z > 0. PART (mother "stac_phys1") const G4AffineTransform transformation = - thisStepPoint->GetTouchable()->GetHistory()->GetTopTransform(); + thisStepPoint->GetTouchable()->GetHistory()->GetTopTransform(); G4ThreeVector startPointinLocal = - transformation.TransformPoint(startPoint); + transformation.TransformPoint(startPoint); G4ThreeVector endPointinLocal = - transformation.TransformPoint (endPoint); + transformation.TransformPoint (endPoint); #ifdef DEBUGSTEP - std::cout << " Local beginning step position " - << startPointinLocal.x() << " " << startPointinLocal.y() << " " - << startPointinLocal.z() << std::endl; - std::cout << " Local end step position " - << endPointinLocal.x() << " " << endPointinLocal.y() << " " - << endPointinLocal.z() << std::endl; -#endif + ATH_MSG_DEBUG(" Local beginning step position " + << startPointinLocal.x() << " " << startPointinLocal.y() << " " + << startPointinLocal.z()); + ATH_MSG_DEBUG(" Local end step position " + << endPointinLocal.x() << " " << endPointinLocal.y() << " " + << endPointinLocal.z()); +#endif G4double energy = step->GetTotalEnergyDeposit(); // Despite the name, this is only ionization. - - if (m_birksLaw) { - const double EField = 10.; // kV/cm, assume constant for now - const double wholeStepLengthCm = step->GetStepLength() / Units::cm; - energy = (*m_birksLaw)(energy, wholeStepLengthCm, EField); + + if (m_BirksLaw) { + const double EField = 10.; // kV/cm, assume constant for now + const double wholeStepLengthCm = step->GetStepLength() / CLHEP::cm; + energy = (*m_birksLaw)(energy, wholeStepLengthCm, EField); } -// compute number of sub steps -// = 1 if no charge collection -// otherwise 200 microns (dstep) division + // compute number of sub steps + // = 1 if no charge collection + // otherwise 200 microns (dstep) division G4int nsub_step=1; if (m_IflCur) nsub_step=(int) (thisStepLength/m_dstep) + 1; -// delta is fraction of step between two sub steps + // delta is fraction of step between two sub steps G4double delta=1./((double) nsub_step); #ifdef DEBUGSTEP - std::cout << " nsub_step,delta " << nsub_step << " " << delta << std::endl; + ATH_MSG_DEBUG(" nsub_step,delta " << nsub_step << " " << delta); #endif energy /= ((float) (nsub_step)); // Divide into substeps. -// loop over sub steps + // loop over sub steps for (G4int i=0;i<nsub_step;i++) { @@ -306,93 +281,95 @@ G4bool LArBarrelCalculator::Process(const G4Step* step, std::vector<LArHitData>& if(philoc<0.) philoc = philoc + 2.*M_PI; G4double radloc = sqrt( xloc*xloc + yloc*yloc ); #ifdef DEBUGSTEP - std::cout << " local position sub_step " - << xloc << " " << yloc << " " << zloc << std::endl; + ATH_MSG_DEBUG(" local position sub_step " + << xloc << " " << yloc << " " << zloc); #endif -// apply fiducial cuts + // apply fiducial cuts if (!FiducialCuts(radloc,zloc,etaloc)) { #ifdef DEBUGSTEP - std::cout << "LArBarrelCalculator: outside fiducial cuts" << std::endl; + ATH_MSG_DEBUG("LArBarrelCalculator: outside fiducial cuts"); #endif - continue; + continue; } - m_geometry->findCell(xloc,yloc,zloc,radloc,etaloc,philoc,m_IflCur,m_detectorName); + m_geometry->findCell(xloc,yloc,zloc,radloc,etaloc,philoc,m_IflCur,m_detectorName); if (m_geometry->cellID() == 0) - { + { #ifdef DEBUGSTEP - std::cout << "LArBarrelCalculator: Invalid hit CELLID == 0 "<<std::endl; - std::cout << "x,y,z local " << xloc << " " << yloc << " " << zloc << std::endl; - std::cout << "radius " << radloc <<" etaloc "<< etaloc << " philoc " << philoc <<std::endl; + ATH_MSG_DEBUG("LArBarrelCalculator: Invalid hit CELLID == 0 "); + ATH_MSG_DEBUG("x,y,z local " << xloc << " " << yloc << " " << zloc); + ATH_MSG_DEBUG("radius " << radloc <<" etaloc "<< etaloc << " philoc " << philoc); #endif - continue; - } + continue; + } G4int region = m_geometry->region(); G4int etaBin = m_geometry->etaBin(); G4int phiBin = m_geometry->phiBin(); G4int sampling = m_geometry->sampling(); if( zSide == -1 ) - { -// following code for an Y-axis rotation to define Z < 0. Barrel part - if( sampling == 1 && region ==0 ) - { - phiBin = 31 - phiBin; - if(phiBin < 0 ) phiBin += 64; - } - if( sampling == 1 && region ==1 ) { - phiBin = 127 - phiBin; - if(phiBin < 0 ) phiBin += 256; - } - if( sampling >= 2 ) - { - phiBin = 127 - phiBin; - if(phiBin < 0 ) phiBin += 256; + // following code for an Y-axis rotation to define Z < 0. Barrel part + if( sampling == 1 && region ==0 ) + { + phiBin = 31 - phiBin; + if(phiBin < 0 ) phiBin += 64; + } + if( sampling == 1 && region ==1 ) + { + phiBin = 127 - phiBin; + if(phiBin < 0 ) phiBin += 256; + } + if( sampling >= 2 ) + { + phiBin = 127 - phiBin; + if(phiBin < 0 ) phiBin += 256; + } } - } #ifdef DEBUGSTEP - std::cout << " region,side,sampling,eta,phi " << region << " " << zSide << " " - << sampling << " " << etaBin << " " << phiBin << std::endl; - std::cout << " distance to electrode,abs " << m_geometry->distElec() << " " - << m_geometry->distAbs() << std::endl; - std::cout << " local coordinates " << m_geometry->x0() << " " << m_geometry->y0() << std::endl; + ATH_MSG_DEBUG(" region,side,sampling,eta,phi " << region << " " << zSide << " " + << sampling << " " << etaBin << " " << phiBin); + ATH_MSG_DEBUG(" distance to electrode,abs " << m_geometry->distElec() << " " + << m_geometry->distAbs()); + ATH_MSG_DEBUG(" local coordinates " << m_geometry->x0() << " " << m_geometry->y0()); #endif if (std::fabs(m_geometry->distElec())< m_ThickEle || std::fabs(m_geometry->distAbs()) < m_ThickAbs) { #ifdef DEBUGSTEP - std::cout << " hit in absorber or electrode radius:" << radloc << std::endl; + ATH_MSG_DEBUG(" hit in absorber or electrode radius:" << radloc); #endif continue; } - m_identifier2.clear(); - m_identifier2 << 4 // LArCalorimeter - << 1 // LArEM - << zSide - << sampling - << region - << etaBin - << phiBin; - -// time computation is not necessarily correct for test beam - G4double time; - if (m_testbeam) - { - time=0.; - } - else - { - G4double tof; - tof = thisStepPoint->GetGlobalTime() / Units::ns; - time = tof - ( thisStepPoint->GetPosition().mag()/Units::c_light ) / Units::ns; - } - + identifier2.clear(); + identifier2 << 4 // LArCalorimeter + << 1 // LArEM + << zSide + << sampling + << region + << etaBin + << phiBin; + + // time computation is not necessarily correct for test beam + // G4double time; + // if (m_testbeam) + // { + // time=0.; + // } + // else + // { + // const G4double tof = thisStepPoint->GetGlobalTime() / Units::ns; + // time = tof - ( thisStepPoint->GetPosition().mag()/CLHEP::c_light ) / Units::ns; + // } + + const G4double time = (m_testbeam)? 0.0 : + ( thisStepPoint->GetGlobalTime() - ( thisStepPoint->GetPosition().mag()/CLHEP::c_light ) ) / Units::ns; + #ifdef DEBUGSTEP - std::cout << " Energy for sub step " << energy << std::endl; + ATH_MSG_DEBUG(" Energy for sub step " << energy); #endif G4double Current; @@ -400,249 +377,243 @@ G4bool LArBarrelCalculator::Process(const G4Step* step, std::vector<LArHitData>& Current_xt1=0; Current_xt2=0; if (!m_IflCur) { -// no charge collection Current=E from Geant - Current=energy; + // no charge collection Current=E from Geant + Current=energy; } else { -// full charge collection - G4double xmap,ymap; - G4int nfold = m_geometry->nfold(); - G4double x0=m_geometry->x0(); - G4double y0=m_geometry->y0(); - if (x0<1500 || x0>1960 || y0>30 || y0<-30) { - std::cout << "weird x0,y0 " << x0 << " " << y0 << std::endl; - } + // full charge collection + G4double xmap,ymap; + G4int nfold = m_geometry->nfold(); + G4double x0=m_geometry->x0(); + G4double y0=m_geometry->y0(); + if (x0<1500 || x0>1960 || y0>30 || y0<-30) { + ATH_MSG_INFO("weird x0,y0 " << x0 << " " << y0); + } #ifdef DEBUGSTEP - G4double rr = sqrt(x0*x0+y0*y0); - std::cout << " radius,rad0 " << radloc << " " << rr << std::endl; + G4double rr = sqrt(x0*x0+y0*y0); + ATH_MSG_DEBUG(" radius,rad0 " << radloc << " " << rr); #endif - bool UseFold=false; -// Are we close to a fold ? (fold 0 has some pathology) - if ((x0 > m_accmap->GetXmin(nfold) || nfold==0) && - x0 < m_accmap->GetXmax(nfold) && - y0 > m_accmap->GetYmin(nfold) && - y0 < m_accmap->GetYmax(nfold) && - (nfold != 13 || x0 < 1957.5) && - (nfold>0 || x0 < 1504.6) ) { - xmap=x0; - ymap=y0; + bool UseFold=false; + // Are we close to a fold ? (fold 0 has some pathology) + if ((x0 > m_accmap->GetXmin(nfold) || nfold==0) && + x0 < m_accmap->GetXmax(nfold) && + y0 > m_accmap->GetYmin(nfold) && + y0 < m_accmap->GetYmax(nfold) && + (nfold != 13 || x0 < 1957.5) && + (nfold>0 || x0 < 1504.6) ) { + xmap=x0; + ymap=y0; #ifdef DEBUGSTEP - std::cout << " Map for fold xmap,ymap " << nfold << " " << xmap << " " << ymap << std::endl; + ATH_MSG_DEBUG(" Map for fold xmap,ymap " << nfold << " " << xmap << " " << ymap); #endif - UseFold=true; - G4int sampMap = m_geometry->sampMap(); - G4int etaMap = m_geometry->etaMap(); - m_accmap->SetMap(nfold,region,sampMap,etaMap); -// catch problem to find map - if (!m_accmap->Map()) { - std::cout << " Problem to access map fold = " << nfold << std::endl; - std::cout << " region,sampling,eta,fold " << region << " " << sampMap << " " - << etaMap << " " << nfold << std::endl; - return false; - } - } - else { - G4int n; - G4int nstraight = m_geometry->nstraight(); - if (nstraight%2==0) n=22; - else n=21; - m_accmap->SetMap(n,region,sampling,etaBin); -// catch problem to find map - if (!m_accmap->Map()) { - std::cout << " Problem to access map straight = " << nstraight << std::endl; - return false; - } - xmap = m_geometry->xl(); - ymap = m_geometry->distElec(); -// special case for first straight section, which is shorter - if (nstraight==0) xmap = 0.5*(xmap+1.); + UseFold=true; + G4int sampMap = m_geometry->sampMap(); + G4int etaMap = m_geometry->etaMap(); + m_accmap->SetMap(nfold,region,sampMap,etaMap); + // catch problem to find map + if (!m_accmap->Map()) { + ATH_MSG_WARNING(" Problem to access map fold = " << nfold); + ATH_MSG_WARNING(" region,sampling,eta,fold " << region << " " << sampMap << " " + << etaMap << " " << nfold); + return false; + } + } + else { + G4int n; + G4int nstraight = m_geometry->nstraight(); + if (nstraight%2==0) n=22; + else n=21; + m_accmap->SetMap(n,region,sampling,etaBin); + // catch problem to find map + if (!m_accmap->Map()) { + ATH_MSG_WARNING(" Problem to access map straight = " << nstraight); + return false; + } + xmap = m_geometry->xl(); + ymap = m_geometry->distElec(); + // special case for first straight section, which is shorter + if (nstraight==0) xmap = 0.5*(xmap+1.); #ifdef DEBUGSTEP - std::cout << " Map for straight xl,delec " << xmap << " " << ymap << std::endl; + ATH_MSG_DEBUG(" Map for straight xl,delec " << xmap << " " << ymap); #endif - } // fold or straight - double gap; - double current0,current1,current2; -// get current for elementary charge - m_accmap->Map()->GetAll(xmap,ymap,&gap,¤t0,¤t1,¤t2); - G4double gap2=std::fabs(m_geometry->distElec())+std::fabs(m_geometry->distAbs()) - -m_ThickEle-m_ThickAbs; - -// in which HV cell are we ? - int ipm,ielec,ieta,iside; - if (zSide==1) ipm=1; // A side - else ipm=0; // C side - ielec=m_geometry->phiGap(); - if (zSide==-1) { - ielec = 511 - ielec; - if(ielec < 0 ) ielec += 1024; - } - ieta=((int) (etaloc*(1./0.2))); - if (ieta>6) ieta=6; //part 1.4 to 1.475 is same HV as 1.2 to 1.4 - iside=0; // phi lower than electrode 0, 1 for phi higher than electrode - if ((m_geometry->distElec()>0 && zSide==1) - || (m_geometry->distElec()<0 && zSide==-1) ) iside=1; - -// HV extrapolation - double current; - double hv=m_hv[ipm][ielec][ieta][iside]; -// std::cout << " etaBin,phiBin " << etaBin << " " << phiBin << std::endl; -// std::cout << " ipm,ielec,ieta,iside " << ipm << " " << ielec << " " << ieta -// << " " << iside << std::endl; -// std::cout << " hv " << hv << std::endl; -// std::cout << " current0,current1,current2 " << current0 << " " << current1 -// << " " << current2 << std::endl; - if (hv>1995.) current=current0; - else if (hv>5.) current=ScaleHV(hv,current0,current1,current2); - else current=0.; -// std::cout << " current " << current << std::endl; - -// extrapolation for non nominal gap (allows to include sagging effect) -// i ~ (gap/gap2)**1.3 -// gap = nominal gap from current map -// gap2 = real gap from geometry -// dgap = gap/gap2 -1 -// at first order i ~ (1+1.3*dgap) - double dgap=0; - if (gap>1e-3 && gap2 >1e-3) dgap=gap/gap2-1; - current = current * (1. + 1.3*dgap); + } // fold or straight + double gap; + double current0,current1,current2; + // get current for elementary charge + m_accmap->Map()->GetAll(xmap,ymap,&gap,¤t0,¤t1,¤t2); + G4double gap2=std::fabs(m_geometry->distElec())+std::fabs(m_geometry->distAbs()) + -m_ThickEle-m_ThickAbs; + + // in which HV cell are we ? + int ipm,ielec,ieta,iside; + if (zSide==1) ipm=1; // A side + else ipm=0; // C side + ielec=m_geometry->phiGap(); + if (zSide==-1) { + ielec = 511 - ielec; + if(ielec < 0 ) ielec += 1024; + } + ieta=((int) (etaloc*(1./0.2))); + if (ieta>6) ieta=6; //part 1.4 to 1.475 is same HV as 1.2 to 1.4 + iside=0; // phi lower than electrode 0, 1 for phi higher than electrode + if ((m_geometry->distElec()>0 && zSide==1) + || (m_geometry->distElec()<0 && zSide==-1) ) iside=1; + + // HV extrapolation + double current; + double hv=m_hv[ipm][ielec][ieta][iside]; + // std::cout << " etaBin,phiBin " << etaBin << " " << phiBin << std::endl; + // std::cout << " ipm,ielec,ieta,iside " << ipm << " " << ielec << " " << ieta + // << " " << iside << std::endl; + // std::cout << " hv " << hv << std::endl; + // std::cout << " current0,current1,current2 " << current0 << " " << current1 + // << " " << current2 << std::endl; + if (hv>1995.) current=current0; + else if (hv>5.) current=ScaleHV(hv,current0,current1,current2); + else current=0.; + // std::cout << " current " << current << std::endl; + + // extrapolation for non nominal gap (allows to include sagging effect) + // i ~ (gap/gap2)**1.3 + // gap = nominal gap from current map + // gap2 = real gap from geometry + // dgap = gap/gap2 -1 + // at first order i ~ (1+1.3*dgap) + double dgap=0; + if (gap>1e-3 && gap2 >1e-3) dgap=gap/gap2-1; + current = current * (1. + 1.3*dgap); #ifdef DEBUGSTEP - std::cout << " elementary current " << current0 << std::endl; - std::cout << " Gap from Map/calculator " << gap << " " << gap2 << std::endl; + ATH_MSG_DEBUG(" elementary current " << current0); + ATH_MSG_DEBUG(" Gap from Map/calculator " << gap << " " << gap2); #endif - Current = energy*current; - -// check if pathology... - if (!UseFold && std::fabs(m_geometry->distElec())>2.1 && current0 < 0.1) { - std::cout << " xl,distEle " << m_geometry->xl() << " " - << m_geometry->distElec() - << " str number " << m_geometry->nstraight() - << " sampling,eta " << sampling << " " << etaBin << " " - << " current/E " << current0 << std::endl; - } - -// compute effect around transition at eta=0.8 from electric field -// read from map weighting factor ( E**1.3 = E*E**0.3) -// in x +-9mm around transition (assume symmetry around 0) -// in y distance from electrode in gap - bool InTrans=false; - //double Current_test=Current; - if (m_IflMapTrans) { - float etaTrans=0.8; - if (fabs(etaloc-etaTrans) < 0.025) { - double x=std::fabs(zloc-radloc*sinh(etaTrans))/cosh(etaTrans); - double y=std::fabs(m_geometry->distElec()); - if ( x < m_etamap3->Xmax() ) { - double resp; - m_etamap3->GetData0(x,y,&resp); - Current = Current*resp; - InTrans=true; - } - } // eta = 0.8 +- 0.025 - } // if m_IflMapTrans - -// simulate cross-talk effects and transitions in eta between cells -// (only in region 0, samplings 1 and 2) - - if (region==0) { - - double resp,xt0,xt1,xt2,deta; - if (sampling==1) { - deta=etaloc-0.003125*((double)etaBin+0.5); - m_etamap1->GetData(std::fabs(deta),std::fabs(m_geometry->distElec()), - &resp,&xt0,&xt1,&xt2); + Current = energy*current; + + // check if pathology... + if (!UseFold && std::fabs(m_geometry->distElec())>2.1 && current0 < 0.1) { + ATH_MSG_WARNING(" xl,distEle " << m_geometry->xl() << " " + << m_geometry->distElec() + << " str number " << m_geometry->nstraight() + << " sampling,eta " << sampling << " " << etaBin << " " + << " current/E " << current0); + } + + // compute effect around transition at eta=0.8 from electric field + // read from map weighting factor ( E**1.3 = E*E**0.3) + // in x +-9mm around transition (assume symmetry around 0) + // in y distance from electrode in gap + bool InTrans=false; + //double Current_test=Current; + if (m_IflMapTrans) { + float etaTrans=0.8; + if (fabs(etaloc-etaTrans) < 0.025) { + double x=std::fabs(zloc-radloc*sinh(etaTrans))/cosh(etaTrans); + double y=std::fabs(m_geometry->distElec()); + if ( x < m_etamap3->Xmax() ) { + double resp; + m_etamap3->GetData0(x,y,&resp); + Current = Current*resp; + InTrans=true; + } + } // eta = 0.8 +- 0.025 + } // if m_IflMapTrans + + // simulate cross-talk effects and transitions in eta between cells + // (only in region 0, samplings 1 and 2) + + if (region==0) { + + double resp,xt0,xt1,xt2,deta; + if (sampling==1) { + deta=etaloc-0.003125*((double)etaBin+0.5); + m_etamap1->GetData(std::fabs(deta),std::fabs(m_geometry->distElec()), + &resp,&xt0,&xt1,&xt2); #ifdef DEBUGSTEP - std::cout << "hit in strip etaloc,etaBin,deta,delec,resp,xt0,xt1,xt2 " - << etaloc << " " << etaBin << " " << deta*1000 << " " << m_geometry->distElec() - << " " << resp << " " << xt0 << " " << xt1 << " " << xt2 << std::endl; + ATH_MSG_DEBUG("hit in strip etaloc,etaBin,deta,delec,resp,xt0,xt1,xt2 " + << etaloc << " " << etaBin << " " << deta*1000 << " " << m_geometry->distElec() + << " " << resp << " " << xt0 << " " << xt1 << " " << xt2); #endif - if (!InTrans) Current = Current*resp; - if (m_IflXtalk && etaBin > 1 && etaBin < 446) { - Xtalk=true; - if (deta>0) { - m_identifier_xt1.clear(); - m_identifier_xt1 << 4 << 1 << zSide << sampling << region << (etaBin+1) << phiBin; - Current_xt1 = Current*xt1; - m_identifier_xt2.clear(); - m_identifier_xt2 << 4 << 1 << zSide << sampling << region << (etaBin-1) << phiBin; - Current_xt2 = Current*xt2; - } - else { - m_identifier_xt1.clear(); - m_identifier_xt1 << 4 << 1 << zSide << sampling << region << (etaBin-1) << phiBin; - Current_xt1 = Current*xt1; - m_identifier_xt2.clear(); - m_identifier_xt2 << 4 << 1 << zSide << sampling << region << (etaBin+1) << phiBin; - Current_xt2 = Current*xt2; - } - Current = Current*xt0; - } // m_IflXtalk = true - } - else if (sampling==2 && !InTrans) { - deta=etaloc-0.025*((double)etaBin+0.5); - m_etamap2->GetData0(std::fabs(deta),std::fabs(m_geometry->distElec()), - &resp); + if (!InTrans) Current = Current*resp; + if (m_IflXtalk && etaBin > 1 && etaBin < 446) { + Xtalk=true; + if (deta>0) { + identifier_xt1.clear(); + identifier_xt1 << 4 << 1 << zSide << sampling << region << (etaBin+1) << phiBin; + Current_xt1 = Current*xt1; + identifier_xt2.clear(); + identifier_xt2 << 4 << 1 << zSide << sampling << region << (etaBin-1) << phiBin; + Current_xt2 = Current*xt2; + } + else { + identifier_xt1.clear(); + identifier_xt1 << 4 << 1 << zSide << sampling << region << (etaBin-1) << phiBin; + Current_xt1 = Current*xt1; + identifier_xt2.clear(); + identifier_xt2 << 4 << 1 << zSide << sampling << region << (etaBin+1) << phiBin; + Current_xt2 = Current*xt2; + } + Current = Current*xt0; + } // m_IflXtalk = true + } + else if (sampling==2 && !InTrans) { + deta=etaloc-0.025*((double)etaBin+0.5); + m_etamap2->GetData0(std::fabs(deta),std::fabs(m_geometry->distElec()), + &resp); #ifdef DEBUGSTEP - std::cout << "hit in middle etaloc,etaBin,deta,delec,resp,xt0,xt1,xt2 " - << etaloc << " " << etaBin << " " << deta*1000 << " " << m_geometry->distElec() - << " " << resp << std::endl; + ATH_MSG_DEBUG("hit in middle etaloc,etaBin,deta,delec,resp,xt0,xt1,xt2 " + << etaloc << " " << etaBin << " " << deta*1000 << " " << m_geometry->distElec() + << " " << resp); #endif - Current = Current*resp; - } // sampling =1 or 2 + Current = Current*resp; + } // sampling =1 or 2 - } // region=0 + } // region=0 } // switch for current simulation -// check if we have a new hit in a different cell, or if we add this substep -// to an already existing hit + // check if we have a new hit in a different cell, or if we add this substep + // to an already existing hit G4bool found=false; - for (int i=0; i<m_nhits; i++) { - if (hdata[i].id==m_identifier2) { - hdata[i].energy += Current; - hdata[i].time += time*Current; - found=true; - break; - } + for (unsigned int i=0; i<hdata.size(); i++) { + if (hdata[i].id==identifier2) { + hdata[i].energy += Current; + hdata[i].time += time*Current; + found=true; + break; + } } // loop over hits if (!found) { - m_nhits++; - LArHitData newdata = {m_identifier2, time*Current, Current}; - hdata.push_back(newdata); - m_isInTime.push_back(true); + LArHitData newdata = {identifier2, time*Current, Current}; + hdata.push_back(newdata); } // hit was not existing before if (Xtalk) { - for (int i=0; i<m_nhits; i++) { - if (hdata[i].id==m_identifier_xt1) { - hdata[i].energy += Current_xt1; - hdata[i].time += time*Current_xt1; - found=true; - break; + for (unsigned int i=0; i<hdata.size(); i++) { + if (hdata[i].id==identifier_xt1) { + hdata[i].energy += Current_xt1; + hdata[i].time += time*Current_xt1; + found=true; + break; } } // loop over hits if (!found) { - m_nhits++; - LArHitData newdata = {m_identifier_xt1, time*Current_xt1, Current_xt1}; - hdata.push_back(newdata); - m_isInTime.push_back(true); - } + LArHitData newdata = {identifier_xt1, time*Current_xt1, Current_xt1}; + hdata.push_back(newdata); + } found=false; - for (int i=0; i<m_nhits; i++) { - if (hdata[i].id==m_identifier_xt2) { - hdata[i].energy += Current_xt2; - hdata[i].time += time*Current_xt2; - found=true; - break; + for (unsigned int i=0; i<hdata.size(); i++) { + if (hdata[i].id==identifier_xt2) { + hdata[i].energy += Current_xt2; + hdata[i].time += time*Current_xt2; + found=true; + break; } } // loop over hits if (!found) { - m_nhits++; - LArHitData newdata = {m_identifier_xt2, time*Current_xt2, Current_xt2}; - hdata.push_back(newdata); - m_isInTime.push_back(true); + LArHitData newdata = {identifier_xt2, time*Current_xt2, Current_xt2}; + hdata.push_back(newdata); } } // Xtalk true @@ -650,24 +621,22 @@ G4bool LArBarrelCalculator::Process(const G4Step* step, std::vector<LArHitData>& } // *** End of loop over sub steps #ifdef DEBUGSTEP - std::cout << "Number of hits for this step " << m_nhits << " " - << hdata.size() << std::endl; + ATH_MSG_DEBUG("Number of hits for this step " << m_nhits << " " + << hdata.size()); #endif -// finalise time computations - for (int i=0;i<m_nhits;i++) { - if (std::fabs(hdata[i].energy)>1e-6) hdata[i].time=hdata[i].time/hdata[i].energy; - else hdata[i].time=0.; - if (std::fabs(hdata[i].time)> m_OOTcut) m_isInTime[i]=false; + // finalise time computations + for (unsigned int i=0;i<hdata.size();i++) { + if (std::fabs(hdata[i].energy)>1e-6) hdata[i].time=hdata[i].time/hdata[i].energy; + else hdata[i].time=0.; #ifdef DEBUGSTEP - std::cout << "Hit Energy/Time " - << hdata[i].energy << " " << hdata[i].time << std::endl; + ATH_MSG_DEBUG("Hit Energy/Time " + << hdata[i].energy << " " << hdata[i].time); #endif } - if (m_nhits>0) return true; - else return false; - + if (hdata.size()>0) return true; + return false; } // =============================================================================== @@ -676,14 +645,14 @@ G4bool LArBarrelCalculator::Process(const G4Step* step, std::vector<LArHitData>& // |eta| < 1.475 // 4 < z < 3164 mm (in local half barrel coordinates) -G4bool LArBarrelCalculator::FiducialCuts(G4double radloc,G4double zloc,G4double etaloc) +G4bool LArBarrelCalculator::FiducialCuts(G4double radloc,G4double zloc,G4double etaloc) const { if (radloc < m_rMinAccordion || radloc > m_rMaxAccordion || etaloc > m_etaMaxBarrel || zloc < m_zMinBarrel || zloc > m_zMaxBarrel) return false; - else return true; + else return true; } // ========================================================================== @@ -692,19 +661,19 @@ G4bool LArBarrelCalculator::FiducialCuts(G4double radloc,G4double zloc,G4double // some HV imperfections void LArBarrelCalculator::InitHV() { - std::cout << " **** in LArBarrelCalculator::InitHV() " << std::endl; + ATH_MSG_INFO(" **** in LArBarrelCalculator::InitHV() "); float defaultHvVal=2000.; - std::cout << " defaultHvVal " << defaultHvVal <<std::endl; + ATH_MSG_INFO(" defaultHvVal " << defaultHvVal); for (int ipm=0;ipm<2;ipm++) { for (int ielec=0;ielec<1024;ielec++) { for (int ieta=0;ieta<7;ieta++) { - for (int iside=0;iside<2;iside++) { - m_hv[ipm][ielec][ieta][iside] = defaultHvVal; - } + for (int iside=0;iside<2;iside++) { + m_hv[ipm][ielec][ieta][iside] = defaultHvVal; + } } } } @@ -712,42 +681,41 @@ void LArBarrelCalculator::InitHV() if (m_doHV) { // initialize services ISvcLocator* svcLocator = Gaudi::svcLocator(); - StoreGateSvc* pDetStore; - - StatusCode status = svcLocator->service("DetectorStore", pDetStore); - if(status.isFailure()) + StoreGateSvc* pDetStore = nullptr; + + if(svcLocator->service("DetectorStore", pDetStore).isFailure()) { - std::cout << "LArBarrelCalculator::InitHV() unable to get Detector Store! Use default HV values\n"; - return; + std::cout << "LArBarrelCalculator::InitHV() unable to get Detector Store! Use default HV values\n"; + return; } - + // get EMBHV Manager - const LArHVManager *manager = NULL; + const LArHVManager *manager = nullptr; if (pDetStore->retrieve(manager)==StatusCode::SUCCESS) { const EMBHVManager* hvManager=manager->getEMBHVManager(); - std::cout << " got HV Manager " << std::endl; + ATH_MSG_INFO(" got HV Manager "); // loop over HV modules for (unsigned int iSide=0;iSide<2;iSide++) { - for (unsigned int iPhi=0;iPhi<16;iPhi++) { - for (unsigned int iSector=0;iSector<2;iSector++) { - for (unsigned int iEta=0;iEta<7;iEta++) { - EMBHVModuleConstLink hvMod = hvManager->getHVModule(iSide,iEta+1,iPhi,iSector); - for (unsigned int ielec=0;ielec<32;ielec++) { - EMBHVElectrodeConstLink electrode = hvMod->getElectrode(ielec); - unsigned jElec = ielec+32*iSector+64*iPhi; - for (unsigned int iGap=0;iGap<2;iGap++) { - double hv = electrode->voltage(iGap); - std::cout << " iSide,jElec,iEta,iGap,hv " << iSide << " " << jElec << " " << iEta << " " << iGap << " " << hv << std::endl; - if (hv>-999.) m_hv[iSide][jElec][iEta][iGap] = hv; - } - } - } - } - } - } - } + for (unsigned int iPhi=0;iPhi<16;iPhi++) { + for (unsigned int iSector=0;iSector<2;iSector++) { + for (unsigned int iEta=0;iEta<7;iEta++) { + EMBHVModuleConstLink hvMod = hvManager->getHVModule(iSide,iEta+1,iPhi,iSector); + for (unsigned int ielec=0;ielec<32;ielec++) { + EMBHVElectrodeConstLink electrode = hvMod->getElectrode(ielec); + unsigned jElec = ielec+32*iSector+64*iPhi; + for (unsigned int iGap=0;iGap<2;iGap++) { + double hv = electrode->voltage(iGap); + ATH_MSG_DEBUG(" iSide,jElec,iEta,iGap,hv " << iSide << " " << jElec << " " << iEta << " " << iGap << " " << hv); + if (hv>-999.) m_hv[iSide][jElec][iEta][iGap] = hv; + } + } + } + } + } + } + } else { - std::cout << " Unable to find HV Manager " << std::endl; + ATH_MSG_WARNING(" Unable to find HV Manager "); } } @@ -761,34 +729,33 @@ void LArBarrelCalculator::InitHV() // assumes resp = a* HV*b between 1000-2000 and 400-1000V // (fixes b=0.57 for HV smaller than 400V) -double LArBarrelCalculator::ScaleHV(double hv, double curr0, double curr1, double curr2) +double LArBarrelCalculator::ScaleHV(double hv, double curr0, double curr1, double curr2) const { double b; double resp=0.; if (hv>1000.) { - if (std::fabs(curr1)>1e-6) { + if (std::fabs(curr1)>1e-6) { double x=curr0/curr1; if (x>1e-6) { b=log(x)*(1./(log(2000.)-log(1000.))); resp = curr0*exp(b*(log(hv)-log(2000.))); } - } + } } else if (hv>400.) { - if (std::fabs(curr2)>1e-6) { + if (std::fabs(curr2)>1e-6) { double x=curr1/curr2; if (x>1e-6) { b=log(x)*(1./(log(1000.)-log(400.))); resp = curr1*exp(b*(log(hv)-log(1000.))); } - } + } } else { - if (std::fabs(curr2)>1e-6) { - b=0.57; - resp = curr2*exp(b*(log(hv)-log(400.))); - } + if (std::fabs(curr2)>1e-6) { + b=0.57; + resp = curr2*exp(b*(log(hv)-log(400.))); + } } return resp; } - diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalculator.h b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalculator.h new file mode 100644 index 0000000000000000000000000000000000000000..084a50f8b129e4377f446ebdb0598aa8a6ffb406 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalculator.h @@ -0,0 +1,110 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// LArBarrelCalculator.hh +// The Cell Identifier for the EM Barrel readout cells + +// Adapted from code written by Gaston Parrour +// Adaptation by Sylvain Negroni + +// 12-Jul-2002 WGS: Added LArG4Identifier. + +// 18-03-2005 G.Unal: major revision to include new current maps +#ifndef LARBARRELCALCULATOR_H +#define LARBARRELCALCULATOR_H + +#include "LArG4Code/LArG4Identifier.h" +#include "LArG4Code/LArCalculatorSvcImp.h" +#include "LArG4Barrel/LArBarrelGeometry.h" + +#include <stdexcept> +#include <vector> +#include <string> +#include <memory> + +class G4Step; +class AccMap; +class MapEta; +class LArG4BirksLaw; + +class LArBarrelCalculator : public LArCalculatorSvcImp +{ +public: + + LArBarrelCalculator(const std::string& name, ISvcLocator* pSvcLocator); + virtual StatusCode initialize() override final; + virtual StatusCode finalize() override final; + + LArBarrelCalculator (const LArBarrelCalculator&) = delete; + LArBarrelCalculator& operator= (const LArBarrelCalculator&) = delete; + + virtual G4bool Process(const G4Step* a_step, std::vector<LArHitData>& hdata) const override final; + + // Check if the current hitTime is in-time + virtual G4bool isInTime(G4double hitTime) const override final + { + return !(std::fabs(hitTime) > m_OOTcut); + } + + // + // get functions: + // + virtual G4float OOTcut() const override final { return m_OOTcut; } + +private: + + LArG4::Barrel::Geometry* m_geometry; + AccMap* m_accmap; + std::unique_ptr<MapEta> m_etamap1; + std::unique_ptr<MapEta> m_etamap2; + std::unique_ptr<MapEta> m_etamap3; + + // RUN Options + bool m_IflCur; + bool m_IflMapTrans; + bool m_IflXtalk; + + double m_dstep; + + const LArG4BirksLaw *m_birksLaw; + bool m_doHV; + + + // detector name, for translated geometry + std::string m_detectorName; + + // global EMBarrel dimensions + double m_etaMaxBarrel; + double m_zMinBarrel; + double m_zMaxBarrel; + // global Accordion dimensions + double m_rMinAccordion; + double m_rMaxAccordion; + // half thickness of absorber and electrode + double m_ThickAbs; + double m_ThickEle; + // GU 11/06/2003 total number of cells in phi + int m_NCellTot; + int m_NCellMax; + // to handle small difference (mostly phi wrapping and +-z symmetry) + // between atlas and test beam + bool m_testbeam; + + + // Hv values + // 0,1 = positive/negative barrel + // 0->1023 = electrode number + // 0->6 = eta region number (0.2 granularity) (1.2 to 1.475 in same eta bin) + // 0,1 = below, above the electrode (according to phi in global Atlas frame) + + double m_hv[2][1024][7][2]; + + G4bool FiducialCuts(G4double,G4double,G4double) const; + + void InitHV(); + double ScaleHV(double, double, double, double) const; + +}; + +#endif // LARBARRELCALCULATOR_H diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalibrationCalculator.cc index cd398907b086fb9fcd2bae9225fcefa8ff03a94d..1d591237dfdf5b7d5d9c46629bb292b1259a3c16 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalibrationCalculator.cc @@ -2,7 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ - /******************************************************************** NAME: CalibrationCalculator.cxx @@ -11,18 +10,18 @@ PACKAGE: offline/LArCalorimeter/LArG4/LArG4Barrel AUTHORS: G. Unal, L. Carminati (on a template from Bill Selingman) CREATED: September, 2004 -PURPOSE: This class calculates the values needed for calibration hits +PURPOSE: This class calculates the values needed for calibration hits in the barrel LAr calorimeter. This calculator is called - in calibration runs (see LArBarrelSDConsultant) for calibration + in calibration runs (see LArBarrelSDConsultant) for calibration hits in the accordion (no presampler). -UPDATES: +UPDATES: ********************************************************************/ //#define DEBUG_HITS -#include "LArG4Barrel/LArBarrelCalibrationCalculator.h" +#include "LArBarrelCalibrationCalculator.h" #include "LArG4Barrel/LArBarrelGeometry.h" @@ -34,13 +33,20 @@ UPDATES: namespace LArG4 { -namespace Barrel { + namespace Barrel { - CalibrationCalculator::CalibrationCalculator() - : m_detectorName("LArMgr") + CalibrationCalculator::CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_geometryCalculator(nullptr) + , m_detectorName("LArMgr") { + declareProperty("DetectorName",m_detectorName); + } + + StatusCode CalibrationCalculator::initialize(){ // Initialize the geometry calculator. m_geometryCalculator = Geometry::GetInstance(); + return StatusCode::SUCCESS; } CalibrationCalculator::~CalibrationCalculator() @@ -48,57 +54,57 @@ namespace Barrel { } - G4bool CalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) + G4bool CalibrationCalculator::Process(const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process) const { // Use the calculators to determine the energies and the // identifier associated with this G4Step. Note that the // default is to process both the energy and the ID. - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { + if ( process == kEnergyAndID || process == kOnlyEnergy ) + { #ifdef DEBUG_HITS - std::cout << "LArG4::Barrel::CalibrationCalculator::Process" - << " calling SimulationEnergies" << std::endl; + std::cout << "LArG4::Barrel::CalibrationCalculator::Process" + << " calling SimulationEnergies" << std::endl; #endif - m_energyCalculator.Energies( a_step, m_energies ); + m_energyCalculator.Energies( step, energies ); - // First, get the energy. - // m_energy = a_step->GetTotalEnergyDeposit(); - } + // First, get the energy. + // m_energy = step->GetTotalEnergyDeposit(); + } else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); - - - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. - m_identifier = m_geometryCalculator->CalculateIdentifier( a_step, m_detectorName ); - } + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); + + + if ( process == kEnergyAndID || process == kOnlyID ) + { + // Calculate the identifier. + identifier = m_geometryCalculator->CalculateIdentifier( step, m_detectorName ); + } else - m_identifier = LArG4Identifier(); - - + identifier = LArG4Identifier(); + + #ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); + G4double energy = accumulate(energies.begin(),energies.end(),0.); std::cout << "LArG4::Barrel::CalibrationCalculator::Process" - << " ID=" << std::string(m_identifier) - << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + << " ID=" << std::string(identifier) + << " energy=" << energy + << " energies=(" << energies[0] + << "," << energies[1] + << "," << energies[2] + << "," << energies[3] << ")" + << std::endl; #endif - + // Check for bad result. - if ( m_identifier == LArG4Identifier() ) - return false; - + if ( identifier == LArG4Identifier() ) + return false; + return true; } - -} // namespace Barrel - + + } // namespace Barrel + } // namespace LAr diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalibrationCalculator.h similarity index 65% rename from LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelCalibrationCalculator.h rename to LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalibrationCalculator.h index d9f30492fa283d8d49d7e36b249bb830a512ba2f..f887e64f94005006aa0e184bcb1b12548584bd00 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/LArBarrelCalibrationCalculator.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalibrationCalculator.h @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// LArG4::Barrel::CalibrationCalculator +// LArG4::Barrel::CalibrationCalculator // This class calculates the values needed for calibration hits in the // simulation. @@ -10,7 +10,7 @@ #ifndef LArG4_Barrel_CalibrationCalculator_H #define LArG4_Barrel_CalibrationCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" @@ -30,18 +30,19 @@ class G4Step; namespace LArG4 { - -namespace Barrel { - + + namespace Barrel { + // Forward declaration class Geometry; - - class CalibrationCalculator : public VCalibrationCalculator { + + class CalibrationCalculator : public LArCalibCalculatorSvcImp { public: - - CalibrationCalculator(); + + CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize() override final; virtual ~CalibrationCalculator(); - + // The Process method returns a boolean value. If it's true, the // hit can be used by Geant4; if it's false, there's something wrong // with the energy deposit and it should be ignored. @@ -53,27 +54,18 @@ namespace Barrel { // yet, but you can never tell). Use the enum (defined in // VCalibrationCalculator.h) to control any special processing. - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } ; - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; }; - - inline void detectorName(std::string name) { m_detectorName=name; } + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process = kEnergyAndID) const override final; + private: - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; // Geometry calculator Geometry* m_geometryCalculator; // Energy calculator CaloG4::SimulationEnergies m_energyCalculator; - + // detector name, for translated geometry std::string m_detectorName; }; diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelGeometry.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelGeometry.cc index 5e0eae5271e8c55a5f5fab718ab8004839bbe863..68a6cf3a4386d2d004d70382a963410359075fab 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelGeometry.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelGeometry.cc @@ -2,7 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ - /******************************************************************** NAME: LArBarrelGeometry.cxx @@ -12,7 +11,7 @@ AUTHORS: G. Unal, L. Carminati CREATED: September, 2004 PURPOSE: 'geometrical' methods used by the LArBarrelCalculator. - These methods (previously in LArBarrelCalculator) were written + These methods (previously in LArBarrelCalculator) were written by Gaston Parrour and adapted by Sylvain Negroni. UPDATES: - Calculate identifier method used by CalibrationCalculator. @@ -27,1376 +26,1387 @@ UPDATES: - Calculate identifier method used by CalibrationCalculator. #include <iostream> #include "LArG4Barrel/LArBarrelGeometry.h" -#include "LArG4Barrel/LArStraightAbsorbers.h" -#include "LArG4Barrel/LArStraightElectrodes.h" -#include "LArG4Barrel/LArCoudeElectrodes.h" -#include "LArG4Barrel/LArCoudeAbsorbers.h" +#include "LArStraightAbsorbers.h" +#include "LArStraightElectrodes.h" +#include "LArCoudeElectrodes.h" +#include "LArCoudeAbsorbers.h" namespace LArG4 { - -namespace Barrel { -Geometry* Geometry::m_instance = 0; + namespace Barrel { + + Geometry* Geometry::m_instance = nullptr; -// =================================================================== + // =================================================================== + + Geometry* Geometry::GetInstance() + { + if (m_instance == nullptr) + { + m_instance = new Geometry(); + } + return m_instance; + } -Geometry* Geometry::GetInstance() -{ - if (m_instance == 0) + // ========================================================================== + Geometry::Geometry() + : m_testbeam(false) + , m_cellID(0) + , m_sampling(0) + , m_region(0) + , m_etaBin(0) + , m_phiBin(0) + , m_zSide(0) + , m_phiGap(0) + , m_nstraight(0) + , m_nfold(0) + , m_distElec(0) + , m_distAbs(0) + , m_xl(0) + , m_x0(0) + , m_y0(0) + , m_sampMap(0) + , m_etaMap(0) + , m_iflSAG(false) { - m_instance = new Geometry(); + // Constructor initializes the geometry. + // Access source of detector parameters. + + LArVG4DetectorParameters* parameters = LArVG4DetectorParameters::GetInstance(); + + // number of straight sections (should be 14) + m_Nbrt = (int) (parameters->GetValue("LArEMBnoOFAccZigs")); + // Number of ZIGs + 1 i.e. 15 = number of folds + m_Nbrt1 = m_Nbrt + 1; + // phi of first absorber + m_gam0 = parameters->GetValue("LArEMBAbsPhiFirst"); + // radius of curvature of neutral fiber in the folds + m_rint_eleFib = parameters->GetValue("LArEMBNeutFiberRadius"); + + m_rc = new double[m_Nbrt1]; + m_phic = new double[m_Nbrt1]; + m_delta = new double[m_Nbrt1]; + m_xc = new double[m_Nbrt1]; + m_yc = new double[m_Nbrt1]; + + // r,phi positions of the centre of the folds (nominal geometry) + for (G4int idat = 0; idat < m_Nbrt1 ; idat++) + { + m_rc[idat] = (double) parameters->GetValue("LArEMBRadiusAtCurvature",idat); + m_phic[idat] = (double) parameters->GetValue("LArEMBPhiAtCurvature",idat); + m_delta[idat] = (double) parameters->GetValue("LArEMBDeltaZigAngle",idat); + m_xc[idat] = m_rc[idat]*cos(m_phic[idat]); + m_yc[idat] = m_rc[idat]*sin(m_phic[idat]); + } + // define parity of accordion waves: =0 if first wave goes up, 1 if first wave goes down in the local frame + m_parity=0; + if (m_phic[0]<0.) m_parity=1; + // + m_rMinAccordion = parameters->GetValue("LArEMBRadiusInnerAccordion"); + m_rMaxAccordion = parameters->GetValue("LArEMBFiducialRmax"); + m_etaMaxBarrel = parameters->GetValue("LArEMBMaxEtaAcceptance"); + m_zMinBarrel = parameters->GetValue("LArEMBfiducialMothZmin"); + m_zMaxBarrel = parameters->GetValue("LArEMBfiducialMothZmax"); + // === GU 11/06/2003 total number of cells in phi + // to distinguish 1 module (testbeam case) from full Atlas + m_NCellTot = (int) (parameters->GetValue("LArEMBnoOFPhysPhiCell")); + // total number of cells in phi to distinguish 1 module (testbeam case) from full Atlas + m_testbeam=false; + if (m_NCellTot != 1024) { + m_testbeam=true; + } + m_NCellMax=1024; + // === + + // Initialize r-phi reference map + this->GetRphi(); + + m_FIRST = true; + m_coudeabs=nullptr; + m_absorber=nullptr; + m_coudeelec=nullptr; + m_electrode=nullptr; + + } + + // ==================================================================================== + + Geometry::~Geometry() { + + if (m_rc) delete [] m_rc; + if (m_phic) delete [] m_phic; + if (m_delta) delete [] m_delta; + if (m_xc) delete [] m_xc; + if (m_yc) delete [] m_yc; + } - return m_instance; -} - -// ========================================================================== -Geometry::Geometry() - : m_testbeam(false), - m_cellID(0), m_sampling(0), m_region(0), m_etaBin(0), m_phiBin(0), m_zSide(0), m_phiGap(0), m_nstraight(0), m_nfold(0), m_distElec(0), m_distAbs(0), m_xl(0), m_x0(0), m_y0(0), m_sampMap(0), m_etaMap(0), - m_iflSAG(false) -{ -// Constructor initializes the geometry. -// Access source of detector parameters. - - LArVG4DetectorParameters* parameters = LArVG4DetectorParameters::GetInstance(); - -// number of straight sections (should be 14) - m_Nbrt = (int) (parameters->GetValue("LArEMBnoOFAccZigs")); -// Number of ZIGs + 1 i.e. 15 = number of folds - m_Nbrt1 = m_Nbrt + 1; -// phi of first absorber - m_gam0 = parameters->GetValue("LArEMBAbsPhiFirst"); -// radius of curvature of neutral fiber in the folds - m_rint_eleFib = parameters->GetValue("LArEMBNeutFiberRadius"); - - m_rc = new double[m_Nbrt1]; - m_phic = new double[m_Nbrt1]; - m_delta = new double[m_Nbrt1]; - m_xc = new double[m_Nbrt1]; - m_yc = new double[m_Nbrt1]; - -// r,phi positions of the centre of the folds (nominal geometry) - for (G4int idat = 0; idat < m_Nbrt1 ; idat++) - { - m_rc[idat] = (double) parameters->GetValue("LArEMBRadiusAtCurvature",idat); - m_phic[idat] = (double) parameters->GetValue("LArEMBPhiAtCurvature",idat); - m_delta[idat] = (double) parameters->GetValue("LArEMBDeltaZigAngle",idat); - m_xc[idat] = m_rc[idat]*cos(m_phic[idat]); - m_yc[idat] = m_rc[idat]*sin(m_phic[idat]); - } - // define parity of accordion waves: =0 if first wave goes up, 1 if first wave goes down in the local frame - m_parity=0; - if (m_phic[0]<0.) m_parity=1; -// - m_rMinAccordion = parameters->GetValue("LArEMBRadiusInnerAccordion"); - m_rMaxAccordion = parameters->GetValue("LArEMBFiducialRmax"); - m_etaMaxBarrel = parameters->GetValue("LArEMBMaxEtaAcceptance"); - m_zMinBarrel = parameters->GetValue("LArEMBfiducialMothZmin"); - m_zMaxBarrel = parameters->GetValue("LArEMBfiducialMothZmax"); -// === GU 11/06/2003 total number of cells in phi -// to distinguish 1 module (testbeam case) from full Atlas - m_NCellTot = (int) (parameters->GetValue("LArEMBnoOFPhysPhiCell")); - m_NCellMax=1024; -// === - -// Initialize r-phi reference map - GetRphi(); - - m_FIRST = true; - m_coudeabs=NULL; - m_absorber=NULL; - m_coudeelec=NULL; - m_electrode=NULL; - -} - -// ==================================================================================== - -Geometry::~Geometry() { - - if (m_rc) delete [] m_rc; - if (m_phic) delete [] m_phic; - if (m_delta) delete [] m_delta; - if (m_xc) delete [] m_xc; - if (m_yc) delete [] m_yc; - -} - - -//====================================================================================== -// -// Here INTRINSIC Distance_to_electrode determination (G.P.) -// -// This retuns an ALGEBRICDistEle value, the distance from electrode -//neutral fiber TOWARDS the Sub_Step in LAr (measured on a local perpendicular -//vector unit oriented upwards i.e. following increasing Phi values). -// -// This is done in THE INTRINSIC LOCAL Z > 0. half_barrel part ("stac_phys1") -// -// inputs: xhit,yhit = x,y positions in local half barrel -// PhiCell = electrode number in phi (0 to 1023 for Atlas case) -// Num_Straight = number (0 to 13) of the straight section -// Num_Coude = number (0 to 14) of closest fold -// -// output: Function value = algebric distance to electrode -// xl = normalized lenght along electrode straight section (between +-1) - -double Geometry::Distance_Ele(const double & xhit, - const double &yhit, const int &PhiCell, int &Num_Straight, - const int &Num_Coude, double &xl) -{ - double dx, dy, dr; - double DistEle = 0.; -// -// FrameWork is consistent with the one used to PhiCell determination -// e.g. it assumes HERE to be the LOCAL one of "stac_phys1", -// (mother of ACCordion volumes) from which Z> 0. and Z < 0. half_barrel -// parts are then defined. -// -// One needs POINTERS to Electrode neutral fibers -// either for straight parts or for folds -// -// Fold Center ccoordinates - G4double Xc[2]; - Xc[0] = m_coudeelec->XCentCoude(Num_Coude, PhiCell); - Xc[1] = m_coudeelec->YCentCoude(Num_Coude, PhiCell); - G4double radfold = sqrt(Xc[0]*Xc[0]+Xc[1]*Xc[1]); - G4double radhit = sqrt(xhit*xhit+yhit*yhit); - -// check if the assumed straight number is the correct one -// (this can be wrong when we are close to a fold and there is sagging) - if (Num_Coude == Num_Straight && radhit <radfold) { - if (Num_Straight>0) Num_Straight = Num_Straight-1; -// std::cout << "radhit,radfold " << radhit << " " << radfold << " change straight by +1" << std::endl; - } - if (Num_Coude == (Num_Straight+1) && radhit > radfold) { - if (Num_Straight<12) Num_Straight = Num_Straight+1; -// std::cout << "radhit,radfold " << radhit << " " << radfold << " change straight by -1" << std::endl; - } - -// u unit 2D_Vector along straight part of the electrode neutral fiber - double u[2]; - u[0] = m_electrode->Cosu(Num_Straight, PhiCell); - u[1] = m_electrode->Sinu(Num_Straight, PhiCell); -// Middle m_coordinates of this straight part of the electrode neutral fiber - double Xm[2]; - Xm[0] = m_electrode->XCentEle(Num_Straight, PhiCell); - Xm[1] = m_electrode->YCentEle(Num_Straight, PhiCell); -// m_Hit Vector components - dx = xhit - Xm[0]; dy = yhit - Xm[1]; - -// First compute algebric distance m_hit (2D) the 2D_projection of the -// m_Hit Vector on this electrode neutral fiber. - double hit = dx*u[0] + dy*u[1]; - -// -// Flat of Fold Region ? -// - G4double Half_Elec; - Half_Elec = m_electrode->HalfLength(Num_Straight,PhiCell); - - if(fabs(hit) < Half_Elec) { -// Flat Region - DistEle = u[0]*dy - u[1]*dx; - xl=hit/Half_Elec; - } - else { -// Fold region -// c_Hit Vector components and its length - dx = xhit - Xc[0]; dy = yhit - Xc[1]; dr = sqrt( dx*dx + dy*dy); - DistEle = (Num_Coude%2 == m_parity) ? (m_rint_eleFib-dr) : (dr - m_rint_eleFib); - if (Num_Coude==Num_Straight) xl=-1.; - else xl=+1; - } // end of Fold Regions - - return DistEle; - -} // end of the function Distance_Ele - - -//====================================================================================== -// Algebric distance to absorber -// -// inputs: xhit,yhit = x,y positions in local half barrel -// PhiCell = absorber number in phi (0 to 1023 for Atlas case) -// Num_Straight = number (0 to 13) of the straight section -// Num_Coude = number (0 to 14) of closest fold -// -// output: Function value = algebric distance to electrode - -double Geometry::Distance_Abs(const double & xhit, - const double &yhit, const int &PhiCell, const int &Num_Straight, - const int &Num_Coude) -{ - double dx, dy, dr; - double DistAbs = 0.; -// -// FrameWork is consistent with the one used to PhiCell determination -// e.g. it assumes HERE to be the LOCAL one of "stac_phys1", -// (mother of ACCordion volumes) from which Z> 0. and Z < 0. half_barrel -// parts are then defined. -// -// One needs POINTERS to Electrode neutral fibers -// either for straight parts or for folds -// -// u unit 2D_Vector along straight part of the electrode neutral fiber - G4double u[2]; - u[0] = m_absorber->Cosu(Num_Straight, PhiCell); - u[1] = m_absorber->Sinu(Num_Straight, PhiCell); -// Middle m_coordinates of this straight part of the electrode neutral fiber - G4double Xm[2]; - Xm[0] = m_absorber->XCentAbs(Num_Straight, PhiCell); - Xm[1] = m_absorber->YCentAbs(Num_Straight, PhiCell); -// m_Hit Vector components - dx = xhit - Xm[0]; dy = yhit - Xm[1]; - -// First compute algebric distance hit (2D) the 2D_projection of the -// m_Hit Vector on this electrode neutral fiber. - double hit = dx*u[0] + dy*u[1]; - -// -// Flat of Fold Region ? -// - G4double Half_Abs; - Half_Abs = m_absorber->HalfLength(Num_Straight,PhiCell); - - if(fabs(hit) < Half_Abs) { -// Flat Region - DistAbs = u[0]*dy - u[1]*dx; - } - else { -// Fold Center c_coordinates - G4double Xc[2]; - Xc[0] = m_coudeabs->XCentCoude(Num_Coude, PhiCell); - Xc[1] = m_coudeabs->YCentCoude(Num_Coude, PhiCell); -// c_Hit Vector components and its length - dx = xhit - Xc[0]; dy = yhit - Xc[1]; dr = sqrt( dx*dx + dy*dy); - DistAbs = (Num_Coude%2 == m_parity) ? (m_rint_eleFib-dr) : (dr - m_rint_eleFib); - - } // end of Fold Regions - - return DistAbs; - -} // end of the function Distance_Abs - - -//============================================================================= -// Function SampSeg -// -// eta-sampling segmentation of barrel calorimeter GU, January 2005 -// input values: eta,radius in half-barrel frame -// -// return value of function: true=active area, false=inactive area -// return arguments: iregion,isampling,ieta -// take into account detailed electrode drawing -// with readout strips -// isamp2,ieta2 do not take into account -// readout strips and can be used to access current -// maps. -// -// iregion=0 (eta<1.4) or 1 (eta=1.4-1.475) -// for region 0: isampling = 1 (strips), 2 (middle), 3 (back) -// for region 1: isampling = 1 or isampling = 2 -// ieta= eta cell number -// region0,samp1: ieta=1->448 (strip 0 does not exist) -// region0,samp2: ieta=0->55 -// region0,samp3: ieta=0->26 (max eta 1.325) -// region1,samp1: ieta=0->2 (deta=0.025) -// region1,samp2: ieta=0 (only 1 cell) - -G4int Geometry::SampSeg(G4double eta, G4double radius, G4double z, - G4int& iregion, G4int& isampling, G4int& ieta, - G4int& isamp2, G4int& ieta2) -{ - static G4double Rmax1[448]; - static G4double Rmax2[56]; - static G4double Eta_max,Eta_max_s1,Eta_max_s3,R_max_acc,Z_max_acc,R_min_acc,R_min_highz; - static G4double Dr_s12; - static G4double deltaz,Z_max_lowr,dzdr; - static G4double deta; - static G4double zmax1,zmax2,zmax3,zmax4,zmax5,zmax6,zmax7,rmax1,rmax2,rmax3,rmax4; - static bool FILL = true; - if (FILL) { - - LArVG4DetectorParameters* parameters = LArVG4DetectorParameters::GetInstance(); - -// maximum eta barrel 1.475 (at r=1500.024) - Eta_max = parameters->GetValue("LArEMBMaxEtaAcceptance"); -// minimum active radius 1500.024 - R_min_acc= parameters->GetValue("LArEMBRadiusInnerAccordion"); -// maximum active radius 1960. - R_max_acc = parameters->GetValue("LArEMBFiducialRmax"); -// maximum active z (before subtracting edge for signal readout) -// currently 3150, should be changed in database to become 3164 - Z_max_acc = parameters->GetValue("LArEMBfiducialMothZmax"); -// minimum radius at z max for active region - R_min_highz=1548.; //FIXME should be taken from database - -// inactive thickness between S1 and S2 FIXME should be taken from database - Dr_s12=1.1; - - Eta_max_s1=1.4; // maximum eta region 0 - Eta_max_s3=1.325; // maximum eta for S3 in region 0 - deta=0.025; // basic granularity - -// values of the radial separations between samplings + + + //====================================================================================== + // + // Here INTRINSIC Distance_to_electrode determination (G.P.) + // + // This retuns an ALGEBRICDistEle value, the distance from electrode + //neutral fiber TOWARDS the Sub_Step in LAr (measured on a local perpendicular + //vector unit oriented upwards i.e. following increasing Phi values). + // + // This is done in THE INTRINSIC LOCAL Z > 0. half_barrel part ("stac_phys1") + // + // inputs: xhit,yhit = x,y positions in local half barrel + // PhiCell = electrode number in phi (0 to 1023 for Atlas case) + // Num_Straight = number (0 to 13) of the straight section + // Num_Coude = number (0 to 14) of closest fold + // + // output: Function value = algebric distance to electrode + // xl = normalized lenght along electrode straight section (between +-1) + + double Geometry::Distance_Ele(const double & xhit, + const double &yhit, const int &PhiCell, int &Num_Straight, + const int &Num_Coude, double &xl) const + { + double dx, dy, dr; + double DistEle = 0.; + // + // FrameWork is consistent with the one used to PhiCell determination + // e.g. it assumes HERE to be the LOCAL one of "stac_phys1", + // (mother of ACCordion volumes) from which Z> 0. and Z < 0. half_barrel + // parts are then defined. + // + // One needs POINTERS to Electrode neutral fibers + // either for straight parts or for folds + // + // Fold Center ccoordinates + G4double Xc[2]; + Xc[0] = m_coudeelec->XCentCoude(Num_Coude, PhiCell); + Xc[1] = m_coudeelec->YCentCoude(Num_Coude, PhiCell); + G4double radfold = sqrt(Xc[0]*Xc[0]+Xc[1]*Xc[1]); + G4double radhit = sqrt(xhit*xhit+yhit*yhit); + + // check if the assumed straight number is the correct one + // (this can be wrong when we are close to a fold and there is sagging) + if (Num_Coude == Num_Straight && radhit <radfold) { + if (Num_Straight>0) Num_Straight = Num_Straight-1; + // std::cout << "radhit,radfold " << radhit << " " << radfold << " change straight by +1" << std::endl; + } + if (Num_Coude == (Num_Straight+1) && radhit > radfold) { + if (Num_Straight<12) Num_Straight = Num_Straight+1; + // std::cout << "radhit,radfold " << radhit << " " << radfold << " change straight by -1" << std::endl; + } + + // u unit 2D_Vector along straight part of the electrode neutral fiber + double u[2]; + u[0] = m_electrode->Cosu(Num_Straight, PhiCell); + u[1] = m_electrode->Sinu(Num_Straight, PhiCell); + // Middle m_coordinates of this straight part of the electrode neutral fiber + double Xm[2]; + Xm[0] = m_electrode->XCentEle(Num_Straight, PhiCell); + Xm[1] = m_electrode->YCentEle(Num_Straight, PhiCell); + // m_Hit Vector components + dx = xhit - Xm[0]; dy = yhit - Xm[1]; + + // First compute algebric distance m_hit (2D) the 2D_projection of the + // m_Hit Vector on this electrode neutral fiber. + double hit = dx*u[0] + dy*u[1]; + + // + // Flat of Fold Region ? + // + G4double Half_Elec; + Half_Elec = m_electrode->HalfLength(Num_Straight,PhiCell); + + if(std::fabs(hit) < Half_Elec) { + // Flat Region + DistEle = u[0]*dy - u[1]*dx; + xl=hit/Half_Elec; + } + else { + // Fold region + // c_Hit Vector components and its length + dx = xhit - Xc[0]; dy = yhit - Xc[1]; dr = sqrt( dx*dx + dy*dy); + DistEle = (Num_Coude%2 == m_parity) ? (m_rint_eleFib-dr) : (dr - m_rint_eleFib); + if (Num_Coude==Num_Straight) xl=-1.; + else xl=+1; + } // end of Fold Regions + + return DistEle; + + } // end of the function Distance_Ele + + + //====================================================================================== + // Algebric distance to absorber + // + // inputs: xhit,yhit = x,y positions in local half barrel + // PhiCell = absorber number in phi (0 to 1023 for Atlas case) + // Num_Straight = number (0 to 13) of the straight section + // Num_Coude = number (0 to 14) of closest fold + // + // output: Function value = algebric distance to electrode + + double Geometry::Distance_Abs(const double & xhit, + const double &yhit, const int &PhiCell, const int &Num_Straight, + const int &Num_Coude) const + { + double dx, dy, dr; + double DistAbs = 0.; + // + // FrameWork is consistent with the one used to PhiCell determination + // e.g. it assumes HERE to be the LOCAL one of "stac_phys1", + // (mother of ACCordion volumes) from which Z> 0. and Z < 0. half_barrel + // parts are then defined. + // + // One needs POINTERS to Electrode neutral fibers + // either for straight parts or for folds + // + // u unit 2D_Vector along straight part of the electrode neutral fiber + G4double u[2]; + u[0] = m_absorber->Cosu(Num_Straight, PhiCell); + u[1] = m_absorber->Sinu(Num_Straight, PhiCell); + // Middle m_coordinates of this straight part of the electrode neutral fiber + G4double Xm[2]; + Xm[0] = m_absorber->XCentAbs(Num_Straight, PhiCell); + Xm[1] = m_absorber->YCentAbs(Num_Straight, PhiCell); + // m_Hit Vector components + dx = xhit - Xm[0]; dy = yhit - Xm[1]; + + // First compute algebric distance hit (2D) the 2D_projection of the + // m_Hit Vector on this electrode neutral fiber. + double hit = dx*u[0] + dy*u[1]; + + // + // Flat of Fold Region ? + // + if(std::fabs(hit) < m_absorber->HalfLength(Num_Straight,PhiCell)) { + // Flat Region + DistAbs = u[0]*dy - u[1]*dx; + } + else { + // Fold Center c_coordinates + G4double Xc[2]; + Xc[0] = m_coudeabs->XCentCoude(Num_Coude, PhiCell); + Xc[1] = m_coudeabs->YCentCoude(Num_Coude, PhiCell); + // c_Hit Vector components and its length + dx = xhit - Xc[0]; dy = yhit - Xc[1]; dr = sqrt( dx*dx + dy*dy); + DistAbs = (Num_Coude%2 == m_parity) ? (m_rint_eleFib-dr) : (dr - m_rint_eleFib); + + } // end of Fold Regions + + return DistAbs; + + } // end of the function Distance_Abs + + + //============================================================================= + // Function SampSeg + // + // eta-sampling segmentation of barrel calorimeter GU, January 2005 + // input values: eta,radius in half-barrel frame + // + // return value of function: true=active area, false=inactive area + // return arguments: iregion,isampling,ieta + // take into account detailed electrode drawing + // with readout strips + // isamp2,ieta2 do not take into account + // readout strips and can be used to access current + // maps. + // + // iregion=0 (eta<1.4) or 1 (eta=1.4-1.475) + // for region 0: isampling = 1 (strips), 2 (middle), 3 (back) + // for region 1: isampling = 1 or isampling = 2 + // ieta= eta cell number + // region0,samp1: ieta=1->448 (strip 0 does not exist) + // region0,samp2: ieta=0->55 + // region0,samp3: ieta=0->26 (max eta 1.325) + // region1,samp1: ieta=0->2 (deta=0.025) + // region1,samp2: ieta=0 (only 1 cell) + + G4int Geometry::SampSeg(G4double eta, G4double radius, G4double z, + G4int& iregion, G4int& isampling, G4int& ieta, + G4int& isamp2, G4int& ieta2) const + { + static G4double Rmax1[448]; + static G4double Rmax2[56]; + static G4double Eta_max,Eta_max_s1,Eta_max_s3,R_max_acc,Z_max_acc,R_min_acc,R_min_highz; + static G4double Dr_s12; + static G4double deltaz,Z_max_lowr,dzdr; + static G4double deta; + static G4double zmax1,zmax2,zmax3,zmax4,zmax5,zmax6,zmax7,rmax1,rmax2,rmax3,rmax4; + static bool FILL = true; + if (FILL) { + + LArVG4DetectorParameters* parameters = LArVG4DetectorParameters::GetInstance(); + + // maximum eta barrel 1.475 (at r=1500.024) + Eta_max = parameters->GetValue("LArEMBMaxEtaAcceptance"); + // minimum active radius 1500.024 + R_min_acc= parameters->GetValue("LArEMBRadiusInnerAccordion"); + // maximum active radius 1960. + R_max_acc = parameters->GetValue("LArEMBFiducialRmax"); + // maximum active z (before subtracting edge for signal readout) + // currently 3150, should be changed in database to become 3164 + Z_max_acc = parameters->GetValue("LArEMBfiducialMothZmax"); + // minimum radius at z max for active region + R_min_highz=1548.; //FIXME should be taken from database + + // inactive thickness between S1 and S2 FIXME should be taken from database + Dr_s12=1.1; + + Eta_max_s1=1.4; // maximum eta region 0 + Eta_max_s3=1.325; // maximum eta for S3 in region 0 + deta=0.025; // basic granularity + + // values of the radial separations between samplings #include "LArBarrelSampling.icc" -// compute z edge taken by readout strips on the edge + // compute z edge taken by readout strips on the edge - deltaz=7.; // this include copper 6mm + 2*0.5mm empty space on each side + deltaz=7.; // this include copper 6mm + 2*0.5mm empty space on each side - zmax1=Z_max_acc-deltaz; - zmax2=Z_max_acc-2.*deltaz; - zmax3=Z_max_acc-3.*deltaz; - zmax4=Z_max_acc-4.*deltaz; - zmax5=Z_max_acc-5.*deltaz; - zmax6=Z_max_acc-6.*deltaz; - zmax7=Z_max_acc-7.*deltaz; - rmax1=R_max_acc-deltaz; - rmax2=R_max_acc-2.*deltaz; - rmax3=R_max_acc-3.*deltaz; - rmax4=R_max_acc-4.*deltaz; + zmax1=Z_max_acc-deltaz; + zmax2=Z_max_acc-2.*deltaz; + zmax3=Z_max_acc-3.*deltaz; + zmax4=Z_max_acc-4.*deltaz; + zmax5=Z_max_acc-5.*deltaz; + zmax6=Z_max_acc-6.*deltaz; + zmax7=Z_max_acc-7.*deltaz; + rmax1=R_max_acc-deltaz; + rmax2=R_max_acc-2.*deltaz; + rmax3=R_max_acc-3.*deltaz; + rmax4=R_max_acc-4.*deltaz; -// maximum z at r=1500.024 - Z_max_lowr = sinh(Eta_max)*R_min_acc; -// slope of z vs r edge (which is not projective in eta...) - dzdr = (Z_max_acc-Z_max_lowr)/(R_min_highz-R_min_acc); + // maximum z at r=1500.024 + Z_max_lowr = sinh(Eta_max)*R_min_acc; + // slope of z vs r edge (which is not projective in eta...) + dzdr = (Z_max_acc-Z_max_lowr)/(R_min_highz-R_min_acc); -// std::cout << "Initialization of SampSet " << std::endl; -// std::cout << " Rmin/Rmax " << R_min_acc << " " << R_max_acc << std::endl; -// std::cout << " Zmax/Zmax_lowR " << Z_max_acc << " " << Z_max_lowr << std::endl; -// std::cout << " Rmin_highz " << R_min_highz << std::endl; -// std::cout << " dzdr " << dzdr << std::endl; + // std::cout << "Initialization of SampSet " << std::endl; + // std::cout << " Rmin/Rmax " << R_min_acc << " " << R_max_acc << std::endl; + // std::cout << " Zmax/Zmax_lowR " << Z_max_acc << " " << Z_max_lowr << std::endl; + // std::cout << " Rmin_highz " << R_min_highz << std::endl; + // std::cout << " dzdr " << dzdr << std::endl; - FILL=false; - }; + FILL=false; + }; -// iactive = 1 if active region, 0 if region considered as inactive - G4int iactive = 1; + // iactive = 1 if active region, 0 if region considered as inactive + G4int iactive = 1; - G4double aeta=fabs(eta); + G4double aeta=std::fabs(eta); - G4double r12=-1.; - G4double r23=-1.; + G4double r12=-1.; + G4double r23=-1.; - // Not used: G4double rmax=Z_max_acc/sinh(aeta); + // Not used: G4double rmax=Z_max_acc/sinh(aeta); - G4int istrip,imid; + G4int istrip,imid; -// eta < 1.4 + // eta < 1.4 - if (aeta<Eta_max_s1) { + if (aeta<Eta_max_s1) { -// get radius for end of strips - istrip=(int) (aeta/deta*8.); - if (istrip<0 || istrip >=448) { - std::cout << " Problem aeta,istrip " << aeta << " " << istrip << std::endl; - return 0; - } - r12=Rmax1[istrip]; + // get radius for end of strips + istrip=(int) (aeta/deta*8.); + if (istrip<0 || istrip >=448) { + std::cout << " Problem aeta,istrip " << aeta << " " << istrip << std::endl; + return 0; + } + r12=Rmax1[istrip]; -// get radius for end of middle - imid = (int) (aeta/deta); - if (imid <0 || imid >=56) { - std::cout << " Problem aeta,imid " << aeta << " " << imid << std::endl; - return 0; - } - r23=Rmax2[imid]; + // get radius for end of middle + imid = (int) (aeta/deta); + if (imid <0 || imid >=56) { + std::cout << " Problem aeta,imid " << aeta << " " << imid << std::endl; + return 0; + } + r23=Rmax2[imid]; - iregion=0; + iregion=0; -// strips - if (radius <= r12) { - isampling=1; - ieta=istrip; - if (ieta==0) iactive=0; - isamp2=1; - ieta2=istrip; - } + // strips + if (radius <= r12) { + isampling=1; + ieta=istrip; + if (ieta==0) iactive=0; + isamp2=1; + ieta2=istrip; + } -// region between strips and middle => not active, same identifier as strips - else if (radius < (r12+Dr_s12)) { - isampling=1; - ieta=istrip; - iactive=0; - isamp2=1; - ieta2=istrip; - } + // region between strips and middle => not active, same identifier as strips + else if (radius < (r12+Dr_s12)) { + isampling=1; + ieta=istrip; + iactive=0; + isamp2=1; + ieta2=istrip; + } - else { - -// eta<1.325, we can be in the back - if (aeta<Eta_max_s3) { -// radius<r23 we are in the middle - if (radius <= r23) { - isampling=2; - ieta=imid; - isamp2=2; - ieta2=imid; - } -// for radius >r23 we have to take care of the readout strips at high z -// and attribute some of the energy to other cells - else { // radius>r23 - if (z>zmax1) { - isampling=2; - ieta=55; - } - else if (z>zmax2) { - isampling=2; - ieta=54; - } - else if (z>zmax3) { - isampling=2; - ieta=53; - } - else if (z>zmax4) { - isampling=3; - ieta=26; - } - else if (aeta<1.3 && z>zmax5) { - isampling=2; - ieta=52; - } - else if (aeta<1.3 && z>zmax6) { + else { + + // eta<1.325, we can be in the back + if (aeta<Eta_max_s3) { + // radius<r23 we are in the middle + if (radius <= r23) { isampling=2; - ieta=51; + ieta=imid; + isamp2=2; + ieta2=imid; } - else if (radius>rmax4 && z<zmax5 && aeta>1.2) { - if (radius>rmax1) { - isampling=2; - ieta=51; + // for radius >r23 we have to take care of the readout strips at high z + // and attribute some of the energy to other cells + else { // radius>r23 + if (z>zmax1) { + isampling=2; + ieta=55; + } + else if (z>zmax2) { + isampling=2; + ieta=54; + } + else if (z>zmax3) { + isampling=2; + ieta=53; } - else if(radius>rmax2) { - isampling=3; - ieta=25; + else if (z>zmax4) { + isampling=3; + ieta=26; } - else if (radius>rmax3) { - if (z<zmax7) { - isampling=2; - ieta=50; + else if (aeta<1.3 && z>zmax5) { + isampling=2; + ieta=52; + } + else if (aeta<1.3 && z>zmax6) { + isampling=2; + ieta=51; + } + else if (radius>rmax4 && z<zmax5 && aeta>1.2) { + if (radius>rmax1) { + isampling=2; + ieta=51; } - else { - isampling=3; - ieta=25; + else if(radius>rmax2) { + isampling=3; + ieta=25; } - } - else { - if (aeta<1.25) { - isampling=2; - ieta=49; + else if (radius>rmax3) { + if (z<zmax7) { + isampling=2; + ieta=50; + } + else { + isampling=3; + ieta=25; + } } else { - isampling=3; - ieta=25; + if (aeta<1.25) { + isampling=2; + ieta=49; + } + else { + isampling=3; + ieta=25; + } } } - } -// normal back cell - else { - isampling=3; - ieta=imid/2; + // normal back cell + else { + isampling=3; + ieta=imid/2; + isamp2=3; + ieta2=ieta; + } isamp2=3; - ieta2=ieta; + ieta2=imid/2; + } // end radius>r23 + // put into middle energy deposited along readout strips across the back + if (isampling==3 && z<zmax4 && (radius<rmax4 || aeta<1.2) ) { + double etastr; + if (imid%2==0) etastr=0.025*imid; + else etastr=0.025*(imid+1); + double delta=radius*(sinh(etastr)-sinh(aeta))/cosh(etastr); + double deltastr; + if (aeta<0.475) { deltastr=1.5;} + else if (aeta<0.80) { deltastr=2.75;} + else if (aeta<0.85) { deltastr=1.5;} + else if (aeta<1.1) { deltastr=2.75;} + else { deltastr=3.25;} + + if (std::fabs(delta)<deltastr) { + isampling=2; + ieta=imid; + } + } // end if sampling==3 + } // end if eta<1.325 + else { + isampling=2; + ieta=imid; + if (z>zmax1) { + ieta=55; } - isamp2=3; - ieta2=imid/2; - } // end radius>r23 -// put into middle energy deposited along readout strips across the back - if (isampling==3 && z<zmax4 && (radius<rmax4 || aeta<1.2) ) { - double etastr; - if (imid%2==0) etastr=0.025*imid; - else etastr=0.025*(imid+1); - double delta=radius*(sinh(etastr)-sinh(aeta))/cosh(etastr); - double deltastr; - if (aeta<0.475) { deltastr=1.5;} - else if (aeta<0.80) { deltastr=2.75;} - else if (aeta<0.85) { deltastr=1.5;} - else if (aeta<1.1) { deltastr=2.75;} - else { deltastr=3.25;} - - if (std::fabs(delta)<deltastr) { - isampling=2; - ieta=imid; + else if (z>zmax2 && aeta<1.375) { + ieta=54; } - } // end if sampling==3 - } // end if eta<1.325 - else { + isamp2=2; + ieta2=imid; + } // end eta>1.352 + } // end radius selection + } // end eta1.4 + + // eta between 1.4 and 1.475 + + if (aeta>=Eta_max_s1 && aeta<Eta_max) { + r12 = Rmax1[447]; // radius for end of sampling 1 + r23=Z_max_acc/sinh(aeta); // radius of end of sampling 2, bounded by high z end + + double zmax = Z_max_lowr + dzdr*(radius-R_min_acc); + + iregion=1; + if (radius <=r12) { + isampling=1; + ieta=int((aeta-Eta_max_s1)/deta); + if (z>zmax) iactive=0; + } + else if (radius < (r12+Dr_s12)) { + isampling=1; + ieta=int((aeta-Eta_max_s1)/deta); + iactive=0; + } + else if (radius <= r23) { isampling=2; - ieta=imid; - if (z>zmax1) { - ieta=55; - } - else if (z>zmax2 && aeta<1.375) { - ieta=54; - } - isamp2=2; - ieta2=imid; - } // end eta>1.352 - } // end radius selection - } // end eta1.4 - -// eta between 1.4 and 1.475 - - if (aeta>=Eta_max_s1 && aeta<Eta_max) { - r12 = Rmax1[447]; // radius for end of sampling 1 - r23=Z_max_acc/sinh(aeta); // radius of end of sampling 2, bounded by high z end - - double zmax = Z_max_lowr + dzdr*(radius-R_min_acc); - - iregion=1; - if (radius <=r12) { - isampling=1; - ieta=int((aeta-Eta_max_s1)/deta); - if (z>zmax) iactive=0; - } - else if (radius < (r12+Dr_s12)) { - isampling=1; - ieta=int((aeta-Eta_max_s1)/deta); + ieta=0; + if (z>zmax) iactive=0; + } + else { + isampling=2; + ieta=0; + iactive=0; + } + isamp2=isampling; + ieta2=ieta; + } + // eta above 1.475, not fiducial region, but still returns something + // for calibration hits + if (aeta>Eta_max) { + iregion=1; + r12 = Rmax1[447]; + if (radius <=r12) { + isampling=1; + ieta=2; + } + else { + isampling=2; + ieta=0; + } + isamp2=isampling; + ieta2=ieta; iactive=0; - } - else if (radius <= r23) { - isampling=2; - ieta=0; - if (z>zmax) iactive=0; - } - else { - isampling=2; - ieta=0; - iactive=0; - } - isamp2=isampling; - ieta2=ieta; - } -// eta above 1.475, not fiducial region, but still returns something -// for calibration hits - if (aeta>Eta_max) { - iregion=1; - r12 = Rmax1[447]; - if (radius <=r12) { - isampling=1; - ieta=2; - } - else { - isampling=2; - ieta=0; + } + + // cross-check of active region + if (z>Z_max_acc || radius>R_max_acc || radius<R_min_acc || aeta > Eta_max) iactive=0; + + return iactive; } - isamp2=isampling; - ieta2=ieta; - iactive=0; - } - -// cross-check of active region - if (z>Z_max_acc || radius>R_max_acc || radius<R_min_acc || aeta > Eta_max) iactive=0; - - return iactive; -} -// ======================================================================= -// function findCell -// -// compute cell in EM accordion for hit at position x,y,z,radius,eta,phi -// given in LOCAL half barrel coordinate system (Stac Geant volume) -// It has already been checked that the hit is in the accordion sensitive volume -// - -void Geometry::findCell(const double &xPosition, - const double &yPosition, - const double &zPosition, - const double &aRadius, - const double &anEta, - const double &/*aPhi*/, - const bool MapDetail, - std::string strDetector) -{ - - if (m_FIRST) { -// get pointers to access G4 geometry - m_electrode = LArStraightElectrodes::GetInstance(strDetector); - m_absorber = LArStraightAbsorbers::GetInstance(strDetector); - m_coudeelec = LArCoudeElectrodes::GetInstance(strDetector); - m_coudeabs = LArCoudeAbsorbers::GetInstance(strDetector); - m_FIRST = false; - } - - m_cellID = 0; - - if (aRadius < m_rc[0] || aRadius >= m_rc[m_Nbrt1-1]) { + // ======================================================================= + // function findCell + // + // compute cell in EM accordion for hit at position x,y,z,radius,eta,phi + // given in LOCAL half barrel coordinate system (Stac Geant volume) + // It has already been checked that the hit is in the accordion sensitive volume + // + + void Geometry::findCell(const double &xPosition, + const double &yPosition, + const double &zPosition, + const double &aRadius, + const double &anEta, + const double &/*aPhi*/, + const bool MapDetail, + std::string strDetector) const + { + + if (m_FIRST) { + // get pointers to access G4 geometry + m_electrode = LArStraightElectrodes::GetInstance(strDetector); + m_absorber = LArStraightAbsorbers::GetInstance(strDetector); + m_coudeelec = LArCoudeElectrodes::GetInstance(strDetector); + m_coudeabs = LArCoudeAbsorbers::GetInstance(strDetector); + m_FIRST = false; + } + + m_cellID = 0; + + if (aRadius < m_rc[0] || aRadius >= m_rc[m_Nbrt1-1]) { #ifdef DEBUGHITS - std::cout << " Outside Accordion " << aRadius << " " << m_rc[0] << " " << m_rc[m_Nbrt1-1] << std::endl; + std::cout << " Outside Accordion " << aRadius << " " << m_rc[0] << " " << m_rc[m_Nbrt1-1] << std::endl; #endif - return; // outside accordion - } - -// set the straight section number - m_nstraight=0; - for (int i=1;i<m_Nbrt1;i++) { - if (m_rc[i] > aRadius) break; - m_nstraight++; - } - if (m_nstraight <0 || m_nstraight >= m_Nbrt) { - std::cout << "Invalid straight number " << m_nstraight << " " << aRadius << std::endl; - return; - } - -// get the closest fold number - m_nfold=m_nstraight; - if (fabs(aRadius-m_rc[m_nfold]) > fabs(aRadius-m_rc[m_nfold+1]) ) m_nfold +=1; - if (m_nfold <0 || m_nfold >= m_Nbrt1) { - std::cout << "Invalid fold number " << m_nfold << std::endl; - return; - } - + return; // outside accordion + } + + // set the straight section number + m_nstraight=0; + for (int i=1;i<m_Nbrt1;i++) { + if (m_rc[i] > aRadius) break; + m_nstraight++; + } + if (m_nstraight <0 || m_nstraight >= m_Nbrt) { + std::cout << "Invalid straight number " << m_nstraight << " " << aRadius << std::endl; + return; + } + + // get the closest fold number + m_nfold=m_nstraight; + if (std::fabs(aRadius-m_rc[m_nfold]) > std::fabs(aRadius-m_rc[m_nfold+1]) ) m_nfold +=1; + if (m_nfold <0 || m_nfold >= m_Nbrt1) { + std::cout << "Invalid fold number " << m_nfold << std::endl; + return; + } + #ifdef DEBUGHITS - std::cout << " BarrelGeometry: radius,eta,phi " << aRadius << " " << anEta << " " << aPhi << std::endl; - std::cout << " Straight/Fold numbers " << m_nstraight << " " << m_nfold << std::endl; + std::cout << " BarrelGeometry: radius,eta,phi " << aRadius << " " << anEta << " " << aPhi << std::endl; + std::cout << " Straight/Fold numbers " << m_nstraight << " " << m_nfold << std::endl; #endif - -// eta and longitudinal segmentations - G4int ireg,isamp,ieta,isamp2,ieta2; - m_cellID = SampSeg(anEta,aRadius,zPosition,ireg,isamp,ieta,isamp2,ieta2); - - m_etaBin = ieta; - m_sampling = isamp; - m_region = ireg; - m_etaMap = ieta2; - m_sampMap = isamp2; - -// compute electrode number in phi - int phicell = PhiGap(aRadius,xPosition,yPosition); - if (phicell<0) phicell=0; -// for test beam, some protection - if (m_NCellTot !=1024) { - if (phicell>=m_NCellTot) { - if (phicell<512) phicell=m_NCellTot-1; - else phicell=0; - m_cellID=0; - } - } + + // eta and longitudinal segmentations + G4int ireg,isamp,ieta,isamp2,ieta2; + m_cellID = SampSeg(anEta,aRadius,zPosition,ireg,isamp,ieta,isamp2,ieta2); + + m_etaBin = ieta; + m_sampling = isamp; + m_region = ireg; + m_etaMap = ieta2; + m_sampMap = isamp2; + + // compute electrode number in phi + int phicell = PhiGap(aRadius,xPosition,yPosition); + if (phicell<0) phicell=0; + // for test beam, some protection + if (m_NCellTot !=1024) { + if (phicell>=m_NCellTot) { + if (phicell<512) phicell=m_NCellTot-1; + else phicell=0; + m_cellID=0; + } + } #ifdef DEBUGHITS - std::cout << " phigap " << phicell << std::endl; + std::cout << " phigap " << phicell << std::endl; #endif -// compute readout cell number - int sampling_phi_nGaps=4; - if (m_region==0 && m_sampling==1) sampling_phi_nGaps=16; + // compute readout cell number + int sampling_phi_nGaps=4; + if (m_region==0 && m_sampling==1) sampling_phi_nGaps=16; - if (m_cellID==0) { - m_phiBin = (G4int) ( phicell/sampling_phi_nGaps ); - m_distElec=9999.; - return; - } + if (m_cellID==0) { + m_phiBin = (G4int) ( phicell/sampling_phi_nGaps ); + m_distElec=9999.; + return; + } -// compute distance to electrode - G4double xl; - G4int nstr = m_nstraight; - G4double distElec = Distance_Ele(xPosition,yPosition,phicell,nstr,m_nfold,xl); + // compute distance to electrode + G4double xl; + G4int nstr = m_nstraight; + G4double distElec = Distance_Ele(xPosition,yPosition,phicell,nstr,m_nfold,xl); #ifdef DEBUGHITS - std::cout << " distElec " << distElec << std::endl; + std::cout << " distElec " << distElec << std::endl; #endif -// if distance is < 2.5mm we are sure to be in the correct gap - if (std::fabs(distElec) > 2.5) { -// try +-2 electrode in phi to get minimum distance - double dElecMin=distElec; - double xlmin=xl; - int phicellmin=phicell; - for (int ii=-2;ii<3;ii++) { - if (ii==0) continue; - int phicellnew = phicell+ii; -// for test beam no phi wrapping - if (m_NCellTot != 1024 && ( phicellnew<0 || phicellnew >= m_NCellTot)) continue; - if (phicellnew < 0) phicellnew += m_NCellTot; - if (phicellnew >= m_NCellTot) phicellnew -= m_NCellTot; - double xln; - int nstr2=m_nstraight; - double dElec = Distance_Ele(xPosition,yPosition,phicellnew,nstr2,m_nfold,xln); - if (fabs(dElec)<fabs(dElecMin)) { + // if distance is < 2.5mm we are sure to be in the correct gap + if (std::fabs(distElec) > 2.5) { + // try +-2 electrode in phi to get minimum distance + double dElecMin=distElec; + double xlmin=xl; + int phicellmin=phicell; + for (int ii=-2;ii<3;ii++) { + if (ii==0) continue; + int phicellnew = phicell+ii; + // for test beam no phi wrapping + if (m_NCellTot != 1024 && ( phicellnew<0 || phicellnew >= m_NCellTot)) continue; + if (phicellnew < 0) phicellnew += m_NCellTot; + if (phicellnew >= m_NCellTot) phicellnew -= m_NCellTot; + double xln; + int nstr2=m_nstraight; + double dElec = Distance_Ele(xPosition,yPosition,phicellnew,nstr2,m_nfold,xln); + if (std::fabs(dElec)<std::fabs(dElecMin)) { phicellmin=phicellnew; xlmin=xln; dElecMin = dElec; nstr=nstr2; + } } + m_phiGap = phicellmin; + m_distElec = dElecMin; + m_xl = xlmin; + m_nstraight = nstr; + } // end distance >2.5mm + else { + m_phiGap=phicell; + m_distElec=distElec; + m_xl=xl; + m_nstraight=nstr; } - m_phiGap = phicellmin; - m_distElec = dElecMin; - m_xl = xlmin; - m_nstraight = nstr; - } // end distance >2.5mm - else { - m_phiGap=phicell; - m_distElec=distElec; - m_xl=xl; - m_nstraight=nstr; - } #ifdef DEBUGHITS - std::cout << " final phiGap,distElec,xl " << m_phiGap << " " << m_distElec << " " - << m_xl << std::endl; + std::cout << " final phiGap,distElec,xl " << m_phiGap << " " << m_distElec << " " + << m_xl << std::endl; #endif - -// compute distance to absorber - - G4int nabs; - if (m_distElec<0) nabs=m_phiGap; - else nabs=m_phiGap+1; - if (nabs >= m_NCellMax) nabs -= m_NCellMax; - m_distAbs = Distance_Abs(xPosition,yPosition,nabs,m_nstraight,m_nfold); + + // compute distance to absorber + + G4int nabs; + if (m_distElec<0) nabs=m_phiGap; + else nabs=m_phiGap+1; + if (nabs >= m_NCellMax) nabs -= m_NCellMax; + m_distAbs = Distance_Abs(xPosition,yPosition,nabs,m_nstraight,m_nfold); #ifdef DEBUGHITS - std::cout << " nabs,distAbs " << nabs << " " << m_distAbs << std::endl; + std::cout << " nabs,distAbs " << nabs << " " << m_distAbs << std::endl; #endif -// in some rare cases near fold, the closest distance could give the wrong gap -// in such case, the signs of distAbs and distElec are not opposite as they should - if ((m_distAbs>0. && m_distElec>0) || - (m_distAbs<0. && m_distElec<0) ) { -// std::cout << "distElec and distAbs same sign " << m_distElec << " " << m_distAbs << std::endl; -// std::cout << " m_phiGap " << m_phiGap << std::endl; - if (std::fabs(m_distElec)>std::fabs(m_distAbs)) { - if (m_distAbs>0) m_phiGap += 1; - if (m_distAbs<0) m_phiGap -= 1; - if (m_NCellTot != 1024) { - if (m_phiGap <0) m_phiGap=0; - if (m_phiGap >= m_NCellTot) m_phiGap = m_NCellTot-1; - } else { - if (m_phiGap < 0) m_phiGap += m_NCellTot; - if (m_phiGap >= m_NCellTot) m_phiGap -= m_NCellTot; + // in some rare cases near fold, the closest distance could give the wrong gap + // in such case, the signs of distAbs and distElec are not opposite as they should + if ((m_distAbs>0. && m_distElec>0) || + (m_distAbs<0. && m_distElec<0) ) { + // std::cout << "distElec and distAbs same sign " << m_distElec << " " << m_distAbs << std::endl; + // std::cout << " m_phiGap " << m_phiGap << std::endl; + if (std::fabs(m_distElec)>std::fabs(m_distAbs)) { + if (m_distAbs>0) m_phiGap += 1; + if (m_distAbs<0) m_phiGap -= 1; + if (m_NCellTot != 1024) { + if (m_phiGap <0) m_phiGap=0; + if (m_phiGap >= m_NCellTot) m_phiGap = m_NCellTot-1; + } else { + if (m_phiGap < 0) m_phiGap += m_NCellTot; + if (m_phiGap >= m_NCellTot) m_phiGap -= m_NCellTot; + } + m_distElec = Distance_Ele(xPosition,yPosition,m_phiGap,m_nstraight,m_nfold,m_xl); + // std::cout << " new phiGap,distElec " << m_phiGap << " " << m_distElec << std::endl; } - m_distElec = Distance_Ele(xPosition,yPosition,m_phiGap,m_nstraight,m_nfold,m_xl); -// std::cout << " new phiGap,distElec " << m_phiGap << " " << m_distElec << std::endl; - } - } - - m_phiBin = (G4int) ( m_phiGap/sampling_phi_nGaps ); - - if (MapDetail) { -// compute x0,y0 coordinates in local electrode frame, using closest fold -// as reference - G4double alpha = m_coudeelec->PhiRot(m_nfold,m_phiGap); - G4double dx=xPosition-m_coudeelec->XCentCoude(m_nfold,m_phiGap); - G4double dy=yPosition-m_coudeelec->YCentCoude(m_nfold,m_phiGap); - G4double dx1=dx*cos(alpha)-dy*sin(alpha); - G4double dy1=dx*sin(alpha)+dy*cos(alpha); - m_x0 = dx1 + m_xc[m_nfold]; - m_y0 = dy1 + m_yc[m_nfold]; - if (m_parity==1) m_y0 = -1*m_y0; - } - - -} // end of findCell method - -// ============================================================================= -// initialize phi0 vs radius of first absorber (for gam=0) -void Geometry::GetRphi() -{ - const G4double dl=0.001; - const G4double inv_dl = 1. / dl; - G4double cenx[15],ceny[15]; - G4double xl,xl2; - G4double sum1[5000],sumx[5000]; - xl=0; - xl2=0.; - m_NRphi=5000; - m_Rmin=1500.; - m_dR=0.10; - m_Rmax=0.; - - m_2pi = 2.*M_PI; - - const G4double rint= m_rint_eleFib; - const G4double inv_rint = 1. / rint; - const G4double dt=dl * inv_rint; - const G4double inv_dt = 1. / dt; - - for (G4int i=0;i<m_NRphi;i++) { - sum1[i]=0.; - sumx[i]=0.; - } - for (G4int i=0;i<15;i++) { - cenx[i]=m_rc[i]*cos(m_phic[i]); - ceny[i]=m_rc[i]*sin(m_phic[i]); - } - - for (G4int i=0; i<15; i++) { - -// fold - G4double phi0,phi1; - if (i==0) { - // first fold goes up - if (m_parity==0) { - phi0=-CLHEP::pi/2.; - phi1=-m_delta[0]; - } - // first fold goes down - else { - phi0=m_delta[0]; - phi1=CLHEP::pi/2; - } - } - else if (i==14) { - if (m_parity==0) { - phi0=-CLHEP::pi+m_delta[13]; - phi1=-CLHEP::pi/2.; - } - else { - phi0=CLHEP::pi/2; - phi1=CLHEP::pi - m_delta[13]; - } - } - else { - if (i%2==(1-m_parity)) { - phi0=m_delta[i]; - phi1=CLHEP::pi-m_delta[i-1]; + } + + m_phiBin = (G4int) ( m_phiGap/sampling_phi_nGaps ); + + if (MapDetail) { + // compute x0,y0 coordinates in local electrode frame, using closest fold + // as reference + G4double alpha = m_coudeelec->PhiRot(m_nfold,m_phiGap); + G4double dx=xPosition-m_coudeelec->XCentCoude(m_nfold,m_phiGap); + G4double dy=yPosition-m_coudeelec->YCentCoude(m_nfold,m_phiGap); + G4double dx1=dx*cos(alpha)-dy*sin(alpha); + G4double dy1=dx*sin(alpha)+dy*cos(alpha); + m_x0 = dx1 + m_xc[m_nfold]; + m_y0 = dy1 + m_yc[m_nfold]; + if (m_parity==1) m_y0 = -1*m_y0; + } + + + } // end of findCell method + + // ============================================================================= + // initialize phi0 vs radius of first absorber (for gam=0) + void Geometry::GetRphi() + { + const G4double dl=0.001; + const G4double inv_dl = 1. / dl; + G4double cenx[15],ceny[15]; + G4double xl,xl2; + G4double sum1[5000],sumx[5000]; + xl=0; + xl2=0.; + m_NRphi=5000; + m_Rmin=1500.; + m_dR=0.10; + m_Rmax=0.; + + m_2pi = 2.*M_PI; + + const G4double rint= m_rint_eleFib; + const G4double inv_rint = 1. / rint; + const G4double dt=dl * inv_rint; + const G4double inv_dt = 1. / dt; + + for (G4int i=0;i<m_NRphi;i++) { + sum1[i]=0.; + sumx[i]=0.; + } + for (G4int i=0;i<15;i++) { + cenx[i]=m_rc[i]*cos(m_phic[i]); + ceny[i]=m_rc[i]*sin(m_phic[i]); + } + + for (G4int i=0; i<15; i++) { + + // fold + G4double phi0,phi1; + if (i==0) { + // first fold goes up + if (m_parity==0) { + phi0=-CLHEP::pi/2.; + phi1=-m_delta[0]; + } + // first fold goes down + else { + phi0=m_delta[0]; + phi1=CLHEP::pi/2; + } } - else { - phi0=-CLHEP::pi+m_delta[i-1]; - phi1=-m_delta[i]; + else if (i==14) { + if (m_parity==0) { + phi0=-CLHEP::pi+m_delta[13]; + phi1=-CLHEP::pi/2.; + } + else { + phi0=CLHEP::pi/2; + phi1=CLHEP::pi - m_delta[13]; + } } - } - xl2+=rint*fabs(phi1-phi0); - G4int nstep=int((phi1-phi0)*inv_dt)+1; - for (int ii=0;ii<nstep;ii++) { - xl+=dl; - G4double phi=phi0+dt*((G4double)ii); - G4double x=cenx[i]+rint*cos(phi); - G4double y=ceny[i]+rint*sin(phi); - G4double radius=sqrt(x*x+y*y); - if (radius>m_Rmax) m_Rmax=radius; - G4double phid=atan(y/x); - G4int ir=((int) ((radius-m_Rmin)/m_dR) ); - if (ir>=0 && ir < m_NRphi) { - sum1[ir]+=1.; - sumx[ir]+=phid; + else { + if (i%2==(1-m_parity)) { + phi0=m_delta[i]; + phi1=CLHEP::pi-m_delta[i-1]; + } + else { + phi0=-CLHEP::pi+m_delta[i-1]; + phi1=-m_delta[i]; + } } - } - -// straight section - if (i<14) { - G4double dx=cenx[i+1]-cenx[i]; - G4double dy=ceny[i+1]-ceny[i]; - G4double along=dx*dx+dy*dy-4.*rint*rint; - along=sqrt(along); - G4double x0=0.5*(cenx[i+1]+cenx[i]); - G4double y0=0.5*(ceny[i+1]+ceny[i]); - G4double phi; - if (i%2==m_parity) phi=CLHEP::pi/2-m_delta[i]; - else phi=-CLHEP::pi/2.+m_delta[i]; - G4double x1=x0-0.5*along*cos(phi); - G4double y1=y0-0.5*along*sin(phi); - xl2+=along; - int nstep=int(along*inv_dl)+1; + xl2+=rint*std::fabs(phi1-phi0); + G4int nstep=int((phi1-phi0)*inv_dt)+1; for (int ii=0;ii<nstep;ii++) { - xl+=dl; - G4double x=x1+dl*((G4double)ii)*cos(phi); - G4double y=y1+dl*((G4double)ii)*sin(phi); - G4double radius=sqrt(x*x+y*y); - if (radius>m_Rmax) m_Rmax=radius; - G4double phid=atan(y/x); - G4int ir=((int) ((radius-m_Rmin)/m_dR) ); - if (ir>=0 && ir < m_NRphi) { + xl+=dl; + G4double phi=phi0+dt*((G4double)ii); + G4double x=cenx[i]+rint*cos(phi); + G4double y=ceny[i]+rint*sin(phi); + G4double radius=sqrt(x*x+y*y); + if (radius>m_Rmax) m_Rmax=radius; + G4double phid=atan(y/x); + G4int ir=((int) ((radius-m_Rmin)/m_dR) ); + if (ir>=0 && ir < m_NRphi) { + sum1[ir]+=1.; + sumx[ir]+=phid; + } + } + + // straight section + if (i<14) { + G4double dx=cenx[i+1]-cenx[i]; + G4double dy=ceny[i+1]-ceny[i]; + G4double along=dx*dx+dy*dy-4.*rint*rint; + along=sqrt(along); + G4double x0=0.5*(cenx[i+1]+cenx[i]); + G4double y0=0.5*(ceny[i+1]+ceny[i]); + G4double phi; + if (i%2==m_parity) phi=CLHEP::pi/2-m_delta[i]; + else phi=-CLHEP::pi/2.+m_delta[i]; + G4double x1=x0-0.5*along*cos(phi); + G4double y1=y0-0.5*along*sin(phi); + xl2+=along; + int nstep=int(along*inv_dl)+1; + for (int ii=0;ii<nstep;ii++) { + xl+=dl; + G4double x=x1+dl*((G4double)ii)*cos(phi); + G4double y=y1+dl*((G4double)ii)*sin(phi); + G4double radius=sqrt(x*x+y*y); + if (radius>m_Rmax) m_Rmax=radius; + G4double phid=atan(y/x); + G4int ir=((int) ((radius-m_Rmin)/m_dR) ); + if (ir>=0 && ir < m_NRphi) { sum1[ir]+=1.; sumx[ir]+=phid; - } + } + } + } + } + // std::cout << "total electrode lenght " << xl << " " << xl2 << std::endl; + // std::cout << "rmax in accordion " << m_Rmax << std::endl; + for (int i=0; i<m_NRphi; i++) { + if (sum1[i]>0) { + m_Rphi[i]=sumx[i]/sum1[i]; + // Not used: + //G4double radius = m_Rmin + ((G4double(i))+0.5)*m_dR; + //std::cout << " GUTEST r,phi0 " << radius << " " << m_Rphi[i] << std::endl; } - } - } -// std::cout << "total electrode lenght " << xl << " " << xl2 << std::endl; -// std::cout << "rmax in accordion " << m_Rmax << std::endl; - for (int i=0; i<m_NRphi; i++) { - if (sum1[i]>0) { - m_Rphi[i]=sumx[i]/sum1[i]; - // Not used: - //G4double radius = m_Rmin + ((G4double(i))+0.5)*m_dR; - //std::cout << " GUTEST r,phi0 " << radius << " " << m_Rphi[i] << std::endl; - } - else m_Rphi[i]=0.; - } -} - -// ====================================================================================== -// phi of first absorber as function of radius for nominal accordion geometry -// (before sagging) -G4double Geometry::Phi0(G4double radius) -{ - G4int ir; - if (radius < m_Rmin) ir=0; - else { - if (radius > m_Rmax) radius=m_Rmax-0.0001; - ir=((int) ((radius-m_Rmin)/m_dR) ); - } - return m_Rphi[ir]; -} - -// ====================================================================================== -// compute number (0 to 1023) of closest electrode according to nominal -// accordion geometry -G4int Geometry::PhiGap(const double & radius, const double & xhit, const double &yhit) -{ - G4double phi0=Phi0(radius)+m_gam0; // from -pi to pi - G4double phi_hit=atan2(yhit,xhit); // from -pi to pi - G4double dphi=phi_hit-phi0; -// bring back to 0-2pi - if (dphi<0) dphi=dphi+m_2pi; - if (dphi>=m_2pi) dphi=dphi-m_2pi; - dphi=dphi/(m_2pi)*1024; - G4int ngap=((int) dphi); + else m_Rphi[i]=0.; + } + } + + // ====================================================================================== + // phi of first absorber as function of radius for nominal accordion geometry + // (before sagging) + G4double Geometry::Phi0(G4double radius) const + { + G4int ir; + if (radius < m_Rmin) ir=0; + else { + if (radius > m_Rmax) radius=m_Rmax-0.0001; + ir=((int) ((radius-m_Rmin)/m_dR) ); + } + return m_Rphi[ir]; + } + + // ====================================================================================== + // compute number (0 to 1023) of closest electrode according to nominal + // accordion geometry + G4int Geometry::PhiGap(const double & radius, const double & xhit, const double &yhit) const + { + G4double phi0=Phi0(radius)+m_gam0; // from -pi to pi + G4double phi_hit=atan2(yhit,xhit); // from -pi to pi + G4double dphi=phi_hit-phi0; + // bring back to 0-2pi + if (dphi<0) dphi=dphi+m_2pi; + if (dphi>=m_2pi) dphi=dphi-m_2pi; + dphi=dphi/(m_2pi)*1024; + G4int ngap=((int) dphi); #ifdef DEBUGHITS - std::cout << " phi0 " << phi0 << " dphi, ngap " << dphi << " " << ngap << std::endl; + std::cout << " phi0 " << phi0 << " dphi, ngap " << dphi << " " << ngap << std::endl; #endif - return ngap; -} - -//=================================================================================== -// full cell id computation starting from an arbitrary G4 step - -LArG4Identifier Geometry::CalculateIdentifier(const G4Step* a_step,std::string strDetector) -{ - -// total number of cells in phi to distinguish 1 module (testbeam case) from full Atlas - m_testbeam=false; - if (m_NCellTot != 1024) { - m_testbeam=true; - } - -// The default result is a blank identifier. - LArG4Identifier result = LArG4Identifier(); - -// Get all the required information from the current step - - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - G4ThreeVector startPoint = pre_step_point->GetPosition(); - G4ThreeVector endPoint = post_step_point->GetPosition(); - G4ThreeVector p = (startPoint + endPoint) * 0.5; - - const G4NavigationHistory* g4navigation = pre_step_point->GetTouchable()->GetHistory(); - G4int ndep = g4navigation->GetDepth(); - G4int indECAM = -999; - -// Now navigate through the volumes hierarchy - - G4String ecamName; - if (strDetector=="") ecamName = "LAr::EMB::ECAM"; - else ecamName = strDetector+"::LAr::EMB::ECAM"; - - bool inSTAC = false; - int zside=1; - for (G4int ii=0;ii<=ndep;ii++) { - G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); - G4String vname = v1->GetName(); - if ( vname == ecamName ) indECAM=ii; - if ( vname.find("STAC") !=std::string::npos) inSTAC=true; - if ( vname.find("NegPhysical") != std::string::npos) zside=-1; - } - if (indECAM>=0) - result = CalculateECAMIdentifier( a_step , indECAM, strDetector, inSTAC, zside) ; - else - std::cout << "LArBarrel::Geometry::CalculateIdentifier ECAM volume not found in hierarchy" << std::endl; - - return result; -} - -//====================================================================================== -// -// The following method computes the identifiers in the ECAM volume: -// (including dead material identifier) -// -// 1) Tranformation into LOCAL half barrel frame -// -// 2) Check if the hit is in the fiducial region (EM accordion, no presampler) -// fiducial range: 1500.24 < r < 1960.00 mm -// |eta| < 1.475 -// 4 < z < 3164 mm (in local half barrel coordinates) -// -// 3) If the hit is in the fiducial region standard identifier are filled -// -// 4) If the hit is outside the fiduacial region calibration hits are filled -// -// CaloDM_ID identifier for the barrel: -// -// detector_system/subdet/type/sampling/region/eta/phi -// -// * For hits with radius < 1500.24 -// ****************************** -// -// detector system = 10 -> Calorimeters -// subdet = +/-4 -> LAr dead materials -// type = 1 -> dead materials outside accordion and active presampler layers -// sampling = 1 -> dead materials in front and in active LAr calorimeters (starting from front warm -// cryostat walls) -// regions: = 3 -> all materials from the active layer of the barrel presampler to the active layer -// of accordion, 0 < |eta| < 1.5 -// -// ---> Granularity : deta 0.1 granularity within region -// dphi pi/32 ~ 0.1 granularity within region -// -// * For hits with radius > 1960.00 -// ****************************** -// -// detector system = 10 -> Calorimeters -// subdet = +/-4 -> LAr dead materials -// type = 1 -> dead materials outside accordion and active presampler layers -// sampling = 2 -> dead materials between active LAr calorimeters and Tile calorimeters or HEC-2 wheels -// regions: = 0 -> all materials behind the active layer of accordion in front the Tile barrel -// for |eta| < 1.0 -// =2 -> all materials in front of the scintillator and behind the active layer of accordion -// for 1.0 < |eta| < 1.5 -// -// ---> Granularity : deta 0.1 granularity within region -// dphi pi/32 ~ 0.1 granularity within region -// -//====================================================================================== - -LArG4Identifier Geometry::CalculateECAMIdentifier(const G4Step* a_step, const G4int indECAM, std::string strDetector, const bool inSTAC, int zside) -{ - - LArG4Identifier result = LArG4Identifier();; - - // Get all the information about the step - - G4StepPoint *thisStepPoint = a_step->GetPreStepPoint(); - G4StepPoint *thisStepBackPoint = a_step->GetPostStepPoint(); - G4ThreeVector startPoint = thisStepPoint->GetPosition(); - G4ThreeVector endPoint = thisStepBackPoint->GetPosition(); - G4ThreeVector p = (thisStepPoint->GetPosition() + thisStepBackPoint->GetPosition()) * 0.5; + return ngap; + } + + //=================================================================================== + // full cell id computation starting from an arbitrary G4 step + + LArG4Identifier Geometry::CalculateIdentifier(const G4Step* a_step,std::string strDetector) const + { + + // The default result is a blank identifier. + LArG4Identifier result = LArG4Identifier(); + + // Get all the required information from the current step + + G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); + G4StepPoint* post_step_point = a_step->GetPostStepPoint(); + G4ThreeVector startPoint = pre_step_point->GetPosition(); + G4ThreeVector endPoint = post_step_point->GetPosition(); + G4ThreeVector p = (startPoint + endPoint) * 0.5; + + const G4NavigationHistory* g4navigation = pre_step_point->GetTouchable()->GetHistory(); + G4int ndep = g4navigation->GetDepth(); + G4int indECAM = -999; + + // Now navigate through the volumes hierarchy + + G4String ecamName; + if (strDetector=="") ecamName = "LAr::EMB::ECAM"; + else ecamName = strDetector+"::LAr::EMB::ECAM"; + + bool inSTAC = false; + int zside=1; + for (G4int ii=0;ii<=ndep;ii++) { + G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); + G4String vname = v1->GetName(); + if ( vname == ecamName ) indECAM=ii; + if ( vname.find("STAC") !=std::string::npos) inSTAC=true; + if ( vname.find("NegPhysical") != std::string::npos) zside=-1; + } + if (indECAM>=0) + result = this->CalculateECAMIdentifier( a_step , indECAM, strDetector, inSTAC, zside) ; + else + std::cout << "LArBarrel::Geometry::CalculateIdentifier ECAM volume not found in hierarchy" << std::endl; + + return result; + } + + //====================================================================================== + // + // The following method computes the identifiers in the ECAM volume: + // (including dead material identifier) + // + // 1) Tranformation into LOCAL half barrel frame + // + // 2) Check if the hit is in the fiducial region (EM accordion, no presampler) + // fiducial range: 1500.24 < r < 1960.00 mm + // |eta| < 1.475 + // 4 < z < 3164 mm (in local half barrel coordinates) + // + // 3) If the hit is in the fiducial region standard identifier are filled + // + // 4) If the hit is outside the fiduacial region calibration hits are filled + // + // CaloDM_ID identifier for the barrel: + // + // detector_system/subdet/type/sampling/region/eta/phi + // + // * For hits with radius < 1500.24 + // ****************************** + // + // detector system = 10 -> Calorimeters + // subdet = +/-4 -> LAr dead materials + // type = 1 -> dead materials outside accordion and active presampler layers + // sampling = 1 -> dead materials in front and in active LAr calorimeters (starting from front warm + // cryostat walls) + // regions: = 3 -> all materials from the active layer of the barrel presampler to the active layer + // of accordion, 0 < |eta| < 1.5 + // + // ---> Granularity : deta 0.1 granularity within region + // dphi pi/32 ~ 0.1 granularity within region + // + // * For hits with radius > 1960.00 + // ****************************** + // + // detector system = 10 -> Calorimeters + // subdet = +/-4 -> LAr dead materials + // type = 1 -> dead materials outside accordion and active presampler layers + // sampling = 2 -> dead materials between active LAr calorimeters and Tile calorimeters or HEC-2 wheels + // regions: = 0 -> all materials behind the active layer of accordion in front the Tile barrel + // for |eta| < 1.0 + // =2 -> all materials in front of the scintillator and behind the active layer of accordion + // for 1.0 < |eta| < 1.5 + // + // ---> Granularity : deta 0.1 granularity within region + // dphi pi/32 ~ 0.1 granularity within region + // + //====================================================================================== + + LArG4Identifier Geometry::CalculateECAMIdentifier(const G4Step* a_step, const G4int indECAM, std::string strDetector, const bool inSTAC, int zside) const + { + + LArG4Identifier result = LArG4Identifier();; + + // Get all the information about the step + + G4StepPoint *thisStepPoint = a_step->GetPreStepPoint(); + G4StepPoint *thisStepBackPoint = a_step->GetPostStepPoint(); + G4ThreeVector startPoint = thisStepPoint->GetPosition(); + G4ThreeVector endPoint = thisStepBackPoint->GetPosition(); + G4ThreeVector p = (thisStepPoint->GetPosition() + thisStepBackPoint->GetPosition()) * 0.5; #ifdef DEBUGHITS - std::cout << "Position of the step in the ATLAS frame (x,y,z) --> " << p.x() << " " << p.y() << " " << p.z() << std::endl; - std::cout << "Eta and Phi in the ATLAS frame --> " << p.eta() << " " << p.phi() << std::endl; + std::cout << "Position of the step in the ATLAS frame (x,y,z) --> " << p.x() << " " << p.y() << " " << p.z() << std::endl; + std::cout << "Eta and Phi in the ATLAS frame --> " << p.eta() << " " << p.phi() << std::endl; #endif - - // BACK directly into the LOCAL half_Barrel. All the variables in this LOCAL framework get the SUFFIX Zpos - - const G4NavigationHistory* g4navigation = thisStepPoint->GetTouchable()->GetHistory(); - const G4AffineTransform transformation = g4navigation->GetTransform(indECAM); - G4ThreeVector startPointinLocal = transformation.TransformPoint(startPoint); - G4ThreeVector endPointinLocal = transformation.TransformPoint (endPoint); - G4ThreeVector midinLocal = (startPointinLocal+endPointinLocal)*0.5; - + + // BACK directly into the LOCAL half_Barrel. All the variables in this LOCAL framework get the SUFFIX Zpos + + const G4NavigationHistory* g4navigation = thisStepPoint->GetTouchable()->GetHistory(); + const G4AffineTransform transformation = g4navigation->GetTransform(indECAM); + G4ThreeVector startPointinLocal = transformation.TransformPoint(startPoint); + G4ThreeVector endPointinLocal = transformation.TransformPoint (endPoint); + G4ThreeVector midinLocal = (startPointinLocal+endPointinLocal)*0.5; + +#ifdef DEBUGHITS + std::cout << "Position of the step in the LOCAL frame (x,y,z) --> " << midinLocal.x() << " " << midinLocal.y() << " " << midinLocal.z() << std::endl; + std::cout << "Eta and Phi of the step in LOCAL frame --> " << midinLocal.eta() << " " << midinLocal.phi() << std::endl; +#endif + + // coordinates in the local frame + + G4double xZpos = midinLocal.x(); + G4double yZpos = midinLocal.y(); + G4double zZpos = midinLocal.z(); + G4double etaZpos = midinLocal.pseudoRapidity(); + G4double phiZpos = midinLocal.phi(); + if(phiZpos<0.) phiZpos = phiZpos + 2.*M_PI; + G4double radius2Zpos = xZpos*xZpos + yZpos*yZpos; + G4double radiusZpos = sqrt(radius2Zpos); + + if (m_testbeam) + m_zSide = 1; + else + m_zSide = zside; + + + // Check if the hit is in the fiducial range and in the STAC volume + // if yes this is active or inactive material + + if (inSTAC && radiusZpos >=m_rMinAccordion && radiusZpos <= m_rMaxAccordion && + zZpos <= m_zMaxBarrel && zZpos >= m_zMinBarrel && etaZpos <= m_etaMaxBarrel) { + #ifdef DEBUGHITS - std::cout << "Position of the step in the LOCAL frame (x,y,z) --> " << midinLocal.x() << " " << midinLocal.y() << " " << midinLocal.z() << std::endl; - std::cout << "Eta and Phi of the step in LOCAL frame --> " << midinLocal.eta() << " " << midinLocal.phi() << std::endl; + std::cout << "This hit is in the STAC volume !!!!! " << std::endl; #endif - // coordinates in the local frame - - G4double xZpos = midinLocal.x(); - G4double yZpos = midinLocal.y(); - G4double zZpos = midinLocal.z(); - G4double etaZpos = midinLocal.pseudoRapidity(); - G4double phiZpos = midinLocal.phi(); - if(phiZpos<0.) phiZpos = phiZpos + 2.*M_PI; - G4double radius2Zpos = xZpos*xZpos + yZpos*yZpos; - G4double radiusZpos = sqrt(radius2Zpos); - - if (m_testbeam) - m_zSide = 1; - else - m_zSide = zside; - - -// Check if the hit is in the fiducial range and in the STAC volume -// if yes this is active or inactive material - - if (inSTAC && radiusZpos >=m_rMinAccordion && radiusZpos <= m_rMaxAccordion && - zZpos <= m_zMaxBarrel && zZpos >= m_zMinBarrel && etaZpos <= m_etaMaxBarrel) { - -#ifdef DEBUGHITS - std::cout << "This hit is in the STAC volume !!!!! " << std::endl; + // DETERMINATION of m_cellID, m_zSide, m_sampling, m_phiBin, m_etaBin, m_stackNumID + bool MapDetail=false; + this->findCell( xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail, strDetector ); + + // adjust phi in the negative half barrel frame + + if( m_zSide == -1 ) + { + if( m_sampling == 1 && m_region ==0 ) + { + m_phiBin = 31 - m_phiBin; + if(m_phiBin < 0 ) m_phiBin += 64; + } + if( m_sampling == 1 && m_region ==1 ) + { + m_phiBin = 127 - m_phiBin; + if(m_phiBin < 0 ) m_phiBin += 256; + } + if( m_sampling >= 2 ) + { + m_phiBin = 127 - m_phiBin; + if(m_phiBin < 0 ) m_phiBin += 256; + } + } + + // there are few hundred microns between the 4mm nominal beginning of the active region + // and the real beginning of the first strip at eta=0.025/8 + // to avoid inactive energy with strip=0 assign this to strip=1 + if (m_sampling==1 && m_region==0 && m_etaBin==0) { + m_etaBin=1; + } + + result << 4 // LArCalorimeter + << 1 // LArEM + << m_zSide + << m_sampling + << m_region + << m_etaBin + << m_phiBin; + +#ifdef DEBUGHITS + std::cout << "Here the identifier for the barrel ACTIVE ----> " << std::endl; + std::cout << "eta in local frame --> " << etaZpos << std::endl; + std::cout << "m_zSide ----> " << m_zSide << std::endl; + std::cout << "m_sampling ----> " << m_sampling << std::endl; + std::cout << "m_region ----> " << m_region << std::endl; + std::cout << "m_etaBin ----> " << m_etaBin << std::endl; + std::cout << "m_phiBin ----> " << m_phiBin << std::endl; + G4double firsteta = thisStepPoint->GetPosition().pseudoRapidity(); + std::cout << "And also etafirst ----> " << firsteta << std::endl; #endif -// DETERMINATION of m_cellID, m_zSide, m_sampling, m_phiBin, m_etaBin, m_stackNumID - bool MapDetail=false; - Geometry::findCell( xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail, strDetector ); - - // adjust phi in the negative half barrel frame - - if( m_zSide == -1 ) - { - if( m_sampling == 1 && m_region ==0 ) - { - m_phiBin = 31 - m_phiBin; - if(m_phiBin < 0 ) m_phiBin += 64; - } - if( m_sampling == 1 && m_region ==1 ) - { - m_phiBin = 127 - m_phiBin; - if(m_phiBin < 0 ) m_phiBin += 256; - } - if( m_sampling >= 2 ) - { - m_phiBin = 127 - m_phiBin; - if(m_phiBin < 0 ) m_phiBin += 256; - } + // if (!Geometry::CheckLArIdentifier(m_sampling,m_region,m_etaBin,m_phiBin)) { + // std::cout << " ** Bad LAr identifier " << m_sampling << " " << m_region << " " + // << m_etaBin << " " << m_phiBin << std::endl; + // std::cout << " x,y,z,eta,phi " << xZpos << " " << yZpos << " " << zZpos + // << " " << radiusZpos << " " << etaZpos << " " << phiZpos << std::endl; + // } + + } + // hits in dead material part + else { + + G4int sampling=0; + G4int region=0; + G4int numDeadPhiBins = 64; + double abs_eta = std::fabs(etaZpos); + double DM1EtaWidth = 0.1 ; + double DM1PhiWidth = 2.*M_PI / numDeadPhiBins ; + m_etaBin = (G4int) ( abs_eta * (1./DM1EtaWidth) ) ; + m_phiBin = (G4int) (phiZpos/ DM1PhiWidth ); + G4int type=1; + // protect against rounding error for phi ~2pi + if (m_phiBin==numDeadPhiBins) m_phiBin=m_phiBin-1; + + // adjust phi for negative half barrel + + if ( m_zSide == -1 ) { + m_phiBin = 31 - m_phiBin; + if (m_phiBin < 0 ) m_phiBin +=64 ; + } -// there are few hundred microns between the 4mm nominal beginning of the active region -// and the real beginning of the first strip at eta=0.025/8 -// to avoid inactive energy with strip=0 assign this to strip=1 - if (m_sampling==1 && m_region==0 && m_etaBin==0) { - m_etaBin=1; - } - - result << 4 // LArCalorimeter - << 1 // LArEM - << m_zSide - << m_sampling - << m_region - << m_etaBin - << m_phiBin; - -#ifdef DEBUGHITS - std::cout << "Here the identifier for the barrel ACTIVE ----> " << std::endl; - std::cout << "eta in local frame --> " << etaZpos << std::endl; - std::cout << "m_zSide ----> " << m_zSide << std::endl; - std::cout << "m_sampling ----> " << m_sampling << std::endl; - std::cout << "m_region ----> " << m_region << std::endl; - std::cout << "m_etaBin ----> " << m_etaBin << std::endl; - std::cout << "m_phiBin ----> " << m_phiBin << std::endl; - G4double firsteta = thisStepPoint->GetPosition().pseudoRapidity(); - std::cout << "And also etafirst ----> " << firsteta << std::endl; + // material in front of the active accordion + if ( radiusZpos < m_rMinAccordion ) { + sampling =1 ; + region = 3 ; + if (m_etaBin > 14) m_etaBin=14; + +#ifdef DEBUGHITS + std::cout << "This hit is in the ECAM volume in front of the accordion (DEAD MATERIAL) !!!!! " << std::endl; +#endif + + } else if (radiusZpos >= m_rMaxAccordion){ // material behind the active accordion + sampling = 2; + + if (abs_eta < 1.0 ) { + region = 0 ; +#ifdef DEBUGHITS + std::cout << "This hit is in the ECAM volume behind accordion (DEAD MATERIAL 0) !!!!! " << std::endl; +#endif + } else if ( abs_eta >= 1.0 && abs_eta < 1.5) { + region = 2; + m_etaBin = m_etaBin - 10; // to have etabin between 0 and 4 +#ifdef DEBUGHITS + std::cout << "This hit is in the ECAM volume behind accordion (DEAD MATERIAL 2) !!!!! " << std::endl; #endif + } else { + std::cout << " LArBarrelGeometry: hit behind accordion at eta>1.5 !!! " << std::endl, + region = 2; + m_etaBin = 4; + } + + } else if (zZpos <= m_zMinBarrel) { // inactive matter between two EMB halves + type=2; + region=0; + G4int phisave=m_phiBin; + G4bool MapDetail=false; + this->findCell( xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail ,strDetector ); + sampling = m_sampling; // sampling as in normal definition + m_etaBin=0; + m_phiBin=phisave; + + } else if (zZpos >= m_zMaxBarrel || abs_eta >= 1.40) { // inactive matter between EMB and scintillator + if (abs_eta >1.0 && abs_eta < 1.5) { + sampling=2; + region=2; + m_etaBin = m_etaBin - 10; // to have etabin between 0 and 4 + } else if (abs_eta < 1.6) { + sampling=1; + region=4; + m_etaBin=0; + } else { + std::cout << " LArBarrelGeometry: hit at eta>1.6 !!! " << std::endl; + sampling=1; + region=4; + m_etaBin=0; + } + } else { + if (!m_testbeam) { + std::cout << "LArBarrelGeometry: cannot find region for DM hit..." << std::endl; + std::cout << "r,z,eta,phi " << radiusZpos << " " << zZpos << " " << etaZpos << " " << phiZpos << std::endl; + std::cout << "x,y,z (Atlas) " << p.x() << " " << p.y() << " " << p.z() << std::endl; + std::cout << " inSTAC " << inSTAC << std::endl; + G4double thisStepEnergyDeposit = a_step->GetTotalEnergyDeposit(); + std::cout << " eDeposited " << thisStepEnergyDeposit << std::endl; + G4VPhysicalVolume* vol = thisStepPoint->GetPhysicalVolume(); + G4String volName = vol->GetName(); + std::cout << " volName " << volName << std::endl; + G4int ndep = g4navigation->GetDepth(); + for (G4int ii=0;ii<=ndep;ii++) { + G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); + G4String vname = v1->GetName(); + std::cout << "vname " << vname << std::endl; + } + + } + // in test beam case, we can get there for leakage on the side (in phi) of the module + // in this case, we attribute an identifier like inactive material + else + { + G4bool MapDetail=false; + this->findCell( xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail ,strDetector ); + // std::cout << " Lateral lakage r,eta,phi " << radiusZpos << " " << etaZpos << " " + // << phiZpos << " sampling/region/eta/phi " << m_sampling << " " << + // m_region << " " << m_etaBin << " " << m_phiBin << std::endl; + // protect against small space between z=4m and real beginning of ieta=1 in strips + if (m_sampling==1 && m_region==0 && m_etaBin==0) { + m_etaBin=1; + // std::cout << "S1R0 etabin 0 found r,z,phi local " << radiusZpos << " " + // << " " << zZpos << " " << phiZpos << std::endl; + } + result << 4 // LArCalorimeter + << 1 // LArEM + << m_zSide + << m_sampling + << m_region + << m_etaBin + << m_phiBin; + return result; + } + } + + result << 10 // LArCalorimeter + << m_zSide * 4 // LArBarrel + << type + << sampling + << region + << m_etaBin + << m_phiBin; + +#ifdef DEBUGHITS + std::cout << "Here the identifier for the barrel DEAD materials ---->" << std::endl; + std::cout << "Type ----> " << type << std::endl; + std::cout << "Sampling ----> " << sampling << std::endl; + std::cout << "Region ----> " << region << std::endl; + std::cout << "m_zSide ----> " << m_zSide*4 << std::endl; + std::cout << "etaBin ----> " << m_etaBin << std::endl; + std::cout << "phiBin ----> " << m_phiBin << std::endl; +#endif + + // if (!Geometry::CheckDMIdentifier(type,sampling,region,m_etaBin,m_phiBin)) { + // std::cout << " ** Bad DM identifier " << type << " " << sampling << " " << region << " " + // << m_etaBin << " " << m_phiBin << std::endl; + // std::cout << "x,y,z,r,eta,phi" << xZpos << " " << yZpos << " " << zZpos << + // " " << radiusZpos << " " << etaZpos << " " << phiZpos << std::endl; + // } + + } + + return result; -// if (!Geometry::CheckLArIdentifier(m_sampling,m_region,m_etaBin,m_phiBin)) { -// std::cout << " ** Bad LAr identifier " << m_sampling << " " << m_region << " " -// << m_etaBin << " " << m_phiBin << std::endl; -// std::cout << " x,y,z,eta,phi " << xZpos << " " << yZpos << " " << zZpos -// << " " << radiusZpos << " " << etaZpos << " " << phiZpos << std::endl; -// } - - - } -// hits in dead material part - else { - - G4int sampling=0; - G4int region=0; - G4int numDeadPhiBins = 64; - double abs_eta = fabs(etaZpos); - double DM1EtaWidth = 0.1 ; - double DM1PhiWidth = 2.*M_PI / numDeadPhiBins ; - m_etaBin = (G4int) ( abs_eta * (1./DM1EtaWidth) ) ; - m_phiBin = (G4int) (phiZpos/ DM1PhiWidth ); - G4int type=1; - // protect against rounding error for phi ~2pi - if (m_phiBin==numDeadPhiBins) m_phiBin=m_phiBin-1; - - // adjust phi for negative half barrel - - if ( m_zSide == -1 ) { - m_phiBin = 31 - m_phiBin; - if (m_phiBin < 0 ) m_phiBin +=64 ; } -// material in front of the active accordion - if ( radiusZpos < m_rMinAccordion ) { - sampling =1 ; - region = 3 ; - if (m_etaBin > 14) m_etaBin=14; - -#ifdef DEBUGHITS - std::cout << "This hit is in the ECAM volume in front of the accordion (DEAD MATERIAL) !!!!! " << std::endl; -#endif - - } else if (radiusZpos >= m_rMaxAccordion){ // material behind the active accordion - sampling = 2; - - if (abs_eta < 1.0 ) { - region = 0 ; -#ifdef DEBUGHITS - std::cout << "This hit is in the ECAM volume behind accordion (DEAD MATERIAL 0) !!!!! " << std::endl; -#endif - } else if ( abs_eta >= 1.0 && abs_eta < 1.5) { - region = 2; - m_etaBin = m_etaBin - 10; // to have etabin between 0 and 4 -#ifdef DEBUGHITS - std::cout << "This hit is in the ECAM volume behind accordion (DEAD MATERIAL 2) !!!!! " << std::endl; -#endif - } else { - std::cout << " LArBarrelGeometry: hit behind accordion at eta>1.5 !!! " << std::endl, - region = 2; - m_etaBin = 4; + bool Geometry::CheckDMIdentifier(int type, int sampling, int region, int eta, int phi) const + { + + if (type <1 || type > 2) return false; + if (type==1) { + if (sampling<1 || sampling>2) return false; + if (sampling==1) { + if (region!=3 && region !=4) return false; + if (phi<0 || phi>63) return false; + if (region==3) { + if (eta<0 || eta>14) return false; + } + if (region==4) { + if (eta !=0) return false; + } + } + if (sampling==2) { + if (region !=0 && region !=2) return false; + if (phi<0 || phi>63) return false; + if (region==0){ + if (eta<0 || eta>9) return false; + } + if (region==2) { + if (eta<0 || eta>4) return false; + } + } + } + if (type==2) { + if (sampling<1 || sampling >3) return false; + if (region !=0) return false; + if (eta!=0) return false; + if (phi<0 || phi>63) return false; } + return true; + } + - } else if (zZpos <= m_zMinBarrel) { // inactive matter between two EMB halves - type=2; - region=0; - G4int phisave=m_phiBin; - G4bool MapDetail=false; - Geometry::findCell( xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail ,strDetector ); - sampling = m_sampling; // sampling as in normal definition - m_etaBin=0; - m_phiBin=phisave; - - } else if (zZpos >= m_zMaxBarrel || abs_eta >= 1.40) { // inactive matter between EMB and scintillator - if (abs_eta >1.0 && abs_eta < 1.5) { - sampling=2; - region=2; - m_etaBin = m_etaBin - 10; // to have etabin between 0 and 4 - } else if (abs_eta < 1.6) { - sampling=1; - region=4; - m_etaBin=0; - } else { - std::cout << " LArBarrelGeometry: hit at eta>1.6 !!! " << std::endl; - sampling=1; - region=4; - m_etaBin=0; + bool Geometry::CheckLArIdentifier(int sampling, int region, int eta, int phi) const + { + if (sampling<0 || sampling >3) return false; + if (sampling==0) { + if (region!=0) return false; + if (eta<0 || eta>60) return false; + if (phi<0 || phi>63) return false; } - } else { - if (!m_testbeam) { - std::cout << "LArBarrelGeometry: cannot find region for DM hit..." << std::endl; - std::cout << "r,z,eta,phi " << radiusZpos << " " << zZpos << " " << etaZpos << " " << phiZpos << std::endl; - std::cout << "x,y,z (Atlas) " << p.x() << " " << p.y() << " " << p.z() << std::endl; - std::cout << " inSTAC " << inSTAC << std::endl; - G4double thisStepEnergyDeposit = a_step->GetTotalEnergyDeposit(); - std::cout << " eDeposited " << thisStepEnergyDeposit << std::endl; - G4VPhysicalVolume* vol = thisStepPoint->GetPhysicalVolume(); - G4String volName = vol->GetName(); - std::cout << " volName " << volName << std::endl; - G4int ndep = g4navigation->GetDepth(); - for (G4int ii=0;ii<=ndep;ii++) { - G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); - G4String vname = v1->GetName(); - std::cout << "vname " << vname << std::endl; + if (sampling==1) { + if (region<0 || region >1) return false; + if (region==0) { + if (eta<1 || eta>447) return false; + if (phi<0 || phi>63) return false; + } + if (region==1) { + if (eta<0 || eta>2) return false; + if (phi<0 || phi>255) return false; } - } -// in test beam case, we can get there for leakage on the side (in phi) of the module -// in this case, we attribute an identifier like inactive material - else - { - G4bool MapDetail=false; - Geometry::findCell( xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail ,strDetector ); -// std::cout << " Lateral lakage r,eta,phi " << radiusZpos << " " << etaZpos << " " -// << phiZpos << " sampling/region/eta/phi " << m_sampling << " " << -// m_region << " " << m_etaBin << " " << m_phiBin << std::endl; -// protect against small space between z=4m and real beginning of ieta=1 in strips - if (m_sampling==1 && m_region==0 && m_etaBin==0) { - m_etaBin=1; -// std::cout << "S1R0 etabin 0 found r,z,phi local " << radiusZpos << " " -// << " " << zZpos << " " << phiZpos << std::endl; - } - result << 4 // LArCalorimeter - << 1 // LArEM - << m_zSide - << m_sampling - << m_region - << m_etaBin - << m_phiBin; - return result; + if (sampling==2) { + if (region<0 || region >1) return false; + if (region==0) { + if (eta<0 || eta>55) return false; + if (phi<0 || phi>255) return false; + } + if (region==1) { + if (eta!=0) return false; + if (phi<0 || phi>255) return false; + } + } + if (sampling==3) { + if (region !=0) return false; + if (eta<0 || eta>26) return false; + if (phi<0 || phi>255) return false; } + return true; } - - result << 10 // LArCalorimeter - << m_zSide * 4 // LArBarrel - << type - << sampling - << region - << m_etaBin - << m_phiBin; - -#ifdef DEBUGHITS - std::cout << "Here the identifier for the barrel DEAD materials ---->" << std::endl; - std::cout << "Type ----> " << type << std::endl; - std::cout << "Sampling ----> " << sampling << std::endl; - std::cout << "Region ----> " << region << std::endl; - std::cout << "m_zSide ----> " << m_zSide*4 << std::endl; - std::cout << "etaBin ----> " << m_etaBin << std::endl; - std::cout << "phiBin ----> " << m_phiBin << std::endl; -#endif -// if (!Geometry::CheckDMIdentifier(type,sampling,region,m_etaBin,m_phiBin)) { -// std::cout << " ** Bad DM identifier " << type << " " << sampling << " " << region << " " -// << m_etaBin << " " << m_phiBin << std::endl; -// std::cout << "x,y,z,r,eta,phi" << xZpos << " " << yZpos << " " << zZpos << -// " " << radiusZpos << " " << etaZpos << " " << phiZpos << std::endl; -// } - - } - - return result; - -} - -bool Geometry::CheckDMIdentifier(int type, int sampling, int region, int eta, int phi) -{ - - if (type <1 || type > 2) return false; - if (type==1) { - if (sampling<1 || sampling>2) return false; - if (sampling==1) { - if (region!=3 && region !=4) return false; - if (phi<0 || phi>63) return false; - if (region==3) { - if (eta<0 || eta>14) return false; - } - if (region==4) { - if (eta !=0) return false; - } - } - if (sampling==2) { - if (region !=0 && region !=2) return false; - if (phi<0 || phi>63) return false; - if (region==0){ - if (eta<0 || eta>9) return false; - } - if (region==2) { - if (eta<0 || eta>4) return false; - } - } - } - if (type==2) { - if (sampling<1 || sampling >3) return false; - if (region !=0) return false; - if (eta!=0) return false; - if (phi<0 || phi>63) return false; - } - return true; -} - - -bool Geometry::CheckLArIdentifier(int sampling, int region, int eta, int phi) -{ - if (sampling<0 || sampling >3) return false; - if (sampling==0) { - if (region!=0) return false; - if (eta<0 || eta>60) return false; - if (phi<0 || phi>63) return false; - } - if (sampling==1) { - if (region<0 || region >1) return false; - if (region==0) { - if (eta<1 || eta>447) return false; - if (phi<0 || phi>63) return false; - } - if (region==1) { - if (eta<0 || eta>2) return false; - if (phi<0 || phi>255) return false; - } - } - if (sampling==2) { - if (region<0 || region >1) return false; - if (region==0) { - if (eta<0 || eta>55) return false; - if (phi<0 || phi>255) return false; - } - if (region==1) { - if (eta!=0) return false; - if (phi<0 || phi>255) return false; - } - } - if (sampling==3) { - if (region !=0) return false; - if (eta<0 || eta>26) return false; - if (phi<0 || phi>255) return false; - } - return true; -} - -} //end of Barrel namespace + } //end of Barrel namespace } // end of LArG4 namespace diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.cc index e2e7ed18dffbbe1480f85f6a3dafb3157c9f80e6..550e977661b76640cfca4b1871b4c91ac93daa13 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.cc @@ -8,13 +8,12 @@ // Modified oct-2005 by Guillaume Unal to include current map for presampler -#include "LArG4Barrel/LArBarrelPresamplerCalculator.h" +#include "LArBarrelPresamplerCalculator.h" #include "LArG4Code/LArVG4DetectorParameters.h" #include "LArG4Code/LArG4Identifier.h" #include "LArG4Code/LArG4BirksLaw.h" #include "LArG4Barrel/LArBarrelPresamplerGeometry.h" -#include "LArG4RunControl/LArG4BarrelOptions.h" -#include "LArG4Barrel/PsMap.h" +#include "PsMap.h" #include "G4AffineTransform.hh" #include "G4NavigationHistory.hh" @@ -38,233 +37,215 @@ namespace Units = Athena::Units; // #define DEBUGSTEP -// Standard implementation of a singleton pattern. - -LArBarrelPresamplerCalculator* LArBarrelPresamplerCalculator::m_instance = 0; - //============================================================================= -LArBarrelPresamplerCalculator* LArBarrelPresamplerCalculator::GetCalculator() +LArBarrelPresamplerCalculator::LArBarrelPresamplerCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalculatorSvcImp(name, pSvcLocator) + , m_geometry(nullptr) + , m_psmap(nullptr) + , m_IflCur(true) + , m_birksLaw(nullptr) + , m_detectorName("LArMgr") + //, m_testbeam(false) + , m_volname("LArMgr::LAr::Barrel::Presampler") { - if (m_instance == 0) - { - m_instance = new LArBarrelPresamplerCalculator(); - } - return m_instance; + ATH_MSG_DEBUG("LArBarrelPresamplerCalculator: Beginning initialization "); + declareProperty("IflCur",m_IflCur); + declareProperty("DetectorName",m_detectorName); + //declareProperty("isTestbeam",m_testbeam); } -//============================================================================= -LArBarrelPresamplerCalculator::LArBarrelPresamplerCalculator() - : m_IflCur(true) - , m_birksLaw(NULL) - , m_nhits(0) - , m_detectorName("LArMgr") - , m_testbeam(false) +StatusCode LArBarrelPresamplerCalculator::initialize() { - - std::cout << "LArBarrelPresamplerCalculator: Beginning initialization " << std::endl; // Initialize private members. - m_identifier2 = LArG4Identifier(); + // m_identifier2 = LArG4Identifier(); // Access source of detector parameters. - m_parameters = LArVG4DetectorParameters::GetInstance(); + LArVG4DetectorParameters* parameters = LArVG4DetectorParameters::GetInstance(); //Inizialize the geometry calculator m_geometry = LArG4::BarrelPresampler::Geometry::GetInstance(); - if (m_IflCur) - std::cout << " LArBarrelPresamplerCalculator: start reading current maps" << std::endl; - - if (m_IflCur) m_psmap = PsMap::GetPsMap(); - else m_psmap=0; + if (m_IflCur) + { + ATH_MSG_INFO(" LArBarrelPresamplerCalculator: start reading current maps"); + m_psmap = PsMap::GetPsMap(); + } // Get the out-of-time cut from the detector parameters routine. - m_OOTcut = m_parameters->GetValue("LArExpHallOutOfTimeCut"); + m_OOTcut = parameters->GetValue("LArExpHallOutOfTimeCut"); //FIXME should be done by configurables - ISvcLocator *svcLocator = Gaudi::svcLocator(); - StoreGateSvc *detStore; - LArG4BarrelOptions *barrelOptions; - - StatusCode status = svcLocator->service("DetectorStore", detStore); - - if(status.isFailure()) - std::cout << "LArBarrelCalculator::LArBarrelCalculator() unable to get Detector Store! Using default values.\n"; - else { - status = detStore->retrieve(barrelOptions, "LArG4BarrelOptions"); - - if(status.isFailure()) - std::cout << "LArBarrelCalculator::LArBarrelCalculator() unable to get LArG4BarrelOptions! Using default values.\n"; - else { - - bool IflBirks = barrelOptions->EMBBirksLaw(); - if (IflBirks) { - const double Birks_LAr_density = 1.396; - const double Birks_k = barrelOptions->EMBBirksk(); - m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,Birks_k); - } + if (m_BirksLaw) + { + const double Birks_LAr_density = 1.396; + m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,m_Birksk); + ATH_MSG_INFO(" LArBarrelPresamplerCalculator: Birks' law ON "); + ATH_MSG_INFO(" LArBarrelPresamplerCalculator: parameter k " << m_birksLaw->k()); + } + else + { + ATH_MSG_INFO(" LArBarrelPresamplerCalculator: Birks' law OFF"); } - } - - if(m_birksLaw) { - std::cout << " LArBarrelPresamplerCalculator: Birks' law ON " << std::endl; - std::cout << " LArBarrelPresamplerCalculator: parameter k " << m_birksLaw->k() << std::endl; - } - else - std::cout << " LArBarrelPresamplerCalculator: Birks' law OFF" << std::endl; - + if(m_detectorName.size()==0) m_volname="LAr::Barrel::Presampler"; + else m_volname=m_detectorName+"::LAr::Barrel::Presampler"; - std::cout <<"End of LArBarrelPresamplerCalculator initialization " << std::endl; + ATH_MSG_DEBUG("End of LArBarrelPresamplerCalculator initialization "); + return StatusCode::SUCCESS; } //============================================================================== -LArBarrelPresamplerCalculator::~LArBarrelPresamplerCalculator() +StatusCode LArBarrelPresamplerCalculator::finalize() { - if (m_birksLaw) delete m_birksLaw; + if (m_BirksLaw) delete m_birksLaw; + return StatusCode::SUCCESS; } - // ============================================================================== -G4bool LArBarrelPresamplerCalculator::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) +G4bool LArBarrelPresamplerCalculator::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) const { - m_nhits = 0; hdata.clear(); - m_isInTime.clear(); + LArG4Identifier identifier2; -// check the Step content is non trivial + // check the Step content is non trivial G4double thisStepEnergyDeposit = a_step->GetTotalEnergyDeposit(); G4double thisStepLength = a_step->GetStepLength() / Units::mm; G4double dstep = .1*Units::mm; // length of punctual charge for Current Option #ifdef DEBUGSTEP - std::cout << "****** LArBarrelPresamplerCalculator: Step energy,length " - << thisStepEnergyDeposit << " " << thisStepLength << std::endl; + ATH_MSG_DEBUG( "****** LArBarrelPresamplerCalculator: Step energy,length " + << thisStepEnergyDeposit << " " << thisStepLength); #endif if(thisStepEnergyDeposit <= 0. || thisStepLength <= 0.) - { - return false; - } + { + return false; + } -// Get Step geometrical parameters (first and end) + // Get Step geometrical parameters (first and end) G4StepPoint *thisStepPoint = a_step->GetPreStepPoint(); G4StepPoint *thisStepBackPoint = a_step->GetPostStepPoint(); G4ThreeVector startPoint = thisStepPoint->GetPosition(); G4ThreeVector endPoint = thisStepBackPoint->GetPosition(); #ifdef DEBUGSTEP - std::cout << " Global beginning step position " + ATH_MSG_DEBUG(" Global beginning step position " << startPoint.x() << " " << startPoint.y() << " " - << startPoint.z() << std::endl; - std::cout << " Global end step position " + << startPoint.z()); + ATH_MSG_DEBUG(" Global end step position " << endPoint.x() << " " << endPoint.y() << " " - << endPoint.z() << std::endl; + << endPoint.z()); #endif -// find transformation to go inside local half presampler tube volume + // find transformation to go inside local half presampler tube volume const G4NavigationHistory* g4navigation = thisStepPoint->GetTouchable()->GetHistory(); G4int ndep = g4navigation->GetDepth(); - G4bool testbeam=false; G4int idep = -999; #ifdef DEBUGSTEP - std::cout << " Detector Name " << m_detectorName << std::endl; + ATH_MSG_DEBUG(" Detector Name " << m_detectorName); #endif + bool testbeam=false; + if(m_detectorName=="") for (G4int ii=0;ii<=ndep;ii++) { G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); + // FIXME More efficient to find the comparison volume once and compare pointers? if (v1->GetName()=="LAr::Barrel::Presampler") idep=ii; // half barrel + // FIXME Why are we checking if the geo is test beam every step? if (v1->GetName()=="LAr::TBBarrel::Cryostat::LAr") testbeam=true; // TB or not ? } else for (G4int ii=0;ii<=ndep;ii++) { G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); #ifdef DEBUGSTEP - std::cout << " Level,VolumeName " << ii << " " << v1->GetName() << std::endl; + ATH_MSG_DEBUG(" Level,VolumeName " << ii << " " << v1->GetName()); #endif - if (v1->GetName()==G4String(m_detectorName+"::LAr::Barrel::Presampler")) idep=ii; + // FIXME More efficient to find the comparison volume once and compare pointers? + if (v1->GetName()==G4String(m_detectorName+"::LAr::Barrel::Presampler")) idep=ii; + // FIXME Why are we checking if the geo is test beam every step? if (v1->GetName()==G4String(m_detectorName+"::LAr::TBBarrel::Cryostat::LAr")) testbeam=true; // TB or not ? } #ifdef DEBUGSTEP - std::cout << " idep = " << idep << std::endl; + ATH_MSG_DEBUG(" idep = " << idep); #endif if (idep<0) { - std::cout << " LArBarrelPresamplerCalculator::Process Presampler volume not found !!" << std::endl; + ATH_MSG_INFO(" LArBarrelPresamplerCalculator::Process Presampler volume not found !!"); return false; } -// transformation to go from global frame to LAr::Barrel::Presampler frame + // transformation to go from global frame to LAr::Barrel::Presampler frame const G4AffineTransform transformation = g4navigation->GetTransform(idep); -// step beginning and end in local frame + // step beginning and end in local frame G4ThreeVector startPointinLocal = - transformation.TransformPoint(startPoint); + transformation.TransformPoint(startPoint); G4ThreeVector endPointinLocal = - transformation.TransformPoint (endPoint); + transformation.TransformPoint (endPoint); #ifdef DEBUGSTEP - std::cout << " Local beginning step position " + ATH_MSG_DEBUG(" Local beginning step position " << startPointinLocal.x() << " " << startPointinLocal.y() << " " - << startPointinLocal.z() << std::endl; - std::cout << " Local end step position " + << startPointinLocal.z()); + ATH_MSG_DEBUG(" Local end step position " << endPointinLocal.x() << " " << endPointinLocal.y() << " " - << endPointinLocal.z() << std::endl; + << endPointinLocal.z()); #endif -// compute number of sub steps -// = 1 if no charge collection -// otherwise 200 microns (dstep) division + // compute number of sub steps + // = 1 if no charge collection + // otherwise 200 microns (dstep) division G4int nsub_step=1; if (m_IflCur) nsub_step=(int) (thisStepLength*(1./dstep)) + 1; -// delta is fraction of step between two sub steps + // delta is fraction of step between two sub steps G4double delta=1./((double) nsub_step); #ifdef DEBUGSTEP - std::cout << " nsub_step,delta " << nsub_step << " " << delta << std::endl; + ATH_MSG_DEBUG(" nsub_step,delta " << nsub_step << " " << delta); #endif G4double energy = a_step->GetTotalEnergyDeposit(); - if (m_birksLaw) { + if (m_BirksLaw) { const double EField = 10. ; // 10 kV/cm electric field in presampler gap - const double wholeStepLengthCm = a_step->GetStepLength() * (1./CLHEP::cm); + const double wholeStepLengthCm = a_step->GetStepLength() / CLHEP::cm; energy = (*m_birksLaw)(energy, wholeStepLengthCm, EField); } -// loop over sub steps - - -// share total step energy evenly in each sub step + // loop over sub steps + + + // share total step energy evenly in each sub step energy = energy / ((float) (nsub_step)); for (G4int i=0;i<nsub_step;i++) { -#ifdef DEBUGSTEP - std::cout << " Energy for sub step " << energy << std::endl; +#ifdef DEBUGSTEP + ATH_MSG_DEBUG(" Energy for sub step " << energy); #endif -// position for this substep + // position for this substep G4double fraction=(((G4double) i)+0.5)*delta; G4ThreeVector subinLocal=startPointinLocal*(1-fraction) + endPointinLocal*fraction; G4double xloc = subinLocal.x(); G4double yloc = subinLocal.y(); G4double zloc = subinLocal.z(); -// call geometry method to find cell from local position -// status = true if hit is in normal region (13mm LAr gap) -// this method fills the cell number as well as coordinates in the electrode frame + // call geometry method to find cell from local position + // status = true if hit is in normal region (13mm LAr gap) + // this method fills the cell number as well as coordinates in the electrode frame bool status = m_geometry->findCell(xloc,yloc,zloc); -// check fiducical cuts + // check fiducical cuts if (status) { -// compute cell identifier + // compute cell identifier G4int zSide; if (testbeam) - zSide = 1; + zSide = 1; else - zSide = ( startPoint.z() > 0.) ? 1 : -1; + zSide = ( startPoint.z() > 0.) ? 1 : -1; G4int region = m_geometry->region(); G4int etaBin = m_geometry->etaBin(); @@ -272,98 +253,96 @@ G4bool LArBarrelPresamplerCalculator::Process(const G4Step* a_step, std::vector< G4int sampling = m_geometry->sampling(); if( zSide == -1 ) - { -// following code for an Y-axis rotation to define Z < 0. Barrel part - phiBin = 31 - phiBin; - if(phiBin < 0 ) phiBin += 64; - } + { + // following code for an Y-axis rotation to define Z < 0. Barrel part + phiBin = 31 - phiBin; + if(phiBin < 0 ) phiBin += 64; + } -// check identifier - if (sampling !=0 || region != 0 || + // check identifier + if (sampling !=0 || region != 0 || etaBin <0 || etaBin > 60 || phiBin <0 || phiBin>63) continue; -// fill identifier - m_identifier2.clear(); - m_identifier2 << 4 // LArCalorimeter - << 1 // LArEM - << zSide - << sampling - << region - << etaBin - << phiBin; - -// time computation is not necessarily correct for test beam + // fill identifier + identifier2.clear(); + identifier2 << 4 // LArCalorimeter + << 1 // LArEM + << zSide + << sampling + << region + << etaBin + << phiBin; + + // time computation is not necessarily correct for test beam G4double time; if (testbeam) - { - time=0.; - } + { + time=0.; + } else - { - G4double tof; - tof = thisStepPoint->GetGlobalTime() / Units::ns; - time = tof - thisStepPoint->GetPosition().mag() * (1. / (CLHEP::c_light * CLHEP::ns)); - } + { + G4double tof; + tof = thisStepPoint->GetGlobalTime() / Units::ns; + time = tof - thisStepPoint->GetPosition().mag() * (1. / (CLHEP::c_light * CLHEP::ns)); + } G4double Current; if (!m_IflCur) { -// no charge collection Current=E from Geant - Current=energy; + // no charge collection Current=E from Geant + Current=energy; } else { -// get module number and coordinates in electrode frame + // get module number and coordinates in electrode frame G4int imodule = m_geometry->module(); G4double x0 = m_geometry->distElec(); G4double y0 = m_geometry->xElec(); -// full symmetry for angle=0 electrodes + // full symmetry for angle=0 electrodes if (imodule>1) { x0=std::fabs(x0); y0=std::fabs(y0); } -// reduced symmetry (point symmetry around 0) for tilted electrodes + // reduced symmetry (point symmetry around 0) for tilted electrodes if (imodule==0 || imodule ==1) { if (x0<0) { - x0=-1.*x0; - y0=-1.*y0; - } + x0=-1.*x0; + y0=-1.*y0; + } } #ifdef DEBUGSTEP - std::cout << " set current map for module " << imodule << std::endl; + ATH_MSG_DEBUG(" set current map for module " << imodule); #endif m_psmap->SetMap(imodule); if (!(m_psmap->Map())) { - std::cout << " LArBarrelPresamplerCalculator: cannot get map for module " << imodule << std::endl; - continue; + ATH_MSG_INFO(" LArBarrelPresamplerCalculator: cannot get map for module " << imodule); + continue; } double current0,current1,current2,gap; -// get information from current map + // get information from current map m_psmap->Map()->GetAll(x0,y0,&gap,¤t0,¤t1,¤t2); #ifdef DEBUGSTEP - std::cout << " module,x0,y0,current0 from map " << imodule << " " << x0 << " " << y0 << " " << current0 << std::endl; + ATH_MSG_DEBUG(" module,x0,y0,current0 from map " << imodule << " " << x0 << " " << y0 << " " << current0); #endif -// assume HV=2000 everywhere for the time being + // assume HV=2000 everywhere for the time being Current = energy*current0; - + } -// check if we have a new hit in a different cell, or if we add this substep -// to an already existing hit + // check if we have a new hit in a different cell, or if we add this substep + // to an already existing hit G4bool found=false; - for (int j=0; j<m_nhits; j++) { - if (hdata[j].id==m_identifier2) { - hdata[j].energy += Current; - hdata[j].time += time*Current; - found=true; - break; + for (unsigned int j=0; j<hdata.size(); j++) { + if (hdata[j].id==identifier2) { + hdata[j].energy += Current; + hdata[j].time += time*Current; + found=true; + break; } } // loop over hits if (!found) { - m_nhits++; - LArHitData newdata = {m_identifier2, time*Current, Current}; + LArHitData newdata = {identifier2, time*Current, Current}; hdata.push_back(newdata); - m_isInTime.push_back(true); } // hit was not existing before @@ -371,22 +350,19 @@ G4bool LArBarrelPresamplerCalculator::Process(const G4Step* a_step, std::vector< } // end loop over sub steps #ifdef DEBUGSTEP - std::cout << "Number of hits for this step " << m_nhits << " " - << hdata.size() << std::endl; + ATH_MSG_DEBUG("Number of hits for this step " << m_nhits << " " << hdata.size()); #endif -// finalise time computations - for (int i=0;i<m_nhits;i++) { - if (std::fabs(hdata[i].energy)>1e-6) hdata[i].time=hdata[i].time/hdata[i].energy; - else hdata[i].time=0.; - if (std::fabs(hdata[i].time)> m_OOTcut) m_isInTime[i]=false; + // finalise time computations + for (unsigned int i=0;i<hdata.size();i++) { + if (std::fabs(hdata[i].energy)>1e-6) hdata[i].time=hdata[i].time/hdata[i].energy; + else hdata[i].time=0.; #ifdef DEBUGSTEP - std::cout << "Hit Energy/Time " - << hdata[i].energy << " " << hdata[i].time << std::endl; + ATH_MSG_DEBUG("Hit Energy/Time " << hdata[i].energy << " " << hdata[i].time); #endif } - if (m_nhits>0) return true; + if (hdata.size()>0) return true; else return false; } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.h b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.h new file mode 100644 index 0000000000000000000000000000000000000000..a8a49e64cf0760879431d2dd522eecddc657d8ec --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.h @@ -0,0 +1,75 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// LArBarrelPresamplerCalculator.hh +// Prepared 05-Dec-2002 Bill Seligman + +// A first pass at determing hit cell ID in the LAr barrel presampler. + +#ifndef LARG4BARREL_LARBARRELPRESAMPLERCALCULATOR_H +#define LARG4BARREL_LARBARRELPRESAMPLERCALCULATOR_H + +#include "LArG4Code/LArG4Identifier.h" +#include "LArG4Code/LArCalculatorSvcImp.h" + +#include "globals.hh" +#include <stdexcept> +// Forward declarations. +class G4Step; +class PsMap; +class LArG4BirksLaw; +class G4String; + +namespace LArG4 { + namespace BarrelPresampler { + // Forward declaration + class Geometry; + } +} + +class LArBarrelPresamplerCalculator : public LArCalculatorSvcImp { + +public: + + LArBarrelPresamplerCalculator(const std::string& name, ISvcLocator *pSvcLocator); + virtual StatusCode initialize() override final; + virtual StatusCode finalize() override final; + + ///////////////////////////////////////////// + + virtual G4float OOTcut() const override final { return m_OOTcut; } + + virtual G4bool Process(const G4Step* a_step, std::vector<LArHitData>& hdata) const override final; + + // Check if the current hitTime is in-time + virtual G4bool isInTime(G4double hitTime) const override final + { + return !(std::fabs(hitTime) > m_OOTcut); + } + +private: + + //copy constructor + LArBarrelPresamplerCalculator(const LArBarrelPresamplerCalculator&);//coverity issue fix. Declared, but not implemented + LArBarrelPresamplerCalculator& operator=(const LArBarrelPresamplerCalculator&);//coverity issue fix. Declared, but not implemented + // + // Class for calculating the identifier. + LArG4::BarrelPresampler::Geometry* m_geometry; + + PsMap* m_psmap; + + bool m_IflCur; + + const LArG4BirksLaw *m_birksLaw; + + // detector name, for translated geometry + std::string m_detectorName; + + //bool m_testbeam; + + G4String m_volname; + +}; + +#endif // __LArBarrelPresamplerCalculator_H__ diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerGeometry.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerGeometry.cc index 8836989569347c1df0836279f3944b0b7ec29bac..ac215d406d753dabb2e8a65e722a74dc9f3f9731 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerGeometry.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerGeometry.cc @@ -2,7 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ - /******************************************************************** NAME: LArBarrelPresamplerGeometry.cxx @@ -12,7 +11,7 @@ AUTHORS: G. Unal, L. Carminati CREATED: September, 2004 PURPOSE: 'geometrical' methods used by the LArBarrelPresamplerCalculator. - These original methods (previously in LArBarrelPresampler Calculator) were + These original methods (previously in LArBarrelPresampler Calculator) were written by Bill Seligman UPDATES: - Calculate identifier method used by PresamplerCalibrationCalculator. @@ -44,14 +43,14 @@ UPDATES: - Calculate identifier method used by PresamplerCalibrationCalculator. #include <iostream> namespace LArG4 { - + namespace BarrelPresampler { -Geometry* Geometry::m_instance = 0; +Geometry* Geometry::m_instance = nullptr; Geometry* Geometry::GetInstance() { - if (m_instance == 0) + if (m_instance == nullptr) { m_instance = new Geometry(); } @@ -67,11 +66,11 @@ Geometry::Geometry() // Access source of detector parameters. m_parameters = LArVG4DetectorParameters::GetInstance(); - + // position of mother volume inside nominal Atlas frame m_zpres=1549.*CLHEP::mm; // compute positions of end of modules and of first cathode in a module in - // nominal Atlas coordinates + // nominal Atlas coordinates double eps=0.007*CLHEP::mm; m_zminPS=3.00*CLHEP::mm; // FIXME this should come from database m_end_module[0]=(m_mod[0][0]*m_cmm+2*eps)+m_zminPS+eps; @@ -84,7 +83,7 @@ Geometry::Geometry() #endif m_cat_th=m_cathode_th*m_cmm; - m_first_cathod[0]=m_zminPS+m_mod[0][5]*m_cmm+m_cat_th/2.+2*eps; + m_first_cathod[0]=m_zminPS+m_mod[0][5]*m_cmm+m_cat_th/2.+2*eps; for (int i=1;i<8;i++) m_first_cathod[i]=m_end_module[i-1]+m_mod[i][5]*m_cmm+m_cat_th/2.+2*eps; #ifdef DEBUGHITS @@ -129,60 +128,60 @@ Geometry::~Geometry() {;} //====================================================================================== // // The following method computes the identifiers in the Presampler volume: -// -// 1) Navigate through the volumes hierarchy +// +// 1) Navigate through the volumes hierarchy // // 2) Calculate identifier using the CalculatePSActiveIdentifier method if the // hit is in the Module volume and CalculatePS_DMIdentifier if the hit is // in some dead region // -//====================================================================================== +//====================================================================================== -LArG4Identifier Geometry::CalculateIdentifier(const G4Step* a_step, std::string strDetector ) +LArG4Identifier Geometry::CalculateIdentifier(const G4Step* a_step, std::string strDetector ) const { const static G4String fullPSName = "LAr::Barrel::Presampler"; const static G4String fullCryoName = "LAr::TBBarrel::Cryostat::LAr"; const static G4String fullModuleName = "LAr::Barrel::Presampler::Module"; // Get all the required information from the current step - const G4NavigationHistory* g4navigation = a_step->GetPreStepPoint()->GetTouchable()->GetHistory(); + const G4NavigationHistory* g4navigation = a_step->GetPreStepPoint()->GetTouchable()->GetHistory(); G4int ndep = g4navigation->GetDepth(); G4int iactive = -999; itb = 0 ; G4int idep = -999; - //Now navigate through the volumes hierarchy + //Now navigate through the volumes hierarchy G4VPhysicalVolume* v1; if(strDetector=="") for (G4int ii=0;ii<=ndep;ii++) { v1 = g4navigation->GetVolume(ii); if (v1->GetName()==fullPSName) idep=ii; // half barrel else if (v1->GetName()==fullCryoName) itb=1; // TB or not ? - else if (v1->GetName()==fullModuleName) iactive=1; + else if (v1->GetName()==fullModuleName) iactive=1; } else for (G4int ii=0;ii<=ndep;ii++) { v1 = g4navigation->GetVolume(ii); if (v1->GetName()==G4String(strDetector+"::LAr::Barrel::Presampler")) idep=ii; // half barrel else if (v1->GetName()==G4String(strDetector+"::LAr::TBBarrel::Cryostat::LAr")) itb=1; // TB or not ? - else if (v1->GetName()==G4String(strDetector+"::LAr::Barrel::Presampler::Module")) iactive=1; + else if (v1->GetName()==G4String(strDetector+"::LAr::Barrel::Presampler::Module")) iactive=1; } if (idep < 0) std::abort(); - if ( iactive > 0 ) { - return CalculatePSActiveIdentifier( a_step , idep , itb ); + if ( iactive > 0 ) { + return CalculatePSActiveIdentifier( a_step , idep , itb ); } return CalculatePS_DMIdentifier( a_step , idep , itb); } - + // ========================================================================================== // calculate identifier from a G4 step in the PS active region // This function should always return a valid identifier which can be used for calibration hit // even if the hit is not really in the "fiducial" active part -LArG4Identifier Geometry::CalculatePSActiveIdentifier(const G4Step* a_step, const G4int ind, const G4int itb) -{ +LArG4Identifier Geometry::CalculatePSActiveIdentifier(const G4Step* a_step, const G4int ind, const G4int itb) const +{ LArG4Identifier PSActiveID = LArG4Identifier(); G4ThreeVector p = (a_step->GetPostStepPoint()->GetPosition() + a_step->GetPreStepPoint()->GetPosition()) * 0.5; @@ -212,27 +211,27 @@ LArG4Identifier Geometry::CalculatePSActiveIdentifier(const G4Step* a_step, cons { zSide = -1; } - } + } else { zSide = 1; } - if( zSide == -1 ) + if( zSide == -1 ) //following code for an Y-axis rotation to define the side C half-barrel { - m_phiBin = 31 - m_phiBin; + m_phiBin = 31 - m_phiBin; if(m_phiBin < 0 ) m_phiBin += 64; } // Append the cell ID to the (empty) identifier. PSActiveID << 4 // LArCalorimeter - << 1 // LArEM - << zSide - << m_sampling - << m_region - << m_etaBin - << m_phiBin; + << 1 // LArEM + << zSide + << m_sampling + << m_region + << m_etaBin + << m_phiBin; #ifdef DEBUGHITS std::cout << "Here the identifier for the presampler ACTIVE ----> " << std::endl; @@ -248,28 +247,28 @@ LArG4Identifier Geometry::CalculatePSActiveIdentifier(const G4Step* a_step, cons //========================================================================================== -LArG4Identifier Geometry::CalculatePS_DMIdentifier(const G4Step* a_step, const G4int ind, const G4int itb) -{ +LArG4Identifier Geometry::CalculatePS_DMIdentifier(const G4Step* a_step, const G4int ind, const G4int itb) const +{ /****************************************************************************** CaloDM_ID identifier: - + detector_system/subdet/type/sampling/region/eta/phi detector system = 10 -> Calorimeters subdet = +/-4 -> LAr dead materials type = 1 -> dead materials outside accordion and active presampler layers - sampling = 1 -> dead materials in front and in active LAr calorimeters + sampling = 1 -> dead materials in front and in active LAr calorimeters (starting from front warm cryostat walls) regions: = 0 barrel warm wall and solenoid in front of the barrel presampler, 0 < |eta| < 1.5 = 1 barrel cryostat cold wall in front of the barrel presampler, 0 < |eta| < 1.5 - = 2 all materials in front of the barrel presampler at radius larger than cold wall + = 2 all materials in front of the barrel presampler at radius larger than cold wall outer radius, 0 < |eta| < 1.5 - = 3 all materials from the active layer of the barrel presampler to the active layer - of accordion, 0 < |eta| < 1.5 - + = 3 all materials from the active layer of the barrel presampler to the active layer + of accordion, 0 < |eta| < 1.5 + ---> Granularity : deta 0.1 granularity within region - dphi pi/32 ~ 0.1 granularity within region - + dphi pi/32 ~ 0.1 granularity within region + ***********************************************************************************/ LArG4Identifier PS_DM_ID = LArG4Identifier(); @@ -287,15 +286,15 @@ LArG4Identifier Geometry::CalculatePS_DMIdentifier(const G4Step* a_step, const G const G4NavigationHistory* g4navigation = a_step->GetPreStepPoint()->GetTouchable()->GetHistory(); G4ThreeVector ploc = g4navigation->GetTransform(ind).TransformPoint(p); G4double radius=sqrt(ploc.x()*ploc.x() + ploc.y()*ploc.y()); - + // shift z such that z=0 is eta=0 in Atlas standard frame G4ThreeVector ploc2(ploc.x(),ploc.y(),ploc.z()+m_zpres+m_zminPS); -#ifdef DEBUGHITS +#ifdef DEBUGHITS std::cout << "Position of the step after traslation (x,y,z) --> " << ploc2.x() << " " << ploc2.y() << " " << ploc2.z() << std::endl; std::cout << "Eta and Phi after translation --> " << ploc2.eta() << " " << ploc2.phi() << std::endl; -#endif - +#endif + // 01-Feb-2001 WGS: Add zSide calculation. G4int zSide = INT_MIN; // Initialize to a default, incorrect value. @@ -310,7 +309,7 @@ LArG4Identifier Geometry::CalculatePS_DMIdentifier(const G4Step* a_step, const G { zSide = -1; } - } + } else { zSide = 1; @@ -319,16 +318,16 @@ LArG4Identifier Geometry::CalculatePS_DMIdentifier(const G4Step* a_step, const G // eta,phi in "local" half barrel coordinates G4double phi = ploc2.phi(); G4double eta = ploc2.eta(); - + if ( phi < 0. ) phi += 2.*M_PI; - //G4double z2=fabs(ploc2.z()); + //G4double z2=fabs(ploc2.z()); // chek if the hit is in front of the active layer of the presampler in order to distinguish - // between regin 2 and 3: WARNING the method is temporary! - // PSModuleRmean = 1420 is the distance between the middle of the active layer (LAr) of the PS - // modules and the interaction point + // between regin 2 and 3: WARNING the method is temporary! + // PSModuleRmean = 1420 is the distance between the middle of the active layer (LAr) of the PS + // modules and the interaction point - const G4int numberPhiMod = 32; + const G4int numberPhiMod = 32; const G4double dphi = ( 2.*M_PI ) / numberPhiMod; const G4double inv_dphi = 1. / dphi; const G4double PSModuleRmean = 1420 ; @@ -339,13 +338,13 @@ LArG4Identifier Geometry::CalculatePS_DMIdentifier(const G4Step* a_step, const G } else { m_region = 2; } - + const G4double detaDM = 0.1 ; const G4double dphiDM = ( 2 * M_PI ) / 64. ; m_phiBin = G4int( phi * (1. / dphiDM) ); m_etaBin = G4int( eta * (1. / detaDM) ); - + if( zSide == -1 ) { m_phiBin = 31 - m_phiBin; @@ -357,26 +356,26 @@ LArG4Identifier Geometry::CalculatePS_DMIdentifier(const G4Step* a_step, const G // Fill identifier. PS_DM_ID << 10 // ATLAS - << zSide*4 // LArEM - << 1 - << 1 - << m_region - << m_etaBin - << m_phiBin; - -#ifdef DEBUGHITS + << zSide*4 // LArEM + << 1 + << 1 + << m_region + << m_etaBin + << m_phiBin; + +#ifdef DEBUGHITS std::cout << "Here the identifier for the presampler DEAD materials ---->" << std::endl; std::cout << "m_zSide ----> " << zSide*4 << std::endl; std::cout << "region ----> " << m_region << std::endl; std::cout << "etaBin ----> " << m_etaBin << std::endl; std::cout << "phiBin ----> " << m_phiBin << std::endl; #endif - + return PS_DM_ID ; } //=============================================================================== -// bool findCell(xloc,yloc,zloc) +// bool findCell(xloc,yloc,zloc) const // // From local PS coordinates (half barrel tube mother volume) // compute etaBin,phiBin,sampling,region @@ -399,7 +398,7 @@ LArG4Identifier Geometry::CalculatePS_DMIdentifier(const G4Step* a_step, const G // it returns false otherwise // -bool Geometry::findCell(G4double xloc,G4double yloc,G4double zloc) +bool Geometry::findCell(G4double xloc,G4double yloc,G4double zloc) const { m_sampling = 0; @@ -408,7 +407,7 @@ bool Geometry::findCell(G4double xloc,G4double yloc,G4double zloc) // eta,phi in "local" Atlas like half barrel coordinates G4double phi = atan2(yloc,xloc); if ( phi < 0. ) phi += 2.*M_PI; - G4double z2=fabs(zloc+m_zpres+m_zminPS); + G4double z2=fabs(zloc+m_zpres+m_zminPS); // According to the memo, phi is divided into 64 regions [0..63]. const G4int numberPhiBins = 64; @@ -430,14 +429,14 @@ bool Geometry::findCell(G4double xloc,G4double yloc,G4double zloc) m_etaBin=60; return false; } - + // find in which module in z the hit is m_module=0; for (int i=1;i<8;i++) { if (m_first_cathod[i]>=z2) break; m_module++; } - if (m_module <0 || m_module > 7) + if (m_module <0 || m_module > 7) { G4cerr << "LArBarrelPresampler: invalid module/hit " << m_module << " " << z2 << G4endl; if (m_module<0) m_etaBin=0; @@ -483,7 +482,7 @@ bool Geometry::findCell(G4double xloc,G4double yloc,G4double zloc) std::cout << "deltaz from first cathode,gap number " << deltaz << " " << m_gap << std::endl; #endif -// compute cell number in eta +// compute cell number in eta m_etaBin= m_gap/m_ngap_cell[m_module]; #ifdef DEBUGHITS std::cout << "etaBin inside module " << m_etaBin; diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeAbsorbers.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeAbsorbers.cc index 005af8ecb91f7aab35f2132454b1d3f540d40a28..29383f8fc005d62533dcc2d2cc36cee13805897b 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeAbsorbers.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeAbsorbers.cc @@ -2,98 +2,98 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4Barrel/LArCoudeAbsorbers.h" +#include "LArCoudeAbsorbers.h" -LArCoudeAbsorbers* LArCoudeAbsorbers::s_instance=0; +LArCoudeAbsorbers* LArCoudeAbsorbers::s_instance=nullptr; -PhysicalVolumeAccessor* LArCoudeAbsorbers::s_theCoudes=0; +PhysicalVolumeAccessor* LArCoudeAbsorbers::s_theCoudes=nullptr; LArCoudeAbsorbers* LArCoudeAbsorbers::GetInstance(std::string strDetector) { - if (s_instance==0) { + if (s_instance==nullptr) { s_instance = new LArCoudeAbsorbers(strDetector); } return s_instance; } -LArCoudeAbsorbers::LArCoudeAbsorbers(std::string strDetector) +LArCoudeAbsorbers::LArCoudeAbsorbers(std::string strDetector) { - if (s_theCoudes==0) - { - if (strDetector=="") { - s_theCoudes= - new PhysicalVolumeAccessor("LAr::EMB::STAC", - "LAr::EMB::ThinAbs::CornerDownFold"); - s_theCoudes->SetPhysicalVolumeList("LAr::EMB::ThinAbs::CornerUpFold"); - } - else { - s_theCoudes= - new PhysicalVolumeAccessor(strDetector+"::LAr::EMB::STAC", - strDetector+"::LAr::EMB::ThinAbs::CornerDownFold"); - s_theCoudes->SetPhysicalVolumeList(strDetector+"::LAr::EMB::ThinAbs::CornerUpFold"); - } - } + if (s_theCoudes==nullptr) + { + if (strDetector=="") { + s_theCoudes= + new PhysicalVolumeAccessor("LAr::EMB::STAC", + "LAr::EMB::ThinAbs::CornerDownFold"); + s_theCoudes->SetPhysicalVolumeList("LAr::EMB::ThinAbs::CornerUpFold"); + } + else { + s_theCoudes= + new PhysicalVolumeAccessor(strDetector+"::LAr::EMB::STAC", + strDetector+"::LAr::EMB::ThinAbs::CornerDownFold"); + s_theCoudes->SetPhysicalVolumeList(strDetector+"::LAr::EMB::ThinAbs::CornerUpFold"); + } + } - m_filled=false; -// std::cout << " *** List of Fold Absorbers " << std::endl; - for (int stackid=0; stackid<15; stackid++) { - for (int cellid=0; cellid<1024; cellid++) { - m_xcent[cellid][stackid] = XCentCoude(stackid,cellid); - m_ycent[cellid][stackid] = YCentCoude(stackid,cellid); - m_phirot[cellid][stackid] = PhiRot(stackid,cellid); -// std::cout << "cell,stack,x,y,phirot " -// << cellid << " " -// << stackid << " " -// << m_xcent[cellid][stackid] << " " -// << m_ycent[cellid][stackid] << " " -// << m_phirot[cellid][stackid] -// <<std::endl; - } - } - m_filled=true; + m_filled=false; + // std::cout << " *** List of Fold Absorbers " << std::endl; + for (int stackid=0; stackid<15; stackid++) { + for (int cellid=0; cellid<1024; cellid++) { + m_xcent[cellid][stackid] = XCentCoude(stackid,cellid); + m_ycent[cellid][stackid] = YCentCoude(stackid,cellid); + m_phirot[cellid][stackid] = PhiRot(stackid,cellid); + // std::cout << "cell,stack,x,y,phirot " + // << cellid << " " + // << stackid << " " + // << m_xcent[cellid][stackid] << " " + // << m_ycent[cellid][stackid] << " " + // << m_phirot[cellid][stackid] + // <<std::endl; + } + } + m_filled=true; } -double LArCoudeAbsorbers::XCentCoude(int stackid, int cellid) +double LArCoudeAbsorbers::XCentCoude(int stackid, int cellid) const { - if (m_filled) { - return m_xcent[cellid][stackid]; - } - else { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4ThreeVector& tv=pv->GetTranslation(); - return tv.x(); - } + if (m_filled) { + return m_xcent[cellid][stackid]; + } + else { + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4ThreeVector& tv=pv->GetTranslation(); + return tv.x(); + } } -double LArCoudeAbsorbers::YCentCoude(int stackid, int cellid) +double LArCoudeAbsorbers::YCentCoude(int stackid, int cellid) const { - if (m_filled) { - return m_ycent[cellid][stackid]; - } - else { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4ThreeVector& tv=pv->GetTranslation(); - return tv.y(); - } + if (m_filled) { + return m_ycent[cellid][stackid]; + } + else { + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4ThreeVector& tv=pv->GetTranslation(); + return tv.y(); + } } -double LArCoudeAbsorbers::PhiRot(int stackid, int cellid) +double LArCoudeAbsorbers::PhiRot(int stackid, int cellid) const { - if (m_filled) { - return m_phirot[cellid][stackid]; - } - else { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4RotationMatrix *rm=pv->GetRotation(); - double alpha; - if (!rm) alpha=0.; - else alpha = rm->phiX(); - if (pv->GetName().find("DownFold") != std::string::npos) alpha=alpha-3.14159; - // old way was assuming we start with a down fold if (stackid%2==0) alpha=alpha-3.14159; - return alpha; - } + if (m_filled) { + return m_phirot[cellid][stackid]; + } + else { + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4RotationMatrix *rm=pv->GetRotation(); + double alpha; + if (!rm) alpha=0.; + else alpha = rm->phiX(); + if (pv->GetName().find("DownFold") != std::string::npos) alpha=alpha-3.14159; + // old way was assuming we start with a down fold if (stackid%2==0) alpha=alpha-3.14159; + return alpha; + } } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeAbsorbers.h b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeAbsorbers.h new file mode 100644 index 0000000000000000000000000000000000000000..c34d6299f5bf6eb4f4e64fb9060f56c87b0f3e4b --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeAbsorbers.h @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4BARREL_LArCoudeAbsorbers_H +#define LARG4BARREL_LArCoudeAbsorbers_H + +#include "PhysicalVolumeAccessor.h" +#include <string> + +class LArCoudeAbsorbers { +private: + static PhysicalVolumeAccessor* s_theCoudes; + double m_xcent[1024][15]; + double m_ycent[1024][15]; + double m_phirot[1024][15]; + bool m_filled; + static LArCoudeAbsorbers* s_instance; +public: + static LArCoudeAbsorbers* GetInstance(std::string strDetector="") ; + double XCentCoude(int stackid, int cellid) const; + double YCentCoude(int stackid, int cellid) const; + double PhiRot(int stackid, int cellid) const; +protected: + LArCoudeAbsorbers(std::string strDetector="") ; +}; + +#endif // LARG4BARREL_LArCoudeAbsorbers_H diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeElectrodes.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeElectrodes.cc index 5b1e22ad914bee05b0ba1d24d5b9502a4d8eca35..0a1d773381d6966f236613e02d24fbef01a94f69 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeElectrodes.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeElectrodes.cc @@ -2,99 +2,99 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4Barrel/LArCoudeElectrodes.h" +#include "LArCoudeElectrodes.h" -LArCoudeElectrodes* LArCoudeElectrodes::s_instance=0; +LArCoudeElectrodes* LArCoudeElectrodes::s_instance=nullptr; -PhysicalVolumeAccessor* LArCoudeElectrodes::s_theCoudes=0; +PhysicalVolumeAccessor* LArCoudeElectrodes::s_theCoudes=nullptr; LArCoudeElectrodes* LArCoudeElectrodes::GetInstance(std::string strDetector) { - if (s_instance==0) { + if (s_instance==nullptr) { s_instance = new LArCoudeElectrodes(strDetector); } return s_instance; } -LArCoudeElectrodes::LArCoudeElectrodes(std::string strDetector) +LArCoudeElectrodes::LArCoudeElectrodes(std::string strDetector) { - if (s_theCoudes==0) - { - if (strDetector=="") { - s_theCoudes= - new PhysicalVolumeAccessor("LAr::EMB::STAC", - "LAr::EMB::Electrode::CornerDownFold"); - s_theCoudes->SetPhysicalVolumeList("LAr::EMB::Electrode::CornerUpFold"); - } - else { - s_theCoudes= - new PhysicalVolumeAccessor(strDetector+"::LAr::EMB::STAC", - strDetector+"::LAr::EMB::Electrode::CornerDownFold"); - s_theCoudes->SetPhysicalVolumeList(strDetector+"::LAr::EMB::Electrode::CornerUpFold"); - } - } - m_filled=false; -// std::cout << " *** List of fold electrodes " << std::endl; - for (int stackid=0; stackid<15; stackid++) { - for (int cellid=0; cellid<1024; cellid++) { - m_xcent[cellid][stackid] = XCentCoude(stackid,cellid); - m_ycent[cellid][stackid] = YCentCoude(stackid,cellid); - m_phirot[cellid][stackid] = PhiRot(stackid,cellid); -// std::cout << "cell,stack,x,y,phirot " -// << cellid << " " -// << stackid << " " -// << m_xcent[cellid][stackid] << " " -// << m_ycent[cellid][stackid] << " " -// << m_phirot[cellid][stackid] -// <<std::endl; + if (s_theCoudes==nullptr) + { + if (strDetector=="") { + s_theCoudes= + new PhysicalVolumeAccessor("LAr::EMB::STAC", + "LAr::EMB::Electrode::CornerDownFold"); + s_theCoudes->SetPhysicalVolumeList("LAr::EMB::Electrode::CornerUpFold"); + } + else { + s_theCoudes= + new PhysicalVolumeAccessor(strDetector+"::LAr::EMB::STAC", + strDetector+"::LAr::EMB::Electrode::CornerDownFold"); + s_theCoudes->SetPhysicalVolumeList(strDetector+"::LAr::EMB::Electrode::CornerUpFold"); + } + } + m_filled=false; + // std::cout << " *** List of fold electrodes " << std::endl; + for (int stackid=0; stackid<15; stackid++) { + for (int cellid=0; cellid<1024; cellid++) { + m_xcent[cellid][stackid] = XCentCoude(stackid,cellid); + m_ycent[cellid][stackid] = YCentCoude(stackid,cellid); + m_phirot[cellid][stackid] = PhiRot(stackid,cellid); + // std::cout << "cell,stack,x,y,phirot " + // << cellid << " " + // << stackid << " " + // << m_xcent[cellid][stackid] << " " + // << m_ycent[cellid][stackid] << " " + // << m_phirot[cellid][stackid] + // <<std::endl; - } - } - m_filled=true; + } + } + m_filled=true; } -double LArCoudeElectrodes::XCentCoude(int stackid, int cellid) +double LArCoudeElectrodes::XCentCoude(int stackid, int cellid) const { - if (m_filled) { - return m_xcent[cellid][stackid]; - } - else { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4ThreeVector& tv=pv->GetTranslation(); - return tv.x(); - } + if (m_filled) { + return m_xcent[cellid][stackid]; + } + else { + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4ThreeVector& tv=pv->GetTranslation(); + return tv.x(); + } } -double LArCoudeElectrodes::YCentCoude(int stackid, int cellid) +double LArCoudeElectrodes::YCentCoude(int stackid, int cellid) const { - if (m_filled) { - return m_ycent[cellid][stackid]; - } - else { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4ThreeVector& tv=pv->GetTranslation(); - return tv.y(); - } + if (m_filled) { + return m_ycent[cellid][stackid]; + } + else { + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4ThreeVector& tv=pv->GetTranslation(); + return tv.y(); + } } -double LArCoudeElectrodes::PhiRot(int stackid, int cellid) +double LArCoudeElectrodes::PhiRot(int stackid, int cellid) const { - if (m_filled) { - return m_phirot[cellid][stackid]; - } - else { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4RotationMatrix *rm=pv->GetRotation(); - double alpha; - if (!rm) alpha=0.; - else alpha = rm->phiX(); -// for down fold - if (pv->GetName().find("DownFold") != std::string::npos) alpha=alpha-3.14159; - // old way was assuming we start with a down fold if (stackid%2==0) alpha=alpha-3.14159; - return alpha; - } + if (m_filled) { + return m_phirot[cellid][stackid]; + } + else { + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4RotationMatrix *rm=pv->GetRotation(); + double alpha; + if (!rm) alpha=0.; + else alpha = rm->phiX(); + // for down fold + if (pv->GetName().find("DownFold") != std::string::npos) alpha=alpha-3.14159; + // old way was assuming we start with a down fold if (stackid%2==0) alpha=alpha-3.14159; + return alpha; + } } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeElectrodes.h b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeElectrodes.h new file mode 100644 index 0000000000000000000000000000000000000000..d532ea802026fc9db190014322ffb77b097010a8 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeElectrodes.h @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4BARREL_LArCoudeElectrodes_H +#define LARG4BARREL_LArCoudeElectrodes_H + +#include "PhysicalVolumeAccessor.h" +#include <string> + +class LArCoudeElectrodes { +private: + static PhysicalVolumeAccessor* s_theCoudes; + double m_xcent[1024][15]; + double m_ycent[1024][15]; + double m_phirot[1024][15]; + bool m_filled; + static LArCoudeElectrodes* s_instance; +public: + static LArCoudeElectrodes* GetInstance(std::string strDetector="") ; + double XCentCoude(int stackid, int cellid) const; + double YCentCoude(int stackid, int cellid) const; + double PhiRot(int stackid, int cellid) const; +protected: + LArCoudeElectrodes(std::string strDetector="") ; +}; + +#endif // LARG4BARREL_LArCoudeElectrodes_H diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudes.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudes.cc index 589df6718a8b1a6233c53a6dbe5904eb285ee62d..74335fda64e84f611ea0d0686671fb3f9573bacf 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudes.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudes.cc @@ -2,43 +2,43 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4Barrel/LArCoudes.h" +#include "LArCoudes.h" -PhysicalVolumeAccessor* LArCoudes::s_theCoudes=0; +PhysicalVolumeAccessor* LArCoudes::s_theCoudes=nullptr; -LArCoudes::LArCoudes(std::string strDetector) +LArCoudes::LArCoudes(std::string strDetector) { - if (s_theCoudes==0) - { - if(strDetector=="") - { - s_theCoudes= - new PhysicalVolumeAccessor("LAr::EMB::STAC", - "LAr::EMB::Electrode::CornerDownFold"); - s_theCoudes->SetPhysicalVolumeList("LAr::EMB::Electrode::CornerUpFold"); - } - else - { - s_theCoudes= - new PhysicalVolumeAccessor(strDetector+"::LAr::EMB::STAC", - strDetector+"::LAr::EMB::Electrode::CornerDownFold"); - s_theCoudes->SetPhysicalVolumeList(strDetector+"::LAr::EMB::Electrode::CornerUpFold"); - } - } + if (s_theCoudes==nullptr) + { + if(strDetector=="") + { + s_theCoudes= + new PhysicalVolumeAccessor("LAr::EMB::STAC", + "LAr::EMB::Electrode::CornerDownFold"); + s_theCoudes->SetPhysicalVolumeList("LAr::EMB::Electrode::CornerUpFold"); + } + else + { + s_theCoudes= + new PhysicalVolumeAccessor(strDetector+"::LAr::EMB::STAC", + strDetector+"::LAr::EMB::Electrode::CornerDownFold"); + s_theCoudes->SetPhysicalVolumeList(strDetector+"::LAr::EMB::Electrode::CornerUpFold"); + } + } } -double LArCoudes::XCentCoude(int stackid, int cellid) +double LArCoudes::XCentCoude(int stackid, int cellid) const { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); - if (!pv) std::abort(); - const G4ThreeVector& tv=pv->GetTranslation(); - return tv.x(); + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); + if (!pv) std::abort(); + const G4ThreeVector& tv=pv->GetTranslation(); + return tv.x(); } -double LArCoudes::YCentCoude(int stackid, int cellid) +double LArCoudes::YCentCoude(int stackid, int cellid) const { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); - if (!pv) std::abort(); - const G4ThreeVector& tv=pv->GetTranslation(); - return tv.y(); + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); + if (!pv) std::abort(); + const G4ThreeVector& tv=pv->GetTranslation(); + return tv.y(); } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudes.h b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudes.h new file mode 100644 index 0000000000000000000000000000000000000000..ef47d013179dbbbe54cfedcb899ef371120e7c6f --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudes.h @@ -0,0 +1,19 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4BARREL_LArCoudes_H +#define LARG4BARREL_LArCoudes_H + +#include "PhysicalVolumeAccessor.h" + +class LArCoudes { +private: + static PhysicalVolumeAccessor* s_theCoudes; +public: + LArCoudes(std::string strDetector="") ; + double XCentCoude(int stackid, int cellid) const; + double YCentCoude(int stackid, int cellid) const; +}; + +#endif // LARG4BARREL_LArCoudes_H diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightAbsorbers.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightAbsorbers.cc index d79c0fb4aaaaee9c30f416d85115c3ad135a0d9a..5fd9066bcf12602a41741997237c4884e81b5f20 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightAbsorbers.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightAbsorbers.cc @@ -2,164 +2,163 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4Barrel/LArStraightAbsorbers.h" +#include "LArStraightAbsorbers.h" #include "G4LogicalVolume.hh" #include "G4VSolid.hh" #include "G4Trap.hh" #include "LArG4Code/LArVG4DetectorParameters.h" -LArStraightAbsorbers* LArStraightAbsorbers::s_instance=0; +LArStraightAbsorbers* LArStraightAbsorbers::s_instance=nullptr; -PhysicalVolumeAccessor* LArStraightAbsorbers::s_theAbsorbers=0; +PhysicalVolumeAccessor* LArStraightAbsorbers::s_theAbsorbers=nullptr; LArStraightAbsorbers* LArStraightAbsorbers::GetInstance(std::string strDetector) { - if (s_instance==0) { + if (s_instance==nullptr) { s_instance = new LArStraightAbsorbers(strDetector); } return s_instance; } -LArStraightAbsorbers::LArStraightAbsorbers(std::string strDetector) +LArStraightAbsorbers::LArStraightAbsorbers(std::string strDetector) { - LArVG4DetectorParameters* parameters = LArVG4DetectorParameters::GetInstance(); - if (parameters->GetValue("LArEMBPhiAtCurvature",0)>0.) m_parity=0; // first wave goes up - else m_parity=1; // first wave goes down + LArVG4DetectorParameters* parameters = LArVG4DetectorParameters::GetInstance(); + if (parameters->GetValue("LArEMBPhiAtCurvature",0)>0.) m_parity=0; // first wave goes up + else m_parity=1; // first wave goes down - if (s_theAbsorbers==0) { - if (strDetector=="") - s_theAbsorbers = new PhysicalVolumeAccessor("LAr::EMB::STAC", - "LAr::EMB::ThinAbs::Straight"); - else - s_theAbsorbers = new PhysicalVolumeAccessor(strDetector+"::LAr::EMB::STAC", - strDetector+"::LAr::EMB::ThinAbs::Straight"); - } - m_filled=false; -// std::cout << " *** List of Straight absorbers " << std::endl; - for (int stackid=0; stackid<14; stackid++) { - for (int cellid=0; cellid<1024; cellid++) { - m_xcent[cellid][stackid] = XCentAbs(stackid,cellid); - m_ycent[cellid][stackid] = YCentAbs(stackid,cellid); - double slant=SlantAbs(stackid,cellid); - m_cosu[cellid][stackid] = cos(slant); - m_sinu[cellid][stackid] = sin(slant); - m_halflength[cellid][stackid] = HalfLength(stackid,cellid); -// std::cout << "cell,stack,x,y,slant,HalfL " -// << cellid << " " -// << stackid << " " -// << m_xcent[cellid][stackid] << " " -// << m_ycent[cellid][stackid] << " " -// << slant << " " -// << m_halflength[cellid][stackid] -// <<std::endl; + if (s_theAbsorbers==nullptr) { + if (strDetector=="") + s_theAbsorbers = new PhysicalVolumeAccessor("LAr::EMB::STAC", + "LAr::EMB::ThinAbs::Straight"); + else + s_theAbsorbers = new PhysicalVolumeAccessor(strDetector+"::LAr::EMB::STAC", + strDetector+"::LAr::EMB::ThinAbs::Straight"); + } + m_filled=false; + // std::cout << " *** List of Straight absorbers " << std::endl; + for (int stackid=0; stackid<14; stackid++) { + for (int cellid=0; cellid<1024; cellid++) { + m_xcent[cellid][stackid] = XCentAbs(stackid,cellid); + m_ycent[cellid][stackid] = YCentAbs(stackid,cellid); + double slant=SlantAbs(stackid,cellid); + m_cosu[cellid][stackid] = cos(slant); + m_sinu[cellid][stackid] = sin(slant); + m_halflength[cellid][stackid] = HalfLength(stackid,cellid); + // std::cout << "cell,stack,x,y,slant,HalfL " + // << cellid << " " + // << stackid << " " + // << m_xcent[cellid][stackid] << " " + // << m_ycent[cellid][stackid] << " " + // << slant << " " + // << m_halflength[cellid][stackid] + // <<std::endl; - } - } - m_filled=true; + } + } + m_filled=true; } -double LArStraightAbsorbers::XCentAbs(int stackid, int cellid) +double LArStraightAbsorbers::XCentAbs(int stackid, int cellid) const { - if (m_filled) { - return m_xcent[cellid][stackid]; - } - else { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theAbsorbers->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4ThreeVector& tv=pv->GetTranslation(); - const G4VPhysicalVolume *pv2=s_theAbsorbers->GetPhysicalVolume(1000000+id); - if (!pv2) return tv.x(); - else { - const G4ThreeVector& tv2=pv2->GetTranslation(); - const G4LogicalVolume* lv = pv->GetLogicalVolume(); - const G4Trap* trap = (G4Trap*) lv->GetSolid(); - const G4LogicalVolume* lv2 = pv2->GetLogicalVolume(); - const G4Trap* trap2 = (G4Trap*) lv2->GetSolid(); - double xl1=trap->GetYHalfLength1(); - double xl2=trap2->GetYHalfLength1(); - double x = (tv.x()*xl1+tv2.x()*xl2)/(xl1+xl2); - return x; - } - } + if (m_filled) { + return m_xcent[cellid][stackid]; + } + else { + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theAbsorbers->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4ThreeVector& tv=pv->GetTranslation(); + const G4VPhysicalVolume *pv2=s_theAbsorbers->GetPhysicalVolume(1000000+id); + if (!pv2) return tv.x(); + else { + const G4ThreeVector& tv2=pv2->GetTranslation(); + const G4LogicalVolume* lv = pv->GetLogicalVolume(); + const G4Trap* trap = (G4Trap*) lv->GetSolid(); + const G4LogicalVolume* lv2 = pv2->GetLogicalVolume(); + const G4Trap* trap2 = (G4Trap*) lv2->GetSolid(); + double xl1=trap->GetYHalfLength1(); + double xl2=trap2->GetYHalfLength1(); + double x = (tv.x()*xl1+tv2.x()*xl2)/(xl1+xl2); + return x; + } + } } -double LArStraightAbsorbers::YCentAbs(int stackid, int cellid) +double LArStraightAbsorbers::YCentAbs(int stackid, int cellid) const { - if (m_filled) { - return m_ycent[cellid][stackid]; - } - else { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theAbsorbers->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4ThreeVector& tv=pv->GetTranslation(); - const G4VPhysicalVolume *pv2=s_theAbsorbers->GetPhysicalVolume(1000000+id); - if (!pv2) return tv.y(); - else { - const G4ThreeVector& tv2=pv2->GetTranslation(); - const G4LogicalVolume* lv = pv->GetLogicalVolume(); - const G4Trap* trap = (G4Trap*) lv->GetSolid(); - const G4LogicalVolume* lv2 = pv2->GetLogicalVolume(); - const G4Trap* trap2 = (G4Trap*) lv2->GetSolid(); - double xl1=trap->GetYHalfLength1(); - double xl2=trap2->GetYHalfLength1(); - double y = (tv.y()*xl1+tv2.y()*xl2)/(xl1+xl2); - return y; + if (m_filled) { + return m_ycent[cellid][stackid]; + } + else { + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theAbsorbers->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4ThreeVector& tv=pv->GetTranslation(); + const G4VPhysicalVolume *pv2=s_theAbsorbers->GetPhysicalVolume(1000000+id); + if (!pv2) return tv.y(); + else { + const G4ThreeVector& tv2=pv2->GetTranslation(); + const G4LogicalVolume* lv = pv->GetLogicalVolume(); + const G4Trap* trap = (G4Trap*) lv->GetSolid(); + const G4LogicalVolume* lv2 = pv2->GetLogicalVolume(); + const G4Trap* trap2 = (G4Trap*) lv2->GetSolid(); + double xl1=trap->GetYHalfLength1(); + double xl2=trap2->GetYHalfLength1(); + double y = (tv.y()*xl1+tv2.y()*xl2)/(xl1+xl2); + return y; - } - } + } + } } -double LArStraightAbsorbers::SlantAbs(int stackid, int cellid) +double LArStraightAbsorbers::SlantAbs(int stackid, int cellid) const { // both stackid and cellid start from 0 in the following code - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theAbsorbers->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4RotationMatrix *rm=pv->GetRotation(); - double Slant; - Slant = (stackid%2 ==m_parity) ? 180*CLHEP::deg-(rm->thetaY()):(rm->thetaY())-180*CLHEP::deg; - if((stackid%2 == m_parity) && (rm->phiY() > 0)) Slant = 360.*CLHEP::deg - Slant; - if((stackid%2 == (1-m_parity)) && (rm->phiY() < 0)) Slant = - Slant; - return Slant; + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theAbsorbers->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4RotationMatrix *rm=pv->GetRotation(); + double Slant; + Slant = (stackid%2 ==m_parity) ? 180*CLHEP::deg-(rm->thetaY()):(rm->thetaY())-180*CLHEP::deg; + if((stackid%2 == m_parity) && (rm->phiY() > 0)) Slant = 360.*CLHEP::deg - Slant; + if((stackid%2 == (1-m_parity)) && (rm->phiY() < 0)) Slant = - Slant; + return Slant; } -double LArStraightAbsorbers::HalfLength(int stackid, int cellid) +double LArStraightAbsorbers::HalfLength(int stackid, int cellid) const { - if (m_filled) { - return m_halflength[cellid][stackid]; - } - else { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theAbsorbers->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4LogicalVolume* lv = pv->GetLogicalVolume(); - const G4Trap* trap = (G4Trap*) lv->GetSolid(); - const G4VPhysicalVolume *pv2=s_theAbsorbers->GetPhysicalVolume(1000000+id); - if (!pv2) return trap->GetYHalfLength1(); - else { - const G4LogicalVolume* lv2 = pv2->GetLogicalVolume(); - const G4Trap* trap2 = (G4Trap*) lv2->GetSolid(); - return (trap->GetYHalfLength1()+trap2->GetYHalfLength1()); - } - } + if (m_filled) { + return m_halflength[cellid][stackid]; + } + else { + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theAbsorbers->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4LogicalVolume* lv = pv->GetLogicalVolume(); + const G4Trap* trap = (G4Trap*) lv->GetSolid(); + const G4VPhysicalVolume *pv2=s_theAbsorbers->GetPhysicalVolume(1000000+id); + if (!pv2) return trap->GetYHalfLength1(); + else { + const G4LogicalVolume* lv2 = pv2->GetLogicalVolume(); + const G4Trap* trap2 = (G4Trap*) lv2->GetSolid(); + return (trap->GetYHalfLength1()+trap2->GetYHalfLength1()); + } + } } -double LArStraightAbsorbers::Cosu(int stackid, int cellid) +double LArStraightAbsorbers::Cosu(int stackid, int cellid) const { - if (m_filled) { - return m_cosu[cellid][stackid]; - } - else { - return cos(SlantAbs(stackid,cellid)); - } + if (m_filled) { + return m_cosu[cellid][stackid]; + } + else { + return cos(SlantAbs(stackid,cellid)); + } } -double LArStraightAbsorbers::Sinu(int stackid, int cellid) +double LArStraightAbsorbers::Sinu(int stackid, int cellid) const { - if (m_filled) { - return m_sinu[cellid][stackid]; - } - else { - return sin(SlantAbs(stackid,cellid)); - } + if (m_filled) { + return m_sinu[cellid][stackid]; + } + else { + return sin(SlantAbs(stackid,cellid)); + } } - diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightAbsorbers.h b/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightAbsorbers.h new file mode 100644 index 0000000000000000000000000000000000000000..3c01efaf57e7d8ccc7d2ed5f37c75892847f49c3 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightAbsorbers.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4BARREL_LArStraightAbsorbers_H +#define LARG4BARREL_LArStraightAbsorbers_H + +#include "PhysicalVolumeAccessor.h" +#include <string> + +class LArStraightAbsorbers { +private: + static PhysicalVolumeAccessor* s_theAbsorbers; + double m_xcent[1024][14]; + double m_ycent[1024][14]; + double m_cosu[1024][14]; + double m_sinu[1024][14]; + double m_halflength[1024][14]; + bool m_filled; + static LArStraightAbsorbers* s_instance; + int m_parity; +public: + static LArStraightAbsorbers* GetInstance(std::string strDetector="") ; + double XCentAbs(int stackid, int cellid) const; + double YCentAbs(int stackid, int cellid) const; + double SlantAbs(int stackid, int cellid) const; + double HalfLength(int stackid, int cellid) const; + double Cosu(int stackid, int cellid) const; + double Sinu(int stackid, int cellid) const; +protected: + LArStraightAbsorbers(std::string strDetector="") ; +}; + +#endif // LARG4BARREL_LArStraightAbsorbers_H diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightElectrodes.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightElectrodes.cc index b7bbffada7dca264f9c2aa868a05b7a9f07fc6ef..b3b841d481246b102fa8098b57c4cd2bfc907293 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightElectrodes.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightElectrodes.cc @@ -2,163 +2,162 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4Barrel/LArStraightElectrodes.h" +#include "LArStraightElectrodes.h" #include "G4LogicalVolume.hh" #include "G4VSolid.hh" #include "G4Trap.hh" #include "LArG4Code/LArVG4DetectorParameters.h" -LArStraightElectrodes* LArStraightElectrodes::s_instance=0; +LArStraightElectrodes* LArStraightElectrodes::s_instance=nullptr; -PhysicalVolumeAccessor* LArStraightElectrodes::s_theElectrodes=0; +PhysicalVolumeAccessor* LArStraightElectrodes::s_theElectrodes=nullptr; LArStraightElectrodes* LArStraightElectrodes::GetInstance(std::string strDetector) { - if (s_instance==0) { + if (s_instance==nullptr) { s_instance = new LArStraightElectrodes(strDetector); } return s_instance; } -LArStraightElectrodes::LArStraightElectrodes(std::string strDetector) +LArStraightElectrodes::LArStraightElectrodes(std::string strDetector) { - LArVG4DetectorParameters* parameters = LArVG4DetectorParameters::GetInstance(); - if (parameters->GetValue("LArEMBPhiAtCurvature",0)>0.) m_parity=0; // first wave goes up - else m_parity=1; // first wave goes down + LArVG4DetectorParameters* parameters = LArVG4DetectorParameters::GetInstance(); + if (parameters->GetValue("LArEMBPhiAtCurvature",0)>0.) m_parity=0; // first wave goes up + else m_parity=1; // first wave goes down - if (s_theElectrodes==0) { - if (strDetector=="") - s_theElectrodes=new PhysicalVolumeAccessor("LAr::EMB::STAC", - "LAr::EMB::Electrode::Straight"); - else - s_theElectrodes=new PhysicalVolumeAccessor(strDetector+"::LAr::EMB::STAC", - strDetector+"::LAr::EMB::Electrode::Straight"); - } -// std::cout << "*** List of StraightElectrodes " << s_theElectrodes << std::endl; - m_filled=false; - for (int stackid=0; stackid<14; stackid++) { - for (int cellid=0; cellid<1024; cellid++) { - m_xcent[cellid][stackid] = XCentEle(stackid,cellid); - m_ycent[cellid][stackid] = YCentEle(stackid,cellid); - double slant=SlantEle(stackid,cellid); - m_cosu[cellid][stackid] = cos(slant); - m_sinu[cellid][stackid] = sin(slant); - m_halflength[cellid][stackid] = HalfLength(stackid,cellid); -// std::cout << "cell,stack,x,y,slant,HalfL " -// << cellid << " " -// << stackid << " " -// << m_xcent[cellid][stackid] << " " -// << m_ycent[cellid][stackid] << " " -// << slant << " " -// << m_halflength[cellid][stackid] -// <<std::endl; - } - } - m_filled=true; + if (s_theElectrodes==nullptr) { + if (strDetector=="") + s_theElectrodes=new PhysicalVolumeAccessor("LAr::EMB::STAC", + "LAr::EMB::Electrode::Straight"); + else + s_theElectrodes=new PhysicalVolumeAccessor(strDetector+"::LAr::EMB::STAC", + strDetector+"::LAr::EMB::Electrode::Straight"); + } + // std::cout << "*** List of StraightElectrodes " << s_theElectrodes << std::endl; + m_filled=false; + for (int stackid=0; stackid<14; stackid++) { + for (int cellid=0; cellid<1024; cellid++) { + m_xcent[cellid][stackid] = XCentEle(stackid,cellid); + m_ycent[cellid][stackid] = YCentEle(stackid,cellid); + double slant=SlantEle(stackid,cellid); + m_cosu[cellid][stackid] = cos(slant); + m_sinu[cellid][stackid] = sin(slant); + m_halflength[cellid][stackid] = HalfLength(stackid,cellid); + // std::cout << "cell,stack,x,y,slant,HalfL " + // << cellid << " " + // << stackid << " " + // << m_xcent[cellid][stackid] << " " + // << m_ycent[cellid][stackid] << " " + // << slant << " " + // << m_halflength[cellid][stackid] + // <<std::endl; + } + } + m_filled=true; } -double LArStraightElectrodes::XCentEle(int stackid, int cellid) +double LArStraightElectrodes::XCentEle(int stackid, int cellid) const { - if (m_filled) { - return m_xcent[cellid][stackid]; - } - else { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theElectrodes->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4ThreeVector& tv=pv->GetTranslation(); - const G4VPhysicalVolume *pv2=s_theElectrodes->GetPhysicalVolume(1000000+id); - if (!pv2) return tv.x(); - else { - const G4ThreeVector& tv2=pv2->GetTranslation(); - const G4LogicalVolume* lv = pv->GetLogicalVolume(); - const G4Trap* trap = (G4Trap*) lv->GetSolid(); - const G4LogicalVolume* lv2 = pv2->GetLogicalVolume(); - const G4Trap* trap2 = (G4Trap*) lv2->GetSolid(); - double xl1=trap->GetYHalfLength1(); - double xl2=trap2->GetYHalfLength1(); - double x = (tv.x()*xl1+tv2.x()*xl2)/(xl1+xl2); - return x; - } + if (m_filled) { + return m_xcent[cellid][stackid]; + } + else { + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theElectrodes->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4ThreeVector& tv=pv->GetTranslation(); + const G4VPhysicalVolume *pv2=s_theElectrodes->GetPhysicalVolume(1000000+id); + if (!pv2) return tv.x(); + else { + const G4ThreeVector& tv2=pv2->GetTranslation(); + const G4LogicalVolume* lv = pv->GetLogicalVolume(); + const G4Trap* trap = (G4Trap*) lv->GetSolid(); + const G4LogicalVolume* lv2 = pv2->GetLogicalVolume(); + const G4Trap* trap2 = (G4Trap*) lv2->GetSolid(); + double xl1=trap->GetYHalfLength1(); + double xl2=trap2->GetYHalfLength1(); + double x = (tv.x()*xl1+tv2.x()*xl2)/(xl1+xl2); + return x; + } - } + } } -double LArStraightElectrodes::YCentEle(int stackid, int cellid) +double LArStraightElectrodes::YCentEle(int stackid, int cellid) const { - if (m_filled) { - return m_ycent[cellid][stackid]; - } - else { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theElectrodes->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4ThreeVector& tv=pv->GetTranslation(); - const G4VPhysicalVolume *pv2=s_theElectrodes->GetPhysicalVolume(1000000+id); - if (!pv2) return tv.y(); - else { - const G4ThreeVector& tv2=pv2->GetTranslation(); - const G4LogicalVolume* lv = pv->GetLogicalVolume(); - const G4Trap* trap = (G4Trap*) lv->GetSolid(); - const G4LogicalVolume* lv2 = pv2->GetLogicalVolume(); - const G4Trap* trap2 = (G4Trap*) lv2->GetSolid(); - double xl1=trap->GetYHalfLength1(); - double xl2=trap2->GetYHalfLength1(); - double y = (tv.y()*xl1+tv2.y()*xl2)/(xl1+xl2); - return y; + if (m_filled) { + return m_ycent[cellid][stackid]; + } + else { + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theElectrodes->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4ThreeVector& tv=pv->GetTranslation(); + const G4VPhysicalVolume *pv2=s_theElectrodes->GetPhysicalVolume(1000000+id); + if (!pv2) return tv.y(); + else { + const G4ThreeVector& tv2=pv2->GetTranslation(); + const G4LogicalVolume* lv = pv->GetLogicalVolume(); + const G4Trap* trap = (G4Trap*) lv->GetSolid(); + const G4LogicalVolume* lv2 = pv2->GetLogicalVolume(); + const G4Trap* trap2 = (G4Trap*) lv2->GetSolid(); + double xl1=trap->GetYHalfLength1(); + double xl2=trap2->GetYHalfLength1(); + double y = (tv.y()*xl1+tv2.y()*xl2)/(xl1+xl2); + return y; - } + } - } + } } -double LArStraightElectrodes::SlantEle(int stackid, int cellid) +double LArStraightElectrodes::SlantEle(int stackid, int cellid) const { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theElectrodes->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4RotationMatrix *rm=pv->GetRotation(); - double Slant; - Slant = (stackid%2 ==m_parity) ? 180*CLHEP::deg-(rm->thetaY()):(rm->thetaY())-180*CLHEP::deg; - if((stackid%2 == m_parity) && (rm->phiY() > 0)) Slant = 360.*CLHEP::deg - Slant; - if((stackid%2 == (1-m_parity)) && (rm->phiY() < 0)) Slant = - Slant; - return Slant; + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theElectrodes->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4RotationMatrix *rm=pv->GetRotation(); + double Slant; + Slant = (stackid%2 ==m_parity) ? 180*CLHEP::deg-(rm->thetaY()):(rm->thetaY())-180*CLHEP::deg; + if((stackid%2 == m_parity) && (rm->phiY() > 0)) Slant = 360.*CLHEP::deg - Slant; + if((stackid%2 == (1-m_parity)) && (rm->phiY() < 0)) Slant = - Slant; + return Slant; } -double LArStraightElectrodes::HalfLength(int stackid, int cellid) +double LArStraightElectrodes::HalfLength(int stackid, int cellid) const { - if (m_filled) { - return m_halflength[cellid][stackid]; - } - else { - int id=cellid+stackid*10000; - const G4VPhysicalVolume *pv=s_theElectrodes->GetPhysicalVolume(id); - if (!pv) return 0.; - const G4LogicalVolume* lv = pv->GetLogicalVolume(); - const G4Trap* trap = (G4Trap*) lv->GetSolid(); - const G4VPhysicalVolume *pv2=s_theElectrodes->GetPhysicalVolume(1000000+id); - if (!pv2) return trap->GetYHalfLength1(); - else { - const G4LogicalVolume* lv2 = pv2->GetLogicalVolume(); - const G4Trap* trap2 = (G4Trap*) lv2->GetSolid(); - return (trap->GetYHalfLength1()+trap2->GetYHalfLength1()); - } + if (m_filled) { + return m_halflength[cellid][stackid]; + } + else { + int id=cellid+stackid*10000; + const G4VPhysicalVolume *pv=s_theElectrodes->GetPhysicalVolume(id); + if (!pv) return 0.; + const G4LogicalVolume* lv = pv->GetLogicalVolume(); + const G4Trap* trap = (G4Trap*) lv->GetSolid(); + const G4VPhysicalVolume *pv2=s_theElectrodes->GetPhysicalVolume(1000000+id); + if (!pv2) return trap->GetYHalfLength1(); + else { + const G4LogicalVolume* lv2 = pv2->GetLogicalVolume(); + const G4Trap* trap2 = (G4Trap*) lv2->GetSolid(); + return (trap->GetYHalfLength1()+trap2->GetYHalfLength1()); + } - } + } } -double LArStraightElectrodes::Cosu(int stackid, int cellid) +double LArStraightElectrodes::Cosu(int stackid, int cellid) const { - if (m_filled) { - return m_cosu[cellid][stackid]; - } - else { - return cos(SlantEle(stackid,cellid)); - } + if (m_filled) { + return m_cosu[cellid][stackid]; + } + else { + return cos(SlantEle(stackid,cellid)); + } } -double LArStraightElectrodes::Sinu(int stackid, int cellid) +double LArStraightElectrodes::Sinu(int stackid, int cellid) const { - if (m_filled) { - return m_sinu[cellid][stackid]; - } - else { - return sin(SlantEle(stackid,cellid)); - } + if (m_filled) { + return m_sinu[cellid][stackid]; + } + else { + return sin(SlantEle(stackid,cellid)); + } } - diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightElectrodes.h b/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightElectrodes.h new file mode 100644 index 0000000000000000000000000000000000000000..0bdddddbd07940ec9a3ddb3d31a3bcff4e0de7f9 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightElectrodes.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4BARREL_LArStraightElectrodes_H +#define LARG4BARREL_LArStraightElectrodes_H + +#include "PhysicalVolumeAccessor.h" +#include <string> + +class LArStraightElectrodes { +private: + static PhysicalVolumeAccessor* s_theElectrodes; + double m_xcent[1024][14]; + double m_ycent[1024][14]; + double m_cosu[1024][14]; + double m_sinu[1024][14]; + double m_halflength[1024][14]; + bool m_filled; + static LArStraightElectrodes* s_instance; + int m_parity; +public: + static LArStraightElectrodes* GetInstance(std::string strDetector="") ; + double XCentEle(int stackid, int cellid) const; + double YCentEle(int stackid, int cellid) const; + double SlantEle(int stackid, int cellid) const; + double HalfLength(int stackid, int cellid) const; + double Cosu(int stackid, int cellid) const; + double Sinu(int stackid, int cellid) const; +protected: + LArStraightElectrodes(std::string strDetector=""); +}; + +#endif // LARG4BARREL_LArStraightElectrodes_H diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/MapEta.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/MapEta.cc index 7ab8aaf7eb2e3a499792939209dd5022b2af6a1c..e66cb189387029fb06906ba14634760a9d78d71c 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/MapEta.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/MapEta.cc @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4Barrel/MapEta.h" +#include "MapEta.h" // For reading the data files in Athena. #ifndef LARG4_STAND_ALONE @@ -16,29 +16,29 @@ MapEta::MapEta(int isampling) { - m_directory="/afs/cern.ch/atlas/offline/data/lar/calo_data"; - m_nx=0; - m_ny=0; - m_init=0; - m_resp=0; - m_xt0=0; - m_xt1=0; - m_xt2=0; - Initialize(isampling); + m_directory="/afs/cern.ch/atlas/offline/data/lar/calo_data"; + m_nx=0; + m_ny=0; + m_init=0; + m_resp=0; + m_xt0=0; + m_xt1=0; + m_xt2=0; + Initialize(isampling); } MapEta::~MapEta() { - if (m_resp) delete [] m_resp; - if (m_xt0) delete [] m_xt0; - if (m_xt1) delete [] m_xt1; - if (m_xt2) delete [] m_xt2; + if (m_resp) delete [] m_resp; + if (m_xt0) delete [] m_xt0; + if (m_xt1) delete [] m_xt1; + if (m_xt2) delete [] m_xt2; } void MapEta::SetDirectory(std::string dir) { - m_directory=dir; + m_directory=dir; } void MapEta::Initialize(int isampling) @@ -64,141 +64,141 @@ void MapEta::Initialize(int isampling) fileLocation=larLocation+"/"+filename; std::cout << "fileLocation " << fileLocation << std::endl; #endif - + std::ifstream in(fileLocation.c_str()); if (in) { in>>m_nx>>m_xmin>>m_xmax>>m_ny>>m_ymin>>m_ymax; if(m_nx>0 && m_ny>0 && m_nx<10000 && m_ny<10000){//coverity issue. This is a tainted variable protection, 10000 can be changed if required. - //std::cout<<"nx"<<";"<<"ny="<<m_nx<<";"<<m_ny<<std::endl; - m_deltax=(m_xmax-m_xmin)/((float) m_nx); - m_deltay=(m_ymax-m_ymin)/((float) m_ny); - // what is written as xmax in the map is x of last point + delta x - // (such that npoint = (xmax-xmin)/deltax - // to get the real last point in the map we should subtract deltax - m_xmax = m_xmax - m_deltax; - m_ymax = m_ymax - m_deltay; - m_resp = new float[m_ny*m_nx]; - m_xt0 = new float[m_ny*m_nx]; - m_xt1 = new float[m_ny*m_nx]; - m_xt2 = new float[m_ny*m_nx]; - int ii,jj; - for (int ix=0;ix<m_nx;ix++) { - for (int iy=0;iy<m_ny;iy++) { - in>>ii>>jj>>m_resp[ix+iy*m_nx]>>m_xt0[ix+iy*m_nx]>>m_xt1[ix+iy*m_nx]>>m_xt2[ix+iy*m_nx]; - if (ii != ix || jj != iy) std::cout << "MapEta: inconsistency when reading map..." << std::endl; - } - } - - std::cout << "Eta Map read " << " Nbins " << m_nx << " " << m_ny - << " bin size*1000 " << 1000*m_deltax << " " << 1000*m_deltay - << " X range " << m_xmin << " " << m_xmax - << " Y range " << m_ymin << " " << m_ymax << std::endl; - m_init=1; - } - else{ - std::cout << "Error in MapEta::Initialize: nx or ny out of limits." << std::endl; - return; - } - } - else{ - std::cout << "Error in MapEta::Initialize: The file could not be open." << std::endl; - return; + //std::cout<<"nx"<<";"<<"ny="<<m_nx<<";"<<m_ny<<std::endl; + m_deltax=(m_xmax-m_xmin)/((float) m_nx); + m_deltay=(m_ymax-m_ymin)/((float) m_ny); + // what is written as xmax in the map is x of last point + delta x + // (such that npoint = (xmax-xmin)/deltax + // to get the real last point in the map we should subtract deltax + m_xmax = m_xmax - m_deltax; + m_ymax = m_ymax - m_deltay; + m_resp = new float[m_ny*m_nx]; + m_xt0 = new float[m_ny*m_nx]; + m_xt1 = new float[m_ny*m_nx]; + m_xt2 = new float[m_ny*m_nx]; + int ii,jj; + for (int ix=0;ix<m_nx;ix++) { + for (int iy=0;iy<m_ny;iy++) { + in>>ii>>jj>>m_resp[ix+iy*m_nx]>>m_xt0[ix+iy*m_nx]>>m_xt1[ix+iy*m_nx]>>m_xt2[ix+iy*m_nx]; + if (ii != ix || jj != iy) std::cout << "MapEta: inconsistency when reading map..." << std::endl; + } + } + + std::cout << "Eta Map read " << " Nbins " << m_nx << " " << m_ny + << " bin size*1000 " << 1000*m_deltax << " " << 1000*m_deltay + << " X range " << m_xmin << " " << m_xmax + << " Y range " << m_ymin << " " << m_ymax << std::endl; + m_init=1; + } + else{ + std::cout << "Error in MapEta::Initialize: nx or ny out of limits." << std::endl; + return; } + } + else{ + std::cout << "Error in MapEta::Initialize: The file could not be open." << std::endl; + return; + } } -void MapEta::GetData(double x,double y,double* resp, double* xt0, double* xt1, double* xt2) +void MapEta::GetData(double x,double y,double* resp, double* xt0, double* xt1, double* xt2) const { - *resp=1; - *xt0=1; - *xt1=0; - *xt2=0; - if (m_nx==0 || m_ny ==0) return; - if (x<m_xmin ) x=m_xmin+0.01*m_deltax; - if (x>=m_xmax) x=m_xmax-0.01*m_deltax; - if (y<m_ymin ) y=m_ymin+0.01*m_deltay; - if (y>=m_ymax) y=m_ymax-0.01*m_deltay; - - int ix,iy; - ix = (int) ((x-m_xmin)/m_deltax); - iy = (int) ((y-m_ymin)/m_deltay); - float x0 = ((float) ix)*m_deltax+m_xmin; - float x1 = x0+m_deltax; - float y0 = ((float) iy)*m_deltay+m_ymin; - float y1 = y0+m_deltay; - - - if (ix<0 || ix+1 >= m_nx || iy<0 || iy+1 >= m_ny) { - std::cout << "MapEta: Out of range " << ix << " " << iy << std::endl; - return; - } - double w[4]; - w[0]=(x1-x)*(y1-y); - w[1]=(x-x0)*(y1-y); - w[2]=(x1-x)*(y-y0); - w[3]=(x-x0)*(y-y0); - - double sumw=0.; - *resp=0; - *xt0=0; - for (int i=0;i<2;i++) { - for (int j=0;j<2;j++) { - int n=ix+i+(iy+j)*m_nx; - int m=i+2*j; - sumw +=w[m]; - *resp += m_resp[n]*w[m]; - *xt0 += m_xt0[n]*w[m]; - *xt1 += m_xt1[n]*w[m]; - *xt2 += m_xt2[n]*w[m]; - } - } - const double inv_sumw = 1. / sumw; - if (sumw>0.) { - *resp = *resp*inv_sumw; - *xt0 = *xt0*inv_sumw; - *xt1 = *xt1*inv_sumw; - *xt2 = *xt2*inv_sumw; - } + *resp=1; + *xt0=1; + *xt1=0; + *xt2=0; + if (m_nx==0 || m_ny ==0) return; + if (x<m_xmin ) x=m_xmin+0.01*m_deltax; + if (x>=m_xmax) x=m_xmax-0.01*m_deltax; + if (y<m_ymin ) y=m_ymin+0.01*m_deltay; + if (y>=m_ymax) y=m_ymax-0.01*m_deltay; + + int ix,iy; + ix = (int) ((x-m_xmin)/m_deltax); + iy = (int) ((y-m_ymin)/m_deltay); + float x0 = ((float) ix)*m_deltax+m_xmin; + float x1 = x0+m_deltax; + float y0 = ((float) iy)*m_deltay+m_ymin; + float y1 = y0+m_deltay; + + + if (ix<0 || ix+1 >= m_nx || iy<0 || iy+1 >= m_ny) { + std::cout << "MapEta: Out of range " << ix << " " << iy << std::endl; + return; + } + double w[4]; + w[0]=(x1-x)*(y1-y); + w[1]=(x-x0)*(y1-y); + w[2]=(x1-x)*(y-y0); + w[3]=(x-x0)*(y-y0); + + double sumw=0.; + *resp=0; + *xt0=0; + for (int i=0;i<2;i++) { + for (int j=0;j<2;j++) { + int n=ix+i+(iy+j)*m_nx; + int m=i+2*j; + sumw +=w[m]; + *resp += m_resp[n]*w[m]; + *xt0 += m_xt0[n]*w[m]; + *xt1 += m_xt1[n]*w[m]; + *xt2 += m_xt2[n]*w[m]; + } + } + const double inv_sumw = 1. / sumw; + if (sumw>0.) { + *resp = *resp*inv_sumw; + *xt0 = *xt0*inv_sumw; + *xt1 = *xt1*inv_sumw; + *xt2 = *xt2*inv_sumw; + } } -void MapEta::GetData0(double x,double y,double* resp) +void MapEta::GetData0(double x,double y,double* resp) const { - *resp=1; - if (m_nx==0 || m_ny ==0) return; - if (x<m_xmin ) x=m_xmin+0.01*m_deltax; - if (x>=m_xmax) x=m_xmax-0.01*m_deltax; - if (y<m_ymin ) y=m_ymin+0.01*m_deltay; - if (y>=m_ymax) y=m_ymax-0.01*m_deltay; - - int ix,iy; - ix = (int) ((x-m_xmin)/m_deltax); - iy = (int) ((y-m_ymin)/m_deltay); - float x0 = ((float) ix)*m_deltax+m_xmin; - float x1 = x0+m_deltax; - float y0 = ((float) iy)*m_deltay+m_ymin; - float y1 = y0+m_deltay; - - if (ix<0 || ix+1 >= m_nx || iy<0 || iy+1 >= m_ny) { - std::cout << "MapEta: Out of range " << ix << " " << iy << std::endl; - return; - } - double w[4]; - w[0]=(x1-x)*(y1-y); - w[1]=(x-x0)*(y1-y); - w[2]=(x1-x)*(y-y0); - w[3]=(x-x0)*(y-y0); - - double sumw=0.; - *resp = 0; - for (int i=0;i<2;i++) { - for (int j=0;j<2;j++) { - int n=ix+i+(iy+j)*m_nx; - int m=i+2*j; - sumw +=w[m]; - *resp += m_resp[n]*w[m]; - } - } - if (sumw>0.) *resp = *resp/sumw; - else *resp = 1; + *resp=1; + if (m_nx==0 || m_ny ==0) return; + if (x<m_xmin ) x=m_xmin+0.01*m_deltax; + if (x>=m_xmax) x=m_xmax-0.01*m_deltax; + if (y<m_ymin ) y=m_ymin+0.01*m_deltay; + if (y>=m_ymax) y=m_ymax-0.01*m_deltay; + + int ix,iy; + ix = (int) ((x-m_xmin)/m_deltax); + iy = (int) ((y-m_ymin)/m_deltay); + float x0 = ((float) ix)*m_deltax+m_xmin; + float x1 = x0+m_deltax; + float y0 = ((float) iy)*m_deltay+m_ymin; + float y1 = y0+m_deltay; + + if (ix<0 || ix+1 >= m_nx || iy<0 || iy+1 >= m_ny) { + std::cout << "MapEta: Out of range " << ix << " " << iy << std::endl; + return; + } + double w[4]; + w[0]=(x1-x)*(y1-y); + w[1]=(x-x0)*(y1-y); + w[2]=(x1-x)*(y-y0); + w[3]=(x-x0)*(y-y0); + + double sumw=0.; + *resp = 0; + for (int i=0;i<2;i++) { + for (int j=0;j<2;j++) { + int n=ix+i+(iy+j)*m_nx; + int m=i+2*j; + sumw +=w[m]; + *resp += m_resp[n]*w[m]; + } + } + if (sumw>0.) *resp = *resp/sumw; + else *resp = 1; } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/MapEta.h b/LArCalorimeter/LArG4/LArG4Barrel/src/MapEta.h similarity index 55% rename from LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/MapEta.h rename to LArCalorimeter/LArG4/LArG4Barrel/src/MapEta.h index ab54ac602ca5df81a9d0960bfabf959b3f5e134a..ad256366ca3593af1c9262d90bbeb543674b222e 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/MapEta.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/MapEta.h @@ -2,12 +2,12 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef MapEta_H -#define MapEta_H +#ifndef LARG4BARREL_MapEta_H +#define LARG4BARREL_MapEta_H #include <string> -#define NMAP_ETA +#define NMAP_ETA class MapEta { private: @@ -25,13 +25,13 @@ public: MapEta(int isampling); void SetDirectory(std::string dir); void Initialize(int isampling); - int Nx() {return m_nx;} - int Ny() {return m_ny;} - float Xmin() {return m_xmin;} - float Xmax() {return m_xmax;} - float Ymin() {return m_ymin;} - float Ymax() {return m_ymax;} - void GetData(double x,double y, double* resp, double* xt0, double* xt1, double* xt2); - void GetData0(double x,double y, double* resp); + int Nx() const {return m_nx;} + int Ny() const {return m_ny;} + float Xmin() const {return m_xmin;} + float Xmax() const {return m_xmax;} + float Ymin() const {return m_ymin;} + float Ymax() const {return m_ymax;} + void GetData(double x,double y, double* resp, double* xt0, double* xt1, double* xt2) const; + void GetData0(double x,double y, double* resp) const; }; -#endif +#endif //LARG4BARREL_MapEta_H diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/PhysicalVolumeAccessor.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/PhysicalVolumeAccessor.cc index 55a7395c1261401910731962a278cda276e0cb55..397f3d9a6d3fcfb8feabf1efc47a13aa24630b15 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/PhysicalVolumeAccessor.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/PhysicalVolumeAccessor.cc @@ -2,66 +2,67 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4Barrel/PhysicalVolumeAccessor.h" +#include "PhysicalVolumeAccessor.h" #include "G4LogicalVolumeStore.hh" #include <string> #include <assert.h> G4LogicalVolume* PhysicalVolumeAccessor::GetLV(std::string name) { - G4LogicalVolumeStore *lvs=G4LogicalVolumeStore::GetInstance(); - for (unsigned int i=0;i<lvs->size();i++) - { - std::string lname=((lvs->operator[](i))->GetName()); - if (name==lname) - return (lvs->operator[](i)); - } -// std::cout<<"PhysicalVolumeAccessor::GetLV Warning!!! Volume "<<name -// <<" not found!!! returning 0"<<std::endl; - return 0; + G4LogicalVolumeStore *lvs=G4LogicalVolumeStore::GetInstance(); + for (unsigned int i=0;i<lvs->size();i++) + { + std::string lname=((lvs->operator[](i))->GetName()); + if (name==lname) + return (lvs->operator[](i)); + } + // std::cout<<"PhysicalVolumeAccessor::GetLV Warning!!! Volume "<<name + // <<" not found!!! returning nullptr"<<std::endl; + return nullptr; } PhysicalVolumeAccessor::PhysicalVolumeAccessor(std::string name) { - m_theLogicalVolume=GetLV(name); + m_theLogicalVolume=GetLV(name); } PhysicalVolumeAccessor::PhysicalVolumeAccessor(std::string name, - std::string PVname) + std::string PVname) { - m_theLogicalVolume=GetLV(name); - assert (m_theLogicalVolume!=0); - for (int i=0;i<m_theLogicalVolume->GetNoDaughters();i++) - { - G4VPhysicalVolume *pv=m_theLogicalVolume->GetDaughter(i); - if (PVname==(pv->GetName())) - { - m_thePhysicalVolumes[pv->GetCopyNo()]=pv; - } - } + m_theLogicalVolume=GetLV(name); + assert (m_theLogicalVolume!=nullptr); + for (int i=0;i<m_theLogicalVolume->GetNoDaughters();i++) + { + G4VPhysicalVolume *pv=m_theLogicalVolume->GetDaughter(i); + if (PVname==(pv->GetName())) + { + m_thePhysicalVolumes[pv->GetCopyNo()]=pv; + } + } } -const G4VPhysicalVolume* PhysicalVolumeAccessor::GetPhysicalVolume(int icopy) +const G4VPhysicalVolume* PhysicalVolumeAccessor::GetPhysicalVolume(int icopy) const { - if (m_thePhysicalVolumes.find(icopy)!=m_thePhysicalVolumes.end()) - return m_thePhysicalVolumes[icopy]; - else - { -// std::cout<<"Physical Volume copy "<<icopy<<" not found in" -// <<m_theLogicalVolume->GetName()<<"!!! return 0"<<std::endl; - return 0; - } + auto physVolIter = m_thePhysicalVolumes.find(icopy); + if (physVolIter!=m_thePhysicalVolumes.end()) + return physVolIter->second; + else + { + // std::cout<<"Physical Volume copy "<<icopy<<" not found in" + // <<m_theLogicalVolume->GetName()<<"!!! return nullptr"<<std::endl; + return nullptr; + } } void PhysicalVolumeAccessor::SetPhysicalVolumeList(std::string name) { - // assert (m_thePhysicalVolumes.size()==0); - for (int i=0;i<m_theLogicalVolume->GetNoDaughters();i++) - { - G4VPhysicalVolume *pv=m_theLogicalVolume->GetDaughter(i); - if (name==(pv->GetName())) - { - m_thePhysicalVolumes[pv->GetCopyNo()]=pv; - } - } + // assert (m_thePhysicalVolumes.size()==0); + for (int i=0;i<m_theLogicalVolume->GetNoDaughters();i++) + { + G4VPhysicalVolume *pv=m_theLogicalVolume->GetDaughter(i); + if (name==(pv->GetName())) + { + m_thePhysicalVolumes[pv->GetCopyNo()]=pv; + } + } } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/PhysicalVolumeAccessor.h b/LArCalorimeter/LArG4/LArG4Barrel/src/PhysicalVolumeAccessor.h similarity index 59% rename from LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/PhysicalVolumeAccessor.h rename to LArCalorimeter/LArG4/LArG4Barrel/src/PhysicalVolumeAccessor.h index d0885d4521ba38c3fc93d8d709f6e0bbd0b14346..289fea44a3993ab82dc55fdcda6363f35f5a0af9 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/PhysicalVolumeAccessor.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/PhysicalVolumeAccessor.h @@ -17,14 +17,14 @@ typedef std::map<int,G4VPhysicalVolume *, std::less<int> > PVMap; class PhysicalVolumeAccessor { public: - PhysicalVolumeAccessor(std::string); - PhysicalVolumeAccessor(std::string,const std::string); - const G4VPhysicalVolume* GetPhysicalVolume(int); - void SetPhysicalVolumeList(std::string); + PhysicalVolumeAccessor(std::string); + PhysicalVolumeAccessor(std::string,const std::string); + const G4VPhysicalVolume* GetPhysicalVolume(int) const; + void SetPhysicalVolumeList(std::string); private: - G4LogicalVolume* m_theLogicalVolume; - PVMap m_thePhysicalVolumes; - G4LogicalVolume *GetLV(std::string); + G4LogicalVolume* m_theLogicalVolume; + PVMap m_thePhysicalVolumes; + G4LogicalVolume *GetLV(std::string); }; diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/PresamplerCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/PresamplerCalibrationCalculator.cc index fc111f63a6a90f53fcd6877ab9accbfff8acdaf1..39c5d4c21e1cef968718fa6f3694a194bd55af7e 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/PresamplerCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/PresamplerCalibrationCalculator.cc @@ -2,7 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ - /******************************************************************** NAME: PresamplerCalibrationCalculator.cxx @@ -11,18 +10,18 @@ PACKAGE: offline/LArCalorimeter/LArG4/LArG4Barrel AUTHORS: G. Unal, L. Carminati (on a template from Bill Selingman) CREATED: September, 2004 -PURPOSE: This class calculates the values needed for calibration hits - in the barrel presampler of LAr calorimeter. This calculator is - called in calibration runs (see LArBarrelPresamplerSDConsultant) +PURPOSE: This class calculates the values needed for calibration hits + in the barrel presampler of LAr calorimeter. This calculator is + called in calibration runs (see LArBarrelPresamplerSDConsultant) for calibration hits in the presampler volume. -UPDATES: +UPDATES: ********************************************************************/ // #define DEBUG_HITS -#include "LArG4Barrel/PresamplerCalibrationCalculator.h" +#include "PresamplerCalibrationCalculator.h" #include "LArG4Barrel/LArBarrelPresamplerGeometry.h" @@ -36,69 +35,75 @@ namespace LArG4 { namespace BarrelPresampler { - CalibrationCalculator::CalibrationCalculator() - : m_detectorName("LArMgr") + CalibrationCalculator::CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_geometryCalculator(nullptr) + , m_detectorName("LArMgr") { + declareProperty("DetectorName",m_detectorName); + } + + StatusCode CalibrationCalculator::initialize() { // Initialize the geometry calculator m_geometryCalculator = Geometry::GetInstance(); + return StatusCode::SUCCESS; } CalibrationCalculator::~CalibrationCalculator() { } - - G4bool CalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) + G4bool CalibrationCalculator::Process(const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process) const { // Use the calculators to determine the energies and the // identifier associated with this G4Step. Note that the // default is to process both the energy and the ID. - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { + if ( process == kEnergyAndID || process == kOnlyEnergy ) + { #ifdef DEBUG_HITS - std::cout << "LArG4::Barrel::CalibrationCalculator::Process" - << " calling SimulationEnergies" << std::endl; + std::cout << "LArG4::Barrel::CalibrationCalculator::Process" + << " calling SimulationEnergies" << std::endl; #endif - m_energyCalculator.Energies( a_step, m_energies ); + m_energyCalculator.Energies( step, energies ); - // First, get the energy. - //m_energy = a_step->GetTotalEnergyDeposit(); - } + // First, get the energy. + //m_energy = step->GetTotalEnergyDeposit(); + } else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); - - - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. - m_identifier = m_geometryCalculator->CalculateIdentifier( a_step, m_detectorName ); - } + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); + + + if ( process == kEnergyAndID || process == kOnlyID ) + { + // Calculate the identifier. + identifier = m_geometryCalculator->CalculateIdentifier( step, m_detectorName ); + } else - m_identifier = LArG4Identifier(); - - + identifier = LArG4Identifier(); + + #ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); + G4double energy = accumulate(energies.begin(),energies.end(),0.); std::cout << "LArG4::Barrel::CalibrationCalculator::Process" - << " ID=" << std::string(m_identifier) - << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + << " ID=" << std::string(identifier) + << " energy=" << energy + << " energies=(" << energies[0] + << "," << energies[1] + << "," << energies[2] + << "," << energies[3] << ")" + << std::endl; #endif - + // Check for bad result. - if ( m_identifier == LArG4Identifier() ) - return false; - + if ( identifier == LArG4Identifier() ) + return false; + return true; } - + } // namespace Barrel - + } // namespace LAr diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/PresamplerCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4Barrel/src/PresamplerCalibrationCalculator.h similarity index 67% rename from LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/PresamplerCalibrationCalculator.h rename to LArCalorimeter/LArG4/LArG4Barrel/src/PresamplerCalibrationCalculator.h index 469eaed3f497288f2653bf19e2cfdca3348b9d37..b6b0b5beb2e65585a674779e2797c3aa1fa44a2f 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/PresamplerCalibrationCalculator.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/PresamplerCalibrationCalculator.h @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// LArG4::BarrelPreampler::CalibrationCalculator +// LArG4::BarrelPreampler::CalibrationCalculator // This class calculates the values needed for calibration hits in the // simulation. @@ -10,7 +10,7 @@ #ifndef LArG4_BarrelPresampler_CalibrationCalculator_H #define LArG4_BarrelPresampler_CalibrationCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" @@ -29,18 +29,19 @@ class G4Step; // Forward declaration for namespace CaloG4. namespace LArG4 { - + namespace BarrelPresampler { - + // Forward declaration class Geometry; - - class CalibrationCalculator : public VCalibrationCalculator { + + class CalibrationCalculator : public LArCalibCalculatorSvcImp { public: - - CalibrationCalculator(); + + CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize() override final; virtual ~CalibrationCalculator(); - + // The Process method returns a boolean value. If it's true, the // hit can be used by Geant4; if it's false, there's something wrong // with the energy deposit and it should be ignored. @@ -52,21 +53,11 @@ namespace LArG4 { // yet, but you can never tell). Use the enum (defined in // VCalibrationCalculator.h) to control any special processing. - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } ; - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; }; - - inline void detectorName(std::string name) { m_detectorName=name; } - private: - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process = kEnergyAndID) const override final; + private: // Geometry calculator Geometry* m_geometryCalculator; @@ -75,7 +66,7 @@ namespace LArG4 { // detector name, for translated geometry std::string m_detectorName; - + }; } // namespace BarrelPresampler diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.cc b/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.cc index a5e70c57ab68333d0868db0fc5a6eb3e79af3de2..e2dd318920697eced6684b4bf511c9098bd6aa8d 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.cc +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.cc @@ -2,14 +2,14 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4Barrel/PsMap.h" +#include "PsMap.h" #include <iostream> #include <sstream> #ifndef LARG4_STAND_ALONE #include "PathResolver/PathResolver.h" #endif -PsMap* PsMap::s_thePointer=0; +PsMap* PsMap::s_thePointer=nullptr; PsMap::PsMap() { @@ -24,20 +24,20 @@ PsMap::PsMap() double xnorm=15.9; // nA/MeV normalisation for PS maps for (int imap=0;imap<5;imap++) { -// accordion folds - std::ostringstream fn; - fn << "presampler_"<<imap<<".map"; - std::string filename = fn.str(); - std::string fileLocation; + // accordion folds + std::ostringstream fn; + fn << "presampler_"<<imap<<".map"; + std::string filename = fn.str(); + std::string fileLocation; #ifdef LARG4_STAND_ALONE - fileLocation=m_directory+"/"+filename; + fileLocation=m_directory+"/"+filename; #else - //fileLocation=larLocation+"/calo_data/"+filename; - fileLocation=larLocation+"/"+filename; + //fileLocation=larLocation+"/calo_data/"+filename; + fileLocation=larLocation+"/"+filename; #endif - CurrMap* cm = new CurrMap(fileLocation,xnorm); - int code=imap; - m_theMap[code]=cm; + CurrMap* cm = new CurrMap(fileLocation,xnorm); + int code=imap; + m_theMap[code]=cm; } m_curr=0; @@ -45,7 +45,7 @@ PsMap::PsMap() PsMap* PsMap::GetPsMap() { - if (s_thePointer==0) s_thePointer=new PsMap(); + if (s_thePointer==nullptr) s_thePointer=new PsMap(); return s_thePointer; } @@ -60,24 +60,24 @@ void PsMap::Reset() void PsMap::SetMap(int module) { - if (m_module==module) return; - m_module=module; -// module 0 and 1 have their own maps (code = 0 and 1) -// module 2 and 3 have the same map (same geometry) with code 2 -// module 4 and 5 have the same map (same geometry) with code 3 -// module 6 and 7 have the same map (same geometry) with code 4 - int code = -1; - if (module==0 || module==1) code=module; - if (module > 1 && module < 8) code=(module-2)/2 + 2; - if (m_theMap.find(code) != m_theMap.end()) - m_curr = m_theMap[code]; - else { - std::cout << " Code " << code << " not found in map ..." << std::endl; - m_curr=0; - } + if (m_module==module) return; + m_module=module; + // module 0 and 1 have their own maps (code = 0 and 1) + // module 2 and 3 have the same map (same geometry) with code 2 + // module 4 and 5 have the same map (same geometry) with code 3 + // module 6 and 7 have the same map (same geometry) with code 4 + int code = -1; + if (module==0 || module==1) code=module; + if (module > 1 && module < 8) code=(module-2)/2 + 2; + if (m_theMap.find(code) != m_theMap.end()) + m_curr = m_theMap[code]; + else { + std::cout << " Code " << code << " not found in map ..." << std::endl; + m_curr=0; + } } void PsMap::SetDirectory(std::string dir) { - m_directory=dir; + m_directory=dir; } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/PsMap.h b/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.h similarity index 76% rename from LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/PsMap.h rename to LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.h index b63272d1eb854ef859618731024cbeb636d8505b..f3bec25de942ce32f7cbc5cdb921196802330252 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/LArG4Barrel/PsMap.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.h @@ -2,10 +2,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef PsMap_h -#define PsMap_h +#ifndef LARG4BARREL_PsMap_h +#define LARG4BARREL_PsMap_h -#include "LArG4Barrel/CurrMap.h" +#include "CurrMap.h" #include <map> #include <vector> @@ -20,7 +20,7 @@ class PsMap { void SetDirectory(std::string dir); void Reset(); void SetMap(int module); - CurrMap* Map() {return m_curr;} + CurrMap* Map() const {return m_curr;} private: PsMap(); static PsMap* s_thePointer; @@ -30,4 +30,4 @@ class PsMap { CurrMap* m_curr; int m_module; }; -#endif +#endif // LARG4BARREL_PsMap_h diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/components/LArG4Barrel_entries.cxx b/LArCalorimeter/LArG4/LArG4Barrel/src/components/LArG4Barrel_entries.cxx new file mode 100644 index 0000000000000000000000000000000000000000..5c6ae8fb59cd2f1ba094d9d134dae0861c6a454e --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/components/LArG4Barrel_entries.cxx @@ -0,0 +1,19 @@ +#include "GaudiKernel/DeclareFactoryEntries.h" + +#include "../CryostatCalibrationCalculator.h" +#include "../CryostatCalibrationMixedCalculator.h" +#include "../LArBarrelCalculator.h" +#include "../LArBarrelPresamplerCalculator.h" +#include "../CryostatCalibrationLArCalculator.h" +#include "../DMCalibrationCalculator.h" +#include "../LArBarrelCalibrationCalculator.h" +#include "../PresamplerCalibrationCalculator.h" + +DECLARE_SERVICE_FACTORY(LArG4::BarrelCryostat::CalibrationCalculator) +DECLARE_SERVICE_FACTORY(LArG4::BarrelCryostat::CalibrationMixedCalculator) +DECLARE_SERVICE_FACTORY(LArBarrelCalculator) +DECLARE_SERVICE_FACTORY(LArBarrelPresamplerCalculator) +DECLARE_SERVICE_FACTORY(LArG4::BarrelCryostat::CalibrationLArCalculator) +DECLARE_SERVICE_FACTORY(LArG4::DM::CalibrationCalculator) +DECLARE_SERVICE_FACTORY(LArG4::Barrel::CalibrationCalculator) +DECLARE_SERVICE_FACTORY(LArG4::BarrelPresampler::CalibrationCalculator) diff --git a/LArCalorimeter/LArG4/LArG4Code/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4Code/CMakeLists.txt index 5fa6d2b2e2889247b4a1d37ecb399f29823d13bc..983c95848543042fe0c3eec69be0c64a8c888ca6 100644 --- a/LArCalorimeter/LArG4/LArG4Code/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4Code/CMakeLists.txt @@ -12,10 +12,12 @@ atlas_depends_on_subdirs( PUBLIC LArCalorimeter/LArGeoModel/LArGeoCode LArCalorimeter/LArSimEvent Simulation/G4Atlas/G4AtlasTools + Control/StoreGate + GaudiKernel PRIVATE Calorimeter/CaloIdentifier Control/AthenaKernel - Control/StoreGate + Control/CxxUtils Simulation/G4Sim/MCTruth ) # External dependencies: @@ -28,8 +30,15 @@ add_definitions(-DLARG4NOROOT) # Component(s) in the package: atlas_add_library( LArG4Code src/*.cc + src/*.cxx PUBLIC_HEADERS LArG4Code INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloSimEvent LArGeoCode LArSimEvent CaloG4SimLib G4AtlasToolsLib StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES CaloIdentifier AthenaKernel MCTruth ) + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloSimEvent LArGeoCode LArSimEvent CaloG4SimLib G4AtlasToolsLib StoreGateLib SGtests GaudiKernel + PRIVATE_LINK_LIBRARIES CaloIdentifier AthenaKernel CxxUtils MCTruth ) + +atlas_add_dictionary( LArG4CodeEnums + LArG4Code/LArG4EnumDefs.h + LArG4Code/selectionEnums.xml + INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloSimEvent LArGeoCode LArSimEvent CaloG4SimLib G4AtlasToolsLib StoreGateLib SGtests GaudiKernel LArG4Code ) diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/CalibSDTool.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/CalibSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..7a9c19ee345b31fb250aeef300bdf7e48b44ed58 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/CalibSDTool.h @@ -0,0 +1,90 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4CODE_CALIBSDTOOL_H +#define LARG4CODE_CALIBSDTOOL_H + +/// @file CalibSDTool.h +/// @brief Defines the CalibSDTool class +/// @author Steve Farrell <Steven.Farrell@cern.ch> +/// @date 2016-03-26 + +// System includes +#include <string> +#include <vector> + +// G4Atlas includes +#include "G4AtlasTools/SensitiveDetectorBase.h" + +// Local includes +#include "LArG4CalibSD.h" + +// Forward declarations +class ILArCalibCalculatorSvc; +class LArEM_ID; +class LArFCAL_ID; +class LArHEC_ID; +class LArMiniFCAL_ID; +class CaloDM_ID; +class LArG4CalibSD; + +namespace LArG4 +{ + + /// @class CalibSDTool + /// @brief A base class for tools that manage LArG4CalibSDs. + /// + /// @todo Add more details. + /// + /// @author Steve Farrell <Steven.Farrell@cern.ch> + /// + class CalibSDTool : public SensitiveDetectorBase + { + + public: + + /// Constructor + CalibSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + /// Initialize the tool + StatusCode initialize() override final; + + /// Calls down to all the SDs to pack their hits into one collection + StatusCode Gather() override final; + + protected: + + /// Initialize Calculator Services + virtual StatusCode initializeCalculators() { return StatusCode::SUCCESS; } + + /// Helper method to create one SD + std::unique_ptr<LArG4CalibSD> + makeOneSD(const std::string& name, ILArCalibCalculatorSvc* calc, + const std::vector<std::string>& volumes) const; + + protected: + + /// @name configuration properties + /// @{ + + /// Are we set up to run with PID hits? + G4bool m_doPID; + + /// @} + + /// @name Calo identifier helpers + /// @{ + const LArEM_ID* m_larEmID; + const LArFCAL_ID* m_larFcalID; + const LArHEC_ID* m_larHecID; + const LArMiniFCAL_ID* m_larMiniFcalID; + const CaloDM_ID* m_caloDmID; + /// @} + + }; // class CalibSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/ILArCalculatorSvc.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/ILArCalculatorSvc.h new file mode 100755 index 0000000000000000000000000000000000000000..c14cfcdd7654bb4aa16399a27a0ba614bc9b5db8 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/ILArCalculatorSvc.h @@ -0,0 +1,48 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ILArCalculatorSvc.h +// Prepared in 2016 based on LArVCalculator from Bill Seligman + +#ifndef __ILARCALCULATORSVC_H__ +#define __ILARCALCULATORSVC_H__ + +#include "GaudiKernel/IService.h" + +#include "globals.hh" + +#include "LArG4Code/LArG4Identifier.h" + + +// Forward declaractions: +class G4Step; +class StatusCode; + +// struct to pass the hit info +struct LArHitData { LArG4Identifier id; G4double time; G4double energy; }; + +class ILArCalculatorSvc: virtual public IService { +public: + + ILArCalculatorSvc() {}; + static const InterfaceID& interfaceID() { + static const InterfaceID IID_ILArCalculatorSvc("ILArCalculatorSvc",1,0); + return IID_ILArCalculatorSvc; + } + + virtual ~ILArCalculatorSvc() {}; + + // "OOTcut" the time cut (ns) after which an energy deposit is + // considered to be out-of-time w.r.t. the event. + virtual G4float OOTcut() const = 0; + + // Check if the current hitTime is in-time + virtual G4bool isInTime(G4double hitTime) const = 0; // units = ns + + //New interface, to pass the hit info directly + virtual G4bool Process (const G4Step*, std::vector<LArHitData>&) const = 0; + +}; + +#endif diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/ILArCalibCalculatorSvc.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/ILArCalibCalculatorSvc.h new file mode 100755 index 0000000000000000000000000000000000000000..2056488ad28ab576df8002d64220ff49ebcf7db0 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/ILArCalibCalculatorSvc.h @@ -0,0 +1,43 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ILArCalibCalculatorSvc.h +// Prepared in 2016 based on VCalibrationCalculator from Bill Seligman + +#ifndef __ILARCALIBCALCULATORSVC_H__ +#define __ILARCALIBCALCULATORSVC_H__ + +#include "GaudiKernel/IService.h" + +#include "globals.hh" + +#include "LArG4Code/LArG4Identifier.h" +#include "LArG4Code/LArG4EnumDefs.h" + + +// Forward declaractions: +class G4Step; +class StatusCode; + +class ILArCalibCalculatorSvc: virtual public IService { +public: + + ILArCalibCalculatorSvc(){}; + static const InterfaceID& interfaceID() { + static const InterfaceID IID_ILArCalibCalculatorSvc("ILArCalibCalculatorSvc",1,0); + return IID_ILArCalibCalculatorSvc; + } + + virtual ~ILArCalibCalculatorSvc() {}; + + + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const LArG4::eCalculatorProcessing process = LArG4::kEnergyAndID) const = 0; + + + +}; + +#endif diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArCalculatorSvcImp.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArCalculatorSvcImp.h new file mode 100644 index 0000000000000000000000000000000000000000..a3bdfc8fdac2d484a606713e364dd0e52cbf2a4c --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArCalculatorSvcImp.h @@ -0,0 +1,32 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef __LARCALCULATORSVCIMP_H__ +#define __LARCALCULATORSVCIMP_H__ + +#include "ILArCalculatorSvc.h" +#include "AthenaBaseComps/AthService.h" + +class LArCalculatorSvcImp: public AthService, virtual public ILArCalculatorSvc { + +public: + + LArCalculatorSvcImp(const std::string& name, ISvcLocator * pSvcLocator); + + /** Query interface method to make athena happy */ + virtual StatusCode queryInterface(const InterfaceID&, void**) override final; + +protected: + // Birks' law + bool m_BirksLaw; + + // Birks' law, constant k + double m_Birksk; + + // OOTcut + double m_OOTcut; + +}; + +#endif diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArCalibCalculatorSvcImp.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArCalibCalculatorSvcImp.h new file mode 100644 index 0000000000000000000000000000000000000000..9d1f63fcd5080b19932fc1455a699ef523ba5039 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArCalibCalculatorSvcImp.h @@ -0,0 +1,20 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef __LARCALIBCALCULATORSVCIMP_H__ +#define __LARCALIBCALCULATORSVCIMP_H__ + +#include "ILArCalibCalculatorSvc.h" +#include "AthenaBaseComps/AthService.h" + +class LArCalibCalculatorSvcImp: public AthService, virtual public ILArCalibCalculatorSvc +{ +public: + LArCalibCalculatorSvcImp(const std::string& name, ISvcLocator * pSvcLocator); + + /** Query interface method to make athena happy */ + virtual StatusCode queryInterface(const InterfaceID&, void**) override final; +}; + +#endif diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4CalibSD.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4CalibSD.h index b5fe6f2d05689ac3fb804d5b1b1bc6a55425f17d..c3a5effa7b897f37121afe69828cf113056d62e0 100644 --- a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4CalibSD.h +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4CalibSD.h @@ -22,7 +22,8 @@ class LArHEC_ID; class LArMiniFCAL_ID; class CaloDM_ID; -namespace LArG4 { class VCalibrationCalculator; } +class ILArCalibCalculatorSvc; + class CaloCalibrationHitContainer; @@ -37,7 +38,7 @@ class LArG4CalibSD : public G4VSensitiveDetector public: /// Constructor - LArG4CalibSD(G4String a_name, LArG4::VCalibrationCalculator* calc, bool doPID=false); + LArG4CalibSD(G4String a_name, ILArCalibCalculatorSvc* calc, bool doPID=false); /// Destructor virtual ~LArG4CalibSD(); @@ -72,7 +73,7 @@ protected: protected: /// Member variable - the calculator we'll use - LArG4::VCalibrationCalculator * m_calculator; + ILArCalibCalculatorSvc * m_calculator; /// Count the number of invalid hits. G4int m_numberInvalidHits; diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4DetectorComponents.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4DetectorComponents.h deleted file mode 100644 index e32c29effdf7e5889873027676738331db0b4306..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4DetectorComponents.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArG4DetectorComponents -// Maintain a list of detector components. -// 05-Jun-2003 Bill Seligman - -#ifndef __LArG4DetectorComponents_H__ -#define __LArG4DetectorComponents_H__ - -#include "LArG4Code/LArVolumeInterface.h" - -#include "globals.hh" - -#include <map> - - -class LArG4DetectorComponents -{ -public: - - enum EDetectorComponent { - kBarrelCryostat , // The entire barrel cryostat - kEndcapCryostat , // The entire endcap cryostat - kEMB , // The electromagnetic barrel calorimeter in the barrel cryostat - kEMBps , // The electromagnetic barrel pre-sampler in the barrel cryostat - kEMEC , // The electromagnetic endcap calorimeter in the endcap cryostat - kEMECps , // The electromagnetic endcap pre-sampler in the endcap cryostat - kFCAL , // The forward calorimeter in the endcap cryostat - kHEC // The hadrnic calorimeter in the endcap cryostat - }; - - virtual ~LArG4DetectorComponents(); - - // Accessor for pointer to the single instance of this class. - static LArG4DetectorComponents* GetInstance(); - - // If the user wishes to override the default detector components, - // they do so by editing the LArG4DetectorComponents.cc file, or by - // using the following method from the main program. These methods - // are "static" because I don't anticipate that there'll be multiple - // ATLAS detectors in one G4 simulation. - void SetDetectorComponent ( const EDetectorComponent, LArVolumeInterface* ); - LArVolumeInterface* GetDetectorComponent ( const EDetectorComponent ) const; - - // The positive (z>0) and negative (z<0) portions of the detector - // can be built separately. These access methods provides a common - // reference point for sub-detectors to know which half is being - // built. - G4bool zNeg() const { return m_zNeg; } - void SetzNeg( G4bool z ) { m_zNeg = z; } - -protected: - // The constructor is protected according to the standard singleton - // design pattern. - LArG4DetectorComponents(); - -private: - // Are we building the positive or the negative half of the - // detector? m_Zneg == true means that we're building the negative - // half. - static G4bool m_zNeg; - - // The list of volumes that will be assembled into the final - // detector description. - typedef std::map< EDetectorComponent, LArVolumeInterface* > m_detectorMap_t; - typedef m_detectorMap_t::const_iterator m_detectorMap_ptr; - m_detectorMap_t m_detectorMap; - -}; - -#endif // __LArG4DetectorComponents_H__ diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4EnumDefs.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4EnumDefs.h new file mode 100644 index 0000000000000000000000000000000000000000..ac7f8929a9ec5601b854c75b1089c44af304803d --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4EnumDefs.h @@ -0,0 +1,26 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4CODE_LARG4ENUMDEFS_H +#define LARG4CODE_LARG4ENUMDEFS_H + +namespace LArG4 { + + enum eCalculatorProcessing { kEnergyAndID, kOnlyEnergy, kOnlyID }; + + enum EnergyCorrection_t { + EMEC_ECOR_ROPT, + EMEC_ECOR_OFF, + EMEC_ECOR_GADJ, + EMEC_ECOR_CHCL, + EMEC_ECOR_GADJ_OLD, + EMEC_ECOR_GADJ_E, + EMEC_ECOR_GADJ_S, + EMEC_ECOR_GADJ_SE, + EMEC_ECOR_CHCL1 + }; + + struct ROOT6_NamespaceAutoloadHook{}; +} +#endif diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4SDTool.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4SDTool.h index 5eb6a47dfa50e2d4d5a2b7cee403098c3f50e79f..227b20aceb8e642b05919be46daa782122b1bdf1 100644 --- a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4SDTool.h +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4SDTool.h @@ -41,6 +41,8 @@ class LArG4SDTool : public SensitiveDetectorBase StatusCode initialize() override final; + virtual StatusCode initializeCalculators(){ return StatusCode::SUCCESS; } + /// Helper method to pass the ID helper pointers to the SDs. void setupHelpers( LArG4SimpleSD* ) const; /// Overload of the above method for calib SDs. diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4SimpleSD.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4SimpleSD.h index f7236a7c3eecd8ac8b1d04b70b26b232f50023af..0e1448f788c7bdce555d971fdf3b14fe849c4c96 100644 --- a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4SimpleSD.h +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArG4SimpleSD.h @@ -20,7 +20,7 @@ class LArFCAL_ID; class LArHEC_ID; class LArMiniFCAL_ID; -class LArVCalculator; +class ILArCalculatorSvc; class LArHitContainer; class StoreGateSvc; @@ -43,7 +43,7 @@ public: }; /// Constructor - LArG4SimpleSD(G4String a_name, LArVCalculator* calc, + LArG4SimpleSD(G4String a_name, ILArCalculatorSvc* calc, const std::string& type="Default", const float width=2.5*CLHEP::ns); @@ -81,7 +81,7 @@ protected: G4int getTimeBin(G4double time) const; /// Member variable - the calculator we'll use - LArVCalculator * m_calculator; + ILArCalculatorSvc * m_calculator; /// Count the number of invalid hits. G4int m_numberInvalidHits; diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArHitMaker.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArHitMaker.h deleted file mode 100644 index 6f37b8dc5c97ce70a816b3e9f0b9eeb81c1a80c1..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArHitMaker.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArHitMaker -// Created by F. Mazzucato September 2002 -// Modified 30-Apr-2003 Bill Seligman - -// Convert an EnergySpot into a LArG4-type hit. - -#ifndef LARG4CODE_LARHITMAKER_h -#define LARG4CODE_LARHITMAKER_h - -#include "G4TouchableHandle.hh" -#include "globals.hh" - -// Forward declarations -class EnergySpot; -class G4StepPoint; -class G4Step; -class G4Navigator; - -class LArHitMaker -{ -public: - LArHitMaker(); - virtual ~LArHitMaker(); - virtual void make(const EnergySpot& spot); - -private: - G4Step* m_fakeStep; - G4StepPoint* m_fakePreStepPoint; - G4StepPoint* m_fakePostStepPoint; - G4TouchableHandle m_touchableHandle; - G4Navigator* m_pNavigator; - G4bool m_naviSetup; - - G4String m_baseName; -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArVCalculator.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArVCalculator.h deleted file mode 100644 index b8b02a4498769531ac23cb9b47c8d8e886db397b..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArVCalculator.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArVCalculator.hh -// Prepared 27-Jun-2001 Bill Seligman - -// This is an abstract base for a geometry calculator for ATLAS EM -// detectors. - -// A "calculator" is used in much the same way as a hand-held -// calculator might be. The user supplies a value and hits 'Enter' -// (i.e., invokes the Process() method). Then they read off whatever -// values are of interest. - -// 12-Jul-2002 WGS: Added access method to return an identifier. This -// replaces any other access methods for hit ID information. - -// 09-Jan-2002 WGS: Major modification -- The main calculation method -// FindCell(G4ThreeVector&) has been changed to Process(G4Step*). The -// reason for this change is that it became apparent the calculators -// needed more information than just the point of the energy deposit. - -// Also: since this class may also be used by the HEC, changed its -// named from LArVEMCalculator to LArVCalculator. - -#ifndef __LArVCalculator_H__ -#define __LArVCalculator_H__ - -#include "globals.hh" - -#include "LArG4Code/LArG4Identifier.h" - -// Forward declaractions: -class G4Step; - -// struct to pass the hit info -struct LArHitData { LArG4Identifier id; G4double time; G4double energy; }; - -class LArVCalculator { -public: - - virtual ~LArVCalculator() {}; - - // "OOTcut" the time cut (ns) after which an energy deposit is - // considered to be out-of-time w.r.t. the event. - virtual G4float OOTcut() const = 0; - - // 29-Mar-2002 WGS: The Process method now returns a boolean value. - // If it's true, the hit can be used by Geant4; if it's false, - // there's something wrong with the hit and it should be ignored. - virtual G4bool Process (const G4Step*) = 0; - - //New interface, to pass the hit info directly - virtual G4bool Process (const G4Step*, std::vector<LArHitData>&) = 0; - - // Override if your calculator will return multiple hits: - virtual int getNumHits() const {return 1;} - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier(int i=0) const = 0; - - // Routines added 09-Jan-2002 WGS: For some detectors, the - // determination of the time, energy deposition, or whether the hit - // was out-of-time is non-trivial, so these new methods were added. - virtual G4double time(int i=0) const = 0; // units = ns - virtual G4double energy(int i=0) const = 0; // units = native G4 unit of energy - virtual G4bool isInTime(int i=0) const = 0; - virtual G4bool isOutOfTime(int i=0) const = 0; - - -}; - -#endif // __LArVCalculator_H__ diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArVolumeInterface.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArVolumeInterface.h deleted file mode 100644 index 2edcd2573dae13736b49aa0e6fc6e47cafa00964..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/LArVolumeInterface.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArVolumeInterface.h -// 09-Apr-2003 Bill Seligman - -// This is an interface for handling volumes inside LArG4. The idea -// is that each detector (or sub-detector) must return a -// logical-volume envelope, and the parent detector places it within a -// physical volume. - -#ifndef __LArVolumeInterface_h__ -#define __LArVolumeInterface_h__ - -#include "G4LogicalVolume.hh" - -class LArVolumeInterface { - -public: - - virtual ~LArVolumeInterface() {}; - - // Get a logical-volume envelope around the sub-element of the ATLAS - // detector. - virtual G4LogicalVolume* GetEnvelope() = 0; - -protected: - - // The constructor is protected to make sure no one creates an - // explicit LArVolumeInterface object. - LArVolumeInterface() {}; - -}; - -#endif // __LArVolumeInterface_h__ diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/OptionsStore.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/OptionsStore.h deleted file mode 100644 index 7e53b85c3a187fb9354d44599b8469aa90e71851..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/OptionsStore.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// OptionsStore -// 02-Oct-2003 Bill Seligman - -// This template class is actually a simple wrapper around a map. -// It's purpose is to provide a common code base for store run options -// for the LArG4Model and LArG4 packages (although it could be used -// by other packages). - -#ifndef __LArG4_OptionsStore_H__ -#define __LArG4_OptionsStore_H__ - -#include <map> -#include <string> -#include <iostream> - -#undef DEBUG_OPTIONS - -namespace LArG4 { - - template< typename EnumType > - class OptionsStore - { - public: - - virtual ~OptionsStore() {;} - - // Store and retrieve user options. Note that no attempt is made - // to validate the option strings; if the user supplies "parital" - // instead of "partial" this routine will not detect it. - virtual void SetOption( EnumType e, std::string value ); - virtual std::string GetOption( EnumType e ) const; - - protected: - - // The constructor is protected according to the standard - // singleton design pattern. However, any class that interits - // from this template will have to implement its own GetInstance() - // method. - OptionsStore(); - - private: - - // Define a map type to hold detector options; some associated - // types, and the map itself. - typedef typename std::map< EnumType, std::string > m_OptionsStoreMap_t; - typedef typename m_OptionsStoreMap_t::iterator m_OptionsStoreMap_ptr_t; - typedef typename m_OptionsStoreMap_t::const_iterator m_OptionsStoreMap_const_ptr_t; - m_OptionsStoreMap_t m_OptionsStoreMap; - }; - - - ///////////////////////////////////////////////////////////////////// - // Since this is a template class, its implementation also has to be - // in the header. - ///////////////////////////////////////////////////////////////////// - - - // Constructor - template < typename EnumType > - OptionsStore<EnumType>::OptionsStore() {;} - - - // Store an option in the internal table. - template < typename EnumType > - void OptionsStore<EnumType>::SetOption( EnumType e, std::string value ) - { - m_OptionsStoreMap[e] = value; - } - - - // Fetch an option from our internal table. (We get a little fancy - // here because, as an exercise, I want to maintain the "const" - // nature of the method without generating compiler warnings.) - template < typename EnumType > - std::string OptionsStore<EnumType>::GetOption( EnumType e ) const - { - m_OptionsStoreMap_const_ptr_t i = m_OptionsStoreMap.find(e); - -#ifdef DEBUG_OPTIONS - std::cout << "OptionsStore: Searching for " << e; -#endif - - if ( i == m_OptionsStoreMap.end() ) - { -#ifdef DEBUG_OPTIONS - std::cout << " and found nothing." << std::endl; -#endif - - return ""; - } - - else - { - // Reminder: - // i == a pointer to one entry in OptionsStoreMap - // (*i) = a pair<EnumType, std::string> - // (*i).second = a string, the value of the option. - -#ifdef DEBUG_OPTIONS - std::cout << " and found '" - << (*i).second - << "'" - << std::endl; -#endif - - return (*i).second; - } - } - -} // namespace LArG4 - -#endif // __LArG4_OptionsStore_H__ diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/RunOptions.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/RunOptions.h deleted file mode 100644 index 25ba5117a50ed5ddf98d60440ed8ea228096add8..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/RunOptions.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// RunOptions -// 30-Jun-2003 Bill Seligman - -#ifndef LArG4_RunOptions_H -#define LArG4_RunOptions_H - -// The LAr simulation has a number of user-specified options. This -// class stores and retrives the options specified by the user. For -// now, this routine is limited to those options which are in common -// to the stand-alone and Athena versions of LArG4Model; for example, the -// physics-list option is not in this class, because it's a LArG4 -// option in stand-alone mode, but a G4Svc option in Athena mode. - -// 21-Jul-2004 WGS: Add out-of-time cut option. - -#include "LArG4Code/OptionsStore.h" - -#include <map> -#include <string> - - -namespace LArG4 { - - // Define all the user options. Note that the simulation main - // routines (e.g., LArG4/LArG4Algs/src/LArG4Run.cxx and - // LArG4/LArG4App/LArG4App.cc) are responsible for - // supplying the default values for all these options. (In - // Athena, the default values are supplied by the jobOptions - // service; in stand-alone, they're supplied through the - // ParseOptions class.) - - enum ERunOptions { - - // Options that related to calibration studies - kCalibrationRun , // Whether this is a calibration run - - // Options that relate to the fast shower model - kEmbFastShowerModel , // Whether to use a fast-shower-model in the EMB - kEmecFastShowerModel , // Whether to use a fast-shower-model in the EMEC - kFcalFastShowerModel , // Whether to use a fast-shower-model in the FCAL - kHecFastShowerModel , // Whether to use a fast-shower-model in the HEC - kBuildFromNova, // Whether to build parameters from NOVA database. - kOutOfTimeCut // Out-of-time cut applied to energy deposits in hits - }; - - // Define the class that will store the run options. In this case, - // the class will be LArG4::RunOptions. - - class RunOptions : public LArG4::OptionsStore<ERunOptions> - { - public: - virtual ~RunOptions() {;} - - // Standard setup for the singleton design pattern. - static RunOptions* GetInstance() - { - static RunOptions s_instance; - return &s_instance; - } - - }; - - -} // namespace LArG4 - - -#endif // LArG4_RunOptions_H diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/SDWrapper.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/SDWrapper.h new file mode 100644 index 0000000000000000000000000000000000000000..aab623292337fb896963de1b967747ff4454194c --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/SDWrapper.h @@ -0,0 +1,106 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4CODE_SDWRAPPER_H +#define LARG4CODE_SDWRAPPER_H + +// System includes +#include <string> +#include <vector> +#include <memory> + +// External includes +#include "G4VSensitiveDetector.hh" + +// Framework includes +#include "StoreGate/WriteHandle.h" + + +// Forward declarations +class LArG4SimpleSD; +class LArHitContainer; +class LArG4CalibSD; +class CaloCalibrationHitContainer; + + +namespace LArG4 +{ + + namespace detail + { + + /// @class SDWrapper + /// @brief A template class which wraps multiple sensitive detectors. + /// + /// Allows for SD tools to manage several SDs which collaborate to fill one + /// hit container in a multi-threading-friendly way. The wrapper owns the + /// WriteHandle for the hit container and gathers hits from each SD at the + /// end of an event. + /// + /// The inheritance from G4VSensitiveDetector is merely a trick so the SD + /// tool can save this object in the SensitiveDetectorBase thread-local + /// container. It also allows to create the hit container at the right time + /// via the SD Initialize method invoked by Geant4. + /// + /// Clients shouldn't use this generic template directly, but should use + /// the explicitly allowed specializations given below. + /// + /// @author Steve Farrell <Steven.Farrell@cern.ch> + /// + template<class SDType, class HitContainerType> + class SDWrapper : public G4VSensitiveDetector + { + + public: + + /// Alias to the SD list type + using SDList_t = std::vector< std::unique_ptr<SDType> >; + + /// Construct the wrapper from the output collection name + SDWrapper(const std::string& name, const std::string& hitCollectionName); + + /// Add an SD to this wrapper + void addSD(std::unique_ptr<SDType> sd); + + /// Add a (non-owned) fast-sim SD by name + void addFastSimSD(const std::string& fastSimSDName); + + /// Beginning of G4 event; initialize the hit collection. + virtual void Initialize(G4HCofThisEvent*) override final; + + /// This method should not be called. It will throw. + virtual bool ProcessHits(G4Step*, G4TouchableHistory*) override final; + + /// Gather the hits into the WriteHandle from all the SDs + void EndOfAthenaEvent(); + + private: + + /// The hit container name + std::string m_hitCollName; + + /// The hit container handle + SG::WriteHandle<HitContainerType> m_hitColl; + + /// The list of sensitive detectors that I own and manage + SDList_t m_sdList; + + /// A fastsim SD name that I do not own but invoke in order to + /// share my hit container. For now I'm assuming there is only one. + std::string m_fastSimSDName; + + }; // class SDWrapper + + } // namespace detail + + + /// Template instantiation for LArG4SimpleSD + using SimpleSDWrapper = detail::SDWrapper<LArG4SimpleSD, LArHitContainer>; + + /// Template instantiation for LArG4CalibSD + using CalibSDWrapper = detail::SDWrapper<LArG4CalibSD, CaloCalibrationHitContainer>; + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/SimpleSDTool.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/SimpleSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..dc5685de2b088bd7dc20b9a154f5d8b1205dfa37 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/SimpleSDTool.h @@ -0,0 +1,95 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4CODE_SIMPLESDTOOL_H +#define LARG4CODE_SIMPLESDTOOL_H + +/// @file SimpleSDTool.h +/// @brief Defines the SimpleSDTool class +/// @author Steve Farrell <Steven.Farrell@cern.ch> +/// @date 2016-03-26 + +// System includes +#include <string> +#include <vector> + +// G4Atlas includes +#include "G4AtlasTools/SensitiveDetectorBase.h" + +// Local includes +#include "LArG4SimpleSD.h" + +// Forward declarations +class ILArCalculatorSvc; +class LArEM_ID; +class LArFCAL_ID; +class LArHEC_ID; +class LArMiniFCAL_ID; +class LArG4SimpleSD; + +namespace LArG4 +{ + + /// @class SimpleSDTool + /// @brief A base class for tools that manage LArG4SimpleSDs. + /// + /// @todo Add more details. + /// + /// @author Steve Farrell <Steven.Farrell@cern.ch> + /// + class SimpleSDTool : public SensitiveDetectorBase + { + + public: + + /// Constructor + SimpleSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + /// Initialize the tool + StatusCode initialize() override final; + + /// Calls down to all the SDs to pack their hits into one collection + StatusCode Gather() override final; + + protected: + + /// Initialize Calculator Services + virtual StatusCode initializeCalculators() { return StatusCode::SUCCESS; } + + /// Helper method to create one SD + std::unique_ptr<LArG4SimpleSD> + makeOneSD(const std::string& name, ILArCalculatorSvc* calc, + const std::vector<std::string>& volumes) const; + + /// Are we handling frozen shower fast sim? + bool useFrozenShowers() const { return m_useFrozenShowers; } + + protected: + + /// @name configuration properties + /// @{ + + /// What time binning type for regular hits? + std::string m_timeBinType; + /// What time bin width for regular hits? + float m_timeBinWidth; + /// Is there going to be a fast simulation coming into this SD? + G4bool m_useFrozenShowers; + + /// @} + + /// @name Calo identifier helpers + /// @{ + const LArEM_ID* m_larEmID; + const LArFCAL_ID* m_larFcalID; + const LArHEC_ID* m_larHecID; + const LArMiniFCAL_ID* m_larMiniFcalID; + /// @} + + }; // class SimpleSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/VCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/VCalibrationCalculator.h deleted file mode 100644 index 57b0aad0b51a2c593474b3bb1c48e9f4f2522cdd..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/VCalibrationCalculator.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// VCalibrationCalculator.h -// Prepared 08-Jan-2004 Bill Seligman - -// This is an abstract base for a calibration hit calculator in LArG4. - -// A "calculator" is used in much the same way as a hand-held -// calculator might be. The user supplies a value and hits 'Enter' -// (i.e., invokes the Process() method). Then they read off whatever -// values are of interest. - -#ifndef LArG4_VCalibrationCalculator_H -#define LArG4_VCalibrationCalculator_H - -#include "globals.hh" - -#include <vector> - -// Forward declaractions: -class LArG4Identifier; -class G4Step; - -namespace LArG4 { - - class VCalibrationCalculator { - public: - - virtual ~VCalibrationCalculator() {}; - - // The Process method returns a boolean value. If it's true, the - // hit can be used by Geant4; if it's false, there's something wrong - // with the energy deposit and it should be ignored. - - // For calibration work, most of the time we want the calculator - // to determine both the energy and the identifier. However, - // sometimes we want it calculate only the identifier (for escaped - // energy), or only the energy (no known application yet, but you - // can never tell). Use the enum to control any special - // processing. - - enum eCalculatorProcessing { kEnergyAndID, kOnlyEnergy, kOnlyID }; - - virtual G4bool Process (const G4Step*, - const eCalculatorProcessing = kEnergyAndID) = 0; - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const = 0; - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const = 0; - }; - -} // namespace LArG4 - -#endif // LArG4_VCalibrationCalculator_H diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/VolumeUtils.h b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/VolumeUtils.h new file mode 100644 index 0000000000000000000000000000000000000000..1ef713883e12d6dafb871d7a2749f6dc8ecf422f --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/VolumeUtils.h @@ -0,0 +1,49 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4CODE_VOLUMEUTILS_H +#define LARG4CODE_VOLUMEUTILS_H + +/** + @file VolumeUtils.h + @brief Standalone functions for dealing with LAr G4 volumes + @author Steve Farrell <Steven.Farrell@cern.ch> + */ + +// System includes +#include <string> +#include <vector> + +// Gaudi includes +#include "GaudiKernel/MsgStream.h" + +namespace LArG4 +{ + + /** @brief Search for logical volumes in the G4 volume store. + * + * Uses the global G4LogicalVolumeStore to search the geometry. + * The pattern may contain '*' wildcards. + * + * @return a set of available volume names matching the wildcard pattern. + */ + std::set<std::string> findLogicalVolumes(const std::string& pattern); + + + /** @brief Search for multiple logical volumes in G4 volume store. + * + * This function does a search for each input pattern in the + * G4LogicalVolumeStore using the findLogicalVolumes function above. + * It uses the provided MsgStream object to print a warning for every + * pattern that yields zero matches. + * + * @return a list of available volume names matching the wildcard patterns. + */ + std::vector<std::string> + findLogicalVolumes(const std::vector<std::string>& patterns, + MsgStream& msg); + +} + +#endif diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/selectionEnums.xml b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/selectionEnums.xml new file mode 100644 index 0000000000000000000000000000000000000000..3827373bde9548cd233029c0aea1d979a686fbc6 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/LArG4Code/selectionEnums.xml @@ -0,0 +1,7 @@ +<lcgdict> + + <enum pattern="LArG4::*"/> + <variable pattern="LArG4::*"/> + <class name="LArG4::ROOT6_NamespaceAutoloadHook" /> + +</lcgdict> diff --git a/LArCalorimeter/LArG4/LArG4Code/cmt/requirements b/LArCalorimeter/LArG4/LArG4Code/cmt/requirements index 3a01e6fd98dd95fd08ffcb61fedcf0ae127794c9..de7d275d845305044ff82ddfe114c6a0caa1b81e 100644 --- a/LArCalorimeter/LArG4/LArG4Code/cmt/requirements +++ b/LArCalorimeter/LArG4/LArG4Code/cmt/requirements @@ -7,27 +7,34 @@ author Mikhail Leltchouk <lelchuk@nevis.columbia.edu> # packages in LArG4. public -use AtlasPolicy AtlasPolicy-* -use LArGeoCode LArGeoCode-* LArCalorimeter/LArGeoModel -use AtlasCLHEP AtlasCLHEP-* External -use CaloG4Sim CaloG4Sim-* Calorimeter -use CaloSimEvent CaloSimEvent-* Calorimeter -use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas -use Geant4 Geant4-* External -use LArSimEvent LArSimEvent-* LArCalorimeter +use AtlasPolicy AtlasPolicy-* +use AtlasReflex AtlasReflex-* External +use AthenaBaseComps AthenaBaseComps-* Control +use GaudiInterface GaudiInterface-* External +use LArGeoCode LArGeoCode-* LArCalorimeter/LArGeoModel +use AtlasCLHEP AtlasCLHEP-* External +use CaloG4Sim CaloG4Sim-* Calorimeter +use CaloSimEvent CaloSimEvent-* Calorimeter +use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas +use Geant4 Geant4-* External +use LArSimEvent LArSimEvent-* LArCalorimeter +use StoreGate StoreGate-* Control private -use AthenaKernel AthenaKernel-* Control -use CaloIdentifier CaloIdentifier-* Calorimeter -use MCTruth MCTruth-* Simulation/G4Sim -use StoreGate StoreGate-* Control +use AthenaKernel AthenaKernel-* Control +use CxxUtils CxxUtils-* Control +use CaloIdentifier CaloIdentifier-* Calorimeter +use MCTruth MCTruth-* Simulation/G4Sim end_private # Add the compiler macro definitions for cmake (transparent to CMT) apply_pattern cmake_add_command command="add_definitions(-DLARG4NOROOT)" +apply_pattern lcgdict dict=LArG4CodeEnums selectionfile=selectionEnums.xml \ + headerfiles="../LArG4Code/LArG4EnumDefs.h" + # Build the library (and export the headers) -library LArG4Code *.cc +library LArG4Code *.cc *.cxx apply_pattern installed_library macro_append LArG4Code_cppflags " -DLARG4NOROOT " diff --git a/LArCalorimeter/LArG4/LArG4Code/src/CalibSDTool.cc b/LArCalorimeter/LArG4/LArG4Code/src/CalibSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..bb2737267ea9597a3fbd3ac68c007de7a2199ecd --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/src/CalibSDTool.cc @@ -0,0 +1,119 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArG4Code/CalibSDTool.h" + +// Framework utilities +#include "CxxUtils/make_unique.h" + +// ID helper includes +#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/LArEM_ID.h" +#include "CaloIdentifier/LArFCAL_ID.h" +#include "CaloIdentifier/LArHEC_ID.h" +#include "CaloIdentifier/LArMiniFCAL_ID.h" +#include "CaloIdentifier/CaloDM_ID.h" + +// Local includes +#include "LArG4Code/SDWrapper.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" +#include "LArG4Code/VolumeUtils.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Tool constructor + //--------------------------------------------------------------------------- + CalibSDTool::CalibSDTool(const std::string& type, const std::string& name, + const IInterface* parent) + : SensitiveDetectorBase(type, name, parent), + m_doPID(false), + m_larEmID(nullptr), + m_larFcalID(nullptr), + m_larHecID(nullptr), + m_larMiniFcalID(nullptr), + m_caloDmID(nullptr) + { + declareProperty("ParticleID", m_doPID); + } + + //--------------------------------------------------------------------------- + // Initialize the tool + //--------------------------------------------------------------------------- + StatusCode CalibSDTool::initialize() + { + ATH_MSG_DEBUG( "Initializing " << name() ); + + const CaloIdManager* idMgr = nullptr; + CHECK( detStore()->retrieve(idMgr) ); + if( (m_larEmID = idMgr->getEM_ID()) == nullptr) { + ATH_MSG_ERROR("Invalid LAr EM ID helper"); + return StatusCode::FAILURE; + } + if( (m_larFcalID = idMgr->getFCAL_ID()) == nullptr) { + ATH_MSG_ERROR("Invalid LAr FCAL ID helper"); + return StatusCode::FAILURE; + } + if( (m_larHecID = idMgr->getHEC_ID()) == nullptr) { + ATH_MSG_ERROR("Invalid LAr HEC ID helper"); + return StatusCode::FAILURE; + } + if( (m_larMiniFcalID = idMgr->getMiniFCAL_ID()) == nullptr) { + ATH_MSG_ERROR("Invalid LAr Mini FCAL ID helper"); + return StatusCode::FAILURE; + } + if( (m_caloDmID = idMgr->getDM_ID()) == nullptr) { + ATH_MSG_ERROR("Invalid CaloDM ID helper"); + return StatusCode::FAILURE; + } + + // No general volume list for SensitiveDetectorBase + m_noVolumes = true; + + ATH_CHECK(this->initializeCalculators()); + + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Collect hits for this event + //--------------------------------------------------------------------------- + StatusCode CalibSDTool::Gather() + { + auto sdWrapper = dynamic_cast<CalibSDWrapper*>( getSD() ); + if(!sdWrapper) { + ATH_MSG_ERROR("Failed to cast SD to CalibSDWrapper"); + return StatusCode::FAILURE; + } + sdWrapper->EndOfAthenaEvent(); + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create one calib SD + //--------------------------------------------------------------------------- + std::unique_ptr<LArG4CalibSD> + CalibSDTool::makeOneSD(const std::string& sdName, ILArCalibCalculatorSvc* calc, + const std::vector<std::string>& volumes) const + { + ATH_MSG_VERBOSE( name() << " makeOneSD" ); + + // Parse the wildcard patterns for existing volume names + auto parsedVolumes = findLogicalVolumes(volumes, msg()); + + // Create the calib SD + auto sd = CxxUtils::make_unique<LArG4CalibSD>(sdName, calc, m_doPID); + sd->setupHelpers(m_larEmID, m_larFcalID, m_larHecID, m_larMiniFcalID, m_caloDmID); + + // Assign the volumes to the SD + if( assignSD( sd.get(), parsedVolumes ).isFailure() ) { + // TODO: can I just return NULL here? + throw GaudiException("Failed to assign sd: " + sdName, + name(), StatusCode::FAILURE); + } + return std::move(sd); + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4Code/src/CalibrationDefaultCalculator.cc b/LArCalorimeter/LArG4/LArG4Code/src/CalibrationDefaultCalculator.cc deleted file mode 100644 index 15c92c06d3d2cc71b6da17c493fd5c481c133034..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Code/src/CalibrationDefaultCalculator.cc +++ /dev/null @@ -1,319 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArG4::CalibrationDefaultCalculator -// Prepared 04-Mar-2004 Bill Seligman -// Modified 22-Sep-2004 Mikhail Leltchouk - -// The calibration studies rely on every volume in the simulation -// being made into a sensitive detector. There is a practical -// problem: What if we're still in the middle of developing code, and -// not every volume has been made sensitive yet? What if we've -// overlooked a volume? Or (the most common case), what if we have an -// energy deposit in a volume that is not being directly calibrated? - -// This class provides a "default behavior" for all energy deposits -// that are not made in a volume that's been made sensitive for -// calibration studies. - -// This class calculates the values needed for calibration hits in the -// simulation. - -#undef DEBUG_HITS -#undef DEBUG_VOLUMES - -#include "LArG4Code/CalibrationDefaultCalculator.h" -#include "LArG4Code/LArG4Identifier.h" - -#include "G4ThreeVector.hh" -#include "G4Step.hh" -#include "globals.hh" -#include "CLHEP/Units/PhysicalConstants.h" - -#include <cmath> -#include <string> -#include <climits> -#include <algorithm> -#include <set> -#include <numeric> - -#undef DEBUG_DMXYZ - -namespace LArG4 { - - CalibrationDefaultCalculator::CalibrationDefaultCalculator() - { - } - - - CalibrationDefaultCalculator::~CalibrationDefaultCalculator() - { - } - - - G4bool CalibrationDefaultCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) - { - // Use the calculators to determine the energies and the - // identifier associated with this G4Step. Note that the - // default is to process both the energy and the ID. - - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } - else { - for (unsigned int i=0; i != 4; i++) m_energies.push_back(0.); - } - - m_identifier.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Call after volume-by-volume calls only if none of these calls assigned - // the SimulationEnergies::Energies of current step to identifier and one - // of the existing hit collections. - - static const double oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. - static const double oneOverDphi = 32./M_PI; // 1/Dphi - static const int phiBinMax = 63; - static const double rhoAlignmentSafety = 50.*CLHEP::mm; - static const double zAlignmentSafety = 100.*CLHEP::mm; - static const double rhoCalorOut = 3885.*CLHEP::mm - rhoAlignmentSafety; - static const double zCalorOut = 6100.*CLHEP::mm - zAlignmentSafety; - static const double rhoInDetOut = 1150.*CLHEP::mm + rhoAlignmentSafety; - static const double zInDetOut = 3511.*CLHEP::mm + zAlignmentSafety; - static const double startZFCal1 = 4668.5 - zAlignmentSafety; - static const double z1BeforeFCal = 4225.5 + zAlignmentSafety; // - static const double z2BeforeFCal = 4557.5 + zAlignmentSafety; // - // Calculate the mid-point of the step, and the simple geometry variables. - - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - - G4ThreeVector startPoint = pre_step_point->GetPosition(); - G4ThreeVector endPoint = post_step_point->GetPosition(); - G4ThreeVector p = (startPoint + endPoint) * 0.5; - - G4double rho = p.perp(); - G4double eta = fabs( p.pseudoRapidity() ); - G4double phi = p.phi(); - if ( phi<0. ) { phi += 2.*M_PI; } // Normalize for phiBin calculation - - G4int detector = 10; // calorimeter "dead" materials - - // Initialize identifier variables with (invalid) default - // values (INT_MIN is defined in <climits>). - G4int subdet = INT_MIN; - G4int type = INT_MIN; - G4int sampling = INT_MIN; - G4int region = INT_MIN; - G4int etaBin = INT_MIN; - G4int phiBin = INT_MIN; - - if ( eta > 5. ) // "forward" leakage - { - // subdet = +/-4, "+" or " -" according to sign of Z in World coorinate - subdet = ( p.z() > 0.) ? 4 : -4; - // type = 1, sampling = 3 leakage outside calorimeters: - type = 1; - sampling = 3; - if ( eta < 8.) // leakage between eta = 5 and 8 - { - region = 1; - etaBin = (int) ( ( eta - 5. ) * 0.5 * oneOverDeta ); - phiBin = (int) ( phi * oneOverDphi ); - if (phiBin>phiBinMax) phiBin=phiBinMax; - } - else // "very forward" leakage eta >= 8. - { - region = 2; - etaBin = 0; // no eta-phi subdivision - phiBin = 0; - } - } - else if ( rho > rhoCalorOut || fabs( p.z() ) > zCalorOut ) - { - // type = 1, sampling = 3 leakage outside calorimeters: - type = 1; - sampling = 3; - region = 0; - phiBin = (int) ( phi * oneOverDphi ); - if (phiBin>phiBinMax) phiBin=phiBinMax; - - if ( eta < 1.7) // leakage outside Tile - { - // subdet = +/-5, "+" or " -" according to sign of Z in World coorinate - subdet = ( p.z() > 0.) ? 5 : -5; - etaBin = (int) ( eta * oneOverDeta ); - } - else // leakage outside LAr HEC - { - // subdet = +/-4, "+" or " -" according to sign of Z in World coorinate - subdet = ( p.z() > 0.) ? 4 : -4; - etaBin = (int) ( ( eta - 1.7 ) * oneOverDeta ); - } // outside at eta covered by Tile or by LAr HEC - - } // leakage outside calorimeters: - - else if ( rho < rhoInDetOut && fabs( p.z() ) < zInDetOut ) - - { - subdet = ( p.z() > 0.) ? 4 : -4; - // type = 1, sampling = 0, region = 1-5 => Inner Detector - type = 1; - sampling = 0; - region = 5; // TRT support, cables, services - if ( rho < 980.*CLHEP::mm ) region = 4; // TRT - if ( rho < 650.*CLHEP::mm ) region = 3; // support - if ( rho < 540.*CLHEP::mm ) region = 2; // SCT - if ( rho < 270.*CLHEP::mm ) region = 1; // Pixels with support, beam pipe - etaBin = (int) ( eta * oneOverDeta ); - phiBin = (int) ( phi * oneOverDphi ); - if (phiBin>phiBinMax) phiBin=phiBinMax; - - // g.p. 23.05.2011 beam pipe material outside of inner detector area close to FCal - } else if( fabs( p.z() ) >= zInDetOut) { - subdet = ( p.z() > 0.) ? 4 : -4; - phiBin = (int) ( phi * oneOverDphi ); - if (phiBin>phiBinMax) phiBin=phiBinMax; - if(eta>=2.9 && eta<5.0) { - if(fabs(p.z()) < z1BeforeFCal) { - type = 1; - sampling = 1; - region = 7; - etaBin = (int) ( (eta-3.2) * oneOverDeta ); - } else if (fabs(p.z()) < z2BeforeFCal){ - type = 2; - sampling = 0; - region = 5; - etaBin = (int) ( (eta-3.0) * oneOverDeta ); - } else if (fabs(p.z()) < startZFCal1) { - type = 2; - sampling = 1; - region = 5; - etaBin = (int) ( (eta-3.0) * oneOverDeta ); - } - // g.p. back leakages in beam pipe - } else if ( eta >= 5. && eta < 8.0) { - type = 1; - sampling = 3; - region = 1; - etaBin = (int) ( (eta-5.)* 0.5 * oneOverDeta ); - } else if (eta>8.) { - type = 1; - sampling = 3; - region = 2; - etaBin = 0; - phiBin = 0; - } - if(etaBin<0) etaBin=0; - } - - - // If the point falls outside any of the above "if" - // statements, use a "none-of-the-above" identifier. - - if - ( subdet == INT_MIN || - type == INT_MIN || - sampling == INT_MIN || - region == INT_MIN || - etaBin == INT_MIN || - phiBin == INT_MIN ) - { -#if defined (DEBUG_VOLUMES) || defined (DEBUG_HITS) - static std::set<G4String> volumeList; - G4String namePhys = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetName(); - G4String nameLog = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName(); - - std::set<G4String>::iterator i = volumeList.find( nameLog ); - if ( i == volumeList.end() ) - { - volumeList.insert( nameLog ); - std::cout << "LArG4::CalibrationDefaultCalculator::Process" - << std::endl - << " default ID used in logical volume '" - << nameLog - << "'" - << std::endl - << " (each such volume is only listed once)" - << std::endl; - } - - static const G4int messageMax = 10; - static G4int messageCount = 0; - if ( messageCount++ < messageMax ) - { - std::cout << " detailed error (" << messageCount - << " of " << messageMax << " max displayed):" - << std::endl - << " G4Step at unexpected place: (x,y,z) [mm] = (" - << p.x()/mm << "," - << p.y()/mm << "," - << p.z()/mm - << "), eta=" << eta - << ", phi=" << phi - << ", rho=" << rho - << std::endl - << " in physical volume '" << namePhys << "'" - << std::endl - << " (subdet,type,sampling,region,etaBin,phiBin)=(" - << subdet << "," - << type << "," - << sampling << "," - << region << "," - << etaBin << "," - << phiBin - << "); using default ID" - << std::endl; - } -#endif - subdet = ( p.z() > 0.) ? 4 : -4; - type = 1; - sampling = 0; - region = 0; - etaBin = (int) ( eta * oneOverDeta ); - if ( etaBin > 49 ) etaBin = 49; - phiBin = (int) ( phi * oneOverDphi ); - if (phiBin>phiBinMax) phiBin=phiBinMax; -#ifdef DEBUG_DMXYZ - G4double energy = std::accumulate(m_energies.begin(),m_energies.end(), 0.); - if(energy > 1e-15) LArG4::CalibrationDefaultCalculator::Print("UNEXP DefaultCalculator",m_identifier,a_step,m_energies); -#endif - } - - // Create the LArG4Identifier. - m_identifier << detector - << subdet - << type - << sampling - << region - << etaBin - << phiBin; - } - -#ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); - std::cout << "LArG4::CalibrationDefaultCalculator::Process" - << " ID=" << std::string(m_identifier) - << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; -#endif -#ifdef DEBUG_DMXYZ -// LArG4::CalibrationDefaultCalculator::Print("DMXYZ DefaultCalculator",m_identifier,a_step,m_energies); -#endif - - // Check for bad result. - if ( m_identifier == LArG4Identifier() ) - return false; - - return true; - } - -} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4Code/src/CalibrationHit.cc b/LArCalorimeter/LArG4/LArG4Code/src/CalibrationHit.cc index 9f1b42fd3223655a32d4d53e315ae0da80f941c4..3ea60f5b1548d848ef3014984c51b922939e901f 100644 --- a/LArCalorimeter/LArG4/LArG4Code/src/CalibrationHit.cc +++ b/LArCalorimeter/LArG4/LArG4Code/src/CalibrationHit.cc @@ -12,7 +12,7 @@ #include "G4Allocator.hh" #include "G4ios.hh" #include "globals.hh" -#include "AthenaKernel/Units.h" +#include "AthenaKernel/Units.h" namespace LArG4 { diff --git a/LArCalorimeter/LArG4/LArG4Code/src/EscapedEnergyProcessing.cc b/LArCalorimeter/LArG4/LArG4Code/src/EscapedEnergyProcessing.cc index 8651df642c8686278c5033f7cb46725283015964..0f4792416dad15201ce45da434517dc704db0cd1 100644 --- a/LArCalorimeter/LArG4/LArG4Code/src/EscapedEnergyProcessing.cc +++ b/LArCalorimeter/LArG4/LArG4Code/src/EscapedEnergyProcessing.cc @@ -18,7 +18,7 @@ #undef DEBUG_PROCESS -using namespace LArG4; +//using namespace LArG4; EscapedEnergyProcessing::EscapedEnergyProcessing(LArG4CalibSD* SD) : m_defaultSD(SD) diff --git a/LArCalorimeter/LArG4/LArG4Code/src/LArCalculatorSvcImp.cxx b/LArCalorimeter/LArG4/LArG4Code/src/LArCalculatorSvcImp.cxx new file mode 100644 index 0000000000000000000000000000000000000000..fb73b7c3788fe1d69a050ffffe4a0282cfb3d34d --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/src/LArCalculatorSvcImp.cxx @@ -0,0 +1,30 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArG4Code/LArCalculatorSvcImp.h" + +#include "CLHEP/Units/SystemOfUnits.h" + +LArCalculatorSvcImp::LArCalculatorSvcImp(const std::string& name, ISvcLocator *pSvcLocator) + : AthService(name, pSvcLocator) + , m_BirksLaw(true) + , m_Birksk(0.0486) + , m_OOTcut(300*CLHEP::ns) +{ + declareProperty("BirksLaw",m_BirksLaw); + declareProperty("Birksk",m_Birksk); + declareProperty("OOTcut",m_OOTcut); +} + +StatusCode LArCalculatorSvcImp::queryInterface( const InterfaceID & riid, void** ppvInterface ) +{ + if ( ILArCalculatorSvc::interfaceID().versionMatch(riid) ) { + *ppvInterface = dynamic_cast<ILArCalculatorSvc*>(this); + } else { + // Interface is not directly available : try out a base class + return AthService::queryInterface(riid, ppvInterface); + } + addRef(); + return StatusCode::SUCCESS; +} diff --git a/LArCalorimeter/LArG4/LArG4Code/src/LArCalibCalculatorSvcImp.cxx b/LArCalorimeter/LArG4/LArG4Code/src/LArCalibCalculatorSvcImp.cxx new file mode 100644 index 0000000000000000000000000000000000000000..6deb8ce6a089bf630a9124133ff1f55f5989fd62 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/src/LArCalibCalculatorSvcImp.cxx @@ -0,0 +1,22 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArG4Code/LArCalibCalculatorSvcImp.h" + +LArCalibCalculatorSvcImp::LArCalibCalculatorSvcImp(const std::string& name, ISvcLocator *pSvcLocator) + : AthService(name, pSvcLocator) +{ +} + +StatusCode LArCalibCalculatorSvcImp::queryInterface( const InterfaceID & riid, void** ppvInterface ) +{ + if ( ILArCalibCalculatorSvc::interfaceID().versionMatch(riid) ) { + *ppvInterface = dynamic_cast<ILArCalibCalculatorSvc*>(this); + } else { + // Interface is not directly available : try out a base class + return AthService::queryInterface(riid, ppvInterface); + } + addRef(); + return StatusCode::SUCCESS; +} diff --git a/LArCalorimeter/LArG4/LArG4Code/src/LArG4CalibSD.cc b/LArCalorimeter/LArG4/LArG4Code/src/LArG4CalibSD.cc index 6b7a5145e8f97c7822d007cd98b1cd67072b4251..4677d54edfd2af814de3e3eb88352fadc7659c69 100644 --- a/LArCalorimeter/LArG4/LArG4Code/src/LArG4CalibSD.cc +++ b/LArCalorimeter/LArG4/LArG4Code/src/LArG4CalibSD.cc @@ -4,7 +4,7 @@ #include "LArG4Code/LArG4CalibSD.h" -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" #include "CaloIdentifier/LArID_Exception.h" #include "CaloIdentifier/LArEM_ID.h" #include "CaloIdentifier/LArFCAL_ID.h" @@ -18,7 +18,7 @@ #include "G4Step.hh" -LArG4CalibSD::LArG4CalibSD(G4String a_name, LArG4::VCalibrationCalculator* calc, bool doPID) +LArG4CalibSD::LArG4CalibSD(G4String a_name, ILArCalibCalculatorSvc* calc, bool doPID) : G4VSensitiveDetector(a_name) , m_calculator(calc) , m_numberInvalidHits(0) @@ -53,12 +53,15 @@ G4bool LArG4CalibSD::ProcessHits(G4Step* a_step,G4TouchableHistory*) // it occurred outside the sensitive region. If such a thing // happens, it means that the geometry definitions in the // detector-construction routine and the calculator do not agree.) - if(!(m_calculator->Process(a_step))) { + LArG4Identifier _identifier; + std::vector<G4double> _energies; + + if(!(m_calculator->Process(a_step, _identifier, _energies))) { m_numberInvalidHits++; return false; } - return SimpleHit( m_calculator->identifier() , m_calculator->energies() ); + return SimpleHit( _identifier , _energies ); } G4bool LArG4CalibSD::SimpleHit( const LArG4Identifier& a_ident , const std::vector<double>& energies ){ @@ -150,10 +153,13 @@ G4bool LArG4CalibSD::SimpleHit( const LArG4Identifier& a_ident , const std::vect G4bool LArG4CalibSD::SpecialHit(G4Step* a_step, const std::vector<G4double>& a_energies) { + LArG4Identifier _identifier; + std::vector<G4double> _vtmp; + // If we can't calculate the identifier, something is wrong. - if (!(m_calculator->Process( a_step, LArG4::VCalibrationCalculator::kOnlyID))) return false; + if (!(m_calculator->Process( a_step, _identifier, _vtmp, LArG4::kOnlyID))) return false; - return SimpleHit( m_calculator->identifier() , a_energies ); + return SimpleHit( _identifier , a_energies ); } diff --git a/LArCalorimeter/LArG4/LArG4Code/src/LArG4DetectorComponents.cc b/LArCalorimeter/LArG4/LArG4Code/src/LArG4DetectorComponents.cc deleted file mode 100644 index 3d36dbb3c601ce41a296cfa34ecf8cf3dffdfe91..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Code/src/LArG4DetectorComponents.cc +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArG4DetectorComponents -// Maintain a list of detector components. -// 05-Jun-2003 Bill Seligman - -#include "LArG4Code/LArG4DetectorComponents.h" -#include "LArG4Code/LArVolumeInterface.h" - -#include <map> - -// Standard implementation of a singleton pattern. - -LArG4DetectorComponents* LArG4DetectorComponents::GetInstance() -{ - static LArG4DetectorComponents instance; - return &instance; -} - -G4bool LArG4DetectorComponents::m_zNeg = false; - -LArG4DetectorComponents::LArG4DetectorComponents() {;} - -LArG4DetectorComponents::~LArG4DetectorComponents() {;} - - -// Add a detector component to the list. -void LArG4DetectorComponents::SetDetectorComponent( const EDetectorComponent e, LArVolumeInterface* v ) -{ - m_detectorMap[e] = v; -} - - -// Fetch a component from the list. If we can't find it, just return -// a null pointer. -LArVolumeInterface* LArG4DetectorComponents::GetDetectorComponent( const EDetectorComponent e ) const -{ - m_detectorMap_ptr i = m_detectorMap.find(e); - - if ( i == m_detectorMap.end() ) - return 0; - - // Reminder: - // i == a pointer to one entry in detectorMap - // (*i) = a pair<EDetectorComponent, LArVolumeInterface*> - // (*i).second = a LArVolumeInterface* - - return (*i).second; -} diff --git a/LArCalorimeter/LArG4/LArG4Code/src/LArG4SDTool.cc b/LArCalorimeter/LArG4/LArG4Code/src/LArG4SDTool.cc index 73673ad394a7d2e980c2934f8dda01cc83c4802c..2c1246ded1f95afa270be47a058584e63f92d04d 100644 --- a/LArCalorimeter/LArG4/LArG4Code/src/LArG4SDTool.cc +++ b/LArCalorimeter/LArG4/LArG4Code/src/LArG4SDTool.cc @@ -43,29 +43,38 @@ LArG4SDTool::LArG4SDTool(const std::string& type, const std::string& name, const StatusCode LArG4SDTool::initialize() { const CaloIdManager* caloIdManager=nullptr; - CHECK( detStore()->retrieve(caloIdManager) ); - - // FIXME: why are we throwing from this method? Return StatusCode::FAILURE! - + ATH_CHECK( detStore()->retrieve(caloIdManager) ); m_larEmID = caloIdManager->getEM_ID(); if(m_larEmID==0) - throw std::runtime_error("LArG4SDTool: Invalid LAr EM ID helper"); - + { + ATH_MSG_ERROR("LArG4SDTool: Invalid LAr EM ID helper"); + return StatusCode::FAILURE; + } m_larFcalID = caloIdManager->getFCAL_ID(); if(m_larFcalID==0) - throw std::runtime_error("LArG4SDTool: Invalid FCAL ID helper"); - + { + ATH_MSG_ERROR("LArG4SDTool: Invalid FCAL ID helper"); + return StatusCode::FAILURE; + } m_larHecID = caloIdManager->getHEC_ID(); if(m_larHecID==0) - throw std::runtime_error("LArG4SDTool: Invalid HEC ID helper"); - + { + ATH_MSG_ERROR("LArG4SDTool: Invalid HEC ID helper"); + return StatusCode::FAILURE; + } m_larMiniFcalID = caloIdManager->getMiniFCAL_ID(); if(m_larMiniFcalID==0) - throw std::runtime_error("LArG4SDTool: Invalid Mini FCAL ID helper"); - + { + ATH_MSG_ERROR("LArG4SDTool: Invalid Mini FCAL ID helper"); + return StatusCode::FAILURE; + } m_caloDmID = caloIdManager->getDM_ID(); if(!m_caloDmID) - throw std::runtime_error("LArG4SDTool: Invalid CaloDM ID helper"); + { + ATH_MSG_ERROR("LArG4SDTool: Invalid CaloDM ID helper"); + return StatusCode::FAILURE; + } + ATH_CHECK(this->initializeCalculators()); return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArG4/LArG4Code/src/LArG4SimpleSD.cc b/LArCalorimeter/LArG4/LArG4Code/src/LArG4SimpleSD.cc index f058fead8ccfe52be6e9689e9d1f2124fc4066dc..db4a6c31dcaedf806d6a49ea46f046fcf015ea13 100644 --- a/LArCalorimeter/LArG4/LArG4Code/src/LArG4SimpleSD.cc +++ b/LArCalorimeter/LArG4/LArG4Code/src/LArG4SimpleSD.cc @@ -5,7 +5,7 @@ #include "LArG4Code/LArG4SimpleSD.h" #include "LArG4Code/LArG4Hit.h" -#include "LArG4Code/LArVCalculator.h" +#include "LArG4Code/ILArCalculatorSvc.h" #include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/LArID_Exception.h" #include "CaloIdentifier/LArEM_ID.h" @@ -20,7 +20,7 @@ #include "G4Step.hh" -LArG4SimpleSD::LArG4SimpleSD(G4String a_name, LArVCalculator* calc, const std::string& type, const float width) +LArG4SimpleSD::LArG4SimpleSD(G4String a_name, ILArCalculatorSvc* calc, const std::string& type, const float width) : G4VSensitiveDetector(a_name) , m_calculator(calc) , m_numberInvalidHits(0) @@ -95,7 +95,9 @@ G4bool LArG4SimpleSD::ProcessHits(G4Step* a_step,G4TouchableHistory*) // it occurred outside the sensitive region. If such a thing // happens, it means that the geometry definitions in the // detector-construction routine and the calculator do not agree.) - if(!(m_calculator->Process(a_step))) { + std::vector<LArHitData> hits; + + if(!(m_calculator->Process(a_step, hits))) { m_numberInvalidHits++; return false; } @@ -103,12 +105,18 @@ G4bool LArG4SimpleSD::ProcessHits(G4Step* a_step,G4TouchableHistory*) // A calculator can determine that a given energy deposit results // in more than one hit in the simulation. FOr each such hit... G4bool result = true; - for(int ihit=0; ihit<m_calculator->getNumHits(); ++ihit) { +// for(int ihit=0; ihit<m_calculator->getNumHits(); ++ihit) { +// // Ported in from the old LArG4HitMerger code +// result = result && SimpleHit( m_calculator->identifier(ihit) , +// m_calculator->time(ihit) , +// m_calculator->energy(ihit) ); +// } + for(const auto &ihit : hits) { // Ported in from the old LArG4HitMerger code - result = result && SimpleHit( m_calculator->identifier(ihit) , - m_calculator->time(ihit) , - m_calculator->energy(ihit) ); - } + result = result && SimpleHit( ihit.id , + ihit.time, + ihit.energy ); + } return result; } diff --git a/LArCalorimeter/LArG4/LArG4Code/src/LArHitMaker.cc b/LArCalorimeter/LArG4/LArG4Code/src/LArHitMaker.cc deleted file mode 100644 index 2025b2ec8ad4dcc1a1529464a13711f10533ef41..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4Code/src/LArHitMaker.cc +++ /dev/null @@ -1,168 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArHitMaker - -// Created by F. Mazzucato, September 2002 -// Modified my E.Barberio January 2003 -// LArG4 compatibility introduced 30-Apr-2003 Bill Seligman - -// 11-Aug-04 WGS: It appears that having more than one G4Navigator -// object in Geant4 may be a bad idea. Don't create a separate -// G4Navigator for this class; use the one in G4TransportationManager. - -#include "LArG4Code/LArHitMaker.h" -#include "LArG4Code/EnergySpot.h" - -#include "G4TransportationManager.hh" -#include "G4VSensitiveDetector.hh" -#include "G4TouchableHandle.hh" -#include "G4TouchableHistory.hh" -#include "G4Step.hh" -#include "G4StepPoint.hh" -#include "G4Navigator.hh" -#include "G4VPhysicalVolume.hh" - -#include "globals.hh" -#include "G4ios.hh" - -#undef DEBUG_FAST - -LArHitMaker::LArHitMaker() -{ - // Initialize the fake G4Step that we'll pass to the sensitive - // detector. - - m_fakeStep = new G4Step(); - m_fakePreStepPoint = m_fakeStep->GetPreStepPoint(); - m_fakePostStepPoint = m_fakeStep->GetPostStepPoint(); - m_touchableHandle = new G4TouchableHistory(); - m_pNavigator = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking(); - m_naviSetup = false; - m_baseName = "LAr"; -} - - -LArHitMaker::~LArHitMaker() -{ - // Cleanup pointers. - delete m_fakeStep; - delete m_pNavigator; -} - - -void LArHitMaker::make(const EnergySpot& a_spot) -{ - // ------------------- - // Locate the spot. Use m_naviSetup to test whether we've - // initialized the G4Navigator _after_ all the G4 geometry - // construction routines have executed. - // ------------------- -#ifdef DEBUG_FAST - G4cout << "LArHitMaker::make -- Begin Class." - << G4endl; -#endif - - if (!m_naviSetup) - { - m_pNavigator-> - LocateGlobalPointAndUpdateTouchable(a_spot.GetPosition(), - m_touchableHandle(), - false); - m_naviSetup = true; - } - else - { - m_pNavigator-> - LocateGlobalPointAndUpdateTouchable(a_spot.GetPosition(), - m_touchableHandle() ); - } - - //-------------------------------------- - // Fill the attributes of the G4Step needed - // by our sensitive detector: - //------------------------------------- -#ifdef DEBUG_FAST - G4cout << "LArHitMaker::make -- ready to fill step." - << G4endl; -#endif - - // Get the position and time from the energy spot. - G4ThreeVector p = a_spot.GetPosition(); - G4double t = a_spot.GetTime(); - - // set touchable volume at PreStepPoint: - m_fakePreStepPoint->SetTouchableHandle(m_touchableHandle); - m_fakePreStepPoint->SetPosition(p); - m_fakePreStepPoint->SetGlobalTime(t); - - - // WGS: Most of the calculators in LArG4 expect a PostStepPoint as - // well. For now, try setting this to be the same as the - // PreStepPoint. - - // AS move post step point a little bit to make Calculator happy - - m_fakePostStepPoint->SetTouchableHandle(m_touchableHandle); - m_fakePostStepPoint->SetPosition(p); - m_fakePostStepPoint->SetGlobalTime(t); - - // set total energy deposit: - m_fakeStep->SetTotalEnergyDeposit(a_spot.GetEnergy()); - //set very short step length - m_fakeStep->SetStepLength(1e-10); - //set pre and post step point - m_fakeStep->SetPreStepPoint(m_fakePreStepPoint); - m_fakeStep->SetPostStepPoint(m_fakePostStepPoint); - m_fakeStep->SetTrack(0); - - //-------------------------------------- - // Produce Hits - //-------------------------------------- - - // First, find out in which physical volume our hit is located. - G4VPhysicalVolume* pCurrentVolume = - m_fakeStep->GetPreStepPoint()->GetPhysicalVolume(); - - // If the volume is valid... - if ( pCurrentVolume != 0 ) { - - // for the time being create hits only in LAr volumes - if ( (pCurrentVolume->GetName()).substr(0,m_baseName.length()) == m_baseName ) - { - - // Is this volume associated with a sensitive detector? - G4VSensitiveDetector* pSensitive; - if (pCurrentVolume->GetLogicalVolume()->GetSensitiveDetector()){ - pSensitive = pCurrentVolume->GetLogicalVolume()->GetSensitiveDetector(); - } - else { - return; - } - - if ( pSensitive != 0 ) - { - // Create the actual hit. - pSensitive->Hit(m_fakeStep); - } - - else - { - // If we reach this point, then the EnergySpot was created - // outside of a sensitive region. - - } - } -#ifdef DEBUG_FAST - else - { - G4cout << "LArHitMaker::make - will not make hit in " - << pCurrentVolume->GetName() - << " since volume name does not begin with " - << m_baseName - << G4endl; - } -#endif - } -} diff --git a/LArCalorimeter/LArG4/LArG4Code/src/SDWrapper.cc b/LArCalorimeter/LArG4/LArG4Code/src/SDWrapper.cc new file mode 100644 index 0000000000000000000000000000000000000000..0182d8d6325b2e4be1c60efda72048492855fd36 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/src/SDWrapper.cc @@ -0,0 +1,133 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArG4Code/SDWrapper.h" + +// Geant4 includes +#include "G4SDManager.hh" + +// Framework utilities +#include "CxxUtils/make_unique.h" + +// Project includes +#include "LArSimEvent/LArHitContainer.h" +#include "CaloSimEvent/CaloCalibrationHitContainer.h" + +// Local includes +#include "LArG4Code/LArG4SimpleSD.h" +#include "LArG4Code/LArG4CalibSD.h" + +namespace LArG4 +{ + + namespace detail + { + + //------------------------------------------------------------------------- + // Construct with a hit collection name + //------------------------------------------------------------------------- + template<class SDType, class HitContainerType> + SDWrapper<SDType, HitContainerType>:: + SDWrapper(const std::string& name, const std::string& hitCollectionName) + : G4VSensitiveDetector(name), + m_hitCollName(hitCollectionName), + m_hitColl(hitCollectionName) + {} + + //------------------------------------------------------------------------- + // Add a unique SD to the list + //------------------------------------------------------------------------- + template<class SDType, class HitContainerType> + void SDWrapper<SDType, HitContainerType>:: + addSD(std::unique_ptr<SDType> sd) + { + m_sdList.push_back( std::move(sd) ); + } + + //------------------------------------------------------------------------- + // Add a fast-sim SD name + //------------------------------------------------------------------------- + template<class SDType, class HitContainerType> + void SDWrapper<SDType, HitContainerType>:: + addFastSimSD(const std::string& sdName) + { + // For now, assume only one fastsim SD + if(!m_fastSimSDName.empty()) { + G4cerr << GetName() << " \tERROR\t" << "Trying to add fastsim SD " + << sdName << " after " << m_fastSimSDName << G4endl; + throw std::runtime_error("More than one fastsim SD"); + } + m_fastSimSDName = sdName; + } + + //------------------------------------------------------------------------- + // Initialize the hit collection at the beginning of the G4 event + //------------------------------------------------------------------------- + template<class SDType, class HitContainerType> + void SDWrapper<SDType, HitContainerType>:: + Initialize(G4HCofThisEvent*) + { + if(!m_hitColl.isValid()) { + if(verboseLevel >= 5) { + G4cout << GetName() << " \tDEBUG\t" << "Initializing hit container: " + << m_hitCollName << G4endl; + } + m_hitColl = CxxUtils::make_unique<HitContainerType>(m_hitCollName); + } + } + + //------------------------------------------------------------------------- + // This should not be called + //------------------------------------------------------------------------- + template<class SDType, class HitContainerType> + bool SDWrapper<SDType, HitContainerType>:: + ProcessHits(G4Step*, G4TouchableHistory*) + { + G4ExceptionDescription description; + description << "ProcessHits: this SD shouldn't be assigned to volumes!"; + G4Exception(GetName(), "SDError", FatalException, description); + return false; + } + + //------------------------------------------------------------------------- + // Gather the hits into the WriteHandle from all the SDs + //------------------------------------------------------------------------- + template<class SDType, class HitContainerType> + void SDWrapper<SDType, HitContainerType>:: + EndOfAthenaEvent() + { + if(!m_hitColl.isValid()) { + G4cerr << GetName() << " \tERROR\t" << "Hit collection WriteHandle is " + << "invalid!" << G4endl; + throw std::runtime_error("Invalid hit container WriteHandle: " + + m_hitColl.name()); + } + // Loop over each SD and fill the container + for(auto& sd : m_sdList) { + sd->EndOfAthenaEvent( &*m_hitColl ); + } + // Gather frozen shower hits + if(!m_fastSimSDName.empty()) { + auto fastSD = dynamic_cast<SDType*> + ( G4SDManager::GetSDMpointer()->FindSensitiveDetector(m_fastSimSDName) ); + if(fastSD) { + fastSD->EndOfAthenaEvent( &*m_hitColl ); + } + else { + G4cerr << GetName() << " \tERROR\t" << "Failed to retrieve/cast " + << m_fastSimSDName << G4endl; + throw std::runtime_error("Failed to retrieve/cast " + m_fastSimSDName); + } + } + } + + //------------------------------------------------------------------------- + // Explit template instantiations + //------------------------------------------------------------------------- + template class SDWrapper<LArG4SimpleSD, LArHitContainer>; + template class SDWrapper<LArG4CalibSD, CaloCalibrationHitContainer>; + + } // namespace detail + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4Code/src/SimpleSDTool.cc b/LArCalorimeter/LArG4/LArG4Code/src/SimpleSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..6da1a418d4d49359434af5209b944144c2bc9e90 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/src/SimpleSDTool.cc @@ -0,0 +1,122 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArG4Code/SimpleSDTool.h" + +// External includes +#include "CLHEP/Units/SystemOfUnits.h" + +// Framework includes +#include "CxxUtils/make_unique.h" + +// ID helper includes +#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/LArEM_ID.h" +#include "CaloIdentifier/LArFCAL_ID.h" +#include "CaloIdentifier/LArHEC_ID.h" +#include "CaloIdentifier/LArMiniFCAL_ID.h" + +// Local includes +#include "LArG4Code/LArG4SimpleSD.h" +#include "LArG4Code/SDWrapper.h" +#include "LArG4Code/VolumeUtils.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Tool constructor + //--------------------------------------------------------------------------- + SimpleSDTool::SimpleSDTool(const std::string& type, const std::string& name, + const IInterface* parent) + : SensitiveDetectorBase(type, name, parent), + m_timeBinType("Default"), + m_timeBinWidth(2.5*CLHEP::ns), + m_useFrozenShowers(false), + m_larEmID(nullptr), + m_larFcalID(nullptr), + m_larHecID(nullptr), + m_larMiniFcalID(nullptr) + { + declareProperty("TimeBinType", m_timeBinType); + declareProperty("TimeBinWidth", m_timeBinWidth); + declareProperty("UseFrozenShowers", m_useFrozenShowers); + } + + //--------------------------------------------------------------------------- + // Initialize the tool + //--------------------------------------------------------------------------- + StatusCode SimpleSDTool::initialize() + { + ATH_MSG_DEBUG( "Initializing " << name() ); + + const CaloIdManager* idMgr = nullptr; + CHECK( detStore()->retrieve(idMgr) ); + if( (m_larEmID = idMgr->getEM_ID()) == nullptr) { + ATH_MSG_ERROR("Invalid LAr EM ID helper"); + return StatusCode::FAILURE; + } + if( (m_larFcalID = idMgr->getFCAL_ID()) == nullptr) { + ATH_MSG_ERROR("Invalid LAr FCAL ID helper"); + return StatusCode::FAILURE; + } + if( (m_larHecID = idMgr->getHEC_ID()) == nullptr) { + ATH_MSG_ERROR("Invalid LAr HEC ID helper"); + return StatusCode::FAILURE; + } + if( (m_larMiniFcalID = idMgr->getMiniFCAL_ID()) == nullptr) { + ATH_MSG_ERROR("Invalid LAr Mini FCAL ID helper"); + return StatusCode::FAILURE; + } + + // No general volume list for SensitiveDetectorBase + m_noVolumes = true; + + ATH_CHECK(this->initializeCalculators()); + + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Collect hits for this event + //--------------------------------------------------------------------------- + StatusCode SimpleSDTool::Gather() + { + ATH_MSG_DEBUG("Gathering hits to write out in " << name()); + auto sdWrapper = dynamic_cast<SimpleSDWrapper*>( getSD() ); + if(!sdWrapper) { + ATH_MSG_ERROR("Failed to cast SD to SimpleSDWrapper"); + return StatusCode::FAILURE; + } + sdWrapper->EndOfAthenaEvent(); + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create one SD + //--------------------------------------------------------------------------- + std::unique_ptr<LArG4SimpleSD> + SimpleSDTool::makeOneSD(const std::string& sdName, ILArCalculatorSvc* calc, + const std::vector<std::string>& volumes) const + { + ATH_MSG_VERBOSE( name() << " makeOneSD" ); + + // Parse the wildcard patterns for existing volume names + auto parsedVolumes = findLogicalVolumes(volumes, msg()); + + // Create the simple SD + auto sd = CxxUtils::make_unique<LArG4SimpleSD> + (sdName, calc, m_timeBinType, m_timeBinWidth); + sd->setupHelpers(m_larEmID, m_larFcalID, m_larHecID, m_larMiniFcalID); + + // Assign the volumes to the SD + if( assignSD( sd.get(), parsedVolumes ).isFailure() ) { + // TODO: can I just return NULL here? + throw GaudiException("Failed to assign sd: " + sdName, + name(), StatusCode::FAILURE); + } + return std::move(sd); + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4Code/src/VolumeUtils.cc b/LArCalorimeter/LArG4/LArG4Code/src/VolumeUtils.cc new file mode 100644 index 0000000000000000000000000000000000000000..2c7c1bb68fa8471e0be1ca8655589e99386e6ba5 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4Code/src/VolumeUtils.cc @@ -0,0 +1,86 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArG4Code/VolumeUtils.h" + +// STL includes +#include <set> + +// Geant4 includes +#include "G4LogicalVolumeStore.hh" + +namespace +{ + //--------------------------------------------------------------------------- + /// @brief Helper function for matching strings with wildcards. + /// It's a recursive function that checks if two given strings match. + /// The first string may contain wildcard characters. + //--------------------------------------------------------------------------- + bool matchStrings(const char* first, const char* second) + { + // If we reach at the end of both strings, we are done + if (*first == '\0' && *second == '\0') + return true; + + // Make sure that the characters after '*' are present in second string. + // This function assumes that the first string will not contain two + // consecutive '*' + if (*first == '*' && *(first+1) != '\0' && *second == '\0') + return false; + + // If the current characters of both strings match + if (*first == *second) + return matchStrings(first+1, second+1); + + // If there is *, then there are two possibilities + // a) We consider current character of second string + // b) We ignore current character of second string. + if (*first == '*') + return matchStrings(first+1, second) || matchStrings(first, second+1); + return false; + } +} + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Search for logical volumes in the G4 volume store + //--------------------------------------------------------------------------- + std::set<std::string> findLogicalVolumes(const std::string& pattern) + { + // Use a set because there can be multiple occurences with same name + std::set<std::string> foundVolumes; + + // Iterate over the G4 volumes and look for matches + auto logicalVolumeStore = G4LogicalVolumeStore::GetInstance(); + for(auto logvol : *logicalVolumeStore) { + if( matchStrings( pattern.data(), logvol->GetName() ) ) { + foundVolumes.insert( logvol->GetName() ); + } + } + + return foundVolumes; + } + + //--------------------------------------------------------------------------- + // Search for multiple logical volumes in the G4 volume store + //--------------------------------------------------------------------------- + std::vector<std::string> + findLogicalVolumes(const std::vector<std::string>& patterns, + MsgStream& msg) + { + std::set<std::string> parsedVolumes; + for(const auto& pattern : patterns) { + const auto patternVols = findLogicalVolumes(pattern); + if(patternVols.empty()) { + msg << MSG::WARNING << "No volume found matching pattern: " + << pattern << endreq; + } + parsedVolumes.insert( patternVols.begin(), patternVols.end() ); + } + return std::vector<std::string>( parsedVolumes.begin(), parsedVolumes.end() ); + } + +} diff --git a/LArCalorimeter/LArG4/LArG4EC/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4EC/CMakeLists.txt index 7526d0a6ea3ab058309c69ec5a8468f297f5f5ce..131c389a95d76fda14e2ef6944bbeb388ed94550 100644 --- a/LArCalorimeter/LArG4/LArG4EC/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4EC/CMakeLists.txt @@ -6,19 +6,17 @@ atlas_subdir( LArG4EC ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC +atlas_depends_on_subdirs( PRIVATE Calorimeter/CaloG4Sim DetectorDescription/GeoModel/GeoSpecialShapes LArCalorimeter/LArG4/LArG4Code LArCalorimeter/LArGeoModel/LArGeoCode - PRIVATE Control/AthenaKernel Control/StoreGate Database/AthenaPOOL/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/GeoModel/GeoModelUtilities GaudiKernel - LArCalorimeter/LArG4/LArG4RunControl LArCalorimeter/LArGeoModel/LArHV Tools/PathResolver ) @@ -30,8 +28,9 @@ find_package( Geant4 ) find_package( XercesC ) # Component(s) in the package: -atlas_add_library( LArG4EC +atlas_add_component( LArG4EC src/*.cc + src/components/*.cxx PUBLIC_HEADERS LArG4EC INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} @@ -39,3 +38,4 @@ atlas_add_library( LArG4EC LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} GeoSpecialShapes LArG4Code LArGeoCode CaloG4SimLib StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelUtilities GaudiKernel LArG4RunControl LArHV PathResolver ) +atlas_install_python_modules( python/*.py ) diff --git a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/EnergyCalculator.h b/LArCalorimeter/LArG4/LArG4EC/LArG4EC/EnergyCalculator.h deleted file mode 100644 index 6671e4a3501323c9241708c85ffab1abc885a935..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/EnergyCalculator.h +++ /dev/null @@ -1,365 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// EnergyCalculator.h -// Prepared 10-Apr-2002 Bill Seligman -// from code written by Jozsef Toth. -// 07-May-2003 AMS: now EnergyCalculator is not a singleton -// 02-July-2003 J.T. Charge collection added -// 20-July-2004 J.T. FieldMapVersion variable is added -// 25-May-2005 J.T. -calling sequence of GapAdj changed -// -new variables and function for reading and handling -// values of HV of power supplies -// - IonReco :for suppress signal because of ion recombination -// - DriftVelo: Walkowiak's formula for drift velocity -// Sept-2006 J.T. - collect signal from the Barrette volume -// Nov -2006 J.T. - fieldmap array structures changed, -// - lengths defined dinamically -// - field map for first/last fold and for Barrett volume are included -// May 2009 AMS move to namespace LArG4::EC -// duplicated data members removed - -#ifndef LArG4_EC_EnergyCalculator_H -#define LArG4_EC_EnergyCalculator_H - -#include <string> -#include <stdexcept> - -#include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVCalculator.h" - -#include "GeoSpecialShapes/LArWheelCalculator.h" - -#include "G4ThreeVector.hh" -#include "globals.hh" - - -class LArG4BirksLaw; -class MsgStream; - - -namespace LArG4 { - class VCalibrationCalculator; - -namespace EC { - - -class EnergyCalculator : public LArVCalculator -{ - public: -///////////////////////////////////////////// -// The interface for LArVCalculator. - virtual G4float OOTcut() const { return m_OOTcut; } - virtual void SetOutOfTimeCut(G4double c) { m_OOTcut = c; } - - virtual G4bool Process(const G4Step* a_step){return Process(a_step, m_hdata);} - virtual G4bool Process(const G4Step*, std::vector<LArHitData>&); - - virtual G4bool FindIdentifier(const G4Step *, std::vector<LArHitData>&, - G4ThreeVector &, G4ThreeVector &); - - virtual const LArG4Identifier& identifier(int i = 0) const { - if(i != 0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].id; - } - - virtual G4double time(int i = 0) const { - if(i != 0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].time; - } - virtual G4double energy(int i = 0) const { - if(i != 0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].energy; - } - virtual G4bool isInTime(int i = 0) const { - if(i != 0) throw std::range_error("Multiple hits not yet implemented"); - return m_isInTime; - } - virtual G4bool isOutOfTime(int i = 0) const { - if(i != 0) throw std::range_error("Multiple hits not yet implemented"); - return(!m_isInTime); - } - - private: - - // The results of the Process calculation: - //LArG4Identifier m_identifier; - //G4double m_time; - //G4double m_energy; - std::vector<LArHitData> m_hdata; - - G4bool m_isInTime; - G4int m_compartment; - - G4float m_OOTcut; - - public: - typedef enum { - EMEC_ECOR_ROPT, - EMEC_ECOR_OFF, - EMEC_ECOR_GADJ, - EMEC_ECOR_CHCL, - EMEC_ECOR_GADJ_OLD, - EMEC_ECOR_GADJ_E, - EMEC_ECOR_GADJ_S, - EMEC_ECOR_GADJ_SE, - EMEC_ECOR_CHCL1 - } EnergyCorrection_t; - - EnergyCalculator( - LArWheelCalculator::LArWheelCalculator_t, - EnergyCorrection_t corr = EMEC_ECOR_ROPT, - G4int zside = 1); - - virtual ~EnergyCalculator(); - - private: - - G4bool (EnergyCalculator::*m_Process_type) (const G4Step*, std::vector<LArHitData>&); - G4bool (EnergyCalculator::*m_FindIdentifier_type) ( - const G4Step *, - std::vector<LArHitData>&, - G4ThreeVector &, - G4ThreeVector &); - G4double (EnergyCalculator::*m_GetHV_Value_type) (const G4ThreeVector &p) const; - G4double (EnergyCalculator::*m_GetGapSize_type) (const G4ThreeVector &p) const; - G4double (EnergyCalculator::*m_distance_to_the_nearest_electrode_type) (const G4ThreeVector &p) const; - - G4bool Process_Default(const G4Step*, std::vector<LArHitData>&); - G4bool Process_Barrett(const G4Step*, std::vector<LArHitData>&); - G4bool FindIdentifier_Default(const G4Step *, std::vector<LArHitData>&, G4ThreeVector &, G4ThreeVector &); - G4bool FindIdentifier_Barrett(const G4Step *, std::vector<LArHitData>&, G4ThreeVector &, G4ThreeVector &); - G4bool FindDMIdentifier_Barrett(const G4Step* step, std::vector<LArHitData>&); - G4bool GetCompartment_Barrett(G4ThreeVector,G4double,G4double,G4double, - G4int &, G4int &) const; - G4double GetHV_Value_Default(const G4ThreeVector& p) const { return GetHV_Value(p);} - G4double GetHV_Value_Barrett(const G4ThreeVector& p) const; - G4double GetGapSize_Default(const G4ThreeVector &p) const { return GetGapSize(p);} // need to make const - G4double GetGapSize_Barrett(const G4ThreeVector &p) const; // need to make const - G4int GetPhiGap_Barrett(const G4ThreeVector &p) const; - G4double distance_to_the_nearest_electrode_Default(const G4ThreeVector &p) const - { return distance_to_the_nearest_electrode(p); } - G4double distance_to_the_nearest_electrode_Barrett(const G4ThreeVector &p) const; - - static VCalibrationCalculator* m_supportCalculator; - - static void SetConst_OuterBarrett(void); - static void SetConst_InnerBarrett(void); - G4bool GetVolumeIndex(const G4Step *) const; - static G4bool s_SetConstOuterBarrett; - static G4bool s_SetConstInnerBarrett; - static const G4double s_LongBarThickness;// = 20. *mm; - static const G4double s_ColdCorrection;// =1.0036256; - static const G4double s_StripWidth;// =3.*mm/ColdCorrection; - static const G4double s_KapGap;// =1.*mm/ColdCorrection; - static const G4double s_EdgeWidth;// =1.*mm; - static const G4double s_DistOfEndofCuFromBack;// =22.77*mm/ColdCorrection; - static const G4double s_DistOfStartofCuFromBack;//=31.*mm; // frontface of the barrette - static const G4double s_ZmaxOfSignal;// DistOfStartofCuFromBack - DistOfEndofCuFromBack + EdgeWidth; - static G4double s_RefzDist; // = dElecFocaltoWRP+dWRPtoFrontFace+WheelThickness+ // used as const after initialization - // +dWRPtoFrontFace+ LongBarThickness - // -DistOfEndofCuFromBack - static const G4double s_S3_Etalim[21]; - static const G4double s_Rmeas_outer[50]; - static const G4double s_Zmeas_outer[2]; - static G4double s_S3_Rlim[21]; - static G4double s_rlim[50]; - static G4double s_zlim[4]; - static G4int s_ModuleNumber,s_PhiDivNumber; - static G4double s_PhiStartOfPhiDiv; - -// ************************************************************************** - - EnergyCorrection_t m_correction_type; - - G4double (EnergyCalculator::*m_ecorr_method) (G4double, const G4ThreeVector&, const G4ThreeVector&); // need to make const - G4double dummy_correction_method(G4double e, const G4ThreeVector&, const G4ThreeVector&) // need to make const - { return e; } - G4double GapAdjustment_old(G4double, const G4ThreeVector&, const G4ThreeVector&); // need to make const - G4double GapAdjustment (G4double, const G4ThreeVector&, const G4ThreeVector&); // need to make const - G4double GapAdjustment_E (G4double, const G4ThreeVector&, const G4ThreeVector&); // need to make const - G4double GapAdjustment_s (G4double, const G4ThreeVector&, const G4ThreeVector&); // need to make const - G4double GapAdjustment__sE (G4double, const G4ThreeVector&, const G4ThreeVector&); // need to make const - G4double CalculateChargeCollection(G4double, const G4ThreeVector&, const G4ThreeVector&); // need to make const !!! - G4double CalculateChargeCollection1(G4double, const G4ThreeVector&, const G4ThreeVector&); // need to make const !!! - - G4double m_GApower; - -// ************************************************************************** -//Declaration of variables,functions for charge collection -//J.T -// ************************************************************************** - - -//variables specific for wheel geometry - G4int m_PhiGapNumber, m_PhiHalfGapNumber; - G4double m_WaveLength, m_FanEleThicknessOld,m_FanEleFoldRadiusOld; - G4int m_HalfWaveNumber, m_SignofZinHalfWave, m_SignofSlopeofHalfWave; - G4double m_SinPhiGap, m_CosPhiGap, m_ZinHalfWave; - G4double m_FanAbsThickness, m_FanEleThickness, m_HalfEleThickness; - G4double m_ElectrodeFanHalfThickness; - -//variables specific for Efield calculation - - static G4bool s_FieldMapsRead; - static G4String s_FieldMapVersion; - - static const G4double s_GridSize; - static const G4double s_AverageGap; - static const G4double s_inv_AverageGap; - - struct Fold_Efield_Map{ - G4bool FieldMapPrepared; - G4double* FieldMap; // [NumberOfRadialLayers][ZYWeight][MaxNofPoints]; - G4double* MinZofLayer; //these are limits of the - G4double* MaxZofLayer; //area where the FieldMap can - G4double* MinYofLayer; //be used for interpolation - G4double* MaxYofLayer; - G4int* NofColofLayer; // a column is parallel to y - G4int* NofRowofLayer; // a row is parallel to z - G4int* NofPointsinLayer; - G4int* pLayer;}; - - struct Wheel_Efield_Map {G4bool FieldMapPrepared; - G4int NumberOfRadialLayer; - G4double* RadiusOfLayers; - G4double* FoldinAngleOfLayers; - G4double* HalfLArGapSizeOfLayers; - Fold_Efield_Map* Fold; - Fold_Efield_Map Fold0; - Fold_Efield_Map Fold1; - G4double GridShift;}; - - static Wheel_Efield_Map s_ChCollInner,s_ChCollOuter; - Wheel_Efield_Map* m_ChCollWheelType; - Fold_Efield_Map* m_ChCollFoldType; - G4int m_PointFoldMapArea; - - void CreateArrays(Wheel_Efield_Map &, G4int); - inline G4int Index(Fold_Efield_Map* foldmap, G4int i, G4int j, G4int k ) const - {return foldmap->pLayer[i]+j*foldmap->NofPointsinLayer[i]+k;}; - void SetFoldArea(G4double); - - G4double m_Ylimits[4]; - -//HV for current calculation - - static G4bool s_HVMapRead; - static G4String s_HVMapVersion; - static const G4double s_AverageHV; - static const G4double s_AverageEfield; - static const G4double s_AverageCurrent; - static const G4String s_HVEMECMapFileName; //{"HVEMECMap.dat"}; - - static const G4int s_NofAtlasSide = 2; - static const G4int s_NofEtaSection = 9; - static const G4int s_NofElectrodeSide = 2; - static const G4int s_NofElectrodesOut = 768; - static const G4double s_HV_Etalim[s_NofEtaSection+1]; // = {1.375,1.5,1.6,1.8,2.,2.1,2.3,2.5,2.8,3.2}; - static G4int s_HV_Start_phi[s_NofAtlasSide][s_NofEtaSection][s_NofElectrodeSide]; - static G4double s_HV_Values[s_NofAtlasSide][s_NofEtaSection][s_NofElectrodeSide][s_NofElectrodesOut]; - - static const G4double s_LArTemperature_ECC0;//={88.15}; //K - static const G4double s_LArTemperature_ECC1;//={88.37}; - static const G4double s_LArTemperature_ECC5;//={87.97}; - static const G4double s_LArTemperature_av ;// ={88.16}; - - G4int m_NofPhiSections; - G4int m_NumberOfElectrodesInPhiSection; - - void GetHVMap(const G4String); - G4double GetHV_Value(const G4ThreeVector& p) const; - G4double GetHV_Value_ChColl_Wheel( const G4ThreeVector& , G4int , G4int) const; - -//Efield in [kv/cm], driftvelo in [mm/microsec], Temperature in [K] - - inline static G4double IonReco(G4double Efield) { - if(Efield<=0.000001){return 0.;} - if(Efield>2.) {return (1./(1. +0.36/Efield));} - return (1./(1.04+0.28/Efield)); - } - - inline static G4double DriftVelo(G4double T, G4double Efield) { - if( Efield <= 0.000001) {return 0.;} - return ( (-0.01481*(T-90.371)+1.)* - ( 0.141*Efield*log(1.+12.4/Efield)+ - 1.627*pow(Efield,0.317) ) - -0.0075*(T-90.371) - ); - } - -// variables for phigap number comparison - - G4int m_calculatorPhiGap,m_chcollPhiGap; - -// functions specific for geometry - - void SetHalfWave(G4double); - void GetPhiGap(G4double *); // need to make const - void SetYlimitsofPhigapinWheel(G4double,G4double); - G4double YofSurface(G4double,G4double,G4double) const; - inline G4double YofNeutralFibre(G4double alpha,G4double rho) const{ - return YofSurface(alpha,rho,0.); - } - G4double FoldingAngle(G4double) const; - G4double HalfLArGapSize(G4double, G4double) const; - - // functions specific for charge coll. - - void IniGeomforFieldMaps(void); - void GetFieldMaps(const G4String); - void PrepareFieldMap(void); - G4double GetCurrent(G4double *,G4double *,G4double); - void TransformWheeltoFieldMap(G4double *,G4double *); - void SetYlimitsofPhigapinFieldMap(G4int); - void TransFromBarrtoWheel(G4double*, G4double*); - G4double GetWeightfromFieldMap(G4int,G4double,G4double); - G4double HalfLArGapSizeOld(G4double) const; - - static G4double s_CHC_Esr; - static const G4int s_CHCMaxPrint=00; - static G4int s_CHCIprint; - static G4double s_CHCEbad; - static G4double s_CHCEtotal; - static G4double s_CHCStotal; - - private: -// inline void vector_to_msg(G4ThreeVector &v) const; - - /* to be developed... - std::pair<double, double>DxToFans(Hep3Vector &p); - double XDistanceToTheNeutralFibre(const Hep3Vector& P) const; - */ - G4double GetGapSize(const G4ThreeVector &p) const; // need to make const - - // public: - G4double distance_to_the_nearest_electrode(const G4ThreeVector &p) const; - - LArG4BirksLaw *m_birksLaw; - LArWheelCalculator *m_lwc; - const LArWheelCalculator * lwc() const { return m_lwc; } - - MsgStream *m_msg; - - void get_HV_map_from_DB(void); - G4bool m_DB_HV; - -// Aug 2007 AMS, lost Aug 2008, restored May 2009 - LArWheelCalculator *m_electrode_calculator; - const LArWheelCalculator * elc() const { return m_electrode_calculator; } - - G4double GetCurrent1(const G4ThreeVector &, const G4ThreeVector &, G4double); // need to make const - G4double get_HV_value(const G4ThreeVector&, const std::pair<G4int, G4int> &) const; - - EnergyCalculator (const EnergyCalculator&); - EnergyCalculator& operator= (const EnergyCalculator&); -}; - -} // namespace EC -} // namespace LArG4 - -#endif // LArG4_EC_EnergyCalculator_H diff --git a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/LArEndcapPresamplerCalculator.h b/LArCalorimeter/LArG4/LArG4EC/LArG4EC/LArEndcapPresamplerCalculator.h deleted file mode 100644 index 69820ebd72e57adbe26e0b419c47e7687f27851d..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/LArEndcapPresamplerCalculator.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArEndcapPresamplerCalculator.hh -// Prepared 27-Dec-2002 Bill Seligman - -// This is a separate "calculator" class for the endcap presampler. -// For more information about what a "calculator" class does, see the -// documentation: LArG4/doc/LArG4.ps. - -#ifndef LARG4EC_LARENDCAPPRESAMPLERCALCULATOR_H -#define LARG4EC_LARENDCAPPRESAMPLERCALCULATOR_H - -#include "globals.hh" -#include "G4ThreeVector.hh" -#include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVCalculator.h" -#include "LArG4Code/LArVG4DetectorParameters.h" -#include <stdexcept> -// Forward declarations. -class G4Step; -class LArG4BirksLaw; - -namespace LArG4 { - namespace EC { - class PresamplerGeometry; - } -} - -class LArEndcapPresamplerCalculator : public LArVCalculator { -public: - - // Accessor for pointer to the singleton. - static LArEndcapPresamplerCalculator* GetCalculator(); - - ~LArEndcapPresamplerCalculator(); - - ///////////////////////////////////////////// - // The interface for LArVCalculator. - - virtual G4float OOTcut() const { return m_OOTcut; } - virtual void SetOutOfTimeCut(G4double o){ m_OOTcut = o; } - - virtual G4bool Process(const G4Step* a_step){return Process(a_step, m_hdata);} - - virtual G4bool Process(const G4Step*, std::vector<LArHitData>&); - - virtual const LArG4Identifier& identifier(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].id; - } - - virtual G4double time(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].time; - } - virtual G4double energy(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].energy; - }; - virtual G4bool isInTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_isInTime; - } - virtual G4bool isOutOfTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return ( ! m_isInTime ); - } - -protected: - // The constructor is protected according to the singleton design - // pattern. - LArEndcapPresamplerCalculator(); - -private: - - // Pointer to geometry routine. - const LArG4::EC::PresamplerGeometry* m_geometry; - - // Store the out-of-time cut from the description: - G4float m_OOTcut; - - LArG4BirksLaw *m_birksLaw; - - // The results of the Process calculation: - //LArG4Identifier m_identifier; - //G4double m_time; - //G4double m_energy; - std::vector<LArHitData> m_hdata; - - G4bool m_isInTime; - - LArEndcapPresamplerCalculator (const LArEndcapPresamplerCalculator&); - LArEndcapPresamplerCalculator& operator= (const LArEndcapPresamplerCalculator&); -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4EC/cmt/requirements b/LArCalorimeter/LArG4/LArG4EC/cmt/requirements index 11a5d4d29ef71240abad35f94ba3f18cda98f44f..b8c8da8b89e2c3b4908697f603803b33b3ab782b 100755 --- a/LArCalorimeter/LArG4/LArG4EC/cmt/requirements +++ b/LArCalorimeter/LArG4/LArG4EC/cmt/requirements @@ -8,26 +8,26 @@ author Mikhail Leltchouk <lelchuk@nevis.columbia.edu> # liquid-argon endcap cryostat, pre-sampler, and calorimeter. use AtlasPolicy AtlasPolicy-* -use LArG4Code LArG4Code-* LArCalorimeter/LArG4 -use LArGeoCode LArGeoCode-* LArCalorimeter/LArGeoModel -use GeoSpecialShapes GeoSpecialShapes-* DetectorDescription/GeoModel - -use CaloG4Sim CaloG4Sim-* Calorimeter use Geant4 Geant4-* External # Build the library (and export the headers) -library LArG4EC *.cc -apply_pattern installed_library +library LArG4EC *.cc -s=components *.cxx +apply_pattern component_library +apply_pattern declare_python_modules files="*.py" #======================================================= private -use AthenaKernel AthenaKernel-* Control -use AtlasCLHEP AtlasCLHEP-* External +use AthenaKernel AthenaKernel-* Control use GaudiInterface GaudiInterface-* External use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel use GeoModelUtilities GeoModelUtilities-* DetectorDescription/GeoModel use RDBAccessSvc RDBAccessSvc-* Database/AthenaPOOL use PathResolver PathResolver-* Tools use StoreGate StoreGate-* Control -use LArG4RunControl LArG4RunControl-* LArCalorimeter/LArG4 +use AtlasCLHEP AtlasCLHEP-* External +#use LArG4RunControl LArG4RunControl-* LArCalorimeter/LArG4 use LArHV LArHV-* LArCalorimeter/LArGeoModel +use LArG4Code LArG4Code-* LArCalorimeter/LArG4 +use LArGeoCode LArGeoCode-* LArCalorimeter/LArGeoModel +use GeoSpecialShapes GeoSpecialShapes-* DetectorDescription/GeoModel +use CaloG4Sim CaloG4Sim-* Calorimeter diff --git a/LArCalorimeter/LArG4/LArG4EC/python/LArG4ECConfig.py b/LArCalorimeter/LArG4/LArG4EC/python/LArG4ECConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..63cf610758e1b7e767ee9962cbca3147622daf9d --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4EC/python/LArG4ECConfig.py @@ -0,0 +1,109 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon import CfgMgr +from LArG4EC import LArWheelCalculatorEnum +def getCalibrationCalculator(name="CalibrationCalculator", **kwargs): + return CfgMgr.LArG4__EC__CalibrationCalculator(name, **kwargs) + +def getEMECPosInnerWheelCalibrationCalculator(name="EMECPosInnerWheelCalibrationCalculator", **kwargs): + kwargs.setdefault("WheelType", LArWheelCalculatorEnum.InnerAbsorberWheel) + kwargs.setdefault("zSide", 1) + kwargs.setdefault("GeometryCalculator","EMECPosInnerWheelCorrOffCalculator") + return getCalibrationCalculator(name, **kwargs) + +def getEMECNegInnerWheelCalibrationCalculator(name="EMECNegInnerWheelCalibrationCalculator", **kwargs): + kwargs.setdefault("WheelType", LArWheelCalculatorEnum.InnerAbsorberWheel) + kwargs.setdefault("zSide", -1) + kwargs.setdefault("GeometryCalculator","EMECNegInnerWheelCorrOffCalculator") + return getCalibrationCalculator(name, **kwargs) + +def getEMECPosOuterWheelCalibrationCalculator(name="EMECPosOuterWheelCalibrationCalculator", **kwargs): + kwargs.setdefault("WheelType", LArWheelCalculatorEnum.OuterAbsorberWheel) + kwargs.setdefault("zSide", 1) + kwargs.setdefault("GeometryCalculator","EMECPosOuterWheelCorrOffCalculator") + return getCalibrationCalculator(name, **kwargs) + +def getEMECNegOuterWheelCalibrationCalculator(name="EMECNegOuterWheelCalibrationCalculator", **kwargs): + kwargs.setdefault("WheelType", LArWheelCalculatorEnum.OuterAbsorberWheel) + kwargs.setdefault("zSide", -1) + kwargs.setdefault("GeometryCalculator","EMECNegOuterWheelCorrOffCalculator") + return getCalibrationCalculator(name, **kwargs) + +def getEMECBackOuterBarretteCalibrationCalculator(name="EMECBackOuterBarretteCalibrationCalculator", **kwargs): + kwargs.setdefault("WheelType", LArWheelCalculatorEnum.BackOuterBarretteWheelCalib) + kwargs.setdefault("zSide", 1) + kwargs.setdefault("GeometryCalculator","EMECBackOuterBarretteCorrOffCalculator") + return getCalibrationCalculator(name, **kwargs) + +def getEMECPresamplerCalibrationCalculator(name="EMECPresamplerCalibrationCalculator", **kwargs): + return CfgMgr.LArG4__EC__PresamplerCalibrationCalculator(name, **kwargs) + +def getEndcapCryostatCalibrationCalculator(name="EndcapCryostatCalibrationCalculator", **kwargs): + return CfgMgr.LArG4__EndcapCryostat__CalibrationCalculator(name, **kwargs) + +def getEndcapCryostatCalibrationLArCalculator(name="EndcapCryostatCalibrationLArCalculator", **kwargs): + return CfgMgr.LArG4__EndcapCryostat__CalibrationLArCalculator(name, **kwargs) + +def getEndcapCryostatCalibrationMixedCalculator(name="EndcapCryostatCalibrationMixedCalculator", **kwargs): + return CfgMgr.LArG4__EndcapCryostat__CalibrationMixedCalculator(name, **kwargs) + +def getEMECSupportCalibrationCalculator(name="EMECSupportCalibrationCalculator", **kwargs): + return CfgMgr.LArG4__EMECSupportCalibrationCalculator(name, **kwargs) + +def getEnergyCalculator(name="EnergyCalculator", **kwargs): + from AthenaCommon.SystemOfUnits import ns + kwargs.setdefault("OOTcut", 300.0*ns) + return CfgMgr.LArG4__EC__EnergyCalculator(name, **kwargs) + +def getEMECPosInnerWheelCalculator(name="EMECPosInnerWheelCalculator", **kwargs): + kwargs.setdefault("WheelType", LArWheelCalculatorEnum.InnerAbsorberWheel) + #kwargs.setdefault("EnergyCorrection", 8) #LArG4::EMEC_ECOR_CHCL1 + kwargs.setdefault("zSide", 1) + return getEnergyCalculator(name, **kwargs) + +def getEMECNegInnerWheelCalculator(name="EMECNegInnerWheelCalculator", **kwargs): + kwargs.setdefault("WheelType", LArWheelCalculatorEnum.InnerAbsorberWheel) + #kwargs.setdefault("EnergyCorrection", 8) #LArG4::EMEC_ECOR_CHCL1 + kwargs.setdefault("zSide", -1) + return getEnergyCalculator(name, **kwargs) + +def getEMECPosOuterWheelCalculator(name="EMECPosOuterWheelCalculator", **kwargs): + kwargs.setdefault("WheelType", LArWheelCalculatorEnum.OuterAbsorberWheel) + #kwargs.setdefault("EnergyCorrection", 8) #LArG4::EMEC_ECOR_CHCL1 + kwargs.setdefault("zSide", 1) + return getEnergyCalculator(name, **kwargs) + +def getEMECNegOuterWheelCalculator(name="EMECNegOuterWheelCalculator", **kwargs): + kwargs.setdefault("WheelType", LArWheelCalculatorEnum.OuterAbsorberWheel) + #kwargs.setdefault("EnergyCorrection", 8) #LArG4::EMEC_ECOR_CHCL1 + kwargs.setdefault("zSide", -1) + return getEnergyCalculator(name, **kwargs) + +def getEMECBackOuterBarretteCalculator(name="EMECBackOuterBarretteCalculator", **kwargs): + kwargs.setdefault("WheelType", LArWheelCalculatorEnum.BackOuterBarretteWheelCalib) + #kwargs.setdefault("EnergyCorrection", 8) #LArG4::EMEC_ECOR_CHCL1 + return getEnergyCalculator(name, **kwargs) + +def getEMECPosInnerWheelCorrOffCalculator(name="EMECPosInnerWheelCorrOffCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 1) #LArG4::EMEC_ECOR_OFF + return getEMECPosInnerWheelCalculator(name, **kwargs) + +def getEMECNegInnerWheelCorrOffCalculator(name="EMECNegInnerWheelCorrOffCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 1) #LArG4::EMEC_ECOR_OFF + return getEMECNegInnerWheelCalculator(name, **kwargs) + +def getEMECPosOuterWheelCorrOffCalculator(name="EMECPosOuterWheelCorrOffCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 1) #LArG4::EMEC_ECOR_OFF + return getEMECPosOuterWheelCalculator(name, **kwargs) + +def getEMECNegOuterWheelCorrOffCalculator(name="EMECNegOuterWheelCorrOffCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 1) #LArG4::EMEC_ECOR_OFF + return getEMECNegOuterWheelCalculator(name, **kwargs) + +def getEMECBackOuterBarretteCorrOffCalculator(name="EMECBackOuterBarretteCorrOffCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 1) #LArG4::EMEC_ECOR_OFF + return getEMECBackOuterBarretteCalculator(name, **kwargs) + +def getEMECPresamplerCalculator(name="EMECPresamplerCalculator", **kwargs): + return CfgMgr.LArEndcapPresamplerCalculator(name, **kwargs) + diff --git a/LArCalorimeter/LArG4/LArG4EC/python/LArG4ECConfigDb.py b/LArCalorimeter/LArG4/LArG4EC/python/LArG4ECConfigDb.py new file mode 100644 index 0000000000000000000000000000000000000000..152c4b3fd2934434d00feedacb36dbd5cd40600a --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4EC/python/LArG4ECConfigDb.py @@ -0,0 +1,26 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.CfgGetter import addService + +addService("LArG4EC.LArG4ECConfig.getEMECPosInnerWheelCalibrationCalculator","EMECPosInnerWheelCalibrationCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECNegInnerWheelCalibrationCalculator","EMECNegInnerWheelCalibrationCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECPosOuterWheelCalibrationCalculator","EMECPosOuterWheelCalibrationCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECNegOuterWheelCalibrationCalculator","EMECNegOuterWheelCalibrationCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECBackOuterBarretteCalibrationCalculator","EMECBackOuterBarretteCalibrationCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECPresamplerCalibrationCalculator","EMECPresamplerCalibrationCalculator") +addService("LArG4EC.LArG4ECConfig.getEndcapCryostatCalibrationCalculator","EndcapCryostatCalibrationCalculator") +addService("LArG4EC.LArG4ECConfig.getEndcapCryostatCalibrationLArCalculator","EndcapCryostatCalibrationLArCalculator") +addService("LArG4EC.LArG4ECConfig.getEndcapCryostatCalibrationMixedCalculator","EndcapCryostatCalibrationMixedCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECSupportCalibrationCalculator","EMECSupportCalibrationCalculator") + +addService("LArG4EC.LArG4ECConfig.getEMECPosInnerWheelCalculator","EMECPosInnerWheelCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECNegInnerWheelCalculator","EMECNegInnerWheelCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECPosOuterWheelCalculator","EMECPosOuterWheelCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECNegOuterWheelCalculator","EMECNegOuterWheelCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECBackOuterBarretteCalculator","EMECBackOuterBarretteCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECPosInnerWheelCorrOffCalculator","EMECPosInnerWheelCorrOffCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECNegInnerWheelCorrOffCalculator","EMECNegInnerWheelCorrOffCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECPosOuterWheelCorrOffCalculator","EMECPosOuterWheelCorrOffCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECNegOuterWheelCorrOffCalculator","EMECNegOuterWheelCorrOffCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECBackOuterBarretteCorrOffCalculator","EMECBackOuterBarretteCorrOffCalculator") +addService("LArG4EC.LArG4ECConfig.getEMECPresamplerCalculator","EMECPresamplerCalculator") diff --git a/LArCalorimeter/LArG4/LArG4EC/python/LArWheelCalculatorEnum.py b/LArCalorimeter/LArG4/LArG4EC/python/LArWheelCalculatorEnum.py new file mode 100644 index 0000000000000000000000000000000000000000..b938beb829491c5be01933dfbea8de2bae25534b --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4EC/python/LArWheelCalculatorEnum.py @@ -0,0 +1,24 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +# based on LArWheelCalculator_t enum defined in "GeoSpecialShapes/LArWheelCalculatorEnums.h +InnerAbsorberWheel=0 +OuterAbsorberWheel=1 +InnerElectrodWheel=2 +OuterElectrodWheel=3 +InnerAbsorberModule=4 +OuterAbsorberModule=5 +InnerElectrodModule=6 +OuterElectrodModule=7 +BackInnerBarretteWheel=8 +BackOuterBarretteWheel=9 +BackInnerBarretteWheelCalib=10 +BackOuterBarretteWheelCalib=11 +BackInnerBarretteModule=12 +BackOuterBarretteModule=13 +BackInnerBarretteModuleCalib=14 +BackOuterBarretteModuleCalib=15 +InnerGlueWheel=16 +OuterGlueWheel=17 +InnerLeadWheel=18 +OuterLeadWheel=19 + diff --git a/LArCalorimeter/LArG4/LArG4EC/src/CalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4EC/src/CalibrationCalculator.cc index d7abbe9ac8838dc79c84fb2e0a27fdcd2882a7a5..28628cee182f48c79672baf7772b98d6a5a1df7b 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/CalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4EC/src/CalibrationCalculator.cc @@ -6,10 +6,10 @@ #undef DEBUG_HITS -#include "LArG4EC/CalibrationCalculator.h" -#include "LArG4EC/EnergyCalculator.h" +#include "CalibrationCalculator.h" #include "LArG4Code/LArG4Identifier.h" +#include "LArG4Code/ILArCalculatorSvc.h" #include "G4Step.hh" #include "globals.hh" @@ -18,69 +18,120 @@ namespace LArG4 { namespace EC { - CalibrationCalculator::CalibrationCalculator(LArWheelCalculator::LArWheelCalculator_t t, int zside) + //CalibrationCalculator::CalibrationCalculator(LArG4::LArWheelCalculator_t t, int zside) + CalibrationCalculator::CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_wcalc_tProp(0) + , m_wcalc_t(LArG4::InnerAbsorberWheel) + , m_geometryCalculator("",name) { - // Make sure there are no uninitialized variables. - m_geometryCalculator = new EnergyCalculator(t, EnergyCalculator::EMEC_ECOR_OFF, zside); + declareProperty("WheelType", m_wcalc_tProp); + m_wcalc_tProp.declareUpdateHandler(&CalibrationCalculator::WheelTypeHandler, this); + declareProperty("zSide", m_zside=0); + declareProperty("GeometryCalculator",m_geometryCalculator); + } + + void CalibrationCalculator::WheelTypeHandler(Property&) + { + switch(m_wcalc_tProp.value()) + { + case 0: m_wcalc_t = LArG4::InnerAbsorberWheel; break; + case 1: m_wcalc_t = LArG4::OuterAbsorberWheel; break; + case 2: m_wcalc_t = LArG4::InnerElectrodWheel; break; + case 3: m_wcalc_t = LArG4::OuterElectrodWheel; break; + case 4: m_wcalc_t = LArG4::InnerAbsorberModule; break; + case 5: m_wcalc_t = LArG4::OuterAbsorberModule; break; + case 6: m_wcalc_t = LArG4::InnerElectrodModule; break; + case 7: m_wcalc_t = LArG4::OuterElectrodModule; break; + case 8: m_wcalc_t = LArG4::BackInnerBarretteWheel; break; + case 9: m_wcalc_t = LArG4::BackOuterBarretteWheel; break; + case 10: m_wcalc_t = LArG4::BackInnerBarretteWheelCalib; break; + case 11: m_wcalc_t = LArG4::BackOuterBarretteWheelCalib; break; + case 12: m_wcalc_t = LArG4::BackInnerBarretteModule; break; + case 13: m_wcalc_t = LArG4::BackOuterBarretteModule; break; + case 14: m_wcalc_t = LArG4::BackInnerBarretteModuleCalib; break; + case 15: m_wcalc_t = LArG4::BackOuterBarretteModuleCalib; break; + case 16: m_wcalc_t = LArG4::InnerGlueWheel; break; + case 17: m_wcalc_t = LArG4::OuterGlueWheel; break; + case 18: m_wcalc_t = LArG4::InnerLeadWheel; break; + case 19: m_wcalc_t = LArG4::OuterLeadWheel; break; + default: + { + std::ostringstream merr; + merr << + "CalibrationCalculator::WheelTypeHandler FATAL: invalid LArWheelCalculator_t specified " + << m_wcalc_tProp.value(); + std::cerr << merr.str() << std::endl; + throw GaudiException(merr.str(), "CalibrationCalculator::WheelTypeHandler", StatusCode::FAILURE); + } + } + } + + StatusCode CalibrationCalculator::initialize() { + ATH_CHECK(m_geometryCalculator.retrieve()); + + return StatusCode::SUCCESS; } CalibrationCalculator::~CalibrationCalculator() { // Clean up pointers. - delete m_geometryCalculator; + //delete m_geometryCalculator; } - - G4bool CalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) + G4bool CalibrationCalculator::Process (const G4Step* a_step, + LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing a_process) const { // Use the calculators to determine the energies and the // identifier associated with this G4Step. Note that the // default is to process both the energy and the ID. - m_energies.clear(); + _energies.clear(); if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { + { #ifdef DEBUG_HITS - std::cout << "LArG4::EC::CalibrationCalculator::Process" - << " calling SimulationEnergies" - << " at m_energyCalculator=" - << m_energyCalculator - << std::endl; + std::cout << "LArG4::EC::CalibrationCalculator::Process" + << " calling SimulationEnergies" + << " at m_energyCalculator=" + << m_energyCalculator + << std::endl; #endif - m_energyCalculator.Energies( a_step, m_energies ); - } + m_energyCalculator.Energies( a_step, _energies ); + } else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); + for (unsigned int i=0; i != 4; i++) _energies.push_back( 0. ); - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. - (void)m_geometryCalculator->Process( a_step ); - m_identifier = m_geometryCalculator->identifier(); - } - else - m_identifier = LArG4Identifier(); + if ( a_process == kEnergyAndID || a_process == kOnlyID ) { + // Calculate the identifier. + //(void)m_geometryCalculator->Process( a_step ); + // _identifier = m_geometryCalculator->identifier(); + std::vector<LArHitData> hdata; + m_geometryCalculator->Process( a_step, hdata ); + _identifier = hdata[0].id; + } else + _identifier = LArG4Identifier(); #ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); + G4double energy = accumulate(_energies.begin(),_energies.end(),0.); std::cout << "LArG4::EC::CalibrationCalculator::Process" - << " ID=" << std::string(m_identifier) - << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + << " ID=" << std::string(_identifier) + << " energy=" << energy + << " energies=(" << _energies[0] + << "," << _energies[1] + << "," << _energies[2] + << "," << _energies[3] << ")" + << std::endl; #endif // Check for bad result. - if ( m_identifier == LArG4Identifier() ) { + if ( _identifier == LArG4Identifier() ) { std::cout << "return invalid from EmecCalibrationCalculator" << std::endl; - return false; + return false; } return true; diff --git a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/CalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4EC/src/CalibrationCalculator.h similarity index 70% rename from LArCalorimeter/LArG4/LArG4EC/LArG4EC/CalibrationCalculator.h rename to LArCalorimeter/LArG4/LArG4EC/src/CalibrationCalculator.h index 351e8a8c238be6d4c7e9455e653cf6e9040d5a8b..ec7db1f2f3e229cc19a0c5d61e5621fff6a4a0df 100644 --- a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/CalibrationCalculator.h +++ b/LArCalorimeter/LArG4/LArG4EC/src/CalibrationCalculator.h @@ -19,7 +19,7 @@ #ifndef LArG4_EC_CalibrationCalculator_H #define LArG4_EC_CalibrationCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" @@ -32,6 +32,7 @@ // Forward declaractions: class G4Step; +class ILArCalculatorSvc; // Note the use of nested namespaces (mainly to prevent long names // like LArG4HECCalibrationCalculator). This class is contained in @@ -43,13 +44,16 @@ namespace LArG4 { // Forward declaration class Geometry; - class EnergyCalculator; - class CalibrationCalculator : public VCalibrationCalculator { + class CalibrationCalculator : public LArCalibCalculatorSvcImp { public: - CalibrationCalculator(LArWheelCalculator::LArWheelCalculator_t, int); + //CalibrationCalculator(LArWheelCalculator::LArWheelCalculator_t, int); + CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator); virtual ~CalibrationCalculator(); + // Update handler + void WheelTypeHandler(Property&); + StatusCode initialize() override final; // The Process method returns a boolean value. If it's true, the // hit can be used by Geant4; if it's false, there's something wrong @@ -62,22 +66,18 @@ namespace LArG4 { // yet, but you can never tell). Use the enum (defined in // VCalibrationCalculator.h) to control any special processing. - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } + virtual G4bool Process (const G4Step* step, LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing p = kEnergyAndID) const override final; private: - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; + + int m_zside; + UnsignedShortProperty m_wcalc_tProp; + LArG4::LArWheelCalculator_t m_wcalc_t; // Geometry calculator - EnergyCalculator* m_geometryCalculator; + ServiceHandle<ILArCalculatorSvc> m_geometryCalculator; // Energy calculator CaloG4::SimulationEnergies m_energyCalculator; diff --git a/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationCalculator.cc index 9259dc85d4bff66d2bc6e9d566c067b63bfdb6e2..5a527ef8d73fc84e9c3e9de377025695025d071d 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationCalculator.cc @@ -4,30 +4,25 @@ // LArG4::EndcapCryostat::CalibrationCalculator // Prepared 13-Jan-2004 Bill Seligman -// 20-Jul-2004 M.Leltchouk - region and volume info definitions +// 20-Jul-2004 M.Leltchouk - region and volume info definitions // This class calculates the values needed for calibration hits in the // volumes: -// "LAr::Endcap::Cryostat::Cylinder" -// "LAr::Endcap::Cryostat::Cone" -// "LAr::Endcap::Cryostat::EmecHecLAr::Cylinder" -// "LAr::Endcap::Cryostat::EmecHecLAr::Sector" -// "LAr::Endcap::Cryostat::FcalLAr::Cylinder" -// "LAr::Endcap::Cryostat::FcalLAr::Sector" - -#define DEBUG_VOLUMES +// "LAr::Endcap::Cryostat::Cylinder" +// "LAr::Endcap::Cryostat::Cone" +// "LAr::Endcap::Cryostat::EmecHecLAr::Cylinder" +// "LAr::Endcap::Cryostat::EmecHecLAr::Sector" +// "LAr::Endcap::Cryostat::FcalLAr::Cylinder" +// "LAr::Endcap::Cryostat::FcalLAr::Sector" + +#undef DEBUG_VOLUMES #undef DEBUG_HITS #undef DEBUG_MAPS #undef DEBUG_DMXYZ -#ifdef DEBUG_DMXYZ -#include "LArG4Code/CalibrationDefaultCalculator.h" -#endif -#include "LArG4EC/CryostatCalibrationCalculator.h" -#include "LArG4EC/CryostatCalibrationLArCalculator.h" +#include "CryostatCalibrationCalculator.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/VCalibrationCalculator.h" #include "G4Step.hh" #include "G4StepPoint.hh" @@ -42,8 +37,6 @@ namespace LArG4 { namespace EndcapCryostat { - VCalibrationCalculator* CalibrationCalculator::m_backupCalculator = 0; - /////////////////////////////////////////////////////////// // Tables /////////////////////////////////////////////////////////// @@ -109,211 +102,211 @@ namespace LArG4 { // ========== Sampling 1 ============= static const RegionInfo_t region016[] = - // inner warm and cold walls, cones - // region etamin etamax deta dphi + // inner warm and cold walls, cones + // region etamin etamax deta dphi { { 6, 1.3, 3.2, 0.1, M_PI/32. }, - { 7, 3.2, 5.0, 0.1, M_PI/32. } }; + { 7, 3.2, 5.0, 0.1, M_PI/32. } }; static const RegionInfo_t region017[] = - // inner warm and cold walls, cones - // region etamin etamax deta dphi - { { 7, 3.2, 5.0, 0.1, M_PI/32. } }; + // inner warm and cold walls, cones + // region etamin etamax deta dphi + { { 7, 3.2, 5.0, 0.1, M_PI/32. } }; // ========== Sampling 2 ============= static const RegionInfo_t region025[] = - // pieces at largest radius of inner warm and cold walls (info5) - // and CREK7 - front part of HEC supports (info7) - // region etamin etamax deta dphi + // pieces at largest radius of inner warm and cold walls (info5) + // and CREK7 - front part of HEC supports (info7) + // region etamin etamax deta dphi { { 5, 1.0, 1.7, 0.1, M_PI/32. } }; // ========== Sampling 3 ============= static const RegionInfo_t region030[] = - // warm and cold walls, shields behind HEC, FCAL (info, info8) - // region etamin etamax deta dphi + // warm and cold walls, shields behind HEC, FCAL (info, info8) + // region etamin etamax deta dphi { { 0, 1.7, 5.0, 0.1, M_PI/32. }, - { 1, 5.0, 8.0, 0.2, M_PI/32. } + { 1, 5.0, 8.0, 0.2, M_PI/32. } }; static const CopyNumberInfo_t info5[] = - // "LAr::Endcap::Cryostat::Cylinder" + // "LAr::Endcap::Cryostat::Cylinder" { - // ------------- region: inner warm and cold walls ------------ - // copy number range (low, high) - { 4, 6, - // Det Sub Typ Sam - { 10, 4, 1, 1, - sizeof(region016)/sizeof(RegionInfo_t), - region016 } - }, - { 15, 15, - // Det Sub Typ Sam - { 10, 4, 1, 1, - sizeof(region016)/sizeof(RegionInfo_t), - region016 } - }, - { 29, 29, - // Det Sub Typ Sam - { 10, 4, 1, 1, - sizeof(region016)/sizeof(RegionInfo_t), - region016 } - }, - - // ------------- region: outer warm - cold piece ------------ - // copy number range (low, high) - { 11, 11, - // Det Sub Typ Sam - { 10, 4, 1, 2, - sizeof(region025)/sizeof(RegionInfo_t), - region025 } - }, + // ------------- region: inner warm and cold walls ------------ + // copy number range (low, high) + { 4, 6, + // Det Sub Typ Sam + { 10, 4, 1, 1, + sizeof(region016)/sizeof(RegionInfo_t), + region016 } + }, + { 15, 15, + // Det Sub Typ Sam + { 10, 4, 1, 1, + sizeof(region016)/sizeof(RegionInfo_t), + region016 } + }, + { 29, 29, + // Det Sub Typ Sam + { 10, 4, 1, 1, + sizeof(region016)/sizeof(RegionInfo_t), + region016 } + }, + + // ------------- region: outer warm - cold piece ------------ + // copy number range (low, high) + { 11, 11, + // Det Sub Typ Sam + { 10, 4, 1, 2, + sizeof(region025)/sizeof(RegionInfo_t), + region025 } + }, // ----- region: warm and cold walls, shields behind HEC, FCAL - { 8, 8, - // Det Sub Typ Sam - { 10, 4, 1, 3, - sizeof(region030)/sizeof(RegionInfo_t), - region030 } - }, - { 20, 21, - // Det Sub Typ Sam - { 10, 4, 1, 3, - sizeof(region030)/sizeof(RegionInfo_t), - region030 } - }, - // ------------- region: warm and cold walls behind HEC, FCAL ---- - // copy number range (low, high) - { 25, 26, - // Det Sub Typ Sam - { 10, 4, 1, 3, - sizeof(region030)/sizeof(RegionInfo_t), - region030 } - }, + { 8, 8, + // Det Sub Typ Sam + { 10, 4, 1, 3, + sizeof(region030)/sizeof(RegionInfo_t), + region030 } + }, + { 20, 21, + // Det Sub Typ Sam + { 10, 4, 1, 3, + sizeof(region030)/sizeof(RegionInfo_t), + region030 } + }, + // ------------- region: warm and cold walls behind HEC, FCAL ---- + // copy number range (low, high) + { 25, 26, + // Det Sub Typ Sam + { 10, 4, 1, 3, + sizeof(region030)/sizeof(RegionInfo_t), + region030 } + }, }; static const CopyNumberInfo_t info6[] = - // "LAr::Endcap::Cryostat::Cone" + // "LAr::Endcap::Cryostat::Cone" { - // ------------- region: inner warm and cold walls ------------ - // copy number range (low, high) - { 1, 3, - // Det Sub Typ Sam - { 10, 4, 1, 1, - sizeof(region017)/sizeof(RegionInfo_t), - region017 } - }, + // ------------- region: inner warm and cold walls ------------ + // copy number range (low, high) + { 1, 3, + // Det Sub Typ Sam + { 10, 4, 1, 1, + sizeof(region017)/sizeof(RegionInfo_t), + region017 } + }, }; static const CopyNumberInfo_t info7[] = - // "LAr::Endcap::Cryostat::EmecHecLAr::Cylinder" + // "LAr::Endcap::Cryostat::EmecHecLAr::Cylinder" { - // ------------- region: warm and cold walls behind HEC, FCAL ---- - // copy number range (low, high) - { 17, 18, - // Det Sub Typ Sam - { 10, 4, 1, 3, - sizeof(region030)/sizeof(RegionInfo_t), - region030 } - }, - { 22, 22, - // Det Sub Typ Sam - { 10, 4, 1, 3, - sizeof(region030)/sizeof(RegionInfo_t), - region030 } - }, - { 23, 23, - // Det Sub Typ Sam - { 10, 4, 1, 2, - sizeof(region025)/sizeof(RegionInfo_t), - region025 } - }, - { 24, 24, - // Det Sub Typ Sam - { 10, 4, 1, 3, - sizeof(region030)/sizeof(RegionInfo_t), - region030 } - }, - { 30, 30, - // Det Sub Typ Sam - { 10, 4, 1, 3, - sizeof(region030)/sizeof(RegionInfo_t), - region030 } - }, + // ------------- region: warm and cold walls behind HEC, FCAL ---- + // copy number range (low, high) + { 17, 18, + // Det Sub Typ Sam + { 10, 4, 1, 3, + sizeof(region030)/sizeof(RegionInfo_t), + region030 } + }, + { 22, 22, + // Det Sub Typ Sam + { 10, 4, 1, 3, + sizeof(region030)/sizeof(RegionInfo_t), + region030 } + }, + { 23, 23, + // Det Sub Typ Sam + { 10, 4, 1, 2, + sizeof(region025)/sizeof(RegionInfo_t), + region025 } + }, + { 24, 24, + // Det Sub Typ Sam + { 10, 4, 1, 3, + sizeof(region030)/sizeof(RegionInfo_t), + region030 } + }, + { 30, 30, + // Det Sub Typ Sam + { 10, 4, 1, 3, + sizeof(region030)/sizeof(RegionInfo_t), + region030 } + }, }; static const CopyNumberInfo_t info8[] = - // "LAr::Endcap::Cryostat::EmecHecLAr::Sector" + // "LAr::Endcap::Cryostat::EmecHecLAr::Sector" { - // ------------- region: inner warm and cold walls ------------ - // copy number range (low, high) - { 7, 7, - // Det Sub Typ Sam - { 10, 4, 1, 2, - sizeof(region025)/sizeof(RegionInfo_t), - region025 } - }, + // ------------- region: inner warm and cold walls ------------ + // copy number range (low, high) + { 7, 7, + // Det Sub Typ Sam + { 10, 4, 1, 2, + sizeof(region025)/sizeof(RegionInfo_t), + region025 } + }, }; -// static const CopyNumberInfo_t info9[] = -// // "LAr::Endcap::Cryostat::FcalLAr::Cylinder" -// { -// // ------------- region: warm and cold walls behind HEC, FCAL ---- -// // copy number range (low, high) -// { 25, 26, -// // Det Sub Typ Sam -// { 10, 4, 1, 3, -// sizeof(region030)/sizeof(RegionInfo_t), -// region030 } -// }, -// }; -// -// static const CopyNumberInfo_t info10[] = -// // "LAr::Endcap::Cryostat::FcalLAr::Sector" -// { -// // ------------- region: warm and cold walls behind HEC, FCAL ---- -// // copy number range (low, high) -// { 5, 8, -// // Det Sub Typ Sam -// { 10, 4, 1, 3, -// sizeof(region030)/sizeof(RegionInfo_t), -// region030 } -// }, -// }; + // static const CopyNumberInfo_t info9[] = + // // "LAr::Endcap::Cryostat::FcalLAr::Cylinder" + // { + // // ------------- region: warm and cold walls behind HEC, FCAL ---- + // // copy number range (low, high) + // { 25, 26, + // // Det Sub Typ Sam + // { 10, 4, 1, 3, + // sizeof(region030)/sizeof(RegionInfo_t), + // region030 } + // }, + // }; + // + // static const CopyNumberInfo_t info10[] = + // // "LAr::Endcap::Cryostat::FcalLAr::Sector" + // { + // // ------------- region: warm and cold walls behind HEC, FCAL ---- + // // copy number range (low, high) + // { 5, 8, + // // Det Sub Typ Sam + // { 10, 4, 1, 3, + // sizeof(region030)/sizeof(RegionInfo_t), + // region030 } + // }, + // }; static const VolumeInfo_t volume5 = { "LAr::Endcap::Cryostat::Cylinder", - sizeof(info5) / sizeof(CopyNumberInfo_t), - info5 + sizeof(info5) / sizeof(CopyNumberInfo_t), + info5 }; static const VolumeInfo_t volume6 = { "LAr::Endcap::Cryostat::Cone", - sizeof(info6) / sizeof(CopyNumberInfo_t), - info6 + sizeof(info6) / sizeof(CopyNumberInfo_t), + info6 }; static const VolumeInfo_t volume7 = { "LAr::Endcap::Cryostat::EmecHecLAr::Cylinder", - sizeof(info7) / sizeof(CopyNumberInfo_t), - info7 + sizeof(info7) / sizeof(CopyNumberInfo_t), + info7 }; static const VolumeInfo_t volume8 = { "LAr::Endcap::Cryostat::EmecHecLAr::Sector", - sizeof(info8) / sizeof(CopyNumberInfo_t), - info8 + sizeof(info8) / sizeof(CopyNumberInfo_t), + info8 }; -// static const VolumeInfo_t volume9 = -// { "LAr::Endcap::Cryostat::FcalLAr::Cylinder", -// sizeof(info9) / sizeof(CopyNumberInfo_t), -// info9 -// }; + // static const VolumeInfo_t volume9 = + // { "LAr::Endcap::Cryostat::FcalLAr::Cylinder", + // sizeof(info9) / sizeof(CopyNumberInfo_t), + // info9 + // }; -// static const VolumeInfo_t volume10 = -// { "LAr::Endcap::Cryostat::FcalLAr::Sector", -// sizeof(info10) / sizeof(CopyNumberInfo_t), -// info10 -// }; + // static const VolumeInfo_t volume10 = + // { "LAr::Endcap::Cryostat::FcalLAr::Sector", + // sizeof(info10) / sizeof(CopyNumberInfo_t), + // info10 + // }; static const VolumeInfo_t volumes[] = { volume5, volume6, volume7, volume8}; static const G4int numberOfVolumes = sizeof(volumes) / sizeof(VolumeInfo_t); @@ -330,301 +323,311 @@ namespace LArG4 { // Methods /////////////////////////////////////////////////////////// - CalibrationCalculator::CalibrationCalculator() + CalibrationCalculator::CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_backupCalculator("EndcapCryostatCalibrationLArCalculator",name) { + declareProperty("BackupCalculator",m_backupCalculator); + } + + StatusCode CalibrationCalculator::initialize() { // Get a "backup" calculator. - if ( m_backupCalculator == 0 ) - m_backupCalculator = new CalibrationLArCalculator(); + + ATH_CHECK(m_backupCalculator.retrieve()); #if defined (DEBUG_HITS) || defined (DEBUG_MAPS) G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::CalibrationCalculator - " - << " notInitialized=" - << notInitialized - << ", numberOfVolumes=" << numberOfVolumes - << ", sizeof(volumes)=" << sizeof(volumes) - << ", sizeof(VolumeInfo_t)=" << sizeof(VolumeInfo_t) - << G4endl; + << " notInitialized=" + << notInitialized + << ", numberOfVolumes=" << numberOfVolumes + << ", sizeof(volumes)=" << sizeof(volumes) + << ", sizeof(VolumeInfo_t)=" << sizeof(VolumeInfo_t) + << G4endl; #endif // Intialize the maps. if ( notInitialized ) - { - notInitialized = false; + { + notInitialized = false; - // For each volume managed by this calculator... - for (G4int v = 0; v != numberOfVolumes; v++) - { - const VolumeInfo_t& volume = volumes[v]; + // For each volume managed by this calculator... + for (G4int v = 0; v != numberOfVolumes; v++) + { + const VolumeInfo_t& volume = volumes[v]; #if defined (DEBUG_HITS) || defined (DEBUG_MAPS) - G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::CalibrationCalculator - " - << " volume '" - << volume.volumeName - << "' has number of entries=" << volume.numberOfCopies - << G4endl; + G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::CalibrationCalculator - " + << " volume '" + << volume.volumeName + << "' has number of entries=" << volume.numberOfCopies + << G4endl; #endif - identifierMap_t identifierMap; - const CopyNumberInfo_t* copyInfo = volume.copyInfo; - - // For each range copy numbers that can be found in a volume with this name... - for (G4int c = 0; c != volume.numberOfCopies; c++, copyInfo++) - { - // For each copy in the range of copy numbers - for (G4int copy = copyInfo->copyNumberLow; - copy <= copyInfo->copyNumberHigh; - copy++) - { + identifierMap_t identifierMap; + const CopyNumberInfo_t* copyInfo = volume.copyInfo; + + // For each range copy numbers that can be found in a volume with this name... + for (G4int c = 0; c != volume.numberOfCopies; c++, copyInfo++) + { + // For each copy in the range of copy numbers + for (G4int copy = copyInfo->copyNumberLow; + copy <= copyInfo->copyNumberHigh; + copy++) + { #if defined (DEBUG_HITS) || defined (DEBUG_MAPS) - G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::CalibrationCalculator - " - << " adding copy=" << copy - << " to identifierMap" - << G4endl; + G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::CalibrationCalculator - " + << " adding copy=" << copy + << " to identifierMap" + << G4endl; #endif - // Add to the map that's based on copy number. - identifierMap[copy] = &(copyInfo->identifierInfo); - } - } + // Add to the map that's based on copy number. + identifierMap[copy] = &(copyInfo->identifierInfo); + } + } - // Add to the map that's based on volume name; it - // contains maps based on copy number. - volumeMap[volume.volumeName] = identifierMap; + // Add to the map that's based on volume name; it + // contains maps based on copy number. + volumeMap[volume.volumeName] = identifierMap; #if defined (DEBUG_HITS) || defined (DEBUG_MAPS) - G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::CalibrationCalculator - " - << " volume '" - << volume.volumeName - << "' added to map." - << G4endl; + G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::CalibrationCalculator - " + << " volume '" + << volume.volumeName + << "' added to map." + << G4endl; #endif - } - } // if not initialized + } + } // if not initialized #if defined (DEBUG_HITS) || defined (DEBUG_MAPS) G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::CalibrationCalculator - " - << G4endl - << " initialization complete; map size=" - << volumeMap.size() - << G4endl; + << G4endl + << " initialization complete; map size=" + << volumeMap.size() + << G4endl; #endif - } + return StatusCode::SUCCESS; + }// initialize - CalibrationCalculator::~CalibrationCalculator() + CalibrationCalculator::~CalibrationCalculator() { // Clean up pointers. - delete m_backupCalculator; - m_backupCalculator = 0; + //delete m_backupCalculator; + //m_backupCalculator = 0; } - - G4bool CalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) + G4bool CalibrationCalculator::Process (const G4Step* a_step, + LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing a_process) const { // Use the calculators to determine the energies and the // identifier associated with this G4Step. Note that the // default is to process both the energy and the ID. - m_energies.clear(); + _energies.clear(); if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } else { - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); + { + m_energyCalculator.Energies( a_step, _energies ); + } else { + for (unsigned int i=0; i != 4; i++) _energies.push_back( 0. ); } - m_identifier.clear(); + _identifier.clear(); if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. + { + // Calculate the identifier. - // First, find the physical volume copy number, and the - // logical volume name. + // First, find the physical volume copy number, and the + // logical volume name. - const G4VPhysicalVolume* physical = a_step->GetPreStepPoint()->GetPhysicalVolume(); - const G4int copyNumber = physical->GetCopyNo(); - G4String volumeName = physical->GetLogicalVolume()->GetName(); + const G4VPhysicalVolume* physical = a_step->GetPreStepPoint()->GetPhysicalVolume(); + const G4int copyNumber = physical->GetCopyNo(); + G4String volumeName = physical->GetLogicalVolume()->GetName(); - if(volumeName.index("LArMgr::") == 0) volumeName.erase(0,8); + if(volumeName.index("LArMgr::") == 0) volumeName.erase(0,8); #ifdef DEBUG_HITS - G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::Process - " - << G4endl - << " searching for volume '" - << volumeName - << "' copyNumber=" - << copyNumber - << G4endl; + G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::Process - " + << G4endl + << " searching for volume '" + << volumeName + << "' copyNumber=" + << copyNumber + << G4endl; #endif - // Search the maps for this volume/copy number combination. - volumeMap_ptr_t v = volumeMap.find( volumeName ); - if ( v != volumeMap.end() ) - { + // Search the maps for this volume/copy number combination. + volumeMap_ptr_t v = volumeMap.find( volumeName ); + if ( v != volumeMap.end() ) + { - // Recall that maps are made from pair <key,value>, and - // you access a pair with the "first" and "second" - // members. In this case, "second" is a map. We don't - // need to copy the entire map; it's enough to get its - // reference. + // Recall that maps are made from pair <key,value>, and + // you access a pair with the "first" and "second" + // members. In this case, "second" is a map. We don't + // need to copy the entire map; it's enough to get its + // reference. - identifierMap_t& identifierMap = (*v).second; - identifierMap_ptr_t i = identifierMap.find( copyNumber ); + identifierMap_t& identifierMap = (*v).second; + identifierMap_ptr_t i = identifierMap.find( copyNumber ); - if ( i != identifierMap.end() ) - { - const IdentifierInfo_t* info = (*i).second; + if ( i != identifierMap.end() ) + { + const IdentifierInfo_t* info = (*i).second; - // Find our (x,y,z) location from the G4Step. + // Find our (x,y,z) location from the G4Step. - const G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - const G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - const G4ThreeVector startPoint = pre_step_point->GetPosition(); - const G4ThreeVector endPoint = post_step_point->GetPosition(); - const G4ThreeVector p = (startPoint + endPoint) * 0.5; + const G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); + const G4StepPoint* post_step_point = a_step->GetPostStepPoint(); + const G4ThreeVector startPoint = pre_step_point->GetPosition(); + const G4ThreeVector endPoint = post_step_point->GetPosition(); + const G4ThreeVector p = (startPoint + endPoint) * 0.5; - // Determine the geometric eta and phi. Note that we do not - // adjust for any endcap shifts; the values are assigned to - // the volumes based on their actual positions + // Determine the geometric eta and phi. Note that we do not + // adjust for any endcap shifts; the values are assigned to + // the volumes based on their actual positions - G4double eta = fabs( p.pseudoRapidity() ); - G4double phi = p.phi(); - // For this calculation, we need 0<phi<2*PI. (The - // official ATLAS standard of -PI<phi<PI is - // meaningless here.) - if ( phi < 0 ) phi += 2*M_PI; + G4double eta = fabs( p.pseudoRapidity() ); + G4double phi = p.phi(); + // For this calculation, we need 0<phi<2*PI. (The + // official ATLAS standard of -PI<phi<PI is + // meaningless here.) + if ( phi < 0 ) phi += 2*M_PI; - // The region can depend on eta. Search through the - // list of regions within this IdentifierInfo record - // to find which one has etaMin<eta<etaMax. + // The region can depend on eta. Search through the + // list of regions within this IdentifierInfo record + // to find which one has etaMin<eta<etaMax. - const G4int regions = info->numberOfRegions; - const RegionInfo_t* region = info->regionInfoArray; + const G4int regions = info->numberOfRegions; + const RegionInfo_t* region = info->regionInfoArray; #ifdef DEBUG_HITS - G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::Process - " - << G4endl - << " found volume, number of regions=" - << regions - << " eta=" << eta << " phi=" << phi - << G4endl; + G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::Process - " + << G4endl + << " found volume, number of regions=" + << regions + << " eta=" << eta << " phi=" << phi + << G4endl; #endif - G4int r; - for ( r = 0; r < regions; r++, region++ ) - { - if ( copyNumber!=8 && region->etaMax == 5.0 && eta > region->etaMax) { - // g.p. 3-Apr-2006 - // region is defined only until 5.0, but we may have hits - // from higher eta. Lets put them into last bin - eta = region->etaMax - 0.00001; - break; - } - // hack for strongly missaligned geometry, 2-Oct-2007, g.p. - if(region == ®ion025[0] && copyNumber == 11 && volumeName == "LAr::Endcap::Cryostat::Cylinder" && eta>=region->etaMax) { - eta = region->etaMax - 0.00001; - } - if ( eta > region->etaMin && eta < region->etaMax ) break; - } - - // If the following statement is not true, we're in - // trouble. It means that the eta of our energy - // deposit is outside the assumed eta limits of the - // volume. - - if ( r < regions ) - { - // Convert eta and phi to their integer equivalents for the - // identifier. - - const G4int etaInteger = G4int( (eta - region->etaMin) / region->deltaEta ); - G4int phiInteger = G4int( phi / region->deltaPhi ); - // to handle rounding error problem - if(phiInteger > 63) phiInteger = 0; + G4int r; + for ( r = 0; r < regions; r++, region++ ) + { + if ( copyNumber!=8 && region->etaMax == 5.0 && eta > region->etaMax) { + // g.p. 3-Apr-2006 + // region is defined only until 5.0, but we may have hits + // from higher eta. Lets put them into last bin + eta = region->etaMax - 0.00001; + break; + } + // hack for strongly missaligned geometry, 2-Oct-2007, g.p. + if(region == ®ion025[0] && copyNumber == 11 && volumeName == "LAr::Endcap::Cryostat::Cylinder" && eta>=region->etaMax) { + eta = region->etaMax - 0.00001; + } + if ( eta > region->etaMin && eta < region->etaMax ) break; + } + + // If the following statement is not true, we're in + // trouble. It means that the eta of our energy + // deposit is outside the assumed eta limits of the + // volume. + + if ( r < regions ) + { + // Convert eta and phi to their integer equivalents for the + // identifier. + + const G4int etaInteger = G4int( (eta - region->etaMin) / region->deltaEta ); + G4int phiInteger = G4int( phi / region->deltaPhi ); + // to handle rounding error problem + if(phiInteger > 63) phiInteger = 0; #ifdef DEBUG_HITS - G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::Process - " - << G4endl - << " found region=" - << region->regionNumber - << " eta bin=" << etaInteger << " phi bin=" << phiInteger - << G4endl; + G4cout << "LArG4::EndcapCryostat::CalibrationCalculator::Process - " + << G4endl + << " found region=" + << region->regionNumber + << " eta bin=" << etaInteger << " phi bin=" << phiInteger + << G4endl; #endif - // The sign of subdet will depend on whether z is positive - // or negative. - G4int subDetSign = 1; - if ( p.z() < 0 ) subDetSign = -1; - - // A quick check against a bad value of etaMin. - if ( etaInteger >= 0 ) { - // Build the full identifier. - m_identifier << info->detector - << info->subdet * subDetSign - << info->type - << info->sampling - << region->regionNumber - << etaInteger - << phiInteger; - - } // etaInteger valid - } // eta valid - } // copy number valid - } // volume name valid - if ( m_identifier == LArG4Identifier() ) - { - // g.p. 09/05/2006 + // The sign of subdet will depend on whether z is positive + // or negative. + G4int subDetSign = 1; + if ( p.z() < 0 ) subDetSign = -1; + + // A quick check against a bad value of etaMin. + if ( etaInteger >= 0 ) { + // Build the full identifier. + _identifier << info->detector + << info->subdet * subDetSign + << info->type + << info->sampling + << region->regionNumber + << etaInteger + << phiInteger; + + } // etaInteger valid + } // eta valid + } // copy number valid + } // volume name valid + if ( _identifier == LArG4Identifier() ) + { + // g.p. 09/05/2006 #ifdef DEBUG_DMXYZ - LArG4::CalibrationDefaultCalculator::Print("UNEXP LArG4EC/CryostatCalibrationCalculator",m_identifier,a_step); + LArG4::CalibrationDefaultCalculator::Print("UNEXP LArG4EC/CryostatCalibrationCalculator",_identifier,a_step); #endif #if defined (DEBUG_HITS) || defined (DEBUG_VOLUMES) - static const G4int messageMax = 1000; - static G4int messageCount = 0; // exists only if debug activated - if ( messageCount++ < messageMax ) { - G4ThreeVector p = (a_step->GetPreStepPoint()->GetPosition() + a_step->GetPostStepPoint()->GetPosition()) * 0.5; - std::cout << "LArG4::EndcapCryostat::CalibrationCalculator::Process" << std::endl - << " G4Step in volume '" << volumeName - << "' copy# " << copyNumber - << " not found on tables, using backup calculator;" - << " xyz:"<<p.x()<<", "<<p.y()<<", "<<p.z() - << " eta:"<< p.pseudoRapidity() - << " (error " << messageCount << " of " << messageMax << " max displayed)." - << std::endl; - } + static const G4int messageMax = 1000; + static G4int messageCount = 0; // exists only if debug activated + if ( messageCount++ < messageMax ) { + G4ThreeVector p = (a_step->GetPreStepPoint()->GetPosition() + a_step->GetPostStepPoint()->GetPosition()) * 0.5; + std::cout << "LArG4::EndcapCryostat::CalibrationCalculator::Process" << std::endl + << " G4Step in volume '" << volumeName + << "' copy# " << copyNumber + << " not found on tables, using backup calculator;" + << " xyz:"<<p.x()<<", "<<p.y()<<", "<<p.z() + << " eta:"<< p.pseudoRapidity() + << " (error " << messageCount << " of " << messageMax << " max displayed)." + << std::endl; + } #endif - } - } // calculate identifier + } + } // calculate identifier // What if we haven't implemented the code for a given volume? // Use a "backup" calculator to try to process the step. - if ( m_identifier == LArG4Identifier() ) - { - m_backupCalculator->Process(a_step, kOnlyID); - m_identifier = m_backupCalculator->identifier(); - } + if ( _identifier == LArG4Identifier() ) + { + //m_backupCalculator->Process(a_step, kOnlyID); + //_identifier = m_backupCalculator->identifier(); + std::vector<G4double> _tmpv; + m_backupCalculator->Process(a_step, _identifier, _tmpv, kOnlyID); + } #ifdef DEBUG_HITS -// G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); + // G4double energy = accumulate(_energies.begin(),_energies.end(),0.); std::cout << "LArG4::EndcapCryostat::CalibrationCalculator::Process" - << " ID=" << std::string(m_identifier) -// << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + << " ID=" << std::string(_identifier) + // << " energy=" << energy + << " energies=(" << _energies[0] + << "," << _energies[1] + << "," << _energies[2] + << "," << _energies[3] << ")" + << std::endl; #endif -// g.p. 09/05/2006 + // g.p. 09/05/2006 #ifdef DEBUG_DMXYZ - LArG4::CalibrationDefaultCalculator::Print("DMXYZ LArG4EC/CryostatCalibrationCalculator",m_identifier,a_step); + LArG4::CalibrationDefaultCalculator::Print("DMXYZ LArG4EC/CryostatCalibrationCalculator",_identifier,a_step); #endif // Check for bad result. - if ( m_identifier == LArG4Identifier() ) return false; + if ( _identifier == LArG4Identifier() ) return false; return true; } diff --git a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/CryostatCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationCalculator.h similarity index 73% rename from LArCalorimeter/LArG4/LArG4EC/LArG4EC/CryostatCalibrationCalculator.h rename to LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationCalculator.h index acec5856694656c5710f4363fc23bb97b3442e28..d483467ebe3b8036d1fa9319fcba0b7d6e2716d0 100644 --- a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/CryostatCalibrationCalculator.h +++ b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationCalculator.h @@ -6,7 +6,7 @@ // Prepared 24-Feb-2004 Bill Seligman // This class calculates the values needed for calibration hits in the -// simulation. +// simulation. // A "calculator" is used in much the same way as a hand-held // calculator might be. The user supplies a value and hits 'Enter' @@ -22,7 +22,7 @@ #ifndef LArG4_EndcapCryostat_CalibrationCalculator_H #define LArG4_EndcapCryostat_CalibrationCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" @@ -41,12 +41,13 @@ namespace LArG4 { namespace EndcapCryostat { - class CalibrationCalculator : public VCalibrationCalculator { + class CalibrationCalculator : public LArCalibCalculatorSvcImp { public: - - CalibrationCalculator(); + + CalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize() override final; virtual ~CalibrationCalculator(); - + // The Process method returns a boolean value. If it's true, the // hit can be used by Geant4; if it's false, there's something wrong // with the energy deposit and it should be ignored. @@ -58,28 +59,18 @@ namespace LArG4 { // yet, but you can never tell). Use the enum (defined in // VCalibrationCalculator.h) to control any special processing. - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } + virtual G4bool Process (const G4Step* step, LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing p = kEnergyAndID) const override final; private: - // The values calculated by Process(). - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; - // Energy calculator CaloG4::SimulationEnergies m_energyCalculator; // Define a "backup" calculator, in this case this calculator // misses a volume. - static VCalibrationCalculator* m_backupCalculator; + ServiceHandle<ILArCalibCalculatorSvc> m_backupCalculator; }; diff --git a/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationLArCalculator.cc b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationLArCalculator.cc index 49cc8257520abdabbb8467105c061b39fc1c745b..3afd372b466deaadcd9cd51dda713bf880f061e0 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationLArCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationLArCalculator.cc @@ -3,27 +3,26 @@ */ // LArG4::EndcapCryostat::CalibrationLArCalculator -// 19-Jul-2004 M.Leltchouk - prepared based on examples in +// 19-Jul-2004 M.Leltchouk - prepared based on examples in // BarrelCryostat::CalibrationLArCalculator // This class calculates the values needed for calibration hits in the // volumes: -// "LAr::Endcap::Cryostat::MotherVolume" -// "LAr::Endcap::Cryostat::EmecHecLAr" -// "LAr::Endcap::Cryostat::FcalLAr" +// "LAr::Endcap::Cryostat::MotherVolume" +// "LAr::Endcap::Cryostat::EmecHecLAr" +// "LAr::Endcap::Cryostat::FcalLAr" #undef DEBUG_HITS -#define DEBUG_VOLUMES +#undef DEBUG_VOLUMES #undef DEBUG_DMXYZ -#include "LArG4EC/CryostatCalibrationLArCalculator.h" -#ifdef DEBUG_DMXYZ -#include "LArG4Code/CalibrationDefaultCalculator.h" -#endif +#include "CryostatCalibrationLArCalculator.h" +// #ifdef DEBUG_DMXYZ +// #include "LArG4Code/CalibrationDefaultCalculator.h" +// #endif #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/VCalibrationCalculator.h" -#include "LArG4Code/CalibrationDefaultCalculator.h" +//#include "LArG4Code/CalibrationDefaultCalculator.h" // direct access to database //#include "RDBAccessSvc/IRDBAccessSvc.h" @@ -53,408 +52,386 @@ namespace LArG4 { namespace EndcapCryostat { - VCalibrationCalculator* CalibrationLArCalculator::m_defaultCalculator = 0; - /////////////////////////////////////////////////////////// // Methods /////////////////////////////////////////////////////////// - CalibrationLArCalculator::CalibrationLArCalculator() + CalibrationLArCalculator::CalibrationLArCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_defaultCalculator("CalibrationDefaultCalculator", name) { - // Get the default calculator (hopefully a temporary piece of code): - if ( m_defaultCalculator == 0) - m_defaultCalculator = new CalibrationDefaultCalculator(); + declareProperty("CalibrationDefaultCalculator", m_defaultCalculator); + } + + StatusCode CalibrationLArCalculator::initialize() { + + ATH_CHECK(m_defaultCalculator.retrieve()); // Access source of detector parameters. m_parameters = LArVG4DetectorParameters::GetInstance(); -// // Access to DB to get parameters -// StatusCode status; -// // Access the GeoModelSvc: -// ISvcLocator *svcLocator = Gaudi::svcLocator(); -// IGeoModelSvc *geoModel; -// status = svcLocator->service ("GeoModelSvc",geoModel); -// if (status != StatusCode::SUCCESS) { -// throw std::runtime_error ("Cannot locate GeoModelSvc!!"); -// } -// -// // Access the geometry database: -// IRDBAccessSvc *pAccessSvc; -// status=svcLocator->service("RDBAccessSvc",pAccessSvc); -// if (status != StatusCode::SUCCESS) { -// throw std::runtime_error ("Cannot locate RDBAccessSvc!!"); -// } -// -// // Obtain the geometry version information: -// std::string AtlasVersion = geoModel->atlasVersion(); -// std::string LArVersion = geoModel->LAr_VersionOverride(); -// std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion; -// std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr"; -// -// pAccessSvc->connect(); -// // getting detector parameters -// const IRDBRecordset *emecGeometry = pAccessSvc->getRecordset("EmecGeometry",detectorKey,detectorNode); -// if (emecGeometry->size()==0) { -// throw std::runtime_error("LArG4EC/cryostatCalibrationLArCalculator Cannot find the EmecGeometry table"); -// } -// const IRDBRecordset *fcalMod = pAccessSvc->getRecordset("FCalMod",detectorKey,detectorNode); -// if (fcalMod->size()==0) { -// fcalMod = pAccessSvc->getRecordset("FCalMod","FCalMod-00"); -// } -// if (fcalMod->size()==0) { -// throw std::runtime_error("LArG4EC/cryostatCalibrationLArCalculator Cannot find the FcalMod table"); -// } -// -// // Get the endcap shift from the detector parameters. -// m_zShift = (*emecGeometry)[0]->getDouble("ZSHIFT")*CLHEP::mm; -// -// // Get FCAL modules positions -// m_startZFCal1 = (*fcalMod)[0]->getDouble("STARTPOSITION")*CLHEP::mm; -// m_startZFCal2 = (*fcalMod)[1]->getDouble("STARTPOSITION")*CLHEP::mm; -// m_startZFCal3 = (*fcalMod)[2]->getDouble("STARTPOSITION")*CLHEP::mm; -// m_endZFCal3 = m_startZFCal3 + (*fcalMod)[2]->getDouble("FULLMODULEDEPTH")*CLHEP::mm; -// pAccessSvc->disconnect(); -// + // ----------------------------------------------------------------------- + // Load geometrical parameters + + // The fixed parameters (only a couple of which are readily + // accessible from the database): + + const double rhoAlignmentSafety = 10.*CLHEP::mm; + + const double HEC_MotherRouter = m_parameters->GetValue("LArHECmoduleRouter"); // 2030.*CLHEP::mm + // HEC Outer Radius + // for misalignment-safe determination what is out of them: + m_rhoOutOfEmecHec = HEC_MotherRouter - rhoAlignmentSafety; + + const double zShift = m_parameters->GetValue("LArEMECZshift"); // 40mm + + const double zAlignmentSafety = zShift + 10.*CLHEP::mm; + + + // At nominal (zShift=0) endcap position absolute z-coordinates: + // of the faces of the EndcapPresampler + const double zEndcapPresamplerFrontFace = + m_parameters->GetValue("LArEMECPreNomPos") - m_parameters->GetValue("LArEMECPreThickness")/2.; + // 3622. * CLHEP::mm + + m_zInFrontOfPresampler = zEndcapPresamplerFrontFace + zShift - 20.*CLHEP::mm; + // in this case it is safer to decrease Z-boundary and put it + // inside thick Cold Wall + // The E-deposit in the Cold Wall itself is handled by + // another calculator. + + // The E-deposit in the Cold Wall itself is handled by + // another calculator. + + m_zEMECRefPoint = m_parameters->GetValue("LArEMECRefPoint"); // Z0 = 3689.5*mm + m_zInFrontOfSpanishFan = zEMECRefPoint() + zAlignmentSafety; + + const double HECzStart = m_parameters->GetValue("LArHECzStart"); // 4277.*mm + + m_zInFrontOfHEC = HECzStart + zAlignmentSafety; + + m_zBehindTile = 6100. + zShift - 50.*CLHEP::mm; + + // g.p. 10/09/2008 parameters to find gap boundaries between HEC wheels + m_endZHEC1Wheel = HECzStart + zShift + + m_parameters->GetValue("LArHECdepthZ",0) + + m_parameters->GetValue("LArHECdepthZ",1) + + m_parameters->GetValue("LArHECdepthZ",2) - 10.0; + + m_startZHEC2Wheel = HECzStart + zShift + + m_parameters->GetValue("LArHECdepthZ",0) + + m_parameters->GetValue("LArHECdepthZ",1) + + m_parameters->GetValue("LArHECdepthZ",2) + + m_parameters->GetValue("LArHECfirstAbsorber",3) + + m_parameters->GetValue("LArHECbetweenWheel") + 10.0; + + // ----------------------------------------------------------------------- + + // // Access to DB to get parameters + // StatusCode status; + // // Access the GeoModelSvc: + // ISvcLocator *svcLocator = Gaudi::svcLocator(); + // IGeoModelSvc *geoModel; + // status = svcLocator->service ("GeoModelSvc",geoModel); + // if (status != StatusCode::SUCCESS) { + // throw std::runtime_error ("Cannot locate GeoModelSvc!!"); + // } + // + // // Access the geometry database: + // IRDBAccessSvc *pAccessSvc; + // status=svcLocator->service("RDBAccessSvc",pAccessSvc); + // if (status != StatusCode::SUCCESS) { + // throw std::runtime_error ("Cannot locate RDBAccessSvc!!"); + // } + // + // // Obtain the geometry version information: + // std::string AtlasVersion = geoModel->atlasVersion(); + // std::string LArVersion = geoModel->LAr_VersionOverride(); + // std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion; + // std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr"; + // + // pAccessSvc->connect(); + // // getting detector parameters + // const IRDBRecordset *emecGeometry = pAccessSvc->getRecordset("EmecGeometry",detectorKey,detectorNode); + // if (emecGeometry->size()==0) { + // throw std::runtime_error("LArG4EC/cryostatCalibrationLArCalculator Cannot find the EmecGeometry table"); + // } + // const IRDBRecordset *fcalMod = pAccessSvc->getRecordset("FCalMod",detectorKey,detectorNode); + // if (fcalMod->size()==0) { + // fcalMod = pAccessSvc->getRecordset("FCalMod","FCalMod-00"); + // } + // if (fcalMod->size()==0) { + // throw std::runtime_error("LArG4EC/cryostatCalibrationLArCalculator Cannot find the FcalMod table"); + // } + // + // // Get the endcap shift from the detector parameters. + // m_zShift = (*emecGeometry)[0]->getDouble("ZSHIFT")*CLHEP::mm; + // + // // Get FCAL modules positions + // m_startZFCal1 = (*fcalMod)[0]->getDouble("STARTPOSITION")*CLHEP::mm; + // m_startZFCal2 = (*fcalMod)[1]->getDouble("STARTPOSITION")*CLHEP::mm; + // m_startZFCal3 = (*fcalMod)[2]->getDouble("STARTPOSITION")*CLHEP::mm; + // m_endZFCal3 = m_startZFCal3 + (*fcalMod)[2]->getDouble("FULLMODULEDEPTH")*CLHEP::mm; + // pAccessSvc->disconnect(); + // + return StatusCode::SUCCESS; } - CalibrationLArCalculator::~CalibrationLArCalculator() + CalibrationLArCalculator::~CalibrationLArCalculator() { // Cleanup pointers. - delete m_defaultCalculator; - m_defaultCalculator = 0; + //delete m_defaultCalculator; + //m_defaultCalculator = 0; } - - G4bool CalibrationLArCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) + G4bool CalibrationLArCalculator::Process (const G4Step* a_step, + LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing a_process) const { // Use the calculators to determine the energies and the // identifier associated with this G4Step. Note that the // default is to process both the energy and the ID. - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } - else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); - - - m_identifier.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. - - // Note: - // LArG4::EndcapCryostat::CryostatCalibrationCalculator uses - // a table-based approach to determine the identifier. The - // following code uses an "if-statement" approach. - - // The fixed parameters (only a couple of which are readily - // accessible from the database): - - static const double oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. - static const double oneOverDphi = 32./M_PI; // 1/Dphi - - static const double rhoAlignmentSafety = 10.*CLHEP::mm; - - static double HEC_MotherRouter = INT_MIN; - if ( HEC_MotherRouter < 0.) - HEC_MotherRouter = m_parameters->GetValue("LArHECmoduleRouter"); //2030.*CLHEP::mm HEC Outer Radius - // static const double EMEC_MotherRouter = 2077.*CLHEP::mm; - // we need only lesser of EMEC_MotherRouter, HEC_MotherRouter - // for misalignment-safe determination what is out of them: - static const double rhoOutOfEmecHec = HEC_MotherRouter - rhoAlignmentSafety; - - static double zShift = INT_MIN; - if ( zShift < 0.) - zShift = m_parameters->GetValue("LArEMECZshift"); // 40mm - static const double zAlignmentSafety = zShift + 10.*CLHEP::mm; - - - // At nominal (zShift=0) endcap position absolute z-coordinates: - // of the faces of the EndcapPresampler - static double zEndcapPresamplerFrontFace = INT_MIN; - if ( zEndcapPresamplerFrontFace < 0.) - zEndcapPresamplerFrontFace = - (m_parameters->GetValue("LArEMECPreNomPos") - - m_parameters->GetValue("LArEMECPreThickness")/2.); // 3622. * CLHEP::mm - static const double zInFrontOfPresampler = - zEndcapPresamplerFrontFace + zShift - 20.*CLHEP::mm; - // in this case it is safer to decrease Z-boundary and put it - // inside thick Cold Wall - // The E-deposit in the Cold Wall itself is handled by - // another calculator. - - // The E-deposit in the Cold Wall itself is handled by - // another calculator. - - static double zEMECRefPoint = INT_MIN; - if ( zEMECRefPoint < 0.) - zEMECRefPoint = m_parameters->GetValue("LArEMECRefPoint"); // Z0 = 3689.5*mm - static const double zInFrontOfSpanishFan = zEMECRefPoint + zAlignmentSafety; - - static double HECzStart = INT_MIN; - if ( HECzStart < 0.) - HECzStart = m_parameters->GetValue("LArHECzStart"); // 4277.*mm - - static const double zInFrontOfHEC = HECzStart + zAlignmentSafety; - //static const double zInFrontOfFCAL = 4668.5*mm + zAlignmentSafety; // startZFCal1 = 4668.5 * mm; - static const double zBehindTile = 6100. + zShift - 50.*CLHEP::mm; + _energies.clear(); + if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) { + m_energyCalculator.Energies( a_step, _energies ); + } else { + for (unsigned int i=0; i != 4; i++) { + _energies.push_back( 0. ); + } + } + + + _identifier.clear(); + if ( a_process == kEnergyAndID || a_process == kOnlyID ) { + // Calculate the identifier. + + // Note: + // LArG4::EndcapCryostat::CryostatCalibrationCalculator uses + // a table-based approach to determine the identifier. The + // following code uses an "if-statement" approach. + static const double sc_oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. + static const double sc_oneOverDphi = 32./M_PI; // 1/Dphi // FCAL related parameters - static const double zShiftFCal = 40.0; - static const double startZFCal1 = 4668.5 + zShiftFCal; - static const double startZFCal2 = 5128.3 + zShiftFCal; - static const double startZFCal3 = 5602.8 + zShiftFCal; - static const double endZFCal3 = startZFCal3 + 442.3; - static const double z1BeforeFCal = 4225.5 + zShiftFCal; // 368.95 + 53.6 - static const double z2BeforeFCal = 4557.5 + zShiftFCal; // - - // g.p. 10/09/2008 parameters to find gap boundaries between HEC wheels - static double endZHEC1Wheel = INT_MIN; - static double startZHEC2Wheel = INT_MIN; - if( endZHEC1Wheel < 0) { - endZHEC1Wheel = HECzStart + zShift + m_parameters->GetValue("LArHECdepthZ",0) + m_parameters->GetValue("LArHECdepthZ",1) + m_parameters->GetValue("LArHECdepthZ",2) - 10.0; - startZHEC2Wheel = HECzStart + zShift + m_parameters->GetValue("LArHECdepthZ",0) + m_parameters->GetValue("LArHECdepthZ",1) + m_parameters->GetValue("LArHECdepthZ",2) + m_parameters->GetValue("LArHECfirstAbsorber",3) + m_parameters->GetValue("LArHECbetweenWheel")+10.0; - // 5123.5 5209 - } -///* ---------------------------------------------------------------------- */ -//s tatic int ifirst=1; // not a thread-safe !!! -//if(ifirst){ -//ifirst=0; -//std::cout -//<< " rhoAlignmentSafety:" << rhoAlignmentSafety << std::endl -//<< " HEC_MotherRouter:" << HEC_MotherRouter << std::endl -//<< " rhoOutOfEmecHec:" << rhoOutOfEmecHec << std::endl -//<< " zShift:" << zShift << std::endl -//<< " zAlignmentSafety:" << zAlignmentSafety << std::endl -//<< " zEndcapPresamplerFrontFace:" << zEndcapPresamplerFrontFace << std::endl -//<< " zInFrontOfPresampler:" << zInFrontOfPresampler << std::endl -//<< " zEMECRefPoint:" << zEMECRefPoint << std::endl -//<< " zInFrontOfSpanishFan:" << zInFrontOfSpanishFan << std::endl -//<< " HECzStart:" << HECzStart << std::endl -//<< " zInFrontOfHEC:" << zInFrontOfHEC << std::endl -//<< " zInFrontOfFCAL:" << zInFrontOfFCAL << std::endl -//<< " zBehindTile:" << zBehindTile << std::endl -//<< " zShiftFCal:" << zShiftFCal << std::endl -//<< " startZFCal1:" << startZFCal1 << std::endl -//<< " startZFCal2:" << startZFCal2 << std::endl -//<< " startZFCal3:" << startZFCal3 << std::endl -//<< " endZFCal3:" << endZFCal3 << std::endl -//<< " z1BeforeFCal:" << z1BeforeFCal << std::endl -//<< " z2BeforeFCal:" << z2BeforeFCal << std::endl -//<< std::endl; -//} -///* ---------------------------------------------------------------------- */ - - // Calculate the mid-point of the step, and the simple geometry variables. - - const G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - const G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - - const G4ThreeVector startPoint = pre_step_point->GetPosition(); - const G4ThreeVector endPoint = post_step_point->GetPosition(); - const G4ThreeVector p = (startPoint + endPoint) * 0.5; - - const G4double rho = p.perp(); - const G4double eta = fabs( p.pseudoRapidity() ); - G4double phi = p.phi(); - if ( phi < 0. ) phi += 2.*M_PI; // Normalize for phiBin calculation - - const G4double absZ = fabs(p.z()); - - // subdet = +/-4 "+" or " -" according to sign of Z in World coorinate - G4int subdet = ( p.z() > 0.) ? 4 : -4; - G4int type = 1; - G4int phiBin = (int) ( phi * oneOverDphi ); - // to handle rounding error problem - if(phiBin > 63) phiBin = 0; - - // Initialize identifier variables with (invalid) default - // values (INT_MIN is defined in <climits>). - G4int sampling = INT_MIN; - G4int region = INT_MIN; - G4int etaBin = INT_MIN; - - if( eta < 1.4) { + static const double sc_zShift = 40.0; + static const double sc_startZFCal1 = 4668.5 + sc_zShift; + static const double sc_startZFCal2 = 5128.3 + sc_zShift; + static const double sc_startZFCal3 = 5602.8 + sc_zShift; + static const double sc_endZFCal3 = sc_startZFCal3 + 442.3; + static const double sc_z1BeforeFCal = 4225.5 + sc_zShift; // 368.95 + 53.6 + static const double sc_z2BeforeFCal = 4557.5 + sc_zShift; // + + // Calculate the mid-point of the step, and the simple geometry variables. + + const G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); + const G4StepPoint* post_step_point = a_step->GetPostStepPoint(); + + const G4ThreeVector startPoint = pre_step_point->GetPosition(); + const G4ThreeVector endPoint = post_step_point->GetPosition(); + const G4ThreeVector p = (startPoint + endPoint) * 0.5; + + const G4double rho = p.perp(); + const G4double eta = fabs( p.pseudoRapidity() ); + G4double phi = p.phi(); + if ( phi < 0. ) phi += 2.*M_PI; // Normalize for phiBin calculation + + const G4double absZ = fabs(p.z()); + + // subdet = +/-4 "+" or " -" according to sign of Z in World coorinate + G4int subdet = ( p.z() > 0.) ? 4 : -4; + G4int type = 1; + G4int phiBin = (int) ( phi * sc_oneOverDphi ); + // to handle rounding error problem + if(phiBin > 63) phiBin = 0; + + // Initialize identifier variables with (invalid) default + // values (INT_MIN is defined in <climits>). + G4int sampling = INT_MIN; + G4int region = INT_MIN; + G4int etaBin = INT_MIN; + + if( eta < 1.4) { + sampling = 2; + region = 5; + etaBin = (int) ( (eta-1.) * sc_oneOverDeta ); + } else if( eta < 1.5 || (rho > rhoOutOfEmecHec() && eta < 1.7) ) { + if (absZ < zEMECRefPoint()) { + sampling = 1; + region = 6; + etaBin = (int) ( (eta-1.3) * sc_oneOverDeta ); + } else { sampling = 2; region = 5; - etaBin = (int) ( (eta-1.) * oneOverDeta ); - } else if( eta < 1.5 || (rho > rhoOutOfEmecHec && eta < 1.7) ) { - if (absZ < zEMECRefPoint) { - sampling = 1; - region = 6; - etaBin = (int) ( (eta-1.3) * oneOverDeta ); - } else { - sampling = 2; - region = 5; - etaBin = (int) ( (eta-1.) * oneOverDeta ); - } - } else if ( eta < 1.8 && absZ < zInFrontOfPresampler ) { // eta >= 1.5 + etaBin = (int) ( (eta-1.) * sc_oneOverDeta ); + } + } else if ( eta < 1.8 && absZ < zInFrontOfPresampler() ) { // eta >= 1.5 + sampling = 1; + region = 5; + etaBin = (int) ( (eta-1.5) * sc_oneOverDeta ); + } else if ( eta < 3.2 && absZ < zInFrontOfSpanishFan() ) { + sampling = 1; + region = 6; + etaBin = (int) ( (eta-1.3) * sc_oneOverDeta ); + } else if ( eta < 3.2 && absZ < zInFrontOfHEC() ) { // eta >= 1.5 + sampling = 2; + region = 3; + etaBin = (int) ( (eta-1.5) * sc_oneOverDeta ); + } else if ( eta >= 2.9 && eta < 5. && absZ < sc_startZFCal1 ) { + if(fabs(p.z()) < sc_z1BeforeFCal) { sampling = 1; + region = 7; + etaBin = (int) ( (eta-3.2) * sc_oneOverDeta ); + } else if (fabs(p.z()) < sc_z2BeforeFCal){ + type = 2; + sampling = 0; region = 5; - etaBin = (int) ( (eta-1.5) * oneOverDeta ); - } else if ( eta < 3.2 && absZ < zInFrontOfSpanishFan ) { + etaBin = (int) ( (eta-3.0) * sc_oneOverDeta ); + } else { + type = 2; sampling = 1; - region = 6; - etaBin = (int) ( (eta-1.3) * oneOverDeta ); - } else if ( eta < 3.2 && absZ < zInFrontOfHEC ) { // eta >= 1.5 + region = 5; + etaBin = (int) ( (eta-3.0) * sc_oneOverDeta ); + } + if(etaBin < 0) etaBin = 0; + } else if ( eta < 1.7 && absZ > zBehindTile() ) { //GU change eta>1.7 to eta<1.7 to agree with documentation for subdet =+-5 + subdet = ( p.z() > 0.) ? 5 : -5; + sampling = 0; + region = 4; + etaBin = (int) ( eta * sc_oneOverDeta ); + // G.P. to treat material between HEC and FCAL + } else if ( eta > 2.9 && eta < 3.3 && absZ > sc_startZFCal1 && absZ < sc_endZFCal3) { + if ( fabs(p.z()) < sc_startZFCal1 ) { + type = 2; + sampling = 1; + region = 5; + etaBin = (int) ( (eta-3.0) * sc_oneOverDeta ); + } else if ( fabs(p.z()) < sc_startZFCal2 ) { + type = 2; + sampling = 1; + region = 4; + etaBin = 0; + } else if ( fabs(p.z()) < sc_startZFCal3 ) { + type = 2; sampling = 2; - region = 3; - etaBin = (int) ( (eta-1.5) * oneOverDeta ); - } else if ( eta >= 2.9 && eta < 5. && absZ < startZFCal1 ) { - if(fabs(p.z()) < z1BeforeFCal) { - sampling = 1; - region = 7; - etaBin = (int) ( (eta-3.2) * oneOverDeta ); - } else if (fabs(p.z()) < z2BeforeFCal){ - type = 2; - sampling = 0; - region = 5; - etaBin = (int) ( (eta-3.0) * oneOverDeta ); - } else { - type = 2; - sampling = 1; - region = 5; - etaBin = (int) ( (eta-3.0) * oneOverDeta ); - } - if(etaBin < 0) etaBin = 0; - } else if ( eta < 1.7 && absZ > zBehindTile ) { //GU change eta>1.7 to eta<1.7 to agree with documentation for subdet =+-5 - subdet = ( p.z() > 0.) ? 5 : -5; - sampling = 0; region = 4; - etaBin = (int) ( eta * oneOverDeta ); - // G.P. to treat material between HEC and FCAL - } else if ( eta > 2.9 && eta < 3.3 && absZ > startZFCal1 && absZ < endZFCal3) { - if ( fabs(p.z()) < startZFCal1 ) { - type = 2; - sampling = 1; - region = 5; - etaBin = (int) ( (eta-3.0) * oneOverDeta ); - } else if ( fabs(p.z()) < startZFCal2 ) { - type = 2; - sampling = 1; - region = 4; - etaBin = 0; - } else if ( fabs(p.z()) < startZFCal3 ) { - type = 2; - sampling = 2; - region = 4; - etaBin = 0; - } else if ( fabs(p.z()) < endZFCal3 ) { // - type = 2; - sampling = 3; - region = 4; - etaBin = 0; - } else{ // leakage behind FCAL+HEC - type = 1; - sampling = 3; - region = 0; - etaBin = (int) ( (eta-1.7) * oneOverDeta ); - } - //GU change for eta above 1.7 for sampling 3 - } else if ( eta < 5. && eta >=1.7 ) { - sampling = 3; - region = 0; - etaBin = (int) ( (eta-1.7) * oneOverDeta ); - } else if ( eta >= 5. && eta < 8.0) { - sampling = 3; - region = 1; - etaBin = (int) ( (eta-5.)* 0.5 * oneOverDeta ); - } else if (eta>8.) { + etaBin = 0; + } else if ( fabs(p.z()) < sc_endZFCal3 ) { // + type = 2; sampling = 3; - region = 2; + region = 4; etaBin = 0; - phiBin = 0; - // g.p. 10/09/2008 crack between two HEC wheels (after broke up the HEC into two wheels in GeoModel by M.Fincke) - } else if ( fabs(p.z()) > endZHEC1Wheel && fabs(p.z()) < startZHEC2Wheel ) { + } else{ // leakage behind FCAL+HEC type = 1; - sampling = 2; - region = 4; - etaBin = (int) ( (eta-1.5) * oneOverDeta ); - } else { - std::cout << "CryostatCalibrationLArCalculator id not found " << eta << " " << absZ << std::endl; - std::cout << "type: " << type << " region:" << region << " sampling: " << sampling << " etaBin: " << etaBin << " phiBin: " << phiBin << std::endl; + sampling = 3; + region = 0; + etaBin = (int) ( (eta-1.7) * sc_oneOverDeta ); } + //GU change for eta above 1.7 for sampling 3 + } else if ( eta < 5. && eta >=1.7 ) { + sampling = 3; + region = 0; + etaBin = (int) ( (eta-1.7) * sc_oneOverDeta ); + } else if ( eta >= 5. && eta < 8.0) { + sampling = 3; + region = 1; + etaBin = (int) ( (eta-5.)* 0.5 * sc_oneOverDeta ); + } else if (eta>8.) { + sampling = 3; + region = 2; + etaBin = 0; + phiBin = 0; + // g.p. 10/09/2008 crack between two HEC wheels (after broke up the HEC into two wheels in GeoModel by M.Fincke) + } else if ( fabs(p.z()) > endZHEC1Wheel() && fabs(p.z()) < startZHEC2Wheel() ) { + type = 1; + sampling = 2; + region = 4; + etaBin = (int) ( (eta-1.5) * sc_oneOverDeta ); + } else { + std::cout << "CryostatCalibrationLArCalculator id not found " << eta << " " << absZ << std::endl; + std::cout << "type: " << type << " region:" << region << " sampling: " << sampling << " etaBin: " << etaBin << " phiBin: " << phiBin << std::endl; + } - // This is a "quick fix" for a complex issue: We're still - // developing code for the cryostat. What if, somehow, we have - // a G4Step in a LAr or Mother volume that isn't handled by the above - // code? Answer: Use the default calibration calculator (the - // same one used for volumes without sensitive detectors) to get - // the identifier. - - if ( type == INT_MIN || - region == INT_MIN || - sampling == INT_MIN || - etaBin == INT_MIN || - phiBin < 0 || etaBin < 0) - { -// g.p. 09/05/2006 + // This is a "quick fix" for a complex issue: We're still + // developing code for the cryostat. What if, somehow, we have + // a G4Step in a LAr or Mother volume that isn't handled by the above + // code? Answer: Use the default calibration calculator (the + // same one used for volumes without sensitive detectors) to get + // the identifier. + + if ( type == INT_MIN || + region == INT_MIN || + sampling == INT_MIN || + etaBin == INT_MIN || + phiBin < 0 || etaBin < 0) + { + // g.p. 09/05/2006 #ifdef DEBUG_DMXYZ - LArG4::CalibrationDefaultCalculator::Print("UNEXP LArG4EC/CryostatCalibrationLArCalculator",m_identifier,a_step,-999.); + LArG4::CalibrationDefaultCalculator::Print("UNEXP LArG4EC/CryostatCalibrationLArCalculator",_identifier,a_step,-999.); #endif #if defined (DEBUG_VOLUMES) || defined (DEBUG_HITS) - static const G4int messageMax = 10; - static G4int messageCount = 0; // exists only if debug activated - if ( messageCount++ < messageMax ) - { - std::cout << "LArG4::EndcapCryostat::CalibrationLArCalculator::Process" - << " (error " << messageCount << " of " << messageMax << " max displayed)" - << std::endl - << " G4Step in LAr at unexpected place: (x,y,z) [mm] = (" - << p.x()/Units::mm << "," - << p.y()/Units::mm << "," - << p.z()/Units::mm - << "); eta=" << eta - << ", phi=" << phi << std::endl - << ", rho=" << sqrt(pow(p.x()/Units::mm,2)+pow(p.y()/Units::mm,2)) - << " using default calculator" - << std::endl; - } + static const G4int messageMax = 10; + static G4int messageCount = 0; // exists only if debug activated + if ( messageCount++ < messageMax ) + { + std::cout << "LArG4::EndcapCryostat::CalibrationLArCalculator::Process" + << " (error " << messageCount << " of " << messageMax << " max displayed)" + << std::endl + << " G4Step in LAr at unexpected place: (x,y,z) [mm] = (" + << p.x()/Units::mm << "," + << p.y()/Units::mm << "," + << p.z()/Units::mm + << "); eta=" << eta + << ", phi=" << phi << std::endl + << ", rho=" << sqrt(pow(p.x()/Units::mm,2)+pow(p.y()/Units::mm,2)) + << " using default calculator" + << std::endl; + } #endif - m_defaultCalculator->Process(a_step, kOnlyID); - m_identifier = m_defaultCalculator->identifier(); - } - else - { - // Append the cell ID to the (empty) identifier. - m_identifier << 10 // Calorimeter - << subdet // LAr +/-4,5 where "+" or " -" according to - // the sign of Z in World coorinate - << type - << sampling - << region - << etaBin - << phiBin; - if (type==1 && sampling==3 && region==0 && etaBin>32) { - std::cout << "Invalid ID S3 r3 CryostatLArCalculator " << eta << " " << etaBin << std::endl; - } - } - } - + //m_defaultCalculator->Process(a_step, kOnlyID); + //_identifier = m_defaultCalculator->identifier(); + std::vector<G4double> _tmpv; + m_defaultCalculator->Process(a_step, _identifier, _tmpv, kOnlyID); + } + else + { + // Append the cell ID to the (empty) identifier. + _identifier << 10 // Calorimeter + << subdet // LAr +/-4,5 where "+" or " -" according to + // the sign of Z in World coorinate + << type + << sampling + << region + << etaBin + << phiBin; + if (type==1 && sampling==3 && region==0 && etaBin>32) { + std::cout << "Invalid ID S3 r3 CryostatLArCalculator " << eta << " " << etaBin << std::endl; + } + } + } + #ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); + G4double energy = accumulate(_energies.begin(),_energies.end(),0.); std::cout << "LArG4::EndcapCryostat::CalibrationLArCalculator::Process" - << " ID=" << std::string(m_identifier) - << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + << " ID=" << std::string(_identifier) + << " energy=" << energy + << " energies=(" << _energies[0] + << "," << _energies[1] + << "," << _energies[2] + << "," << _energies[3] << ")" + << std::endl; #endif -// g.p. 09/05/2006 + // g.p. 09/05/2006 #ifdef DEBUG_DMXYZ - LArG4::CalibrationDefaultCalculator::Print("DMXYZ LArG4EC/CryostatCalibrationLArCalculator",m_identifier,a_step); + LArG4::CalibrationDefaultCalculator::Print("DMXYZ LArG4EC/CryostatCalibrationLArCalculator",_identifier,a_step); #endif // Check for bad result. - if ( m_identifier == LArG4Identifier() ) - return false; + if ( _identifier == LArG4Identifier() ) { + return false; + } return true; } diff --git a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/CryostatCalibrationLArCalculator.h b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationLArCalculator.h similarity index 57% rename from LArCalorimeter/LArG4/LArG4EC/LArG4EC/CryostatCalibrationLArCalculator.h rename to LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationLArCalculator.h index 2af79d906419fc72def65d9d7f32e62d03bb1493..b3ac0ae332fbc2b875932dbe561c5aab5d1a41a0 100644 --- a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/CryostatCalibrationLArCalculator.h +++ b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationLArCalculator.h @@ -6,7 +6,7 @@ // Prepared 19-Aug-2004 Bill Seligman // This class calculates the values needed for calibration hits in the -// simulation. +// simulation. // A "calculator" is used in much the same way as a hand-held // calculator might be. The user supplies a value and hits 'Enter' @@ -21,7 +21,7 @@ #ifndef LArG4_EndcapCryostat_CalibrationLArCalculator_H #define LArG4_EndcapCryostat_CalibrationLArCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "LArG4Code/LArVG4DetectorParameters.h" #include "CaloG4Sim/SimulationEnergies.h" @@ -41,12 +41,13 @@ namespace LArG4 { namespace EndcapCryostat { - class CalibrationLArCalculator : public VCalibrationCalculator { + class CalibrationLArCalculator : public LArCalibCalculatorSvcImp { public: - - CalibrationLArCalculator(); + + CalibrationLArCalculator(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize() override final; virtual ~CalibrationLArCalculator(); - + // The Process method returns a boolean value. If it's true, the // hit can be used by Geant4; if it's false, there's something wrong // with the energy deposit and it should be ignored. @@ -58,22 +59,12 @@ namespace LArG4 { // yet, but you can never tell). Use the enum (defined in // VCalibrationCalculator.h) to control any special processing. - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } + virtual G4bool Process (const G4Step* step, LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing p = kEnergyAndID) const override final; private: - // The values calculated by Process(). - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; - // Energy calculator CaloG4::SimulationEnergies m_energyCalculator; @@ -81,8 +72,24 @@ namespace LArG4 { LArVG4DetectorParameters* m_parameters; // For the default calculator (hopefully temporary). - static VCalibrationCalculator* m_defaultCalculator; - + ServiceHandle<ILArCalibCalculatorSvc> m_defaultCalculator; + + double m_rhoOutOfEmecHec; // used as const after init + double m_zInFrontOfPresampler; // used as const after init + double m_zEMECRefPoint; // used as const after init + double m_zInFrontOfSpanishFan; // used as const after init + double m_zInFrontOfHEC; // used as const after init + double m_zBehindTile; // used as const after init + double m_endZHEC1Wheel; // used as const after init + double m_startZHEC2Wheel; // used as const after init + inline double rhoOutOfEmecHec() const { return m_rhoOutOfEmecHec; }; + inline double zInFrontOfPresampler() const { return m_zInFrontOfPresampler; }; + inline double zEMECRefPoint() const { return m_zEMECRefPoint; }; + inline double zInFrontOfSpanishFan() const { return m_zInFrontOfSpanishFan; }; + inline double zInFrontOfHEC() const { return m_zInFrontOfHEC; }; + inline double zBehindTile() const { return m_zBehindTile; }; + inline double endZHEC1Wheel() const { return m_endZHEC1Wheel; }; + inline double startZHEC2Wheel() const { return m_startZHEC2Wheel; }; }; } // namespace EndcapCryostat diff --git a/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationMixedCalculator.cc b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationMixedCalculator.cc index 8e4ec6e87bc42e0fd2efebb5095d2729fcf33567..62c12be9450d379ffa1d459a4e5126aab7d34291 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationMixedCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationMixedCalculator.cc @@ -11,17 +11,12 @@ // simulation. #undef DEBUG_HITS -#define DEBUG_VOLUMES +#undef DEBUG_VOLUMES #undef DEBUG_DMXYZ -#include "LArG4EC/CryostatCalibrationMixedCalculator.h" -#ifdef DEBUG_DMXYZ -#include "LArG4Code/CalibrationDefaultCalculator.h" -#endif -#include "LArG4EC/CryostatCalibrationLArCalculator.h" +#include "CryostatCalibrationMixedCalculator.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/VCalibrationCalculator.h" // direct access to database #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -47,13 +42,11 @@ namespace LArG4 { namespace EndcapCryostat { - VCalibrationCalculator* CalibrationMixedCalculator::m_backupCalculator = 0; - /////////////////////////////////////////////////////////// // Local class to store detector parameters for calculator /////////////////////////////////////////////////////////// class CalibrationMixedCalculator::Parameters { - public: + public: Parameters(); ~Parameters(); @@ -93,7 +86,7 @@ namespace LArG4 { // Obtain the geometry version information: std::string AtlasVersion = geoModel->atlasVersion(); - std::string LArVersion = geoModel->LAr_VersionOverride(); + std::string LArVersion = geoModel->LAr_VersionOverride(); std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion; std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr"; @@ -132,21 +125,21 @@ namespace LArG4 { m_z1BeforeFCal = m_zEMECRefPoint + m_LArEMECLArThickness; m_z2BeforeFCal = m_endZHec0; -// std::cout << "--- GGG CryostatCalibrationMixedCalculator.cc ---" << std::endl -// << " m_zShift: " << m_zShift << std::endl -// << " m_zEMECRefPoint: " << m_zEMECRefPoint << std::endl -// << " m_LArEMECLArThickness: " << m_LArEMECLArThickness << std::endl -// << " m_startZFCal1: " << m_startZFCal1 << std::endl -// << " m_startZFCal2: " << m_startZFCal2 << std::endl -// << " m_startZFCal3: " << m_startZFCal3 << std::endl -// << " m_hdepthFCal1: " << m_hdepthFCal1 << std::endl -// << " m_hdepthFCal2: " << m_hdepthFCal2 << std::endl -// << " m_hdepthFCal3: " << m_hdepthFCal3 << std::endl -// << " m_endZFCal3: " << m_endZFCal3 << std::endl -// << " m_endZHec0: " << m_endZHec0 << std::endl -// << " m_z1BeforeFCal: " << m_z1BeforeFCal << std::endl -// << " m_z2BeforeFCal: " << m_z2BeforeFCal << std::endl -// << std::endl; + // std::cout << "--- GGG CryostatCalibrationMixedCalculator.cc ---" << std::endl + // << " m_zShift: " << m_zShift << std::endl + // << " m_zEMECRefPoint: " << m_zEMECRefPoint << std::endl + // << " m_LArEMECLArThickness: " << m_LArEMECLArThickness << std::endl + // << " m_startZFCal1: " << m_startZFCal1 << std::endl + // << " m_startZFCal2: " << m_startZFCal2 << std::endl + // << " m_startZFCal3: " << m_startZFCal3 << std::endl + // << " m_hdepthFCal1: " << m_hdepthFCal1 << std::endl + // << " m_hdepthFCal2: " << m_hdepthFCal2 << std::endl + // << " m_hdepthFCal3: " << m_hdepthFCal3 << std::endl + // << " m_endZFCal3: " << m_endZFCal3 << std::endl + // << " m_endZHec0: " << m_endZHec0 << std::endl + // << " m_z1BeforeFCal: " << m_z1BeforeFCal << std::endl + // << " m_z2BeforeFCal: " << m_z2BeforeFCal << std::endl + // << std::endl; pAccessSvc->disconnect(); } @@ -159,33 +152,45 @@ namespace LArG4 { // Methods /////////////////////////////////////////////////////////// - CalibrationMixedCalculator::CalibrationMixedCalculator() : m_par(new Parameters()) + CalibrationMixedCalculator::CalibrationMixedCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_par(nullptr) + , m_backupCalculator("EndcapCryostatCalibrationLArCalculator",name) { + declareProperty("BackupCalculator",m_backupCalculator); + } + + StatusCode CalibrationMixedCalculator::initialize() { // Get a "backup" calculator. - if ( m_backupCalculator == 0) - m_backupCalculator = new CalibrationLArCalculator(); + //if ( m_backupCalculator == 0) + //m_backupCalculator = new CalibrationLArCalculator(); + ATH_CHECK(m_backupCalculator.retrieve()); + m_par = new Parameters(); + return StatusCode::SUCCESS; } - CalibrationMixedCalculator::~CalibrationMixedCalculator() + CalibrationMixedCalculator::~CalibrationMixedCalculator() { // Cleanup pointers. - delete m_backupCalculator; - m_backupCalculator = 0; + //delete m_backupCalculator; + //m_backupCalculator = 0; delete m_par; } // This calculator is intended to apply to the endcap volumes that // have "mixed" identifiers: - G4bool CalibrationMixedCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) + G4bool CalibrationMixedCalculator::Process (const G4Step* a_step, + LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing a_process) const { const static G4String volLArMgr = "LArMgr::"; const static G4String volLArEndcapCryostat = "LAr::Endcap::Cryostat::"; const static G4String volCylinderMixed = "Cylinder::Mixed"; const static G4String volCylinderMixedPresampler = "Cylinder::Mixed::PresamplerMother"; - const static G4String volExtraBeforePS = "ExtraCyl_beforePS"; + const static G4String volExtraBeforePS = "ExtraCyl_beforePS"; const static G4String volSectorMixed = "Sector::Mixed"; const static G4String volEmecHecLArSectorMixed = "EmecHecLAr::Sector::Mixed"; const static G4String volConeMixed = "Cone::Mixed"; @@ -194,351 +199,353 @@ namespace LArG4 { // identifier associated with this G4Step. Note that the // default is to process both the energy and the ID. - m_energies.clear(); + _energies.clear(); if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) { - m_energyCalculator.Energies( a_step, m_energies ); + m_energyCalculator.Energies( a_step, _energies ); } else { - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); + for (unsigned int i=0; i != 4; i++) _energies.push_back( 0. ); } - m_identifier.clear(); + _identifier.clear(); if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. - - // Note: - // LArG4::EndcapCryostat::CryostatCalibrationCalculator uses - // a table-based approach to determine the identifier. The - // following code uses an "if-statement" approach. - - // The fixed parameters (only a couple of which are readily - // accessible from the database): - - static const double oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. - static const double oneOverDphi = 32./M_PI; // 1/Dphi - - // Calculate the mid-point of the step, and the simple geometry variables. - - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - - G4ThreeVector startPoint = pre_step_point->GetPosition(); - G4ThreeVector endPoint = post_step_point->GetPosition(); - G4ThreeVector p = (startPoint + endPoint) * 0.5; - - //G4double rho = p.perp(); - G4double eta = fabs( p.pseudoRapidity() ); - G4double phi = p.phi(); - if ( phi < 0. ) phi += 2.*M_PI; // Normalize for phiBin calculation - - // Initialize identifier variables with (invalid) default - // values (INT_MIN is defined in <climits>). - G4int subdet = INT_MIN; - G4int type = INT_MIN; - G4int sampling = INT_MIN; - G4int region = INT_MIN; - G4int etaBin = INT_MIN; - G4int phiBin = (int) ( phi * oneOverDphi ); - // to handle rounding error problem - if(phiBin > 63) phiBin = 0; - - G4String name = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetName(); - G4int copy = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetCopyNo(); - - // we meet here 3 volume types: - // LArMgr::LAr::Endcap::Cryostat::* - // LAr::Endcap::Cryostat::Cylinder::Mixed::PresamplerMother - // LArMgr::LAr::FCAL::LiquidArgonC - if(name.compare(0, 8, volLArMgr) == 0) name.erase(0,8); - - if ( name.size() == 23 && name == volFcalLiquidArgonC ) { - subdet = ( p.z() > 0.) ? 4 : -4; - type = 1; - if ( eta < 5.0) { - type = 2; - region = 5; - etaBin = (int) ( (eta-3.)* oneOverDeta ); - sampling = 0; - if ( fabs(p.z()) < (m_par->m_startZFCal1+m_par->m_hdepthFCal1) ) { - sampling = 1; - } else if( fabs(p.z()) < (m_par->m_startZFCal2+m_par->m_hdepthFCal2) ) { - sampling = 2; - } else if( fabs(p.z()) < (m_par->m_startZFCal3+m_par->m_hdepthFCal3) ) { - sampling = 3; - } else { - type = 1; - sampling = 3; - region = 0; - etaBin = (int) ( (eta-1.7)* oneOverDeta ); - } - } else if (eta < 8.0) { - sampling = 3; - region = 1; - etaBin = (int) ( (eta-5.)* 0.5 * oneOverDeta ); - } else { - sampling = 3; - region = 2; - etaBin = 0; - phiBin = 0; - } - }else if(name.size() > 23){ - name.erase(0,23); - if ( ( ( copy == 3 || copy == 14 ) && name == volCylinderMixed ) || name == volCylinderMixedPresampler || name==volExtraBeforePS) - { - // case 1 // front walls - // volumeName LArMgr::LAr::Endcap::Cryostat::Cylinder::Mixed, copy number 3, 14 - // volumeName LAr::Endcap::Cryostat::Cylinder::Mixed::PresamplerMother - - // subdet = +/-4 "+" or " -" according to sign of Z in World coorinate + { + // Calculate the identifier. + + // Note: + // LArG4::EndcapCryostat::CryostatCalibrationCalculator uses + // a table-based approach to determine the identifier. The + // following code uses an "if-statement" approach. + + // The fixed parameters (only a couple of which are readily + // accessible from the database): + + static const double oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. + static const double oneOverDphi = 32./M_PI; // 1/Dphi + + // Calculate the mid-point of the step, and the simple geometry variables. + + G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); + G4StepPoint* post_step_point = a_step->GetPostStepPoint(); + + G4ThreeVector startPoint = pre_step_point->GetPosition(); + G4ThreeVector endPoint = post_step_point->GetPosition(); + G4ThreeVector p = (startPoint + endPoint) * 0.5; + + //G4double rho = p.perp(); + G4double eta = fabs( p.pseudoRapidity() ); + G4double phi = p.phi(); + if ( phi < 0. ) phi += 2.*M_PI; // Normalize for phiBin calculation + + // Initialize identifier variables with (invalid) default + // values (INT_MIN is defined in <climits>). + G4int subdet = INT_MIN; + G4int type = INT_MIN; + G4int sampling = INT_MIN; + G4int region = INT_MIN; + G4int etaBin = INT_MIN; + G4int phiBin = (int) ( phi * oneOverDphi ); + // to handle rounding error problem + if(phiBin > 63) phiBin = 0; + + G4String name = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetName(); + G4int copy = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetCopyNo(); + + // we meet here 3 volume types: + // LArMgr::LAr::Endcap::Cryostat::* + // LAr::Endcap::Cryostat::Cylinder::Mixed::PresamplerMother + // LArMgr::LAr::FCAL::LiquidArgonC + if(name.compare(0, 8, volLArMgr) == 0) name.erase(0,8); + + if ( name.size() == 23 && name == volFcalLiquidArgonC ) { subdet = ( p.z() > 0.) ? 4 : -4; type = 1; - if ( eta < 1.4 ) { - sampling = 2; - region = 5; - etaBin = (int) ( (eta-1.) * oneOverDeta ); - }else if ( eta < 1.5 ) { - sampling = 1; - region = 6; - etaBin = (int) ( (eta-1.3) * oneOverDeta ); - } else if ( eta < 1.8 ) { - sampling = 1; + if ( eta < 5.0) { + type = 2; region = 5; - // these walls are behind the scintillator - so it is - // region=5 and not region=4 even for 1.5<eta<1.6 - etaBin = (int) ( (eta-1.5) * oneOverDeta ); - } else if ( eta < 3.2 ) { - sampling = 1; - region = 6; - etaBin = (int) ( (eta-1.3) * oneOverDeta ); - } else if ( eta < 5.0 ) { // we expect that eta < 5.0 - type = 1; - sampling = 1; - region = 7; - etaBin = (int) ( (eta-3.2) * oneOverDeta ); - } else if( eta < 8.0 ) { + etaBin = (int) ( (eta-3.)* oneOverDeta ); + sampling = 0; + if ( fabs(p.z()) < (m_par->m_startZFCal1+m_par->m_hdepthFCal1) ) { + sampling = 1; + } else if( fabs(p.z()) < (m_par->m_startZFCal2+m_par->m_hdepthFCal2) ) { + sampling = 2; + } else if( fabs(p.z()) < (m_par->m_startZFCal3+m_par->m_hdepthFCal3) ) { + sampling = 3; + } else { + type = 1; + sampling = 3; + region = 0; + etaBin = (int) ( (eta-1.7)* oneOverDeta ); + } + } else if (eta < 8.0) { sampling = 3; region = 1; - etaBin = (int) ( (eta-5.0) * 0.5 * oneOverDeta ); + etaBin = (int) ( (eta-5.)* 0.5 * oneOverDeta ); } else { sampling = 3; region = 2; etaBin = 0; phiBin = 0; } - } else if ( ( copy == 9 || copy == 12 || copy == 13 ) && name == volCylinderMixed ) { - // case 2 // back walls near Tile - // volumeName "LArMgr::LAr::Endcap::Cryostat::Cylinder::Mixed" - // copy number 9, 12, 13 + }else if(name.size() > 23){ + name.erase(0,23); + if ( ( ( copy == 3 || copy == 14 ) && name == volCylinderMixed ) || name == volCylinderMixedPresampler || name==volExtraBeforePS) + { + // case 1 // front walls + // volumeName LArMgr::LAr::Endcap::Cryostat::Cylinder::Mixed, copy number 3, 14 + // volumeName LAr::Endcap::Cryostat::Cylinder::Mixed::PresamplerMother + + // subdet = +/-4 "+" or " -" according to sign of Z in World coorinate + subdet = ( p.z() > 0.) ? 4 : -4; + type = 1; + if ( eta < 1.4 ) { + sampling = 2; + region = 5; + etaBin = (int) ( (eta-1.) * oneOverDeta ); + }else if ( eta < 1.5 ) { + sampling = 1; + region = 6; + etaBin = (int) ( (eta-1.3) * oneOverDeta ); + } else if ( eta < 1.8 ) { + sampling = 1; + region = 5; + // these walls are behind the scintillator - so it is + // region=5 and not region=4 even for 1.5<eta<1.6 + etaBin = (int) ( (eta-1.5) * oneOverDeta ); + } else if ( eta < 3.2 ) { + sampling = 1; + region = 6; + etaBin = (int) ( (eta-1.3) * oneOverDeta ); + } else if ( eta < 5.0 ) { // we expect that eta < 5.0 + type = 1; + sampling = 1; + region = 7; + etaBin = (int) ( (eta-3.2) * oneOverDeta ); + } else if( eta < 8.0 ) { + sampling = 3; + region = 1; + etaBin = (int) ( (eta-5.0) * 0.5 * oneOverDeta ); + } else { + sampling = 3; + region = 2; + etaBin = 0; + phiBin = 0; + } + } else if ( ( copy == 9 || copy == 12 || copy == 13 ) && name == volCylinderMixed ) { + // case 2 // back walls near Tile + // volumeName "LArMgr::LAr::Endcap::Cryostat::Cylinder::Mixed" + // copy number 9, 12, 13 - type = 1; - if ( eta < 1.7 ) { - subdet = ( p.z() > 0.) ? 5 : -5; - sampling = 3; - region = 0; - etaBin = (int) ( eta * oneOverDeta ); - } else if ( eta < 5.0 ) { - subdet = ( p.z() > 0.) ? 4 : -4; - sampling = 3; - region = 0; - etaBin = (int) ( (eta-1.7) * oneOverDeta ); - } - } else if ( ( ( copy == 10 || copy == 19 ) && name == volCylinderMixed ) || - ( ( copy == 3 || copy == 4 ) && name == volSectorMixed ) || - ( ( copy == 1 || copy == 2 || copy == 8 || copy == 9 || copy == 10 || copy == 11 || copy == 12 ) && name == volEmecHecLArSectorMixed ) ) { - // case 3 // walls and supports at large rho - // volumeName "LAr::Endcap::Cryostat::Cylinder" - // copy number 10, 19 + type = 1; + if ( eta < 1.7 ) { + subdet = ( p.z() > 0.) ? 5 : -5; + sampling = 3; + region = 0; + etaBin = (int) ( eta * oneOverDeta ); + } else if ( eta < 5.0 ) { + subdet = ( p.z() > 0.) ? 4 : -4; + sampling = 3; + region = 0; + etaBin = (int) ( (eta-1.7) * oneOverDeta ); + } + } else if ( ( ( copy == 10 || copy == 19 ) && name == volCylinderMixed ) || + ( ( copy == 3 || copy == 4 ) && name == volSectorMixed ) || + ( ( copy == 1 || copy == 2 || copy == 8 || copy == 9 || copy == 10 || copy == 11 || copy == 12 ) && name == volEmecHecLArSectorMixed ) ) { + // case 3 // walls and supports at large rho + // volumeName "LAr::Endcap::Cryostat::Cylinder" + // copy number 10, 19 - // volumeName "LAr::Endcap::Cryostat::Sector" - // copy number 3, 4 SectorDBArray: daughters of cryoMotherLogical + // volumeName "LAr::Endcap::Cryostat::Sector" + // copy number 3, 4 SectorDBArray: daughters of cryoMotherLogical - // volumeName "LAr::Endcap::Cryostat::EmecHecLAr::Sector" - // copy number 1-2,8,9-12 + // volumeName "LAr::Endcap::Cryostat::EmecHecLAr::Sector" + // copy number 1-2,8,9-12 - subdet = ( p.z() > 0.) ? 4 : -4; - type = 1; - if ( eta < 1.7 ) { - sampling = 2; - region = 5; - etaBin = (int) ( (eta-1.) * oneOverDeta ); - } else { - sampling = 3; - region = 0; - etaBin = (int) ( (eta-1.7) * oneOverDeta ); - } - }else if ( copy == 27 && name == volCylinderMixed ) { - // case 4 // wall between HEC and FCAL - // volumeName "LAr::Endcap::Cryostat::Cylinder::Mixed" - // copy number 27 - subdet = ( p.z() > 0.) ? 4 : -4; - if ( fabs(p.z()) < m_par->m_startZFCal1 ) { - type = 2; - sampling = 1; - region = 5; - etaBin = (int) ( (eta-3.0) * oneOverDeta ); - } else if ( fabs(p.z()) < m_par->m_startZFCal2 ) { - type = 2; - sampling = 1; - region = 4; - etaBin = 0; - } else if ( fabs(p.z()) < m_par->m_startZFCal3 ) { // - type = 2; - sampling = 2; - region = 4; - etaBin = 0; - } else if ( fabs(p.z()) < m_par->m_endZFCal3 ) { // - type = 2; - sampling = 3; - region = 4; - etaBin = 0; - } else{ // leakage behind FCAL+HEC + subdet = ( p.z() > 0.) ? 4 : -4; type = 1; - sampling = 3; - region = 0; - etaBin = (int) ( (eta-1.7) * oneOverDeta ); - } - } else if ( copy==1 && name == volConeMixed) { - // case 6 // walls close to beam-pipe - // volumeName "LAr::Endcap::Cryostat::Cone::Mixed" - // copy number 6, 7, 16, 29, 33 - subdet = ( p.z() > 0.) ? 4 : -4; - type = 1; - if ( eta < 5.0 ) { - if(fabs(p.z()) < m_par->m_z1BeforeFCal) { - type = 1; - sampling = 1; - region = 7; - etaBin = (int) ( (eta-3.2) * oneOverDeta ); - if(etaBin < 0) etaBin = 0; - } else if (fabs(p.z()) < m_par->m_z2BeforeFCal){ - type = 2; - sampling = 0; + if ( eta < 1.7 ) { + sampling = 2; region = 5; - etaBin = (int) ( (eta-3.0) * oneOverDeta ); + etaBin = (int) ( (eta-1.) * oneOverDeta ); } else { + sampling = 3; + region = 0; + etaBin = (int) ( (eta-1.7) * oneOverDeta ); + } + }else if ( copy == 27 && name == volCylinderMixed ) { + // case 4 // wall between HEC and FCAL + // volumeName "LAr::Endcap::Cryostat::Cylinder::Mixed" + // copy number 27 + subdet = ( p.z() > 0.) ? 4 : -4; + if ( fabs(p.z()) < m_par->m_startZFCal1 ) { type = 2; sampling = 1; region = 5; etaBin = (int) ( (eta-3.0) * oneOverDeta ); - } - if(etaBin < 0) etaBin = 0; // FcalNose can be a litle bit further than 3.2 - } else if ( eta < 8.0 ) { - sampling = 3; - region = 1; - etaBin = (int) ( (eta-5.)* 0.5 * oneOverDeta ); - } else { - sampling = 3; - region = 2; - etaBin = 0; - phiBin = 0; - } - }else if ( ( copy == 6 || copy == 7 || copy == 16 || copy == 33 ) && name == volCylinderMixed ) { - // case 6 // walls close to beam-pipe - // volumeName "LAr::Endcap::Cryostat::Cylinder::Mixed" - // copy number 6, 7, 16, 29, 33 - subdet = ( p.z() > 0.) ? 4 : -4; - type = 1; - if ( eta < 5.0 ) { - if(fabs(p.z()) < m_par->m_z1BeforeFCal) { - type = 1; + } else if ( fabs(p.z()) < m_par->m_startZFCal2 ) { + type = 2; sampling = 1; - region = 7; - etaBin = (int) ( (eta-3.2) * oneOverDeta ); - if(etaBin < 0) etaBin = 0; - } else if (fabs(p.z()) < m_par->m_z2BeforeFCal){ + region = 4; + etaBin = 0; + } else if ( fabs(p.z()) < m_par->m_startZFCal3 ) { // type = 2; - sampling = 0; - region = 5; - etaBin = (int) ( (eta-3.0) * oneOverDeta ); - } else { + sampling = 2; + region = 4; + etaBin = 0; + } else if ( fabs(p.z()) < m_par->m_endZFCal3 ) { // type = 2; - sampling = 1; - region = 5; - etaBin = (int) ( (eta-3.0) * oneOverDeta ); + sampling = 3; + region = 4; + etaBin = 0; + } else{ // leakage behind FCAL+HEC + type = 1; + sampling = 3; + region = 0; + etaBin = (int) ( (eta-1.7) * oneOverDeta ); + } + } else if ( copy==1 && name == volConeMixed) { + // case 6 // walls close to beam-pipe + // volumeName "LAr::Endcap::Cryostat::Cone::Mixed" + // copy number 6, 7, 16, 29, 33 + subdet = ( p.z() > 0.) ? 4 : -4; + type = 1; + if ( eta < 5.0 ) { + if(fabs(p.z()) < m_par->m_z1BeforeFCal) { + type = 1; + sampling = 1; + region = 7; + etaBin = (int) ( (eta-3.2) * oneOverDeta ); + if(etaBin < 0) etaBin = 0; + } else if (fabs(p.z()) < m_par->m_z2BeforeFCal){ + type = 2; + sampling = 0; + region = 5; + etaBin = (int) ( (eta-3.0) * oneOverDeta ); + } else { + type = 2; + sampling = 1; + region = 5; + etaBin = (int) ( (eta-3.0) * oneOverDeta ); + } + if(etaBin < 0) etaBin = 0; // FcalNose can be a litle bit further than 3.2 + } else if ( eta < 8.0 ) { + sampling = 3; + region = 1; + etaBin = (int) ( (eta-5.)* 0.5 * oneOverDeta ); + } else { + sampling = 3; + region = 2; + etaBin = 0; + phiBin = 0; + } + }else if ( ( copy == 6 || copy == 7 || copy == 16 || copy == 33 ) && name == volCylinderMixed ) { + // case 6 // walls close to beam-pipe + // volumeName "LAr::Endcap::Cryostat::Cylinder::Mixed" + // copy number 6, 7, 16, 29, 33 + subdet = ( p.z() > 0.) ? 4 : -4; + type = 1; + if ( eta < 5.0 ) { + if(fabs(p.z()) < m_par->m_z1BeforeFCal) { + type = 1; + sampling = 1; + region = 7; + etaBin = (int) ( (eta-3.2) * oneOverDeta ); + if(etaBin < 0) etaBin = 0; + } else if (fabs(p.z()) < m_par->m_z2BeforeFCal){ + type = 2; + sampling = 0; + region = 5; + etaBin = (int) ( (eta-3.0) * oneOverDeta ); + } else { + type = 2; + sampling = 1; + region = 5; + etaBin = (int) ( (eta-3.0) * oneOverDeta ); + } + } else if ( eta < 8.0 ) { + sampling = 3; + region = 1; + etaBin = (int) ( (eta-5.)* 0.5 * oneOverDeta ); + } else { + sampling = 3; + region = 2; + etaBin = 0; + phiBin = 0; } - } else if ( eta < 8.0 ) { - sampling = 3; - region = 1; - etaBin = (int) ( (eta-5.)* 0.5 * oneOverDeta ); - } else { - sampling = 3; - region = 2; - etaBin = 0; - phiBin = 0; } } - } - - // What if we have a G4Step that isn't handled by the above - // code? Answer: Use a "backup" calculator to try to - // process the step. - if ( type == INT_MIN || - region == INT_MIN || - sampling == INT_MIN || - etaBin == INT_MIN || - phiBin < 0 || etaBin < 0) - { -// g.p. 09/05/2006 + // What if we have a G4Step that isn't handled by the above + // code? Answer: Use a "backup" calculator to try to + // process the step. + + if ( type == INT_MIN || + region == INT_MIN || + sampling == INT_MIN || + etaBin == INT_MIN || + phiBin < 0 || etaBin < 0) + { + // g.p. 09/05/2006 #ifdef DEBUG_DMXYZ - LArG4::CalibrationDefaultCalculator::Print("UNEXP LArG4EC/CryostatCalibrationMixedCalculator",m_identifier,a_step); + LArG4::CalibrationDefaultCalculator::Print("UNEXP LArG4EC/CryostatCalibrationMixedCalculator",_identifier,a_step); #endif #if defined (DEBUG_VOLUMES) || defined (DEBUG_HITS) - static const G4int messageMax = 1000; - static G4int messageCount = 0; - if ( messageCount++ < messageMax ) { - std::cout << "LArG4::EndcapCryostat::CalibrationMixedCalculator::Process" - << " (error " << messageCount << " of " << messageMax << " max displayed)" - << std::endl - << " G4Step in '" - << name - << "' copy=" - << copy - << ", using backup calculator" - << std::endl; - std::cout << " type:" << type - << " region:" << region - << " sampling:" << sampling - << " etaBin:" << etaBin - << " phiBin:" << phiBin - << " xyz:"<<p.x()<<", "<<p.y()<<", "<<p.z() - << " eta:"<< eta - <<std::endl; - } + static const G4int messageMax = 1000; + static G4int messageCount = 0; // exists only if debug activated + if ( messageCount++ < messageMax ) { + std::cout << "LArG4::EndcapCryostat::CalibrationMixedCalculator::Process" + << " (error " << messageCount << " of " << messageMax << " max displayed)" + << std::endl + << " G4Step in '" + << name + << "' copy=" + << copy + << ", using backup calculator" + << std::endl; + std::cout << " type:" << type + << " region:" << region + << " sampling:" << sampling + << " etaBin:" << etaBin + << " phiBin:" << phiBin + << " xyz:"<<p.x()<<", "<<p.y()<<", "<<p.z() + << " eta:"<< eta + <<std::endl; + } #endif - m_backupCalculator->Process(a_step, kOnlyID); - m_identifier = m_backupCalculator->identifier(); - } else { - // Append the cell ID to the (empty) identifier. - m_identifier << 10 // Calorimeter - << subdet // LAr +/-4 where "+" or " -" according to the sign of Z in World coorinate - << type - << sampling - << region - << etaBin - << phiBin; - } - } // if a_process == kEnergyAndID || a_process == kOnlyID + //m_backupCalculator->Process(a_step, kOnlyID); + //_identifier = m_backupCalculator->identifier(); + std::vector<G4double> _tmpv; + m_backupCalculator->Process(a_step, _identifier, _tmpv, kOnlyID); + } else { + // Append the cell ID to the (empty) identifier. + _identifier << 10 // Calorimeter + << subdet // LAr +/-4 where "+" or " -" according to the sign of Z in World coorinate + << type + << sampling + << region + << etaBin + << phiBin; + } + } // if a_process == kEnergyAndID || a_process == kOnlyID #ifdef DEBUG_HITS -// G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); + // G4double energy = accumulate(_energies.begin(),_energies.end(),0.); std::cout << "LArG4::EndcapCryostat::CalibrationMixedCalculator::Process" - << " ID=" << std::string(m_identifier) -// << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + << " ID=" << std::string(_identifier) + // << " energy=" << energy + << " energies=(" << _energies[0] + << "," << _energies[1] + << "," << _energies[2] + << "," << _energies[3] << ")" + << std::endl; #endif -// g.p. 09/05/2006 + // g.p. 09/05/2006 #ifdef DEBUG_DMXYZ - LArG4::CalibrationDefaultCalculator::Print("DMXYZ LArG4EC/CryostatCalibrationMixedCalculator",m_identifier,a_step); + LArG4::CalibrationDefaultCalculator::Print("DMXYZ LArG4EC/CryostatCalibrationMixedCalculator",_identifier,a_step); #endif // Check for bad result. - if ( m_identifier == LArG4Identifier() ) return false; + if ( _identifier == LArG4Identifier() ) return false; return true; } diff --git a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/CryostatCalibrationMixedCalculator.h b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationMixedCalculator.h similarity index 73% rename from LArCalorimeter/LArG4/LArG4EC/LArG4EC/CryostatCalibrationMixedCalculator.h rename to LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationMixedCalculator.h index ed243e00a2448417898ed13fa7ef1646191d6118..fc3854b0955d7e6dea3fa767816c6d109e10c761 100644 --- a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/CryostatCalibrationMixedCalculator.h +++ b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationMixedCalculator.h @@ -6,7 +6,7 @@ // Prepared 13-Aug-2004 Bill Seligman // This class calculates the values needed for calibration hits in the -// simulation. +// simulation. // A "calculator" is used in much the same way as a hand-held // calculator might be. The user supplies a value and hits 'Enter' @@ -21,7 +21,7 @@ #ifndef LArG4_EndcapCryostat_CalibrationMixedCalculator_H #define LArG4_EndcapCryostat_CalibrationMixedCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" #include "globals.hh" @@ -39,12 +39,13 @@ namespace LArG4 { namespace EndcapCryostat { - class CalibrationMixedCalculator : public VCalibrationCalculator { + class CalibrationMixedCalculator : public LArCalibCalculatorSvcImp { public: - - CalibrationMixedCalculator(); + + CalibrationMixedCalculator(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize() override final; virtual ~CalibrationMixedCalculator(); - + // The Process method returns a boolean value. If it's true, the // hit can be used by Geant4; if it's false, there's something wrong // with the energy deposit and it should be ignored. @@ -56,22 +57,12 @@ namespace LArG4 { // yet, but you can never tell). Use the enum (defined in // VCalibrationCalculator.h) to control any special processing. - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } + virtual G4bool Process (const G4Step* step, LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing p = kEnergyAndID) const override final; private: - // The values calculated by Process(). - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; - // Energy calculator CaloG4::SimulationEnergies m_energyCalculator; @@ -79,7 +70,7 @@ namespace LArG4 { Parameters *m_par; // Define a "backup" calculator. - static VCalibrationCalculator* m_backupCalculator; + ServiceHandle<ILArCalibCalculatorSvc> m_backupCalculator; CalibrationMixedCalculator (const CalibrationMixedCalculator&); CalibrationMixedCalculator& operator= (const CalibrationMixedCalculator&); diff --git a/LArCalorimeter/LArG4/LArG4EC/src/EMECSupportCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4EC/src/EMECSupportCalibrationCalculator.cc index 55da46553203f05e0eb5d804f77134daf92d82b2..2c45b11feff3a84205b42d28b0bdfc3e6547e6d5 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/EMECSupportCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4EC/src/EMECSupportCalibrationCalculator.cc @@ -11,17 +11,12 @@ // simulation. #undef DEBUG_HITS -#define DEBUG_VOLUMES +#undef DEBUG_VOLUMES #undef DEBUG_DMXYZ -#include "LArG4EC/EMECSupportCalibrationCalculator.h" -#ifdef DEBUG_DMXYZ -#include "LArG4Code/CalibrationDefaultCalculator.h" -#endif -#include "LArG4EC/CryostatCalibrationLArCalculator.h" +#include "EMECSupportCalibrationCalculator.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/VCalibrationCalculator.h" // direct access to database #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -50,8 +45,6 @@ namespace Units = Athena::Units; namespace LArG4 { - VCalibrationCalculator* EMECSupportCalibrationCalculator::m_backupCalculator = 0; - /////////////////////////////////////////////////////////// // Local class to store detector parameters for calculator /////////////////////////////////////////////////////////// @@ -173,39 +166,48 @@ namespace LArG4 { // Methods /////////////////////////////////////////////////////////// - EMECSupportCalibrationCalculator::EMECSupportCalibrationCalculator() : m_par(new Parameters()), - m_parameters(0) + EMECSupportCalibrationCalculator::EMECSupportCalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_par(nullptr) + , m_backupCalculator("EndcapCryostatCalibrationLArCalculator",name) { - // Get a "backup" calculator. - if ( m_backupCalculator == 0) - m_backupCalculator = new EndcapCryostat::CalibrationLArCalculator(); + declareProperty("BackupCalculator",m_backupCalculator); + } + + StatusCode EMECSupportCalibrationCalculator::initialize() { + ATH_CHECK(m_backupCalculator.retrieve()); + m_par = new Parameters(); + return StatusCode::SUCCESS; } EMECSupportCalibrationCalculator::~EMECSupportCalibrationCalculator() { // Cleanup pointers. - delete m_backupCalculator; - m_backupCalculator = 0; + //delete m_backupCalculator; + //m_backupCalculator = 0; delete m_par; } - G4bool EMECSupportCalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) + G4bool EMECSupportCalibrationCalculator::Process (const G4Step* a_step, + LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing a_process) const { // Use the calculators to determine the energies and the // identifier associated with this G4Step. Note that the // default is to process both the energy and the ID. - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) { - m_energyCalculator.Energies( a_step, m_energies ); + _energies.reserve(4); + _energies.clear(); + if ( a_process == LArG4::kEnergyAndID || a_process == LArG4::kOnlyEnergy ) { + m_energyCalculator.Energies( a_step, _energies ); } else { - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); + for (unsigned int i=0; i != 4; i++) _energies.push_back( 0. ); } - m_identifier.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyID ) + _identifier.clear(); + if ( a_process == LArG4::kEnergyAndID || a_process == LArG4::kOnlyID ) { static const double oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. static const double oneOverDphi = 32./M_PI; // 1/Dphi @@ -238,7 +240,10 @@ namespace LArG4 { if(name.index("LArMgr::") == 0) name.erase(0,8); +#if defined (DEBUG_VOLUMES) || defined (DEBUG_HITS) + // The 'copy' variable is used only inside defines G4int copy = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetCopyNo(); +#endif #ifdef DEBUG_HITS std::cout << "LArG4::EMECSupportCalibrationCalculator::Process" << " G4Step in '" << name @@ -454,7 +459,7 @@ namespace LArG4 { { // g.p. 09/05/2006 #ifdef DEBUG_DMXYZ - LArG4::CalibrationDefaultCalculator::Print("UNEXP LArG4EC/EMECSupportCalibrationCalculator",m_identifier,a_step); + LArG4::CalibrationDefaultCalculator::Print("UNEXP LArG4EC/EMECSupportCalibrationCalculator",_identifier,a_step); #endif #if defined (DEBUG_VOLUMES) || defined (DEBUG_HITS) static const G4int messageMax = 1000; @@ -477,11 +482,13 @@ namespace LArG4 { << std::endl; } #endif - m_backupCalculator->Process(a_step, kOnlyID); - m_identifier = m_backupCalculator->identifier(); + //m_backupCalculator->Process(a_step, kOnlyID); + //_identifier = m_backupCalculator->identifier(); + std::vector<G4double> _tmpv; + m_backupCalculator->Process(a_step, _identifier, _tmpv, kOnlyID); } else { // Append the cell ID to the (empty) identifier. - m_identifier << 10 // Calorimeter + _identifier << 10 // Calorimeter << subdet // LAr +/-4 where "+" or " -" according to the sign of Z in World coorinate << type << sampling @@ -489,26 +496,26 @@ namespace LArG4 { << etaBin << phiBin; } - } + } // end of if ( a_process == kEnergyAndID || a_process == kOnlyID ) #ifdef DEBUG_HITS -// G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); +// G4double energy = accumulate(_energies.begin(),_energies.end(),0.); std::cout << "LArG4::EMECSupportCalibrationCalculator::Process" - << " ID=" << std::string(m_identifier) + << " ID=" << std::string(_identifier) // << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" + << " energies=(" << _energies[0] + << "," << _energies[1] + << "," << _energies[2] + << "," << _energies[3] << ")" << std::endl; #endif // g.p. 09/05/2006 #ifdef DEBUG_DMXYZ - LArG4::CalibrationDefaultCalculator::Print("DMXYZ LArG4EC/EMECSupportCalibrationCalculator",m_identifier,a_step); + LArG4::CalibrationDefaultCalculator::Print("DMXYZ LArG4EC/EMECSupportCalibrationCalculator",_identifier,a_step); #endif // Check for bad result. - if ( m_identifier == LArG4Identifier() ) return false; + if ( _identifier == LArG4Identifier() ) return false; return true; } diff --git a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/EMECSupportCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4EC/src/EMECSupportCalibrationCalculator.h similarity index 69% rename from LArCalorimeter/LArG4/LArG4EC/LArG4EC/EMECSupportCalibrationCalculator.h rename to LArCalorimeter/LArG4/LArG4EC/src/EMECSupportCalibrationCalculator.h index 7bd82d916875c6821fc75802053df8ba7afecd2e..211e39f9f87be8aacf1c0633b9b3a609ad96f519 100644 --- a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/EMECSupportCalibrationCalculator.h +++ b/LArCalorimeter/LArG4/LArG4EC/src/EMECSupportCalibrationCalculator.h @@ -16,10 +16,10 @@ #ifndef LArG4_EMECSupport_CalibrationCalculator_H #define LArG4_EMECSupport_CalibrationCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "LArGeoCode/VDetectorParameters.h" -#include "LArG4EC/CryostatCalibrationLArCalculator.h" +#include "CryostatCalibrationLArCalculator.h" #include "CaloG4Sim/SimulationEnergies.h" #include "globals.hh" @@ -35,10 +35,11 @@ namespace LArG4 { // namespace EMECSupport { - class EMECSupportCalibrationCalculator : public VCalibrationCalculator { + class EMECSupportCalibrationCalculator : public LArCalibCalculatorSvcImp { public: - EMECSupportCalibrationCalculator(); + EMECSupportCalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize() override final; virtual ~EMECSupportCalibrationCalculator(); // The Process method returns a boolean value. If it's true, the @@ -52,33 +53,23 @@ namespace LArG4 { // yet, but you can never tell). Use the enum (defined in // VCalibrationCalculator.h) to control any special processing. - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } + virtual G4bool Process (const G4Step* step, LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing p = kEnergyAndID) const override final; private: - // The values calculated by Process(). - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; - // Energy calculator CaloG4::SimulationEnergies m_energyCalculator; class Parameters; - Parameters *m_par; + const Parameters *m_par; // Access to parameters. - LArGeo::VDetectorParameters* m_parameters; + //LArGeo::VDetectorParameters* m_parameters; // Define a "backup" calculator. - static VCalibrationCalculator* m_backupCalculator; + ServiceHandle<ILArCalibCalculatorSvc> m_backupCalculator; EMECSupportCalibrationCalculator (const EMECSupportCalibrationCalculator&); EMECSupportCalibrationCalculator& operator= (const EMECSupportCalibrationCalculator&); diff --git a/LArCalorimeter/LArG4/LArG4EC/src/EnergyCalculator.cc b/LArCalorimeter/LArG4/LArG4EC/src/EnergyCalculator.cc index dccf6d4028eec7a259b1a936f50f0328bf2d8111..00644ef09233ccc7819c51da38c7afb6dc0d370c 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/EnergyCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4EC/src/EnergyCalculator.cc @@ -59,9 +59,7 @@ #include "globals.hh" #include "LArG4Code/LArG4BirksLaw.h" -#include "LArG4Code/VCalibrationCalculator.h" -#include "LArG4RunControl/LArG4EMECOptions.h" -#include "LArG4RunControl/LArG4GlobalOptions.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" #include "LArHV/LArHVManager.h" #include "LArHV/EMECHVManager.h" @@ -71,8 +69,8 @@ #include "LArHV/EMECHVElectrodeConstLink.h" #include "LArHV/EMECHVDescriptor.h" -#include "LArG4EC/EMECSupportCalibrationCalculator.h" -#include "LArG4EC/EnergyCalculator.h" +//#include "EMECSupportCalibrationCalculator.h" +#include "EnergyCalculator.h" #include "AthenaKernel/Units.h" #define MSG_VECTOR(v) "(" << v.x() << ", " << v.y() << ", " << v.z() << ")" @@ -86,30 +84,31 @@ EnergyCalculator::Wheel_Efield_Map EnergyCalculator::s_ChCollOuter; const G4double EnergyCalculator::s_GridSize =0.1; //[mm] const G4double EnergyCalculator::s_AverageGap = 1.3*CLHEP::mm; - G4bool EnergyCalculator::s_FieldMapsRead =false; - G4String EnergyCalculator::s_FieldMapVersion = ""; +G4bool EnergyCalculator::s_FieldMapsRead =false; +G4String EnergyCalculator::s_FieldMapVersion = ""; // **************************************************************************** const G4String EnergyCalculator::s_HVEMECMapFileName="/afs/cern.ch/atlas/offline/data/lar/emec/efield/HVEMECMap.dat"; - G4bool EnergyCalculator::s_HVMapRead=false; - G4String EnergyCalculator::s_HVMapVersion="unknown"; +G4bool EnergyCalculator::s_HVMapRead=false; const G4double EnergyCalculator::s_HV_Etalim[s_NofEtaSection+1]= - {1.375,1.5,1.6,1.8,2.,2.1,2.3,2.5,2.8,3.2}; + {1.375,1.5,1.6,1.8,2.,2.1,2.3,2.5,2.8,3.2}; const G4double EnergyCalculator::s_LArTemperature_ECC0=88.15; //K const G4double EnergyCalculator::s_LArTemperature_ECC1=88.37; const G4double EnergyCalculator::s_LArTemperature_ECC5=87.97; const G4double EnergyCalculator::s_LArTemperature_av =88.16; - G4int EnergyCalculator::s_HV_Start_phi[s_NofAtlasSide][s_NofEtaSection][s_NofElectrodeSide]; - G4double EnergyCalculator::s_HV_Values[s_NofAtlasSide][s_NofEtaSection][s_NofElectrodeSide][s_NofElectrodesOut]; +G4int EnergyCalculator::s_HV_Start_phi[s_NofAtlasSide][s_NofEtaSection][s_NofElectrodeSide]; +G4double EnergyCalculator::s_HV_Values[s_NofAtlasSide][s_NofEtaSection][s_NofElectrodeSide][s_NofElectrodesOut]; const G4double EnergyCalculator::s_AverageHV=1250.;//[V] const G4double EnergyCalculator::s_AverageEfield=0.01*s_AverageHV/s_AverageGap;//[kv/cm] const G4double EnergyCalculator::s_AverageCurrent=1./s_AverageGap*IonReco(s_AverageEfield) - *DriftVelo(s_LArTemperature_av,s_AverageEfield); + *DriftVelo(s_LArTemperature_av,s_AverageEfield); // **************************************************************************** - G4double EnergyCalculator::s_CHC_Esr =0.2*CLHEP::mm; //[mm] - G4int EnergyCalculator::s_CHCIprint=0; - G4double EnergyCalculator::s_CHCEbad =0.; - G4double EnergyCalculator::s_CHCEtotal=0.; - G4double EnergyCalculator::s_CHCStotal=0.; +// G4double EnergyCalculator::s_CHC_Esr =0.2*CLHEP::mm; //[mm] +#ifdef DEBUG_CHCL +G4int EnergyCalculator::s_CHCIprint=0; +G4double EnergyCalculator::s_CHCEbad =0.; +G4double EnergyCalculator::s_CHCEtotal=0.; +G4double EnergyCalculator::s_CHCStotal=0.; +#endif // **************************************************************************** const G4double EnergyCalculator::s_ColdCorrection = 1.0036256; @@ -120,40 +119,35 @@ const G4double EnergyCalculator::s_EdgeWidth = 1.*CLHEP::mm; const G4double EnergyCalculator::s_DistOfEndofCuFromBack = 22.77*CLHEP::mm/s_ColdCorrection; const G4double EnergyCalculator::s_DistOfStartofCuFromBack= 31.*CLHEP::mm; // frontface of the barrette const G4double EnergyCalculator::s_ZmaxOfSignal = s_DistOfStartofCuFromBack - - s_DistOfEndofCuFromBack + s_EdgeWidth; + - s_DistOfEndofCuFromBack + s_EdgeWidth; G4double EnergyCalculator::s_RefzDist = 0.; G4bool EnergyCalculator::s_SetConstOuterBarrett = false; G4bool EnergyCalculator::s_SetConstInnerBarrett = false; const G4double EnergyCalculator::s_S3_Etalim[21]={ - 1.50, 1.55, 1.60, 1.65, 1.70, 1.75, 1.80, 1.85, 1.90, 1.95, - 2.00, 2.05, 2.10, 2.15, 2.20, 2.25, 2.30, 2.35, 2.40, 2.45, 2.5 + 1.50, 1.55, 1.60, 1.65, 1.70, 1.75, 1.80, 1.85, 1.90, 1.95, + 2.00, 2.05, 2.10, 2.15, 2.20, 2.25, 2.30, 2.35, 2.40, 2.45, 2.5 }; const G4double EnergyCalculator::s_Rmeas_outer[50]={ 11.59, 25.22, 57.28, 71.30, 85.90, 98.94, 103.09, 116.68, 130.42, 146.27, - 147.19, 11.59, 15., 56.91, 44.37, 15.13, 14.93, 45.87, 35.03, 15.40, + 147.19, 11.59, 15., 56.91, 44.37, 15.13, 14.93, 45.87, 35.03, 15.40, 14.04, 39.67, 26.83, 15.64, 14.90, 30.26, 14.70, 29.09, 43.12, 34.51, 25.08, 11.88, 14.39, 19.54, 17.80, 12.70, 15.31, 13.96, 11.79, -99., 23.57, 34.64, 55.32, 65.39, 76.34, 10.83, 94.84, 98.00, -99., -99. }; const G4double EnergyCalculator::s_Zmeas_outer[2]={3.81, 7.81}; - G4double EnergyCalculator::s_S3_Rlim[21]; - G4double EnergyCalculator::s_rlim[50]; - G4double EnergyCalculator::s_zlim[4]; - G4int EnergyCalculator::s_ModuleNumber; - G4int EnergyCalculator::s_PhiDivNumber; - G4double EnergyCalculator::s_PhiStartOfPhiDiv; - -LArG4::VCalibrationCalculator* EnergyCalculator::m_supportCalculator=0; +G4double EnergyCalculator::s_S3_Rlim[21]; +G4double EnergyCalculator::s_rlim[50]; +G4double EnergyCalculator::s_zlim[4]; // **************************************************************************** static const G4String - ECorr_t_option = "type", - CHC_Map_option = "chcmap", - CHC_Esr_option = "chcesr", - GApower_option = "gapower"; +ECorr_t_option = "type", + CHC_Map_option = "chcmap", + CHC_Esr_option = "chcesr", + GApower_option = "gapower"; static G4double zsep12[44]; // used as const after initialization static G4double ziw[7]; // used as const after initialization @@ -164,544 +158,549 @@ static G4double zsep23[22]; // used as const after initialization s tatic G4String extract_option(G4String &options, G4String option) // Depracated? DM, 29 Jul 2015 // **************************************************************************** { - size_t l = options.length(); - size_t p1 = options.find(option); - if(p1 < l){ - size_t p2 = options.find("=", p1); - p2 ++; - if(p2 < l){ - size_t p3 = options.find(" ", p2); - if(p3 > l) p3 = l; - return options.substr(p2, p3 - p2); - } - } - return ""; + size_t l = options.length(); + size_t p1 = options.find(option); + if(p1 < l){ + size_t p2 = options.find("=", p1); + p2 ++; + if(p2 < l){ + size_t p3 = options.find(" ", p2); + if(p3 > l) p3 = l; + return options.substr(p2, p3 - p2); + } + } + return ""; } #endif // **************************************************************************** static inline G4double DistanceToEtaLine(const G4ThreeVector &p, G4double eta) { - G4double sinTheta = 2. * exp(-eta) / (1. + exp(2. * -eta)); - G4double cosTheta = (1. - exp(2. * -eta)) / (1. + exp(2. * -eta)); - return p.perp() * cosTheta - p.z() * sinTheta; + G4double sinTheta = 2. * exp(-eta) / (1. + exp(2. * -eta)); + G4double cosTheta = (1. - exp(2. * -eta)) / (1. + exp(2. * -eta)); + return p.perp() * cosTheta - p.z() * sinTheta; } -// **************************************************************************** -//void EnergyCalculator::vector_to_msg(G4ThreeVector &v) const -// **************************************************************************** -//{ -// (*m_msg) << "(" << v.x() << ", " << v.y() << ", " << v.z() << ")"; -//} +template<typename T, typename R, typename ...Args, typename ReturnType = R (T::*)(Args...)> +ReturnType remove_const(R (T::*Func)(Args...) const) { + return reinterpret_cast<ReturnType>(Func); +} // **************************************************************************** -G4bool EnergyCalculator::Process(const G4Step* step, std::vector<LArHitData>& hdata){ -// **************************************************************************** +G4bool EnergyCalculator::Process(const G4Step* step, std::vector<LArHitData>& hdata) const { + // **************************************************************************** // make sure hdata is reset - hdata.resize(1); + hdata.resize(1); return (this->*m_Process_type)(step, hdata); } // **************************************************************************** +StatusCode EnergyCalculator::finalize() { + if(m_birksLaw) { + delete m_birksLaw; + m_birksLaw = nullptr; + } + delete m_lwc; + m_lwc = nullptr; + return StatusCode::SUCCESS; +} + // **************************************************************************** -G4bool EnergyCalculator::FindIdentifier( - const G4Step* step, - std::vector<LArHitData>& hdata, - G4ThreeVector &startPointLocal, - G4ThreeVector &endPointLocal - ){ +G4bool EnergyCalculator::Process_Default(const G4Step* step, std::vector<LArHitData>& hdata) const // **************************************************************************** +{ + G4ThreeVector startPointinLocal, endPointinLocal; + if(!FindIdentifier_Default(step, hdata, startPointinLocal, endPointinLocal)){ + return false; + } + + G4double E = step->GetTotalEnergyDeposit(); + if (m_birksLaw) { + const G4ThreeVector midpoint = (startPointinLocal + endPointinLocal) * 0.5; + const G4double wholeStepLengthCm = step->GetStepLength() / CLHEP::cm; + const G4double gap = (this->*m_GetGapSize_type)(midpoint); // const method + const G4double efield = 0.01 * (this->*m_GetHV_Value_type)(midpoint, 0.123456) / gap; // estimate Efield[KV/cm] + // 0.123456 is arbitrary number. This value is not used for this type of process + E = (*m_birksLaw)(E, wholeStepLengthCm, efield); + } - return (this->*m_FindIdentifier_type) (step,hdata,startPointLocal,endPointLocal); + hdata[0].energy = (this->*m_ecorr_method)(E, startPointinLocal, endPointinLocal, 0.654321); + // 0.654321 is arbitrary number. This value is not used for this type of process. + return true; } -// **************************************************************************** -EnergyCalculator::~EnergyCalculator() { - if(m_birksLaw) { - delete m_birksLaw; - m_birksLaw = 0; +G4double EnergyCalculator::getPhiStartOfPhiDiv(const G4Step* step) const { + // --- moved from FindIdentifier_Barrett --- // + // get Module and Phidiv number (result is put into VolumeNumber and PhiDivNumber) + G4int ModuleNumber = -999; + G4int PhiDivNumber = -999; + + G4bool validhit = GetVolumeIndex(step, ModuleNumber, PhiDivNumber); + if (!validhit) { + ATH_MSG_FATAL(" ERROR ::Process_Barrett::Module, Phidiv is not found" + <<" ModuleNumber= "<<ModuleNumber<<" PhiDivNumber= "<<PhiDivNumber); } - delete m_lwc; - m_lwc = 0; + + if(lwc()->type() == LArG4::OuterAbsorberWheel){ // for wheel calculation + //PhiStartOfPhiDiv = + return lwc()->GetFanStepOnPhi()/2. + ModuleNumber * CLHEP::twopi/8. + + PhiDivNumber * lwc()->GetFanStepOnPhi(); + //phi_inb = PhiStartOfPhiDiv + pinLocal.phi(); //in ::BackOuterBarrettes + //if(phi_inb < 0.) phi_inb = phi_inb + CLHEP::twopi; + //if(phi_inb > CLHEP::twopi) phi_inb = phi_inb - CLHEP::twopi; + //phi_inb = CLHEP::twopi - phi_inb; // phi in ::EmecMother system; + } + + if(lwc()->type() == LArG4::OuterAbsorberModule){ // for TB modul calculation + + // M_PI_2 - M_PI/8. is from EMECSupportConstruction + // PhiStartOfPhiDiv = + return M_PI_2 - M_PI/8. + lwc()->GetFanStepOnPhi()/2 + PhiDivNumber * lwc()->GetFanStepOnPhi(); + + //phi_inb = PhiStartOfPhiDiv + pinLocal.phi(); //in BackOuterBarrettes; + //phi_inb = M_PI - phi_inb; // phi in ::EmecMother system; + } + // --- moved from FindIdentifier_Barrett --- // + ATH_MSG_ERROR(" ERROR ::Process_Barrett::getPhiStartOfPhiDiv, LArWheelType is unknown ("<<lwc()->type()<<"), PhiStartOfPhiDiv is set zero!" + <<" ModuleNumber= "<<ModuleNumber<<" PhiDivNumber= "<<PhiDivNumber); + return 0.0; } // **************************************************************************** -G4bool EnergyCalculator::Process_Default(const G4Step* step, std::vector<LArHitData>& hdata) +G4bool EnergyCalculator::Process_Barrett(const G4Step* step, std::vector<LArHitData>& hdata) const{ + // **************************************************************************** + const G4double PhiStartOfPhiDiv = getPhiStartOfPhiDiv(step); + G4ThreeVector startPointinLocal, endPointinLocal; + if(!FindIdentifier_Barrett(step, PhiStartOfPhiDiv, hdata, startPointinLocal, endPointinLocal)){ + //cell id is not found + if(!lwc()->GetisBarretteCalib()) return false; // ==> normal calculator return false + else{ // if Calibration Calculator for Barrett: + // compute DM identifier; + // In calibration calculator mode this process is used as "geometry calculator". + // We have to be prepared to return + // either the emec cell id or , if the hit does not belong to any cell, + // the DeadMatter (DM) id. + // DM identifier for Barrett is defined + // by the EmecSupportCalibrationCalculator.( In general it is + // activated by the atlas_calo.py) + const G4bool status=FindDMIdentifier_Barrett(step, hdata); + if(!status) + ATH_MSG_WARNING(" WARNING!!EnergyCalculator::Process_Barrett:" + << " DM identifier not found????"); + return status; + } // end of calibr. calculator + } // end if cell id not found + // compute signal in 'normal' calculator mode, if cellid is found + G4double E = step->GetTotalEnergyDeposit(); + if (m_birksLaw){ + const G4ThreeVector midpoint = (startPointinLocal + endPointinLocal) * 0.5; + const G4double wholeStepLengthCm = step->GetStepLength() / CLHEP::cm; + const G4double gap = (this->*m_GetGapSize_type)(midpoint); // const method + const G4double efield = 0.01 * (this->*m_GetHV_Value_type)(midpoint, PhiStartOfPhiDiv) / gap; // estimate Efield[KV/cm] + E = (*m_birksLaw)(E, wholeStepLengthCm, efield); + } + + hdata[0].energy = (this->*m_ecorr_method)(E, startPointinLocal, endPointinLocal, PhiStartOfPhiDiv); + return true; +} // **************************************************************************** +EnergyCalculator::EnergyCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalculatorSvcImp(name, pSvcLocator) + , m_supportCalculator("EMECSupportCalibrationCalculator",name) + , m_corrProp(8) + , m_correction_type(EMEC_ECOR_CHCL1) + // PhiGapNumber(0), + // PhiHalfGapNumber(0), + // HalfWaveNumber(0), + // SignofZinHalfWave(0), + // SignofSlopeofHalfWave(0), + // SinPhiGap(0), + // CosPhiGap(0), + // ZinHalfWave(0), + // HalfEleThickness(0), + // ChCollWheelType(0), + // ChCollFoldType(0), + // PointFoldMapArea(0), + // calculatorPhiGap(0), + // chcollPhiGap(0), + , m_solidtypeProp(0) + , m_solidtype(LArG4::InnerAbsorberWheel) + , m_zside(1) + , m_birksLaw(nullptr) + , m_lwc(nullptr) + // **************************************************************************** { - G4ThreeVector startPointinLocal, endPointinLocal; - if(!FindIdentifier_Default(step, hdata, startPointinLocal, endPointinLocal)){ - return false; - } - - G4double E = step->GetTotalEnergyDeposit(); - if (m_birksLaw) { - const G4ThreeVector midpoint = (startPointinLocal + endPointinLocal) * 0.5; - const G4double wholeStepLengthCm = step->GetStepLength() / CLHEP::cm; - const G4double gap = (this->*m_GetGapSize_type)(midpoint); - const G4double efield = 0.01 * (this->*m_GetHV_Value_type)(midpoint) / gap; // estimate Efield[KV/cm] - E = (*m_birksLaw)(E, wholeStepLengthCm,efield); - } - - hdata[0].energy = (this->*m_ecorr_method)(E, startPointinLocal, endPointinLocal); - return true; + ATH_MSG_DEBUG("constructor started"); + + declareProperty("EMECHVEnable",m_DB_HV=false); + // get power of gap in signal calculation + declareProperty("EMECGapPower",m_GApower=1.4); + // pick up surface_suppression_range + declareProperty("EMECEsr",m_CHC_Esr=0.2*CLHEP::mm); + declareProperty("EMECHVMap",m_HVMapVersion="v02"); + declareProperty("EMECChMap", m_suffix="v03"); + + declareProperty("SupportCalculator",m_supportCalculator); + declareProperty("WheelType",m_solidtypeProp); + m_solidtypeProp.declareUpdateHandler(&EnergyCalculator::SolidTypeHandler, this); + declareProperty("EnergyCorrection",m_corrProp); + m_corrProp.declareUpdateHandler(&EnergyCalculator::CorrectionTypeHandler, this); + declareProperty("zSide",m_zside); } -// **************************************************************************** -G4bool EnergyCalculator::Process_Barrett(const G4Step* step, std::vector<LArHitData>& hdata){ -// **************************************************************************** - G4ThreeVector startPointinLocal, endPointinLocal; - if(!FindIdentifier_Barrett(step, hdata, startPointinLocal, endPointinLocal)){ - //cell id is not found - if(!lwc()->GetisBarretteCalib()) return false; // ==> normal calculator return false - else{ // if Calibration Calculator for Barrett: - // compute DM identifier; - // In calibration calculator mode this process is used as "geometry calculator". - // We have to be prepared to return - // either the emec cell id or , if the hit does not belong to any cell, - // the DeadMatter (DM) id. - // DM identifier for Barrett is defined - // by the EmecSupportCalibrationCalculator.( In general it is - // activated by the atlas_calo.py) - const G4bool status=FindDMIdentifier_Barrett(step, hdata); - if(!status) - std::cout<<" WARNING!!EnergyCalculator::Process_Barrett:" - << " DM identifier not found????" - <<std::endl; - return status; - } // end of calibr. calculator - } // end if cell id not found - - // compute signal in 'normal' calculator mode, if cellid is found - G4double E = step->GetTotalEnergyDeposit(); - if (m_birksLaw){ - const G4ThreeVector midpoint = (startPointinLocal + endPointinLocal) * 0.5; - const G4double wholeStepLengthCm = step->GetStepLength() / CLHEP::cm; - const G4double gap = (this->*m_GetGapSize_type)(midpoint); - const G4double efield = 0.01 * (this->*m_GetHV_Value_type)(midpoint) / gap; // estimate Efield[KV/cm] - E = (*m_birksLaw)(E, wholeStepLengthCm,efield); - } - - hdata[0].energy = (this->*m_ecorr_method)(E, startPointinLocal, endPointinLocal); - return true; +void EnergyCalculator::CorrectionTypeHandler(Property&) +{ + switch(m_corrProp.value()) + { + case 0: m_correction_type=EMEC_ECOR_ROPT; break; + case 1: m_correction_type=EMEC_ECOR_OFF; break; + case 2: m_correction_type=EMEC_ECOR_GADJ; break; + case 3: m_correction_type=EMEC_ECOR_CHCL; break; + case 4: m_correction_type=EMEC_ECOR_GADJ_OLD; break; + case 5: m_correction_type=EMEC_ECOR_GADJ_E; break; + case 6: m_correction_type=EMEC_ECOR_GADJ_S; break; + case 7: m_correction_type=EMEC_ECOR_GADJ_SE; break; + case 8: m_correction_type=EMEC_ECOR_CHCL1; break; + default: + { + std::ostringstream merr; + merr << + "EnergyCalculator::CorrectionTypeHandler FATAL: invalid EnergyCorrection_t specified " + << m_corrProp.value(); + std::cerr << merr.str() << std::endl; + throw GaudiException(merr.str(), "EnergyCalculator::CorrectionTypeHandler", StatusCode::FAILURE); + } + } } -// **************************************************************************** -EnergyCalculator::EnergyCalculator( - LArWheelCalculator::LArWheelCalculator_t solidtype, - EnergyCorrection_t corr, - G4int zside - ) : - m_correction_type(corr), - m_PhiGapNumber(0), - m_PhiHalfGapNumber(0), - m_HalfWaveNumber(0), - m_SignofZinHalfWave(0), - m_SignofSlopeofHalfWave(0), - m_SinPhiGap(0), - m_CosPhiGap(0), - m_ZinHalfWave(0), - m_HalfEleThickness(0), - m_ChCollWheelType(0), - m_ChCollFoldType(0), - m_PointFoldMapArea(0), - m_calculatorPhiGap(0), - m_chcollPhiGap(0), - m_birksLaw(0), - m_lwc(new LArWheelCalculator(solidtype, zside) ), - m_DB_HV(false) -// **************************************************************************** + +void EnergyCalculator::SolidTypeHandler(Property&) { - ISvcLocator* svcLocator = Gaudi::svcLocator(); - IMessageSvc* msgSvc; - StatusCode status = svcLocator->service("MessageSvc", msgSvc); - if(!status.isFailure()){ - m_msg = new MsgStream(msgSvc, "LArG4::EC::EnergyCalculator"); - } else { - throw std::runtime_error("EnergyCalculator constructor: cannot initialze message service"); - } - (*m_msg) << MSG::DEBUG << "constructor started" << endmsg; - - if(lwc()->GetisElectrode()){ - (*m_msg) << MSG::FATAL - << "energy caclculator must be of 'absorber' type," - << " while 'electrode' type is requested." - << endmsg; - throw std::runtime_error("wrong type for EnergyCalculator"); - } - - s_RefzDist = lwc()->GetElecFocaltoWRP() + - lwc()->GetdWRPtoFrontFace() + lwc()->GetWheelThickness() + - lwc()->GetdWRPtoFrontFace() + s_LongBarThickness - s_DistOfEndofCuFromBack; - - StoreGateSvc* detStore; - LArG4EMECOptions *emecOptions; - LArG4GlobalOptions *globalOptions; - status = svcLocator->service("DetectorStore", detStore); - - if(status.isSuccess()){ - status = detStore->retrieve(emecOptions, "LArG4EMECOptions"); - if(status.isFailure()){ - throw std::runtime_error("EnergyCalculator: cannot retrieve LArG4EMECOptions"); - } - status = detStore->retrieve(globalOptions, "LArG4GlobalOptions"); - if(status.isFailure()){ - throw std::runtime_error("EnergyCalculator: cannot retrieve LArG4GlobalOptions"); - } - } else { - throw std::runtime_error("EnergyCalculator: cannot initialize StoreGate interface"); - } - - (*m_msg) << MSG::DEBUG << "StoreGate interface is ready" << endmsg; - - //m_identifier = LArG4Identifier(); - m_compartment = 0; - //m_time = 0.; - //m_energy = 0.; - m_isInTime = false; - - m_OOTcut = globalOptions->OutOfTimeCut(); - - if(emecOptions->EMECBirksLaw()){ - const double Birks_LAr_density = 1.396; - const double Birks_k = emecOptions->EMECBirksk(); - m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,Birks_k); - } - - m_DB_HV = emecOptions->EMECHVEnable(); - - // Access the GeoModelSvc: - IGeoModelSvc *geoModel; - status = svcLocator->service ("GeoModelSvc",geoModel); - if (status != StatusCode::SUCCESS) { - throw std::runtime_error ("Cannot locate GeoModelSvc!!"); - } - - // Access the geometry database: - IRDBAccessSvc *pAccessSvc; - status=svcLocator->service("RDBAccessSvc",pAccessSvc); - if (status != StatusCode::SUCCESS) { - throw std::runtime_error ("Cannot locate RDBAccessSvc!!"); - } - - // Obtain the geometry version information: - - DecodeVersionKey larVersionKey(geoModel, "LAr"); - - pAccessSvc->connect(); - - const IRDBRecordset *emecSamplingSep = - pAccessSvc->getRecordset("EmecSamplingSep", larVersionKey.tag(), larVersionKey.node()); - if (emecSamplingSep->size()==0) { - throw std::runtime_error("Cannot find the EmecSamplingSep Table"); - } - - const IRDBRecordset *emecGeometry = - pAccessSvc->getRecordset("EmecGeometry", larVersionKey.tag(), larVersionKey.node()); - if (emecGeometry->size()==0) { - throw std::runtime_error("Cannot find the EmecGeometry Table"); - } - - pAccessSvc->disconnect(); - - for(int i = 0; i < 7; i ++){ - std::ostringstream A0STR; - A0STR << "_" << i; - const std::string A0 = A0STR.str(); - const std::string colName = "ZIW" + A0; - ziw[i] = (*emecSamplingSep)[0]->getDouble(colName)*CLHEP::cm; - // cout<<"i,ziw= "<<i<<" "<<ziw[i]<<endl; - } - for(int i = 0; i < 44; i ++){ - std::ostringstream A0STR; - A0STR << "_" << i; - const std::string A0 = A0STR.str(); - const std::string colName = "ZSEP12" + A0; - zsep12[i] = (*emecSamplingSep)[0]->getDouble(colName)*CLHEP::cm; - // cout<<"i,zsep12= "<<i<<" "<<zsep12[i]<<endl; - } - for(int i = 0; i < 22; i ++){ - std::ostringstream A0STR; - A0STR << "_" << i; - const std::string A0 = A0STR.str(); - const std::string colName = "ZSEP23" + A0; - zsep23[i] = (*emecSamplingSep)[0]->getDouble(colName)*CLHEP::cm; - // cout<<"i,zsep23= "<<i<<" "<<zsep23[i]<<endl; - } - - m_ElectrodeFanHalfThickness = LArWheelCalculator::GetFanHalfThickness(LArWheelCalculator::InnerElectrodWheel); - m_FanEleThickness = m_ElectrodeFanHalfThickness * 2.; - m_FanEleThicknessOld = 0.300*CLHEP::mm; - m_FanEleFoldRadiusOld = 3.*CLHEP::mm; - m_FanAbsThickness = lwc()->GetFanHalfThickness() * 2.; - m_WaveLength = lwc()->GetActiveLength() / lwc()->GetNumberOfWaves(); - - assert(fabs((*emecGeometry)[0]->getDouble("GAP0")*CLHEP::cm - s_AverageGap) < 0.000001); - -//Barrette treatment - if(lwc()->GetisBarrette()){ - if(lwc()->type() == LArWheelCalculator::OuterAbsorberWheel || lwc()->type() == LArWheelCalculator::OuterAbsorberModule) { - SetConst_OuterBarrett(); - } else{ - if(lwc()->type() == LArWheelCalculator::InnerAbsorberWheel || lwc()->type() == LArWheelCalculator::InnerAbsorberModule ){ - - (*m_msg) << MSG::FATAL - << "EnergyCalculator: " - << "Barrett section is not (yet) prepared for " - << LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()) - << endmsg; - G4ExceptionDescription description; - description << G4String("Process_Barrett: ") + "Barrett section is not (yet) prepared for solidtype=" + - LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()); - G4Exception("EnergyCalculator", "BarretteSectionNotPrepared", FatalException, description); - } - else{ - (*m_msg) << MSG::FATAL - << "EnergyCalculator: " - << "Unknown solidtype:" - << LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()) - << endmsg; - G4ExceptionDescription description; - description << G4String("Process_Barrett: ") + "Unknown solidtype=" + - LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()); - G4Exception("EnergyCalculator", "UnknownSolidType", FatalException, description); - } - } - - m_Process_type = &EnergyCalculator::Process_Barrett; - m_FindIdentifier_type = &EnergyCalculator::FindIdentifier_Barrett; - m_GetHV_Value_type = &EnergyCalculator::GetHV_Value_Barrett; - m_GetGapSize_type = &EnergyCalculator::GetGapSize_Barrett; - m_distance_to_the_nearest_electrode_type = - &EnergyCalculator::distance_to_the_nearest_electrode_Barrett; - - if(lwc()->GetisBarretteCalib()) m_supportCalculator= new LArG4::EMECSupportCalibrationCalculator(); - - } else { - m_Process_type = &EnergyCalculator::Process_Default; - m_FindIdentifier_type = &EnergyCalculator::FindIdentifier_Default; - m_GetHV_Value_type = &EnergyCalculator::GetHV_Value_Default; - m_GetGapSize_type = &EnergyCalculator::GetGapSize_Default; - m_distance_to_the_nearest_electrode_type = - &EnergyCalculator::distance_to_the_nearest_electrode_Default; - } - -// energy correction type - if(m_correction_type == EMEC_ECOR_ROPT){ - LArG4EMECOptions::ECORRTYPE ecorr = emecOptions->EMECECorrType(); - switch(ecorr){ - case LArG4EMECOptions::GAPADJ: - m_correction_type = EMEC_ECOR_GADJ; break; - case LArG4EMECOptions::CHCOLL: - m_correction_type = EMEC_ECOR_CHCL; break; - case LArG4EMECOptions::GAPOLD: - m_correction_type = EMEC_ECOR_GADJ_OLD; break; - case LArG4EMECOptions::GAP_E: - m_correction_type = EMEC_ECOR_GADJ_E; break; - case LArG4EMECOptions::GAP_S: - m_correction_type = EMEC_ECOR_GADJ_S; break; - case LArG4EMECOptions::GAP_SE: - m_correction_type = EMEC_ECOR_GADJ_SE; break; - case LArG4EMECOptions::NONE: - m_correction_type = EMEC_ECOR_OFF; break; - case LArG4EMECOptions::CHCOLL1: - m_correction_type = EMEC_ECOR_CHCL1; break; - default: - (*m_msg) << MSG::FATAL - << "got from StoreGate ECORRTYPE = " << ecorr - << ", don't know such correction" << endmsg; - throw std::runtime_error("EnergyCalculator: \ -Bad ECORRTYPE"); - } - }// end for defining m_correction_type - - switch(m_correction_type){ - case EMEC_ECOR_GADJ: - m_ecorr_method = &EnergyCalculator::GapAdjustment; - break; - case EMEC_ECOR_CHCL: - m_ecorr_method = &EnergyCalculator::CalculateChargeCollection; - break; - case EMEC_ECOR_GADJ_OLD: - m_ecorr_method = &EnergyCalculator::GapAdjustment_old; - break; - case EMEC_ECOR_GADJ_E: - m_ecorr_method = &EnergyCalculator::GapAdjustment_E; - break; - case EMEC_ECOR_GADJ_S: - m_ecorr_method = &EnergyCalculator::GapAdjustment_s; - break; - case EMEC_ECOR_GADJ_SE: - m_ecorr_method = &EnergyCalculator::GapAdjustment__sE; - break; - case EMEC_ECOR_OFF: - m_ecorr_method = &EnergyCalculator::dummy_correction_method; - break; - case EMEC_ECOR_CHCL1: - if(lwc()->GetisBarrette()){ - m_ecorr_method = &EnergyCalculator::CalculateChargeCollection; - (*m_msg) << MSG::INFO << "CHCOLL energy correction is user for Barettes" - << " instead of CHCOLL1" << endmsg; - } else { - m_ecorr_method = &EnergyCalculator::CalculateChargeCollection1; - } - break; - default: - (*m_msg) << MSG::FATAL - << "EnergyCalculator: unknown correction type " - << m_correction_type << endmsg; - G4Exception("EnergyCalculator", "UnknownCorrectionType", FatalException, - "Process_Barrett: unknown correction type"); - } - -// get power of gap in signal calculation - m_GApower = emecOptions->EMECGapPower(); - -// pick up surface_suppression_range - s_CHC_Esr = emecOptions->EMECEsr(); - -//read HV values of power supplies - - s_HVMapVersion = emecOptions->EMECHVMap(); - if(s_HVMapVersion == "v00" || s_HVMapVersion == "v01") m_NofPhiSections=32; - else{ - m_NofPhiSections=lwc()->GetNumberOfFans(); - for(G4int i=0;i<s_NofAtlasSide;++i){ - for(G4int j=0;j<s_NofEtaSection;++j){ - for(G4int k=0;k<s_NofElectrodeSide;++k){ - s_HV_Start_phi[i][j][k]=0; - } - } - } - } - m_NumberOfElectrodesInPhiSection = lwc()->GetNumberOfFans() / m_NofPhiSections; - - m_Ylimits[0]=m_Ylimits[1]=m_Ylimits[2]=m_Ylimits[3]=0; - - if(s_HVMapRead == false){ - (*m_msg) << MSG::DEBUG - << "EnergyCalculator: getting EMECHVMap version = " - << emecOptions->EMECHVMap() << " from StoreGate" - << endmsg; - G4String HVMapPath = "LArG4EC"; - G4String HVMapFileName = "HVEMECMap_"+ s_HVMapVersion + ".dat"; - G4String HVpartialPath = HVMapPath + "/" + HVMapFileName; - G4String HVMapLocation = PathResolver::find_file(HVpartialPath, "ATLASCALDATA"); - GetHVMap(HVMapLocation.c_str()); - } - - if(m_DB_HV) get_HV_map_from_DB(); - - // if charge collection is required - if(m_correction_type == EMEC_ECOR_CHCL || m_correction_type == EMEC_ECOR_CHCL1){ - if(!lwc()->GetisElectrode()){ - // get fieldmap from file - - if(s_FieldMapsRead == false){ - s_ChCollInner.FieldMapPrepared=false; - s_ChCollOuter.FieldMapPrepared=false; - // Determine which version of the file by examining the user option. - G4String suffix = emecOptions->EMECChMap(); - if(suffix.empty()) s_FieldMapVersion = "v00"; - else s_FieldMapVersion = suffix; - - (*m_msg) << MSG::DEBUG - << "EnergyCalculator: field map version = " - << s_FieldMapVersion - << endmsg; - - IniGeomforFieldMaps(); - - // Now we have to get the full path to the file. In - // stand-alone, we use AFS. In Athena, we use - // PathResolver. - G4String FieldMapFileName = "ec.fieldz" + suffix; - G4String FieldMapPath = "LArG4EC"; - G4String partialPath = FieldMapPath + "/" + FieldMapFileName; - G4String FieldMapLocation = PathResolver::find_file(partialPath, "ATLASCALDATA"); - - GetFieldMaps(FieldMapLocation.c_str()); - s_FieldMapsRead=true; - - } // finish to read the fieldmap - - // prepare the fieldmaps for further calculation - - if(s_FieldMapVersion != "v00"){ - m_FanEleThicknessOld = m_FanEleThickness; - m_FanEleFoldRadiusOld = lwc()->GetFanFoldRadius(); - } + switch(m_solidtypeProp.value()) + { + case 0: m_solidtype = LArG4::InnerAbsorberWheel; break; + case 1: m_solidtype = LArG4::OuterAbsorberWheel; break; + case 2: m_solidtype = LArG4::InnerElectrodWheel; break; + case 3: m_solidtype = LArG4::OuterElectrodWheel; break; + case 4: m_solidtype = LArG4::InnerAbsorberModule; break; + case 5: m_solidtype = LArG4::OuterAbsorberModule; break; + case 6: m_solidtype = LArG4::InnerElectrodModule; break; + case 7: m_solidtype = LArG4::OuterElectrodModule; break; + case 8: m_solidtype = LArG4::BackInnerBarretteWheel; break; + case 9: m_solidtype = LArG4::BackOuterBarretteWheel; break; + case 10: m_solidtype = LArG4::BackInnerBarretteWheelCalib; break; + case 11: m_solidtype = LArG4::BackOuterBarretteWheelCalib; break; + case 12: m_solidtype = LArG4::BackInnerBarretteModule; break; + case 13: m_solidtype = LArG4::BackOuterBarretteModule; break; + case 14: m_solidtype = LArG4::BackInnerBarretteModuleCalib; break; + case 15: m_solidtype = LArG4::BackOuterBarretteModuleCalib; break; + case 16: m_solidtype = LArG4::InnerGlueWheel; break; + case 17: m_solidtype = LArG4::OuterGlueWheel; break; + case 18: m_solidtype = LArG4::InnerLeadWheel; break; + case 19: m_solidtype = LArG4::OuterLeadWheel; break; + default: + { + std::ostringstream merr; + merr << + "EnergyCalculator::SolidTypeHandler FATAL: invalid LArWheelCalculator_t specified " + << m_solidtypeProp.value(); + std::cerr << merr.str() << std::endl; + throw GaudiException(merr.str(), "EnergyCalculator::SolidTypeHandler", StatusCode::FAILURE); + } + } +} - if(lwc()->GetisInner()) m_ChCollWheelType=&s_ChCollInner; - else m_ChCollWheelType=&s_ChCollOuter; - - if(m_ChCollWheelType->FieldMapPrepared == false){ - PrepareFieldMap(); - m_ChCollWheelType->FieldMapPrepared = true; - } - } - else{ // electrode type - (*m_msg) << MSG::FATAL - << "EnergyCalculator: " - << "Charge Collection cannot be prepared for " - << LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()) - << endmsg; - G4ExceptionDescription description; - description << G4String("Process_Barrett: ") + - "Charge Collection cannot be prepared for solidtype=" + - LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()); - G4Exception("EnergyCalculator", "IncorrectSolidType", FatalException, description); - } - } // end if chcoll required - (*m_msg) << MSG::DEBUG - << "EnergyCalculator parameters: " << std::endl - << "correction type " << m_correction_type << std::endl - << "GA power = " << m_GApower << std::endl - << "energy suppression range = " << s_CHC_Esr / Units::mm << " [mm]" - << "\n" - << "default method for computation of folding angle (param) - compiled in" - << endmsg; - // Aug 2007 AMS, lost Aug 2008, restored May 2009 - m_electrode_calculator = 0; - if(m_correction_type == EMEC_ECOR_CHCL1 && !lwc()->GetisBarrette()){ - LArWheelCalculator::LArWheelCalculator_t t = LArWheelCalculator::OuterElectrodWheel; - if(lwc()->GetisModule()){ - - if(lwc()->GetisInner()) t = LArWheelCalculator::InnerElectrodModule; - else t = LArWheelCalculator::OuterElectrodModule; - - } else if(lwc()->GetisInner()) t = LArWheelCalculator::InnerElectrodWheel; - - m_electrode_calculator = new LArWheelCalculator(t, lwc()->GetAtlasZside()); - if(m_electrode_calculator == 0){ - (*m_msg) << MSG::FATAL - << "cannot create helper electrode calculator" - << endmsg; - G4Exception("EnergyCalculator", "NoElectrodeCalculator", FatalException, - "Process_Barrett: cannot create helper electrode calculator"); - } - (*m_msg) << MSG::DEBUG - << "helper electrode calculator created (" - << LArWheelCalculator::LArWheelCalculatorTypeString(t) << ")" - << endmsg; - } -} // end of EnergyCalculator::EnergyCalculator +StatusCode EnergyCalculator::initialize() +{ + m_lwc = new LArWheelCalculator(m_solidtype, m_zside); + if(lwc()->GetisElectrode()) + { + ATH_MSG_FATAL("energy caclculator must be of 'absorber' type," + << " while 'electrode' type is requested."); + return StatusCode::FAILURE; + } + s_RefzDist = lwc()->GetElecFocaltoWRP() + + lwc()->GetdWRPtoFrontFace() + lwc()->GetWheelThickness() + + lwc()->GetdWRPtoFrontFace() + s_LongBarThickness - s_DistOfEndofCuFromBack; + + ISvcLocator* svcLocator = Gaudi::svcLocator(); + + if(m_BirksLaw) + { + const double Birks_LAr_density = 1.396; + m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,m_Birksk); + } + + // Access the GeoModelSvc: + IGeoModelSvc *geoModel=0; + ATH_CHECK(svcLocator->service ("GeoModelSvc",geoModel)); + + // Access the geometry database: + IRDBAccessSvc *pAccessSvc=0; + ATH_CHECK(svcLocator->service("RDBAccessSvc",pAccessSvc)); + + DecodeVersionKey larVersionKey(geoModel, "LAr"); + + pAccessSvc->connect(); + + const IRDBRecordset *emecSamplingSep = + pAccessSvc->getRecordset("EmecSamplingSep", larVersionKey.tag(), larVersionKey.node()); + if (emecSamplingSep->size()==0) { + throw std::runtime_error("Cannot find the EmecSamplingSep Table"); + } + + const IRDBRecordset *emecGeometry = + pAccessSvc->getRecordset("EmecGeometry", larVersionKey.tag(), larVersionKey.node()); + if (emecGeometry->size()==0) { + throw std::runtime_error("Cannot find the EmecGeometry Table"); + } + + pAccessSvc->disconnect(); + + for(int i = 0; i < 7; i ++){ + std::ostringstream A0STR; + A0STR << "_" << i; + const std::string A0 = A0STR.str(); + const std::string colName = "ZIW" + A0; + ziw[i] = (*emecSamplingSep)[0]->getDouble(colName)*CLHEP::cm; + // cout<<"i,ziw= "<<i<<" "<<ziw[i]<<endl; + } + for(int i = 0; i < 44; i ++){ + std::ostringstream A0STR; + A0STR << "_" << i; + const std::string A0 = A0STR.str(); + const std::string colName = "ZSEP12" + A0; + zsep12[i] = (*emecSamplingSep)[0]->getDouble(colName)*CLHEP::cm; + // cout<<"i,zsep12= "<<i<<" "<<zsep12[i]<<endl; + } + for(int i = 0; i < 22; i ++){ + std::ostringstream A0STR; + A0STR << "_" << i; + const std::string A0 = A0STR.str(); + const std::string colName = "ZSEP23" + A0; + zsep23[i] = (*emecSamplingSep)[0]->getDouble(colName)*CLHEP::cm; + // cout<<"i,zsep23= "<<i<<" "<<zsep23[i]<<endl; + } + + m_ElectrodeFanHalfThickness = LArWheelCalculator::GetFanHalfThickness(LArG4::InnerElectrodWheel); + m_FanEleThickness = ElectrodeFanHalfThickness() * 2.; + m_FanEleThicknessOld = 0.300*CLHEP::mm; + m_FanEleFoldRadiusOld = 3.*CLHEP::mm; + m_FanAbsThickness = lwc()->GetFanHalfThickness() * 2.; + m_WaveLength = lwc()->GetActiveLength() / lwc()->GetNumberOfWaves(); + + assert(fabs((*emecGeometry)[0]->getDouble("GAP0")*CLHEP::cm - s_AverageGap) < 0.000001); + + //Barrette treatment + if(lwc()->GetisBarrette()){ + if(lwc()->type() == LArG4::OuterAbsorberWheel || lwc()->type() == LArG4::OuterAbsorberModule) { + SetConst_OuterBarrett(); + } else{ + if(lwc()->type() == LArG4::InnerAbsorberWheel || lwc()->type() == LArG4::InnerAbsorberModule ){ + + ATH_MSG_FATAL("EnergyCalculator: " + << "Barrett section is not (yet) prepared for " + << LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type())); + G4ExceptionDescription description; + description << G4String("Process_Barrett: ") + "Barrett section is not (yet) prepared for solidtype=" + + LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()); + G4Exception("EnergyCalculator", "BarretteSectionNotPrepared", FatalException, description); + } + else{ + ATH_MSG_FATAL("EnergyCalculator: " + << "Unknown solidtype:" + << LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type())); + G4ExceptionDescription description; + description << G4String("Process_Barrett: ") + "Unknown solidtype=" + + LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()); + G4Exception("EnergyCalculator", "UnknownSolidType", FatalException, description); + } + } + m_Process_type = &EnergyCalculator::Process_Barrett; + m_GetHV_Value_type = &EnergyCalculator::GetHV_Value_Barrett; + m_GetGapSize_type = &EnergyCalculator::GetGapSize_Barrett; + m_distance_to_the_nearest_electrode_type = + &EnergyCalculator::distance_to_the_nearest_electrode_Barrett; + + if(lwc()->GetisBarretteCalib()) { + ATH_CHECK(m_supportCalculator.retrieve()); + } + + } else { + m_Process_type = &EnergyCalculator::Process_Default; + m_GetHV_Value_type = &EnergyCalculator::GetHV_Value_Default; + m_GetGapSize_type = &EnergyCalculator::GetGapSize_Default; + m_distance_to_the_nearest_electrode_type = + &EnergyCalculator::distance_to_the_nearest_electrode_Default; + } + + // energy correction type from jO + + + switch(m_correction_type){ + case EMEC_ECOR_GADJ: + m_ecorr_method = &EnergyCalculator::GapAdjustment; + break; + case EMEC_ECOR_CHCL: + m_ecorr_method = &EnergyCalculator::CalculateChargeCollection; + break; + case EMEC_ECOR_GADJ_OLD: + m_ecorr_method = &EnergyCalculator::GapAdjustment_old; + break; + case EMEC_ECOR_GADJ_E: + m_ecorr_method = &EnergyCalculator::GapAdjustment_E; + break; + case EMEC_ECOR_GADJ_S: + m_ecorr_method = &EnergyCalculator::GapAdjustment_s; + break; + case EMEC_ECOR_GADJ_SE: + m_ecorr_method = &EnergyCalculator::GapAdjustment__sE; + break; + case EMEC_ECOR_OFF: + m_ecorr_method = &EnergyCalculator::dummy_correction_method; + break; + case EMEC_ECOR_CHCL1: + if(lwc()->GetisBarrette()){ + m_ecorr_method = &EnergyCalculator::CalculateChargeCollection; + ATH_MSG_INFO("CHCOLL energy correction is user for Barettes" + << " instead of CHCOLL1"); + } else { + m_ecorr_method = &EnergyCalculator::CalculateChargeCollection1; + } + break; + default: + ATH_MSG_FATAL("EnergyCalculator: unknown correction type " + << m_correction_type); + G4Exception("EnergyCalculator", "UnknownCorrectionType", FatalException, + "Process_Barrett: unknown correction type"); + } + + if(m_HVMapVersion == "v00" || m_HVMapVersion == "v01") { + m_NofPhiSections=32; + } else { + m_NofPhiSections=lwc()->GetNumberOfFans(); + for(G4int i=0;i<s_NofAtlasSide;++i) { + for(G4int j=0;j<s_NofEtaSection;++j) { + for(G4int k=0;k<s_NofElectrodeSide;++k) { + s_HV_Start_phi[i][j][k]=0; + } + } + } + } + m_NumberOfElectrodesInPhiSection = lwc()->GetNumberOfFans() / NofPhiSections(); + + if(s_HVMapRead == false){ + ATH_MSG_DEBUG("EnergyCalculator: getting EMECHVMap version = " + << m_HVMapVersion << " from jO"); + const G4String HVMapPath = "LArG4EC"; + const G4String HVMapFileName = "HVEMECMap_"+ m_HVMapVersion + ".dat"; + const G4String HVpartialPath = HVMapPath + "/" + HVMapFileName; + const G4String HVMapLocation = PathResolver::find_file(HVpartialPath, "ATLASCALDATA"); + GetHVMap(HVMapLocation.c_str()); + } + + if(m_DB_HV) get_HV_map_from_DB(); + + // if charge collection is required + if(m_correction_type == EMEC_ECOR_CHCL || m_correction_type == EMEC_ECOR_CHCL1) { + if(!lwc()->GetisElectrode()) { + // get fieldmap from file + if(s_FieldMapsRead == false) { + s_ChCollInner.FieldMapPrepared=false; + s_ChCollOuter.FieldMapPrepared=false; + // Determine which version of the file by examining the user option. + //if(m_suffix.empty()) FieldMapVersion = "v00"; + //else FieldMapVersion = m_suffix; + s_FieldMapVersion = m_suffix.empty() ? "v00" : m_suffix; + + ATH_MSG_DEBUG("EnergyCalculator: field map version = " << s_FieldMapVersion); + + IniGeomforFieldMaps(); + + // Now we have to get the full path to the file. In + // stand-alone, we use AFS. In Athena, we use + // PathResolver. + const G4String FieldMapFileName = "ec.fieldz" + m_suffix; + const G4String FieldMapPath = "LArG4EC"; + const G4String partialPath = FieldMapPath + "/" + FieldMapFileName; + const G4String FieldMapLocation = PathResolver::find_file(partialPath, "ATLASCALDATA"); + + LoadFieldMaps(FieldMapLocation.c_str()); + s_FieldMapsRead=true; + } // finish to read the fieldmap + + // prepare the fieldmaps for further calculation + + if(s_FieldMapVersion != "v00"){ + m_FanEleThicknessOld = FanEleThickness(); + m_FanEleFoldRadiusOld = lwc()->GetFanFoldRadius(); + } + + // if(lwc()->GetisInner()) ChCollWheelType=&ChCollInner; + // else ChCollWheelType=&ChCollOuter; + m_ChCollWheelType = lwc()->GetisInner() ? &s_ChCollInner : &s_ChCollOuter; + + if(ChCollWheelType()->FieldMapPrepared == false){ + PrepareFieldMap(m_ChCollWheelType); + m_ChCollWheelType->FieldMapPrepared = true; + } + } else { + // electrode type + ATH_MSG_FATAL("EnergyCalculator: " + << "Charge Collection cannot be prepared for " + << LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type())); + G4ExceptionDescription description; + description << G4String("Process_Barrett: ") + + "Charge Collection cannot be prepared for solidtype=" + + LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()); + G4Exception("EnergyCalculator", "IncorrectSolidType", FatalException, description); + } + } // end if charge collection is required + ATH_MSG_DEBUG("EnergyCalculator parameters: " << "correction type " << m_correction_type ); + ATH_MSG_DEBUG("GA power = " << m_GApower + << "energy suppression range = " << m_CHC_Esr / CLHEP::mm << " [mm]" + << "\n" + << "default method for computation of folding angle (param) - compiled in"); + // Aug 2007 AMS, lost Aug 2008, restored May 2009 + m_electrode_calculator = 0; + if(m_correction_type == EMEC_ECOR_CHCL1 && !lwc()->GetisBarrette()){ + LArG4::LArWheelCalculator_t t = LArG4::OuterElectrodWheel; + if(lwc()->GetisModule()){ + + if(lwc()->GetisInner()) t = LArG4::InnerElectrodModule; + else t = LArG4::OuterElectrodModule; + + } else if(lwc()->GetisInner()) t = LArG4::InnerElectrodWheel; + + m_electrode_calculator = new LArWheelCalculator(t, lwc()->GetAtlasZside()); + if(m_electrode_calculator == 0){ + ATH_MSG_FATAL("cannot create helper electrode calculator"); + G4Exception("EnergyCalculator", "NoElectrodeCalculator", FatalException, + "Process_Barrett: cannot create helper electrode calculator"); + } + ATH_MSG_DEBUG("helper electrode calculator created (" + << LArWheelCalculator::LArWheelCalculatorTypeString(t) << ")"); + } + return StatusCode::SUCCESS; +} // end of EnergyCalculator::initialize G4double EnergyCalculator::CalculateChargeCollection1( - G4double a_energy, const G4ThreeVector &p1, const G4ThreeVector &p2) // need to make const + G4double a_energy, + const G4ThreeVector &p1, + const G4ThreeVector &p2, + G4double /*Barret_PhiStart*/) const { if(!lwc()->GetisBarrette()){ // should be wheel - G4double current1 = GetCurrent1(p1, p2, a_energy); // need to make const - + G4double current1 = GetCurrent1(p1, p2, a_energy); +#ifdef DEBUG_CHCL s_CHCEtotal += a_energy; s_CHCStotal += current1; - if(m_msg->level()==MSG::DEBUG) - (*m_msg) << MSG::DEBUG - << " chcoll1: edep, current= " << a_energy << " " << current1 - << " CHCEtotal= " << s_CHCEtotal << " CHCStotal= " << s_CHCStotal - << " CHCIprint= " << s_CHCIprint << " CHCEbad= " << s_CHCEbad - << " ebad/etotal= " << s_CHCEbad / s_CHCEtotal - << endmsg; + + ATH_MSG_DEBUG(" chcoll1: edep, current= " << a_energy << " " << current1 + << " CHCEtotal= " << CHCEtotal << " CHCStotal= " << CHCStotal + << " CHCIprint= " << CHCIprint << " CHCEbad= " << CHCEbad + << " ebad/etotal= " << CHCEbad / CHCEtotal); +#endif return current1; } return a_energy; @@ -711,37 +710,38 @@ G4double EnergyCalculator::CalculateChargeCollection1( // **************************************************************************** G4double EnergyCalculator::GapAdjustment_old(G4double a_energy, - const G4ThreeVector& p1, const G4ThreeVector &p2) // need to make const + const G4ThreeVector& p1, const G4ThreeVector &p2, G4double /*Barret_PhiStart*/ ) const // **************************************************************************** { // std::cout<<"*** GapAdjustment_old is called, a_energy="<<a_energy - // <<std::endl; + // <<std::endl; const G4ThreeVector p = (p1 + p2) * .5; - return(a_energy / pow( ((this->*m_GetGapSize_type)(p)) / s_AverageGap, 1.3)); + return(a_energy / pow( ((this->*m_GetGapSize_type)(p)) / s_AverageGap, 1.3)); // const method } // **************************************************************************** G4double EnergyCalculator::GapAdjustment(G4double a_energy, const G4ThreeVector& a_startPoint, - const G4ThreeVector& a_endPoint) // need to make const + const G4ThreeVector& a_endPoint, + G4double /*Barret_PhiStart*/) const // **************************************************************************** { static const G4double substpsize = 0.1*CLHEP::mm; // std::cout<<"*** GapAdjustment is called, a_energy="<<a_energy - // <<std::endl; + // <<std::endl; const G4ThreeVector step( a_endPoint - a_startPoint ); - const G4int nofstep= int(step.mag()/substpsize)+1; + const G4int nofstep= int(step.mag()/substpsize)+1; const G4double s_energy= a_energy/nofstep; - G4double corr_energy= 0; + G4double corr_energy= 0; G4ThreeVector vstep; for(G4int i = 0; i < nofstep; ++ i){ // loop for substeps const G4double ds = (i + 0.5) / nofstep; vstep = a_startPoint * (1. - ds) + a_endPoint * ds; - const G4double gap = (this->*m_GetGapSize_type)(vstep); - corr_energy += s_energy * pow((gap / s_AverageGap), m_GApower); + const G4double gap = (this->*m_GetGapSize_type)(vstep); // const method + corr_energy += s_energy / pow((gap / s_AverageGap), GApower()); } return corr_energy; } @@ -749,26 +749,26 @@ G4double EnergyCalculator::GapAdjustment(G4double a_energy, // **************************************************************************** G4double EnergyCalculator::GapAdjustment_E(G4double a_energy, const G4ThreeVector& a_startPoint, - const G4ThreeVector& a_endPoint) // need to make const + const G4ThreeVector& a_endPoint, + G4double Barret_PhiStart) const // **************************************************************************** { static const G4double substpsize = 0.1*CLHEP::mm; //std::cout<<"*** GapAdjustment_E is called, a_energy="<<a_energy - // <<std::endl; + // <<std::endl; const G4ThreeVector step( a_endPoint - a_startPoint ); const G4int nofstep = G4int(step.mag()/substpsize) + 1; const G4double s_energy = a_energy / nofstep / s_AverageCurrent; G4double corr_energy = 0; - G4ThreeVector vstep; for(G4int i = 0; i < nofstep; i ++){ const G4double ds = (i + 0.5) / nofstep; - vstep = a_startPoint * (1. - ds) + a_endPoint * ds; - const G4double gap = (this->*m_GetGapSize_type)(vstep); - const G4double HV_value = (this->*m_GetHV_Value_type)(vstep); + const G4ThreeVector vstep = a_startPoint * (1. - ds) + a_endPoint * ds; + const G4double gap = (this->*m_GetGapSize_type)(vstep); // const method + const G4double HV_value = (this->*m_GetHV_Value_type)(vstep, Barret_PhiStart); const G4double efield = (HV_value * CLHEP::volt) / (gap * CLHEP::mm) / (CLHEP::kilovolt / CLHEP::cm); // estimate Efield[KV/cm] - corr_energy += s_energy / /* gap * gap / */ (gap - s_CHC_Esr) + corr_energy += s_energy / /* gap * gap / */ ( gap - CHC_Esr() ) * IonReco(efield) * DriftVelo(s_LArTemperature_av, efield); } return corr_energy; @@ -778,23 +778,21 @@ G4double EnergyCalculator::GapAdjustment_E(G4double a_energy, G4double EnergyCalculator::CalculateChargeCollection( G4double a_energy, const G4ThreeVector &a_startPoint, - const G4ThreeVector &a_endPoint) // need to make const + const G4ThreeVector &a_endPoint, + G4double Barret_PhiStart) const // **************************************************************************** { // std::cout<<"*** CalculateChargeCollection is called, a_energy="<<a_energy - // <<std::endl; - - if(m_msg->level()==MSG::DEBUG) - (*m_msg) << MSG::DEBUG - << "starting CalculateChargeCollection:" - << "a_energy = " << a_energy - << ", startPoint = " << MSG_VECTOR(a_startPoint) - << ", endPoint = " << MSG_VECTOR(a_endPoint) - << ", wheel type: " - << LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()) - << " isBarrette = " << lwc()->GetisBarrette() - << " isBarretteCalib = " << lwc()->GetisBarretteCalib() - << endmsg; + // <<std::endl; + + ATH_MSG_DEBUG("starting CalculateChargeCollection:" + << "a_energy = " << a_energy + << ", startPoint = " << MSG_VECTOR(a_startPoint) + << ", endPoint = " << MSG_VECTOR(a_endPoint) + << ", wheel type: " + << LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()) + << " isBarrette = " << lwc()->GetisBarrette() + << " isBarretteCalib = " << lwc()->GetisBarretteCalib()); // m_calculatorPhiGap = // lwc()->PhiGapNumberForWheel(LArWheelCalculator::GetPhiGap(a_startPoint)); @@ -809,7 +807,7 @@ G4double EnergyCalculator::CalculateChargeCollection( assert(pStart[2] >= -0.0001 && pEnd[2] >= -0.0001 && - pStart[2] <= lwc()->GetWheelThickness()+0.0001 && + pStart[2] <= lwc()->GetWheelThickness()+0.0001 && pEnd[2] <= lwc()->GetWheelThickness()+0.0001); if(pStart[2]<0.) pStart[2]=0.0001; @@ -827,21 +825,18 @@ G4double EnergyCalculator::CalculateChargeCollection( if( pEnd[2]> thick) pEnd[2]= thick-0.0001; } - const G4double current = GetCurrent(pStart, pEnd, a_energy); + const G4double current = GetCurrent(pStart, pEnd, a_energy, Barret_PhiStart); +#ifdef DEBUG_CHCL s_CHCEtotal=s_CHCEtotal+a_energy; s_CHCStotal=s_CHCStotal+current; - if(m_msg->level()==MSG::DEBUG) - (*m_msg) << MSG::DEBUG - // std::cout - <<" isBarrett="<<lwc()->GetisBarrette()<<" isInner="<<lwc()->GetisInner() - <<" chcoll: edep, current= "<<a_energy<<" "<<current - <<" CHCEtotal= "<<s_CHCEtotal<<" CHCStotal= "<<s_CHCStotal - <<" CHCIprint= "<<s_CHCIprint<<" CHCEbad= "<<s_CHCEbad - <<" ebad/etotal= "<<s_CHCEbad/s_CHCEtotal - <<endmsg; - // <<std::endl; + ATH_MSG_DEBUG(" isBarrett="<<lwc()->GetisBarrette()<<" isInner="<<lwc()->GetisInner() + <<" chcoll: edep, current= "<<a_energy<<" "<<current + <<" CHCEtotal= "<<s_CHCEtotal<<" CHCStotal= "<<s_CHCStotal + <<" CHCIprint= "<<s_CHCIprint<<" CHCEbad= "<<s_CHCEbad + <<" ebad/etotal= "<<s_CHCEbad/s_CHCEtotal); +#endif return current; } @@ -850,335 +845,312 @@ G4double EnergyCalculator::CalculateChargeCollection( void EnergyCalculator::GetHVMap(const G4String fname){ // **************************************************************************** - (*m_msg) << MSG::INFO - << "HVEMECMap is to be read from file: " << fname << endmsg; + ATH_MSG_INFO("HVEMECMap is to be read from file: " << fname); FILE *lun = fopen(fname, "r"); if(lun == 0){ - (*m_msg) << MSG::ERROR - << "GetHVMap - file '" << fname << "' not found!" - << std::endl - << " Trying to read HVEMECMap from local file:" - << "HVEMECMap.dat" - << endmsg; + ATH_MSG_ERROR("GetHVMap - file '" << fname << "' not found!" + << std::endl + << " Trying to read HVEMECMap from local file:" + << "HVEMECMap.dat"); lun = fopen("HVEMECMap.dat", "r"); } if(lun == 0){ - (*m_msg) << MSG::FATAL - << "GetHVMap - file "<< "./HVEMECMap.dat not found!" - << "Cannot obtain HV map." << endmsg; - G4Exception("EnergyCalculator", "NoHVMap", FatalException, + ATH_MSG_FATAL("GetHVMap - file "<< "./HVEMECMap.dat not found!" + << "Cannot obtain HV map."); + G4Exception("EnergyCalculator", "NoHVMap", FatalException, "GetHVMap: could not read map file"); } char ch[80], ch1[80]; - for(G4int i=0;i<80;i++){ch1[i]=' ';} + for(G4int i=0;i<80;i++) { + ch[i]=0; + ch1[i]=' '; + } fgets(ch,80,lun); - (*m_msg) << MSG::INFO << "actual s_HVMapVersion = " << ch - << endmsg; + ATH_MSG_INFO("actual HVMapVersion = " << ch); ch1[0]=ch[9]; ch1[1]=ch[10]; - if(s_HVMapVersion == "v02" || s_HVMapVersion == "v99"){ + if(m_HVMapVersion == "v02" || m_HVMapVersion == "v99") { ch1[0]=ch[10]; ch1[1]=ch[11]; } G4int iv=atoi(ch1); G4bool ok=false; - if(s_HVMapVersion == "v00" && iv == 0) ok=true; - if(s_HVMapVersion == "v01" && iv == 1) ok=true; - if(s_HVMapVersion == "v02" && iv == 2) ok=true; - if(s_HVMapVersion == "v99" && iv == 99) ok=true; // this is a test file + if(m_HVMapVersion == "v00" && iv == 0) ok=true; + if(m_HVMapVersion == "v01" && iv == 1) ok=true; + if(m_HVMapVersion == "v02" && iv == 2) ok=true; + if(m_HVMapVersion == "v99" && iv == 99) ok=true; // this is a test file if(!ok){ - (*m_msg) << MSG::FATAL - << "GetHVMap - file does not contain the map requested"<< endmsg; - G4Exception("EnergyCalculator", "IncorrectVMap", FatalException, + ATH_MSG_FATAL("GetHVMap - file does not contain the map requested"); + G4Exception("EnergyCalculator", "IncorrectVMap", FatalException, "GetHVMap: incorrect map file"); } - if(s_HVMapVersion == "v00" || s_HVMapVersion == "v01" ){ - - G4String AtlasSide, EtaSection, ElectrodeSide; - for(G4int i = 0; i < s_NofAtlasSide; ++ i){ + if(m_HVMapVersion == "v00" || m_HVMapVersion == "v01" ) { + for(G4int i = 0; i < s_NofAtlasSide; ++ i) { if (fscanf(lun, "%79s", ch) < 1) { - (*m_msg) << MSG::ERROR << "GetHVMap: Error reading map file" - << endmsg; + ATH_MSG_ERROR("GetHVMap: Error reading map file"); } - AtlasSide = ch; - (*m_msg) << MSG::DEBUG << "AtlasSide = " << AtlasSide << endmsg; - for(G4int j = 0; j < s_NofEtaSection; ++ j){ - for(G4int k = 0; k < s_NofElectrodeSide; ++ k){ + const G4String AtlasSide = ch; + ATH_MSG_DEBUG("AtlasSide = " << AtlasSide); + for(G4int j = 0; j < s_NofEtaSection; ++ j) { + for(G4int k = 0; k < s_NofElectrodeSide; ++ k) { if (fscanf(lun, "%79s%79s", ch, ch1) < 2) { - (*m_msg) << MSG::ERROR << "GetHVMap: Error reading map file" - << endmsg; + ATH_MSG_ERROR("GetHVMap: Error reading map file"); } - EtaSection =ch; - ElectrodeSide=ch1; - (*m_msg) << MSG::DEBUG << "EtaSection = " << EtaSection - << " ElectrodeSide = " << ElectrodeSide - << endmsg; - + const G4String EtaSection = ch; + const G4String ElectrodeSide=ch1; + ATH_MSG_DEBUG("EtaSection = " << EtaSection + << " ElectrodeSide = " << ElectrodeSide); if (fscanf(lun, "%i", &s_HV_Start_phi[i][j][k]) < 1) { - (*m_msg) << MSG::ERROR << "GetHVMap: Error reading map file" - << endmsg; + ATH_MSG_ERROR("GetHVMap: Error reading map file"); } - (*m_msg) << MSG::DEBUG << "i, j, k = " << i << ", " << j << ", " << k - << " " <<" HV_Start_phi = " << s_HV_Start_phi[i][j][k] - << endmsg; - - for(G4int l = 0; l < m_NofPhiSections; ++ l){ - if (fscanf(lun, "%lg", &s_HV_Values[i][j][k][l]) < 1) { - (*m_msg) << MSG::ERROR << "GetHVMap: Error reading map file" - << endmsg; - } - if(l == 0){ - (*m_msg) << MSG::DEBUG << " s_HV_Values = " << s_HV_Values[i][j][k][l] - << endmsg; - } - } - } - } - } - (*m_msg) << MSG::DEBUG << endmsg; - } - - if(s_HVMapVersion == "v02" || s_HVMapVersion == "v99") { - - G4int iprmx,i,j,k,l,electrodenumber; - char s[200]; - - iprmx=3; - //iprmx=3*256; - for(i=0;i<s_NofAtlasSide;++i){ //loop for Atlas side - for(j=0;j<3;++j){ // read header lines - fgets(s,200,lun); - printf("%s",s); - } - for(j=0; j<s_NofElectrodesOut; ++j){ //loop for electrodes - if (fscanf(lun,"%i",&electrodenumber) < 1) { - (*m_msg) << MSG::ERROR << "GetHVMap: Error reading map file" - << endmsg; - } - if(j<iprmx || j==s_NofElectrodesOut-1) printf("%3i",electrodenumber); - if(j==iprmx) printf("...\n"); - for(k=0;k<s_NofEtaSection;++k){ //loop for etasection - for(l=0;l<s_NofElectrodeSide;++l){ //loop for side - if (fscanf(lun,"%lg", &s_HV_Values[i][k][l][j]) < 1) { - (*m_msg) << MSG::ERROR << "GetHVMap: Error reading map file" - << endmsg; - } - if(j<iprmx || j==s_NofElectrodesOut-1) printf("%8.2f",s_HV_Values[i][k][l][j]); - } - } - if(j<iprmx || j==s_NofElectrodesOut-1) printf("\n"); - } - fgets(s,200,lun); - } - } - fclose(lun); - s_HVMapRead = true; + ATH_MSG_DEBUG("i, j, k = " << i << ", " << j << ", " << k + << " " <<" HV_Start_phi = " << s_HV_Start_phi[i][j][k]); + for(G4int l = 0; l < NofPhiSections(); ++ l){ + if (fscanf(lun, "%lg", &s_HV_Values[i][j][k][l]) < 1) { + ATH_MSG_ERROR("GetHVMap: Error reading map file"); + } + if(l == 0){ + ATH_MSG_DEBUG(" HV_Values = " << s_HV_Values[i][j][k][l]); + } + } + } + } + } // end for(G4int i = 0; i < NofAtlasSide; ++ i) + } // end if (HVMapVersion == "v00" || HVMapVersion == "v01" ) + if(m_HVMapVersion == "v02" || m_HVMapVersion == "v99") { + char s[200]; + const G4int iprmx=3; + //iprmx=3*256; + for(G4int i=0; i<s_NofAtlasSide; ++i) { //loop for Atlas side + for(G4int j=0; j<3; ++j) { // read header lines + fgets(s,200,lun); + printf("%s",s); + } + for(G4int j=0; j<s_NofElectrodesOut; ++j) { //loop for electrodes + G4int electrodenumber=0; + if (fscanf(lun,"%i",&electrodenumber) < 1) { + ATH_MSG_ERROR("GetHVMap: Error reading map file"); + } + if (j<iprmx || j==s_NofElectrodesOut-1) { + printf("%3i",electrodenumber); + } + if (j==iprmx) { + printf("...\n"); + } + for(G4int k=0; k<s_NofEtaSection; ++k) { //loop for etasection + for(G4int l=0; l<s_NofElectrodeSide; ++l) { //loop for side + if (fscanf(lun,"%lg", &s_HV_Values[i][k][l][j]) < 1) { + ATH_MSG_ERROR("GetHVMap: Error reading map file"); + } + if(j<iprmx || j==s_NofElectrodesOut-1) { + printf("%8.2f",s_HV_Values[i][k][l][j]); + } + } + } + if(j<iprmx || j==s_NofElectrodesOut-1) { + printf("\n"); + } + } + fgets(s,200,lun); + } + } + fclose(lun); + s_HVMapRead = true; } -void EnergyCalculator::get_HV_map_from_DB(void) -{ - ISvcLocator* svcLocator = Gaudi::svcLocator(); - StoreGateSvc* pDetStore; +void EnergyCalculator::get_HV_map_from_DB(void) { + ISvcLocator* svcLocator = Gaudi::svcLocator(); + StoreGateSvc* pDetStore; - StatusCode status = svcLocator->service("DetectorStore", pDetStore); - if(status.isFailure()){ - (*m_msg) << MSG::WARNING - << "unable to get Detector Store! Use default HV values" - << endmsg; - return; - } + StatusCode status = svcLocator->service("DetectorStore", pDetStore); + if(status.isFailure()){ + ATH_MSG_WARNING("unable to get Detector Store! Use default HV values"); + return; + } // get EMECHV Manager - const LArHVManager *manager = 0; - if(pDetStore->retrieve(manager) == StatusCode::SUCCESS){ - const EMECHVManager* hvManager = - manager->getEMECHVManager(lwc()->GetisInner()? EMECHVModule::INNER: EMECHVModule::OUTER); - (*m_msg) << MSG::INFO << "got HV Manager for " - << (lwc()->GetisInner()? "inner": "outer") << " wheel" << endmsg; - const EMECHVDescriptor* dsc = hvManager->getDescriptor(); - unsigned int counter = 0; - // loop over HV modules - for(unsigned int iSide = hvManager->beginSideIndex(); - iSide < hvManager->endSideIndex(); ++ iSide - ){ - unsigned short jSide = 1 - iSide; // local numbering is inverse - for(unsigned int iEta = hvManager->beginEtaIndex(); - iEta < hvManager->endEtaIndex(); ++ iEta - ){ - unsigned int jEta = iEta; - if(lwc()->GetisInner()) jEta += 7; - for(unsigned int iPhi = hvManager->beginPhiIndex(); - iPhi < hvManager->endPhiIndex(); ++ iPhi - ){ - for(unsigned int iSector = hvManager->beginSectorIndex(); - iSector < hvManager->endSectorIndex(); ++ iSector - ){ - EMECHVModuleConstLink hvMod = - hvManager->getHVModule(iSide, iEta, iPhi, iSector); - unsigned int nElec = hvMod->getNumElectrodes(); - for(unsigned int iElec = 0; iElec < nElec; ++ iElec){ - EMECHVElectrodeConstLink electrode = - hvMod->getElectrode(iElec); - unsigned int jElec = iElec; - jElec += iSector*nElec; - jElec += iPhi*nElec*dsc->getSectorBinning().getNumDivisions(); - if(jSide == 1){ - jElec = lwc()->GetNumberOfFans() + lwc()->GetNumberOfFans() / 2 - jElec; - if(jElec >= (unsigned int)lwc()->GetNumberOfFans()) jElec -= lwc()->GetNumberOfFans(); - } - for(unsigned int iGap = 0; iGap < 2; ++ iGap){ - double hv = electrode->voltage(iGap); - if(m_msg->level()==MSG::DEBUG) - (*m_msg) << MSG::DEBUG - << "Side, Eta, Elec, Gap, hv " - << jSide << " " << jEta << " " - << jElec << " " << iGap << " " - << s_HV_Values[jSide][jEta][iGap][jElec] - << " -> " << hv << endmsg; - if(fabs((s_HV_Values[jSide][jEta][iGap][jElec] - hv)/s_HV_Values[jSide][jEta][iGap][jElec]) > 0.05){ - (*m_msg) << MSG::INFO - << "eta: " << dsc->getEtaBinning().binCenter(iEta) * (jSide == 0? 1: -1) << " " - << "phi: " << dsc->getPhiBinning().binCenter(iPhi) << " " - << "ele phi: " << electrode->getPhi() - << " side " << iGap - << " change HV from " - << s_HV_Values[jSide][jEta][iGap][jElec] - << " to " << hv << endmsg; - } - if(hv > -999.){ - s_HV_Values[jSide][jEta][iGap][jElec] = hv; - ++ counter; - } - } - } - } - } - } - } - (*m_msg) << MSG::INFO << counter - << " HV values updated from DB" << endmsg; - } else { - (*m_msg) << MSG::WARNING << "Unable to find HV Manager" << endmsg; - } + const LArHVManager *manager = 0; + if(pDetStore->retrieve(manager) == StatusCode::SUCCESS){ + const EMECHVManager* hvManager = + manager->getEMECHVManager(lwc()->GetisInner()? EMECHVModule::INNER: EMECHVModule::OUTER); + ATH_MSG_INFO("got HV Manager for " << (lwc()->GetisInner()? "inner": "outer") << " wheel"); + const EMECHVDescriptor* dsc = hvManager->getDescriptor(); + unsigned int counter = 0; + // loop over HV modules + for(unsigned int iSide = hvManager->beginSideIndex(); + iSide < hvManager->endSideIndex(); ++ iSide + ){ + unsigned short jSide = 1 - iSide; // local numbering is inverse + for(unsigned int iEta = hvManager->beginEtaIndex(); + iEta < hvManager->endEtaIndex(); ++ iEta + ){ + unsigned int jEta = iEta; + if(lwc()->GetisInner()) jEta += 7; + for(unsigned int iPhi = hvManager->beginPhiIndex(); + iPhi < hvManager->endPhiIndex(); ++ iPhi + ){ + for(unsigned int iSector = hvManager->beginSectorIndex(); + iSector < hvManager->endSectorIndex(); ++ iSector + ){ + EMECHVModuleConstLink hvMod = + hvManager->getHVModule(iSide, iEta, iPhi, iSector); + unsigned int nElec = hvMod->getNumElectrodes(); + for(unsigned int iElec = 0; iElec < nElec; ++ iElec){ + EMECHVElectrodeConstLink electrode = + hvMod->getElectrode(iElec); + unsigned int jElec = iElec; + jElec += iSector*nElec; + jElec += iPhi*nElec*dsc->getSectorBinning().getNumDivisions(); + if(jSide == 1){ + jElec = lwc()->GetNumberOfFans() + lwc()->GetNumberOfFans() / 2 - jElec; + if(jElec >= (unsigned int)lwc()->GetNumberOfFans()) jElec -= lwc()->GetNumberOfFans(); + } + for(unsigned int iGap = 0; iGap < 2; ++ iGap){ + double hv = electrode->voltage(iGap); + ATH_MSG_DEBUG("Side, Eta, Elec, Gap, hv " + << jSide << " " << jEta << " " + << jElec << " " << iGap << " " + << s_HV_Values[jSide][jEta][iGap][jElec] + << " -> " << hv); + if(fabs((s_HV_Values[jSide][jEta][iGap][jElec] - hv)/s_HV_Values[jSide][jEta][iGap][jElec]) > 0.05){ + ATH_MSG_INFO("eta: " << dsc->getEtaBinning().binCenter(iEta) * (jSide == 0? 1: -1) << " " + << "phi: " << dsc->getPhiBinning().binCenter(iPhi) << " " + << "ele phi: " << electrode->getPhi() + << " side " << iGap + << " change HV from " + << s_HV_Values[jSide][jEta][iGap][jElec] + << " to " << hv); + } + if(hv > -999.){ + s_HV_Values[jSide][jEta][iGap][jElec] = hv; + ++ counter; + } + } + } + } + } + } + } + ATH_MSG_INFO(counter << " HV values updated from DB"); + } else { + ATH_MSG_WARNING("Unable to find HV Manager"); + } } // **************************************************************************** G4double EnergyCalculator::GetHV_Value(const G4ThreeVector& p) const // **************************************************************************** { -// pickup HV value from the data of power supplies; -// everything positioned in the Wheel's coord.system; -// if it is not the same as the Atlas's one, adjustment is needed -// either in this code or in the data file - - const G4int atlasside = (lwc()->GetAtlasZside() > 0) ? 0 : 1; - - const G4ThreeVector pforeta(p.x(), p.y(), p.z() + lwc()->GetElecFocaltoWRP() + lwc()->GetdWRPtoFrontFace()); - const G4double mideta = pforeta.pseudoRapidity(); - G4int etasection = -1; - for(G4int i = 1; i <= s_NofEtaSection; ++ i){ - if(mideta <= s_HV_Etalim[i]){ - etasection = i - 1; - break; - } - } - if(!(etasection>=0 && etasection <=s_NofEtaSection-1)) throw std::runtime_error("Index out of range"); - - //assert(etasection >= 0 && etasection <= s_NofEtaSection - 1); - - const std::pair<G4int, G4int> gap = lwc()->GetPhiGapAndSide(p); - G4int electrodeside = 0; //left side of electrode(small phi) - if(gap.second > 0) electrodeside = 1; - - const G4int electrodenumber = lwc()->PhiGapNumberForWheel(gap.first); - const G4int firstelectrode = s_HV_Start_phi[atlasside][etasection][electrodeside]; - G4int electrodeindex = electrodenumber-firstelectrode; - if(electrodeindex < 0) electrodeindex += lwc()->GetNumberOfFans(); - - const G4int phisection = electrodeindex / m_NumberOfElectrodesInPhiSection; - assert(phisection>=0 && phisection<=m_NofPhiSections-1); - - G4double HV_value= s_HV_Values[atlasside][etasection][electrodeside][phisection]; - - if(m_msg->level()==MSG::DEBUG) -// std::cout - (*m_msg) << MSG::DEBUG - <<"***GetHV::="<<HV_value<<" Asde="<<atlasside<<" eta="<<etasection - <<" Esde="<<electrodeside - <<" fi="<<phisection<<" xyz="<<p.x()<<" "<<p.y()<<" "<<p.z() - <<" igap.first="<<lwc()->PhiGapNumberForWheel(gap.first) - <<" gap.second="<<gap.second - <<endmsg; - - return HV_value; + // pickup HV value from the data of power supplies; + // everything positioned in the Wheel's coord.system; + // if it is not the same as the Atlas's one, adjustment is needed + // either in this code or in the data file + + const G4int atlasside = (lwc()->GetAtlasZside() > 0) ? 0 : 1; + + const G4ThreeVector pforeta(p.x(), p.y(), p.z() + lwc()->GetElecFocaltoWRP() + lwc()->GetdWRPtoFrontFace()); + const G4double mideta = pforeta.pseudoRapidity(); + G4int etasection = -1; + for(G4int i = 1; i <= s_NofEtaSection; ++ i){ + if(mideta <= s_HV_Etalim[i]){ + etasection = i - 1; + break; + } + } + if(!(etasection>=0 && etasection <=s_NofEtaSection-1)) throw std::runtime_error("Index out of range"); + + //assert(etasection >= 0 && etasection <= s_NofEtaSection - 1); + + const std::pair<G4int, G4int> gap = lwc()->GetPhiGapAndSide(p); + G4int electrodeside = 0; //left side of electrode(small phi) + if(gap.second > 0) electrodeside = 1; + + const G4int electrodenumber = lwc()->PhiGapNumberForWheel(gap.first); + const G4int firstelectrode = s_HV_Start_phi[atlasside][etasection][electrodeside]; + G4int electrodeindex = electrodenumber-firstelectrode; + if(electrodeindex < 0) electrodeindex += lwc()->GetNumberOfFans(); + + const G4int phisection = electrodeindex / NumberOfElectrodesInPhiSection(); + assert(phisection>=0 && phisection<=NofPhiSections()-1); + + G4double HV_value= s_HV_Values[atlasside][etasection][electrodeside][phisection]; + + ATH_MSG_DEBUG("***GetHV::="<<HV_value<<" Asde="<<atlasside<<" eta="<<etasection + <<" Esde="<<electrodeside + <<" fi="<<phisection<<" xyz="<<p.x()<<" "<<p.y()<<" "<<p.z() + <<" igap.first="<<lwc()->PhiGapNumberForWheel(gap.first) + <<" gap.second="<<gap.second); + + return HV_value; } /* -In this type of correction energy deposited close than s_CHC_Esr to an electrod -is suppressed. + In this type of correction energy deposited close than s_CHC_Esr to an electrod + is suppressed. */ // **************************************************************************** G4double EnergyCalculator::GapAdjustment_s(G4double a_energy, - const G4ThreeVector& a_startPoint, - const G4ThreeVector& a_endPoint) // need to make const + const G4ThreeVector& a_startPoint, + const G4ThreeVector& a_endPoint, + G4double Barret_PhiStart) const // **************************************************************************** { - static const G4double substpsize = 0.1*CLHEP::mm; + static const G4double substpsize = 0.1*CLHEP::mm; // std::cout<<"*** GapAdjustment_s is called, a_energy="<<a_energy - // <<std::endl; - - const G4ThreeVector step( a_endPoint - a_startPoint ); - const G4int nofstep= int(step.mag()/substpsize)+1; - const G4double s_energy= a_energy/nofstep; - G4double corr_energy= 0.; - G4ThreeVector vstep, tmp; - for(G4int i = 0; i < nofstep; ++ i){ // loop for substeps - const G4double ds = (i + 0.5) / nofstep; - vstep = a_startPoint * (1. - ds) + a_endPoint * ds; - tmp = vstep; - const G4double dte = (this->*m_distance_to_the_nearest_electrode_type)(tmp); - if(fabs(dte) < s_CHC_Esr) continue; - const G4double gap = (this->*m_GetGapSize_type)(vstep); - corr_energy += s_energy / pow((gap / s_AverageGap), m_GApower) - * gap / (gap - s_CHC_Esr); - } - return corr_energy; + // <<std::endl; + + const G4ThreeVector step( a_endPoint - a_startPoint ); + const G4int nofstep= int(step.mag()/substpsize)+1; + const G4double s_energy= a_energy/nofstep; + G4double corr_energy= 0.; + + for(G4int i = 0; i < nofstep; ++ i){ // loop for substeps + const G4double ds = (i + 0.5) / nofstep; + const G4ThreeVector vstep = a_startPoint * (1. - ds) + a_endPoint * ds; + G4ThreeVector tmp = vstep; + const G4double dte = (this->*m_distance_to_the_nearest_electrode_type)(tmp, Barret_PhiStart); + if( fabs(dte) < CHC_Esr() ) continue; + const G4double gap = (this->*m_GetGapSize_type)(vstep); // const method + corr_energy += s_energy / pow((gap / s_AverageGap), GApower()) + * gap / ( gap - CHC_Esr() ); + } + return corr_energy; } // **************************************************************************** G4double EnergyCalculator::GapAdjustment__sE(G4double a_energy, - const G4ThreeVector& a_startPoint, - const G4ThreeVector& a_endPoint) // need to make const + const G4ThreeVector& a_startPoint, + const G4ThreeVector& a_endPoint, + G4double Barret_PhiStart) const // **************************************************************************** { - static const G4double substpsize = 0.1*CLHEP::mm; + static const G4double substpsize = 0.1*CLHEP::mm; // std::cout<<"*** GapAdjustment__sE is called, a_energy="<<a_energy - // <<std::endl; - - const G4ThreeVector step( a_endPoint - a_startPoint ); - const G4int nofstep = G4int(step.mag()/substpsize) + 1; - const G4double s_energy = a_energy / nofstep; - G4double corr_energy = 0; - G4ThreeVector vstep, tmp; - - for(G4int i = 0; i < nofstep; i ++){ - const G4double ds = (i + 0.5) / nofstep; - vstep = a_startPoint * (1. - ds) + a_endPoint * ds; - tmp = vstep; - const G4double dte = (this->*m_distance_to_the_nearest_electrode_type)(tmp); - if(fabs(dte) < s_CHC_Esr) continue; - const G4double gap = (this->*m_GetGapSize_type)(vstep); - const G4double efield = 0.01 * (this->*m_GetHV_Value_type)(vstep) / gap; // estimate Efield[KV/cm] - corr_energy += s_energy / s_AverageCurrent / gap * - IonReco(efield) * DriftVelo(s_LArTemperature_av, efield) - * gap / (gap - s_CHC_Esr); - } - return corr_energy; + // <<std::endl; + + const G4ThreeVector step( a_endPoint - a_startPoint ); + const G4int nofstep = G4int(step.mag()/substpsize) + 1; + const G4double step_energy = a_energy / nofstep; + G4double corr_energy = 0; + + for(G4int i = 0; i < nofstep; i ++){ + const G4double ds = (i + 0.5) / nofstep; + const G4ThreeVector vstep = a_startPoint * (1. - ds) + a_endPoint * ds; + G4ThreeVector tmp = vstep; + const G4double dte = (this->*m_distance_to_the_nearest_electrode_type)(tmp, Barret_PhiStart); + if( fabs(dte) < CHC_Esr() ) continue; + const G4double gap = (this->*m_GetGapSize_type)(vstep); // const method + const G4double efield = 0.01 * (this->*m_GetHV_Value_type)(vstep, Barret_PhiStart) / gap; // estimate Efield[KV/cm] + corr_energy += step_energy / s_AverageCurrent / gap * + IonReco(efield) * DriftVelo(s_LArTemperature_av, efield) + * gap / ( gap - CHC_Esr() ); + } + return corr_energy; } // **************************************************************************** // The static arrays that describe the endcap geometry. Mostly these @@ -1203,100 +1175,97 @@ typedef struct { } geometry_t; static const geometry_t geometry[] = -// zSide sampling region etaScale etaOffset maxEta gapsPerBin maxPhi -{ { 3, 1, 0, 10, 25 , 6, 4, 63 }, - { 3, 2, 0, 10, 25 , 6, 4, 63 }, - { 2, 1, 5, 40, 96 , 3, 12, 63 }, - { 2, 1, 4, 160, 320 , 63, 12, 63 }, - { 2, 1, 3, 240, 432 , 47, 12, 63 }, - { 2, 1, 2, 320, 480 , 95, 12, 63 }, - { 2, 1, 1, 40, 57 , 2, 12, 63 }, - { 2, 2, 1, 40, 57 , 42, 3, 255 }, - { 2, 3, 0, 20, 30 , 19, 3, 255 }, - // These last two compartments did not exist separately - // in the G3 study. Yes, they have only one bin in eta. - { 2, 1, 0, 20, 27.5, 0, 12, 63 }, - { 2, 2, 0, 20, 27.5, 0, 3, 255 } }; + // zSide sampling region etaScale etaOffset maxEta gapsPerBin maxPhi + { { 3, 1, 0, 10, 25 , 6, 4, 63 }, + { 3, 2, 0, 10, 25 , 6, 4, 63 }, + { 2, 1, 5, 40, 96 , 3, 12, 63 }, + { 2, 1, 4, 160, 320 , 63, 12, 63 }, + { 2, 1, 3, 240, 432 , 47, 12, 63 }, + { 2, 1, 2, 320, 480 , 95, 12, 63 }, + { 2, 1, 1, 40, 57 , 2, 12, 63 }, + { 2, 2, 1, 40, 57 , 42, 3, 255 }, + { 2, 3, 0, 20, 30 , 19, 3, 255 }, + // These last two compartments did not exist separately + // in the G3 study. Yes, they have only one bin in eta. + { 2, 1, 0, 20, 27.5, 0, 12, 63 }, + { 2, 2, 0, 20, 27.5, 0, 3, 255 } }; // **************************************************************************** G4bool EnergyCalculator::FindIdentifier_Default( - const G4Step* step, - std::vector<LArHitData>& hdata, - G4ThreeVector &startPointLocal, - G4ThreeVector &endPointLocal -) // need to make const. return m_identifier, not modify + const G4Step* step, + std::vector<LArHitData>& hdata, + G4ThreeVector &startPointLocal, + G4ThreeVector &endPointLocal + ) const // **************************************************************************** { - G4bool validhit = true; - - const G4StepPoint* pre_step_point = step->GetPreStepPoint(); - const G4StepPoint* post_step_point = step->GetPostStepPoint(); - - const G4ThreeVector startPoint = pre_step_point->GetPosition(); - const G4ThreeVector endPoint = post_step_point->GetPosition(); -// p = (startPoint + endPoint) * 0.5; - const G4ThreeVector p = startPoint; // middle point may be out of volume - - const G4AffineTransform transformation = - pre_step_point->GetTouchable()->GetHistory()->GetTopTransform(); - - startPointLocal = transformation.TransformPoint(startPoint); - endPointLocal = transformation.TransformPoint(endPoint); -// pinLocal = (startPointLocal + endPointLocal) * 0.5; - const G4ThreeVector pinLocal = startPointLocal; // middle point may be out of volume - - const G4ThreeVector pforcell(pinLocal.x(), pinLocal.y() , - pinLocal.z() + lwc()->GetElecFocaltoWRP() + lwc()->GetdWRPtoFrontFace()); - - const G4double eta = pforcell.pseudoRapidity(); - const G4double z = pforcell.z(); - G4double phi = pforcell.phi(); - if(phi < 0.) phi += CLHEP::twopi; - - m_compartment = 0; - - if(lwc()->GetisInner()) - { - G4int ipad = G4int((eta - 2.5) / 0.1); - if(ipad > 6 || ipad < 0){ - (*m_msg) << MSG::WARNING - << "FindIdentifier: invalid hit, eta = " - << eta << ", ipad=" << ipad << endmsg; - validhit=false; - if (ipad<0) ipad=0; - if (ipad>6) ipad=6; - } - if(z < ziw[ipad]) m_compartment = 1; - else m_compartment = 2; - } else { // !isInner - G4int ipad = G4int((eta - 1.4) / 0.025); - if(ipad < 0) ipad = 0; // first electrode starts below eta=1.4 - if(ipad > 43){ - (*m_msg) << MSG::WARNING - << "FindIdentifier: invalid hit, eta = " - << eta << ", ipad = " << ipad << endmsg; - validhit=false; - ipad=43; - } - if(z < zsep12[ipad]){ - if (eta > 2.4) m_compartment = 3; - else if(eta > 2.0) m_compartment = 4; - else if(eta > 1.8) m_compartment = 5; - else if(eta > 1.5) m_compartment = 6; - else if(eta > 1.425) m_compartment = 7; - else m_compartment = 10; - } else { - if(z < zsep23[ipad/2]){ - if(eta > 1.425) m_compartment = 8; - else m_compartment = 11; - } else m_compartment = 9; - } - } -// if m_compartment==0, then none of the above "if's" were resolved. - - assert(m_compartment > 0); - - G4int c = m_compartment - 1; + G4bool validhit = true; + + const G4StepPoint* pre_step_point = step->GetPreStepPoint(); + const G4StepPoint* post_step_point = step->GetPostStepPoint(); + + const G4ThreeVector startPoint = pre_step_point->GetPosition(); + const G4ThreeVector endPoint = post_step_point->GetPosition(); + // p = (startPoint + endPoint) * 0.5; + const G4ThreeVector p = startPoint; // middle point may be out of volume + + const G4AffineTransform transformation = + pre_step_point->GetTouchable()->GetHistory()->GetTopTransform(); + + startPointLocal = transformation.TransformPoint(startPoint); + endPointLocal = transformation.TransformPoint(endPoint); + // pinLocal = (startPointLocal + endPointLocal) * 0.5; + const G4ThreeVector pinLocal = startPointLocal; // middle point may be out of volume + + const G4ThreeVector pforcell(pinLocal.x(), pinLocal.y() , + pinLocal.z() + lwc()->GetElecFocaltoWRP() + lwc()->GetdWRPtoFrontFace()); + + const G4double eta = pforcell.pseudoRapidity(); + const G4double z = pforcell.z(); + G4double phi = pforcell.phi(); + if(phi < 0.) phi += CLHEP::twopi; + + G4int m_compartment = 0; + + if(lwc()->GetisInner()) + { + G4int ipad = G4int((eta - 2.5) / 0.1); + if(ipad > 6 || ipad < 0){ + ATH_MSG_WARNING("FindIdentifier: invalid hit, eta = " + << eta << ", ipad=" << ipad); + validhit=false; + if (ipad<0) ipad=0; + if (ipad>6) ipad=6; + } + if(z < ziw[ipad]) m_compartment = 1; + else m_compartment = 2; + } else { // !isInner + G4int ipad = G4int((eta - 1.4) / 0.025); + if(ipad < 0) ipad = 0; // first electrode starts below eta=1.4 + if(ipad > 43){ + ATH_MSG_WARNING("FindIdentifier: invalid hit, eta = " + << eta << ", ipad = " << ipad); + validhit=false; + ipad=43; + } + if(z < zsep12[ipad]){ + if (eta > 2.4) m_compartment = 3; + else if(eta > 2.0) m_compartment = 4; + else if(eta > 1.8) m_compartment = 5; + else if(eta > 1.5) m_compartment = 6; + else if(eta > 1.425) m_compartment = 7; + else m_compartment = 10; + } else { + if(z < zsep23[ipad/2]){ + if(eta > 1.425) m_compartment = 8; + else m_compartment = 11; + } else m_compartment = 9; + } + } + // if m_compartment==0, then none of the above "if's" were resolved. + assert(m_compartment > 0); + + G4int c = m_compartment - 1; // There were some differences between the definition of a // "compartment" in the G3 study and the assignment of @@ -1310,360 +1279,355 @@ G4bool EnergyCalculator::FindIdentifier_Default( // if ( m_compartment == 11 ) m_compartment = 8; -// 19-04-2007 AMS use constant m_AtlasZside obtained in constructor + // 19-04-2007 AMS use constant m_AtlasZside obtained in constructor // zSide is negative if z<0. -// m_AtlasZside = geometry[c].zSide; -// if(p.z() < 0.) m_AtlasZside = -m_AtlasZside; -// G4int atlasside = m_AtlasZside; - const G4int atlasside = lwc()->GetAtlasZside() * geometry[c].zSide; + // m_AtlasZside = geometry[c].zSide; + // if(p.z() < 0.) m_AtlasZside = -m_AtlasZside; + // G4int atlasside = m_AtlasZside; + const G4int atlasside = lwc()->GetAtlasZside() * geometry[c].zSide; - G4int sampling = geometry[c].sampling; - G4int region = geometry[c].region; + G4int sampling = geometry[c].sampling; + G4int region = geometry[c].region; - G4int etaBin = G4int(eta * geometry[c].etaScale - geometry[c].etaOffset); + G4int etaBin = G4int(eta * geometry[c].etaScale - geometry[c].etaOffset); - if(etaBin < 0 || etaBin > geometry[c].maxEta) { - validhit=false; - if (etaBin<0) etaBin=0; - if (etaBin>geometry[c].maxEta) etaBin=geometry[c].maxEta; - } + if(etaBin < 0 || etaBin > geometry[c].maxEta) { + validhit=false; + if (etaBin<0) etaBin=0; + if (etaBin>geometry[c].maxEta) etaBin=geometry[c].maxEta; + } -// =============== -// Treatment of the constraints on the electrodes' geometry, -// and HV buses (J.T. 10.2004) -// Does not work for old G3 numbering scheme!! + // =============== + // Treatment of the constraints on the electrodes' geometry, + // and HV buses (J.T. 10.2004) + // Does not work for old G3 numbering scheme!! // overall geom param.: -// G4double WheelThickness = 514.*CLHEP::mm; - static const G4double rOuterCutoff = 2034.*CLHEP::mm; - static const G4double gapBetweenWheels = 3.*CLHEP::mm; - static const G4double eta_hi = 3.2; - static const G4double eta_mid= 2.5; - static const G4double eta_low= 1.375; + // G4double WheelThickness = 514.*CLHEP::mm; + static const G4double rOuterCutoff = 2034.*CLHEP::mm; + static const G4double gapBetweenWheels = 3.*CLHEP::mm; + static const G4double eta_hi = 3.2; + static const G4double eta_mid= 2.5; + static const G4double eta_low= 1.375; // specific param of electrode design; - static const G4double WidthofHVBus = 2.5*CLHEP::mm; - static const G4double WidthofKaptonGap = 1.0*CLHEP::mm; - static const G4double WidthofKaptonGapinS1 = 0.5*CLHEP::mm; - static const G4double WidthofKaptonGapatEdge = 2.*CLHEP::mm; - static const G4double zStartofIW = 4.*CLHEP::mm; // what follows measured by hand - static const G4double zStartofC7 = 8.4*CLHEP::mm; - static const G4double zStartofC3 = 7.8*CLHEP::mm; - static const G4double zEndofC8e2 = 4.5*CLHEP::mm; - static const G4double zEndofC9e19 = 30.*CLHEP::mm; - static const G4double r0aofC9e18 = 743.1*CLHEP::mm; - static const G4double r0cofC9e18 = 751.1*CLHEP::mm; - static const G4double zSepofC9e18 = 14.*CLHEP::mm; - static const G4double txofC9e18 = 0.48; - - static const G4double DistMax = WidthofHVBus+WidthofKaptonGap; - static const G4double DistMaxS1 = WidthofHVBus+WidthofKaptonGapinS1; - static const G4double DistMaxatEdgeinCrack = gapBetweenWheels/2.+WidthofKaptonGapatEdge+ - WidthofHVBus+WidthofKaptonGap/2.; - static const G4double DistMinatEdgeinCrack =(gapBetweenWheels+WidthofKaptonGapatEdge)/2.; - - G4double dist,dist_min,dist_max,eta_min,eta_max; + static const G4double WidthofHVBus = 2.5*CLHEP::mm; + static const G4double WidthofKaptonGap = 1.0*CLHEP::mm; + static const G4double WidthofKaptonGapinS1 = 0.5*CLHEP::mm; + static const G4double WidthofKaptonGapatEdge = 2.*CLHEP::mm; + static const G4double zStartofIW = 4.*CLHEP::mm; // what follows measured by hand + static const G4double zStartofC7 = 8.4*CLHEP::mm; + static const G4double zStartofC3 = 7.8*CLHEP::mm; + static const G4double zEndofC8e2 = 4.5*CLHEP::mm; + static const G4double zEndofC9e19 = 30.*CLHEP::mm; + static const G4double r0aofC9e18 = 743.1*CLHEP::mm; + static const G4double r0cofC9e18 = 751.1*CLHEP::mm; + static const G4double zSepofC9e18 = 14.*CLHEP::mm; + static const G4double txofC9e18 = 0.48; + + static const G4double DistMax = WidthofHVBus+WidthofKaptonGap; + static const G4double DistMaxS1 = WidthofHVBus+WidthofKaptonGapinS1; + static const G4double DistMaxatEdgeinCrack = gapBetweenWheels/2.+WidthofKaptonGapatEdge+ + WidthofHVBus+WidthofKaptonGap/2.; + static const G4double DistMinatEdgeinCrack =(gapBetweenWheels+WidthofKaptonGapatEdge)/2.; + + G4double dist,dist_min,dist_max,eta_min,eta_max; // check against the edges of the electrodes: hits are deleted if the // distance of the hit to the Cu signal layer on the (r,z) plane // is bigger than 1mm. - switch(m_compartment){ + switch(m_compartment){ -//compartment=1:inner wheel S1 + //compartment=1:inner wheel S1 - case 1: - switch(etaBin){ - case 0: - if(pinLocal.z() < zStartofIW ) { - validhit=false; - } - if (-DistanceToEtaLine( pforcell, eta_mid) < DistMinatEdgeinCrack) { - validhit=false; - } - break; - case 4: - case 5: - if(pinLocal.z() < zStartofIW ) { - validhit=false; - } - break; - case 6: - if(pinLocal.z() < zStartofIW ) { - validhit=false; - } - if (DistanceToEtaLine( pforcell, eta_hi) < WidthofKaptonGapatEdge * 0.5) { - validhit=false; - } - break; - } - break; - -//compartment=2:inner wheel S2 - - case 2: - switch(etaBin){ - case 0: - if(-DistanceToEtaLine( pforcell, eta_mid) < DistMinatEdgeinCrack) { - validhit=false; - } - break; - case 6: - if (DistanceToEtaLine( pforcell, eta_hi) < WidthofKaptonGapatEdge * 0.5) { - validhit=false; - } - break; - } - break; - -//compartment=3:outer wheel S1 eta 2.4 - - case 3: - switch(etaBin){ - case 0: - case 1: - case 2: - if(pinLocal.z() < zStartofC3 ) { - validhit=false; - } - break; - case 3: - if(pinLocal.z() < zStartofC3 ) { - validhit=false; - } - - if(DistanceToEtaLine( pforcell, eta_mid) < DistMinatEdgeinCrack) { - validhit=false; - } - break; - } - break; - -//compartment=7:outer wheel S1 eta 1.425 - - case 7: - if(pinLocal.z()<zStartofC7) { - validhit=false; - } - - break; - -//compartment=8:outer wheel S2 eta 1.425 - - case 8: - switch(etaBin){ - case 0: - case 1: - if(rOuterCutoff-pforcell.perp() < WidthofKaptonGapatEdge * 0.5) { - validhit=false; - } - - break; - case 2: - if(pinLocal.z() > lwc()->GetWheelThickness()-zEndofC8e2) { - validhit=false; - } - break; - case 42: - if(DistanceToEtaLine( pforcell, eta_mid) < DistMinatEdgeinCrack) { - validhit=false; - } - - break; - } - break; - -//compartment=9:outer wheel S3 eta 1.5 - - case 9: - switch(etaBin){ - case 18: - if(pinLocal.z() > lwc()->GetWheelThickness()-zEndofC9e19 && - pinLocal.z() <= lwc()->GetWheelThickness()-zSepofC9e18 && - pinLocal.perp() < r0aofC9e18 ) { -// G4cout<<" Skip of Hit in aC9e18"<<" r="<<pinLocal.perp()<< -// " zinWheel="<<pinLocal.z()<<G4endl; - validhit=false; - - } - if(pinLocal.z() > lwc()->GetWheelThickness()-zSepofC9e18 && - pinLocal.perp() < + case 1: + switch(etaBin){ + case 0: + if(pinLocal.z() < zStartofIW ) { + validhit=false; + } + if (-DistanceToEtaLine( pforcell, eta_mid) < DistMinatEdgeinCrack) { + validhit=false; + } + break; + case 4: + case 5: + if(pinLocal.z() < zStartofIW ) { + validhit=false; + } + break; + case 6: + if(pinLocal.z() < zStartofIW ) { + validhit=false; + } + if (DistanceToEtaLine( pforcell, eta_hi) < WidthofKaptonGapatEdge * 0.5) { + validhit=false; + } + break; + } + break; + + //compartment=2:inner wheel S2 + + case 2: + switch(etaBin){ + case 0: + if(-DistanceToEtaLine( pforcell, eta_mid) < DistMinatEdgeinCrack) { + validhit=false; + } + break; + case 6: + if (DistanceToEtaLine( pforcell, eta_hi) < WidthofKaptonGapatEdge * 0.5) { + validhit=false; + } + break; + } + break; + + //compartment=3:outer wheel S1 eta 2.4 + + case 3: + switch(etaBin){ + case 0: + case 1: + case 2: + if(pinLocal.z() < zStartofC3 ) { + validhit=false; + } + break; + case 3: + if(pinLocal.z() < zStartofC3 ) { + validhit=false; + } + + if(DistanceToEtaLine( pforcell, eta_mid) < DistMinatEdgeinCrack) { + validhit=false; + } + break; + } + break; + + //compartment=7:outer wheel S1 eta 1.425 + + case 7: + if(pinLocal.z()<zStartofC7) { + validhit=false; + } + + break; + + //compartment=8:outer wheel S2 eta 1.425 + + case 8: + switch(etaBin){ + case 0: + case 1: + if(rOuterCutoff-pforcell.perp() < WidthofKaptonGapatEdge * 0.5) { + validhit=false; + } + + break; + case 2: + if(pinLocal.z() > lwc()->GetWheelThickness()-zEndofC8e2) { + validhit=false; + } + break; + case 42: + if(DistanceToEtaLine( pforcell, eta_mid) < DistMinatEdgeinCrack) { + validhit=false; + } + + break; + } + break; + + //compartment=9:outer wheel S3 eta 1.5 + + case 9: + switch(etaBin){ + case 18: + if(pinLocal.z() > lwc()->GetWheelThickness()-zEndofC9e19 && + pinLocal.z() <= lwc()->GetWheelThickness()-zSepofC9e18 && + pinLocal.perp() < r0aofC9e18 ) { + // G4cout<<" Skip of Hit in aC9e18"<<" r="<<pinLocal.perp()<< + // " zinWheel="<<pinLocal.z()<<G4endl; + validhit=false; + + } + if(pinLocal.z() > lwc()->GetWheelThickness()-zSepofC9e18 && + pinLocal.perp() < r0cofC9e18+txofC9e18*(pinLocal.z()-(lwc()->GetWheelThickness()-zSepofC9e18))){ -// G4cout<<" Skip of Hit in cC9e18"<<" r="<<pinLocal.perp()<< -// " zinWheel="<<pinLocal.z()<<G4endl; - validhit=false; - - } - break; - case 19: - if(pinLocal.z() > lwc()->GetWheelThickness()-zEndofC9e19) { -// G4cout<<" Skip of Hit in z crack C9e19"<<" r="<<pinLocal.perp()<< -// " zinWheel="<<pinLocal.z()<<G4endl; - validhit=false; + // G4cout<<" Skip of Hit in cC9e18"<<" r="<<pinLocal.perp()<< + // " zinWheel="<<pinLocal.z()<<G4endl; + validhit=false; - } - if(DistanceToEtaLine( pforcell, eta_mid) < DistMinatEdgeinCrack) { -// G4cout<<" Skip of Hit in eta crack of C9e19"<< -// " r="<<pinLocal.perp()<< " zinWheel="<<pinLocal.z()<<G4endl; - validhit=false; - } - break; - } - break; + } + break; + case 19: + if(pinLocal.z() > lwc()->GetWheelThickness()-zEndofC9e19) { + // G4cout<<" Skip of Hit in z crack C9e19"<<" r="<<pinLocal.perp()<< + // " zinWheel="<<pinLocal.z()<<G4endl; + validhit=false; + + } + if(DistanceToEtaLine( pforcell, eta_mid) < DistMinatEdgeinCrack) { + // G4cout<<" Skip of Hit in eta crack of C9e19"<< + // " r="<<pinLocal.perp()<< " zinWheel="<<pinLocal.z()<<G4endl; + validhit=false; + } + break; + } + break; -//compartment=10:outer wheel S1 eta 1.375 + //compartment=10:outer wheel S1 eta 1.375 - case 10: - if(-DistanceToEtaLine( pforcell, eta_low) < WidthofKaptonGapatEdge * 0.5) { - validhit=false; - } - if(rOuterCutoff-pforcell.perp() < WidthofKaptonGapatEdge * 0.5) - validhit=false; - break; + case 10: + if(-DistanceToEtaLine( pforcell, eta_low) < WidthofKaptonGapatEdge * 0.5) { + validhit=false; + } + if(rOuterCutoff-pforcell.perp() < WidthofKaptonGapatEdge * 0.5) + validhit=false; + break; -//compartment=11:outer wheel S2 eta 1.375 + //compartment=11:outer wheel S2 eta 1.375 - case 11: - if(rOuterCutoff-pforcell.perp() < WidthofKaptonGapatEdge/2.) { - validhit=false; - } - break; - } + case 11: + if(rOuterCutoff-pforcell.perp() < WidthofKaptonGapatEdge/2.) { + validhit=false; + } + break; + } -// treatment of HV bus;the signal collected in the region of the bus -// should be attached to different cell what found above + // treatment of HV bus;the signal collected in the region of the bus + // should be attached to different cell what found above // outer wheel, S1: - G4int cnew=-1; - - if(m_compartment == 10 || m_compartment == 7 ){ - - eta_max = (geometry[c].etaOffset+etaBin+1.)/ geometry[c].etaScale; - dist=DistanceToEtaLine(pforcell,eta_max); -// assert(dist >= 0.); - if (dist>=0. && dist <= DistMaxS1) cnew = c+1; - } - -// outer wheel, S3: - - else if(m_compartment == 9 ) { - - eta_min=(geometry[c].etaOffset+etaBin) / geometry[c].etaScale; - eta_max=(geometry[c].etaOffset+etaBin+1.)/ geometry[c].etaScale; - dist_min =DistanceToEtaLine(pforcell,eta_min); - dist_max =DistanceToEtaLine(pforcell,eta_max); - -// assert(dist_min <=0.); -// assert(dist_max >=0.); - - if(dist_min<=0. && -dist_min <= DistMax) cnew = c-1; - else { - if(etaBin != geometry[c].maxEta) { - if(dist_max>=0. && dist_max <= DistMax) cnew = c-1; - } - else{ // close to the crack region between wheels, etaBin=maxEta; - if(dist_max >= DistMinatEdgeinCrack && - dist_max <= DistMaxatEdgeinCrack) cnew=c-1; - } - } - } - - // inner wheel S2: - - else if(m_compartment == 2) { - - eta_min=(geometry[c].etaOffset+etaBin)/geometry[c].etaScale; - dist = DistanceToEtaLine(pforcell,eta_min); - -// assert(dist<=0.); - - if(etaBin == 0) { - if(dist <=0. && -dist >= DistMinatEdgeinCrack && - -dist <= DistMaxatEdgeinCrack) cnew=c-1; - } - else if(dist<=0. && -dist <= DistMax) cnew=c-1; - } - - if(cnew >= 0 && cnew <= 10 ){ - -/* G4cout<<" edep in HV bus: old:comp="<<c+1<<" sampl="<<sampling<< - " eta="<<etaBin<<" reg="<<region - <<G4endl;*/ - - c=cnew; - m_compartment = c + 1; - sampling = geometry[c].sampling; - region = geometry[c].region; - etaBin = G4int(eta * geometry[c].etaScale - geometry[c].etaOffset); -/* G4cout<<" edep in HV bus: new:comp="<<c+1<<" sampl="<<sampling<< - " eta="<<etaBin<<" reg="<<region - <<G4endl;*/ - } -//=== end of edge and HV bus treatment================ - - - G4int phiGap = lwc()->GetPhiGap(pinLocal); - if(lwc()->GetisModule()){ - if(phiGap < lwc()->GetFirstFan() || phiGap >= lwc()->GetLastFan()){ - // this hit is beyond of edge absorbers of the module and should be ignored - if (phiGap < lwc()->GetFirstFan()) phiGap = lwc()->GetFirstFan(); - if (phiGap >= lwc()->GetLastFan()) phiGap = lwc()->GetLastFan() - 1; - validhit = false; - } - } - - G4int phiBin = phiGap / geometry[c].gapsPerBin; - - if(atlasside < 0){ -// The following formula assumes that the z<0 endcap was derived -// from the positive endcap by rotateY(180.*deg) -// 29-March-2004 ML - phiBin = (geometry[c].maxPhi - 1)/2 - phiBin; - if(phiBin < 0) phiBin += geometry[c].maxPhi + 1; - } - - assert(phiBin >= 0); - assert(phiBin <= geometry[c].maxPhi); - if(phiBin<0) {phiBin=0;validhit=false;} - if(phiBin>geometry[c].maxPhi) { - phiBin=geometry[c].maxPhi; - validhit=false; - } - if(etaBin > geometry[c].maxEta){ - (*m_msg) << MSG::WARNING - << "FindIdentifier: invalid hit, etaBin = " - << etaBin << " > geometry[" << c << "].maxEta=" - << geometry[c].maxEta << endmsg; - etaBin=geometry[c].maxEta; - validhit=false; - } - if(etaBin < 0){ - (*m_msg) << MSG::WARNING - << "FindIdentifier: invalid hit, etaBin < 0" - << endmsg; - etaBin=0; - validhit=false; - } - - hdata[0].id.clear(); - hdata[0].id << 4 // LArCalorimeter - << 1 // LArEM - << atlasside - << sampling - << region - << etaBin - << phiBin; - - G4double timeOfFlight = (pre_step_point->GetGlobalTime() + - post_step_point->GetGlobalTime()) * 0.5; - hdata[0].time = timeOfFlight/Units::ns - p.mag()/Units::c_light/Units::ns; - if (hdata[0].time > m_OOTcut) m_isInTime = false; - else m_isInTime = true; - - return validhit; + G4int cnew=-1; + + if(m_compartment == 10 || m_compartment == 7 ){ + + eta_max = (geometry[c].etaOffset+etaBin+1.)/ geometry[c].etaScale; + dist=DistanceToEtaLine(pforcell,eta_max); + // assert(dist >= 0.); + if (dist>=0. && dist <= DistMaxS1) cnew = c+1; + } + + // outer wheel, S3: + + else if(m_compartment == 9 ) { + + eta_min=(geometry[c].etaOffset+etaBin) / geometry[c].etaScale; + eta_max=(geometry[c].etaOffset+etaBin+1.)/ geometry[c].etaScale; + dist_min =DistanceToEtaLine(pforcell,eta_min); + dist_max =DistanceToEtaLine(pforcell,eta_max); + + // assert(dist_min <=0.); + // assert(dist_max >=0.); + + if(dist_min<=0. && -dist_min <= DistMax) cnew = c-1; + else { + if(etaBin != geometry[c].maxEta) { + if(dist_max>=0. && dist_max <= DistMax) cnew = c-1; + } + else{ // close to the crack region between wheels, etaBin=maxEta; + if(dist_max >= DistMinatEdgeinCrack && + dist_max <= DistMaxatEdgeinCrack) cnew=c-1; + } + } + } + + // inner wheel S2: + + else if(m_compartment == 2) { + + eta_min=(geometry[c].etaOffset+etaBin)/geometry[c].etaScale; + dist = DistanceToEtaLine(pforcell,eta_min); + + // assert(dist<=0.); + + if(etaBin == 0) { + if(dist <=0. && -dist >= DistMinatEdgeinCrack && + -dist <= DistMaxatEdgeinCrack) cnew=c-1; + } + else if(dist<=0. && -dist <= DistMax) cnew=c-1; + } + + if(cnew >= 0 && cnew <= 10 ){ + + /* G4cout<<" edep in HV bus: old:comp="<<c+1<<" sampl="<<sampling<< + " eta="<<etaBin<<" reg="<<region + <<G4endl;*/ + + c=cnew; + m_compartment = c + 1; + sampling = geometry[c].sampling; + region = geometry[c].region; + etaBin = G4int(eta * geometry[c].etaScale - geometry[c].etaOffset); + /* G4cout<<" edep in HV bus: new:comp="<<c+1<<" sampl="<<sampling<< + " eta="<<etaBin<<" reg="<<region + <<G4endl;*/ + } + //=== end of edge and HV bus treatment================ + + + G4int phiGap = lwc()->GetPhiGap(pinLocal); + if(lwc()->GetisModule()){ + if(phiGap < lwc()->GetFirstFan() || phiGap >= lwc()->GetLastFan()){ + // this hit is beyond of edge absorbers of the module and should be ignored + if (phiGap < lwc()->GetFirstFan()) phiGap = lwc()->GetFirstFan(); + if (phiGap >= lwc()->GetLastFan()) phiGap = lwc()->GetLastFan() - 1; + validhit = false; + } + } + + G4int phiBin = phiGap / geometry[c].gapsPerBin; + + if(atlasside < 0){ + // The following formula assumes that the z<0 endcap was derived + // from the positive endcap by rotateY(180.*deg) + // 29-March-2004 ML + phiBin = (geometry[c].maxPhi - 1)/2 - phiBin; + if(phiBin < 0) phiBin += geometry[c].maxPhi + 1; + } + + assert(phiBin >= 0); + assert(phiBin <= geometry[c].maxPhi); + if(phiBin<0) {phiBin=0;validhit=false;} + if(phiBin>geometry[c].maxPhi) { + phiBin=geometry[c].maxPhi; + validhit=false; + } + if(etaBin > geometry[c].maxEta){ + ATH_MSG_WARNING("FindIdentifier: invalid hit, etaBin = " + << etaBin << " > geometry[" << c << "].maxEta=" + << geometry[c].maxEta); + etaBin=geometry[c].maxEta; + validhit=false; + } + if(etaBin < 0){ + ATH_MSG_WARNING("FindIdentifier: invalid hit, etaBin < 0"); + etaBin=0; + validhit=false; + } + + hdata[0].id.clear(); + hdata[0].id << 4 // LArCalorimeter + << 1 // LArEM + << atlasside + << sampling + << region + << etaBin + << phiBin; + + G4double timeOfFlight = (pre_step_point->GetGlobalTime() + + post_step_point->GetGlobalTime()) * 0.5; + hdata[0].time = timeOfFlight/Units::ns - p.mag()/CLHEP::c_light/Units::ns; + + return validhit; } /* gives the distance to the nearest electrode's surface */ @@ -1671,25 +1635,25 @@ G4bool EnergyCalculator::FindIdentifier_Default( G4double EnergyCalculator::distance_to_the_nearest_electrode(const G4ThreeVector &p) const // **************************************************************************** { - G4ThreeVector p1( p ); - int fan_number = G4int((p.phi() - M_PI_2 - lwc()->GetZeroFanPhi()) / lwc()->GetFanStepOnPhi()); - G4double angle = lwc()->GetFanStepOnPhi() * fan_number + lwc()->GetZeroFanPhi(); - p1.rotateZ(-angle); - G4double d0 = lwc()->DistanceToTheNeutralFibre(p1, lwc()->adjust_fan_number(fan_number)); - G4double d1; - d1 = d0; - G4int delta = 1; - if(d0 < 0.) delta = -1; - angle = - lwc()->GetFanStepOnPhi() * delta; - do{ - p1.rotateZ(angle); - fan_number += delta; - d1 = lwc()->DistanceToTheNeutralFibre(p1, lwc()->adjust_fan_number(fan_number)); - } while(d0 * d1 > 0.); - p1.rotateZ(-angle / 2); - if(delta > 0) fan_number --; - G4double d3 = lwc()->DistanceToTheNeutralFibre(p1, lwc()->adjust_fan_number(fan_number)); - return(fabs(d3) - m_ElectrodeFanHalfThickness); + G4ThreeVector p1( p ); + int fan_number = G4int((p.phi() - M_PI_2 - lwc()->GetZeroFanPhi()) / lwc()->GetFanStepOnPhi()); + G4double angle = lwc()->GetFanStepOnPhi() * fan_number + lwc()->GetZeroFanPhi(); + p1.rotateZ(-angle); + G4double d0 = lwc()->DistanceToTheNeutralFibre(p1, lwc()->adjust_fan_number(fan_number)); + G4double d1; + d1 = d0; + G4int delta = 1; + if(d0 < 0.) delta = -1; + angle = - lwc()->GetFanStepOnPhi() * delta; + do{ + p1.rotateZ(angle); + fan_number += delta; + d1 = lwc()->DistanceToTheNeutralFibre(p1, lwc()->adjust_fan_number(fan_number)); + } while(d0 * d1 > 0.); + p1.rotateZ(-angle / 2); + if(delta > 0) fan_number --; + G4double d3 = lwc()->DistanceToTheNeutralFibre(p1, lwc()->adjust_fan_number(fan_number)); + return(fabs(d3) - ElectrodeFanHalfThickness()); } // No account for edge effects in this function in case of module, @@ -1701,39 +1665,39 @@ G4double EnergyCalculator::distance_to_the_nearest_electrode(const G4ThreeVector double EnergyCalculator::GetGapSize(const G4ThreeVector& p) const // **************************************************************************** { - G4ThreeVector p1 ( p ); - int fan_number = G4int((p.phi() - M_PI_2 - lwc()->GetZeroFanPhi()) / lwc()->GetFanStepOnPhi()); - G4double angle = lwc()->GetFanStepOnPhi() * fan_number + lwc()->GetZeroFanPhi(); - p1.rotateZ(-angle); - const G4double d0 = lwc()->DistanceToTheNeutralFibre(p1, lwc()->adjust_fan_number(fan_number)); - - const G4int delta = (d0 < 0.)? -1 : 1; - G4double d1(d0), d2; - - angle = - lwc()->GetFanStepOnPhi() * delta; - do { - d2 = d1; - p1.rotateZ(angle); - fan_number += delta; - d1 = lwc()->DistanceToTheNeutralFibre(p1, lwc()->adjust_fan_number(fan_number)); - } while(d0 * d1 > 0.); - p1.rotateZ(-angle / 2); - if(delta > 0) fan_number --; - const G4double d3 = lwc()->DistanceToTheNeutralFibre(p1, lwc()->adjust_fan_number(fan_number)); - if(d3 * d2 < 0.){ - return(fabs(d2) - - lwc()->GetFanHalfThickness() + fabs(d3) - m_ElectrodeFanHalfThickness); - } else { - return(fabs(d1) - - lwc()->GetFanHalfThickness() + fabs(d3) - m_ElectrodeFanHalfThickness); - } + G4ThreeVector p1 ( p ); + int fan_number = G4int((p.phi() - M_PI_2 - lwc()->GetZeroFanPhi()) / lwc()->GetFanStepOnPhi()); + G4double angle = lwc()->GetFanStepOnPhi() * fan_number + lwc()->GetZeroFanPhi(); + p1.rotateZ(-angle); + const G4double d0 = lwc()->DistanceToTheNeutralFibre(p1, lwc()->adjust_fan_number(fan_number)); + + const G4int delta = (d0 < 0.)? -1 : 1; + G4double d1(d0), d2; + + angle = - lwc()->GetFanStepOnPhi() * delta; + do { + d2 = d1; + p1.rotateZ(angle); + fan_number += delta; + d1 = lwc()->DistanceToTheNeutralFibre(p1, lwc()->adjust_fan_number(fan_number)); + } while(d0 * d1 > 0.); + p1.rotateZ(-angle / 2); + if(delta > 0) fan_number --; + const G4double d3 = lwc()->DistanceToTheNeutralFibre(p1, lwc()->adjust_fan_number(fan_number)); + if(d3 * d2 < 0.){ + return(fabs(d2) + - lwc()->GetFanHalfThickness() + fabs(d3) - ElectrodeFanHalfThickness()); + } else { + return(fabs(d1) + - lwc()->GetFanHalfThickness() + fabs(d3) - ElectrodeFanHalfThickness()); + } } // **************************************************************************** void EnergyCalculator::SetConst_InnerBarrett(void){ -// **************************************************************************** + // **************************************************************************** if(s_SetConstInnerBarrett) return; - s_SetConstInnerBarrett=true; + s_SetConstInnerBarrett=true; std::cout <<" ===>>> ERROR!! SetConst_InnerBarrett is called!!!" <<std::endl; exit(99); @@ -1741,14 +1705,14 @@ void EnergyCalculator::SetConst_InnerBarrett(void){ // **************************************************************************** void EnergyCalculator::SetConst_OuterBarrett(void){ -// **************************************************************************** + // **************************************************************************** if(s_SetConstOuterBarrett) return; - s_SetConstOuterBarrett=true; + s_SetConstOuterBarrett=true; for(G4int i=0;i<=20;++i){ - const G4double teta = 2.*atan( exp(-s_S3_Etalim[i])); - s_S3_Rlim[i] = s_RefzDist*tan(teta); + const G4double teta = 2.*atan( exp(-s_S3_Etalim[i])); + s_S3_Rlim[i] = s_RefzDist*tan(teta); } const G4double inv_ColdCorrection = 1. / s_ColdCorrection; @@ -1829,737 +1793,656 @@ void EnergyCalculator::SetConst_OuterBarrett(void){ } // **************************************************************************** G4bool EnergyCalculator::GetCompartment_Barrett( - G4ThreeVector pforcell, G4double r_inb, G4double z_inb, G4double eta_inb, - G4int &b_compartment, G4int &etabin) const{ -// **************************************************************************** + G4ThreeVector pforcell, G4double r_inb, G4double z_inb, G4double eta_inb, + G4int &b_compartment, G4int &etabin) const { + // **************************************************************************** - G4double d,d1,d2,rlim1,rlim2,rlim3,zlim1,zlim2,eta1,eta2; - G4int i; - G4int i0 = 3; + G4double d,d1,d2,rlim1,rlim2,rlim3,zlim1,zlim2,eta1,eta2; + G4int i; + G4int i0 = 3; - G4bool validhit=true; - b_compartment=-99; - etabin=-99; + G4bool validhit=true; + b_compartment=-99; + etabin=-99; - if(r_inb > s_rlim[10] || r_inb < s_rlim[47] ) - {validhit=false; goto label99;} - if(z_inb > s_ZmaxOfSignal ){validhit=false; goto label99;} + if(r_inb > s_rlim[10] || r_inb < s_rlim[47] ) + {validhit=false; goto label99;} + if(z_inb > s_ZmaxOfSignal ){validhit=false; goto label99;} - if(r_inb > s_rlim[0]) { // Upper corner + if(r_inb > s_rlim[0]) { // Upper corner - if(r_inb > s_rlim[9]) { + if(r_inb > s_rlim[9]) { if(z_inb > s_zlim[0]) {validhit=false; goto label99;} -label1: + label1: if(z_inb > s_zlim[1]) { - b_compartment = 8; - etabin = 4; - goto label99; + b_compartment = 8; + etabin = 4; + goto label99; + } + label2: + b_compartment = 9; + etabin = 0; + goto label99; + } + if(r_inb > s_rlim[8]) goto label1; + if(r_inb > s_rlim[7]) goto label2; + if(r_inb > s_rlim[6]) { + b_compartment = 8; + etabin = 5; + goto label99; + } + if(r_inb > s_rlim[5]) { + label3: + b_compartment = 8; + etabin = 6; + goto label99; + } + if(r_inb > s_rlim[4]) { + if(z_inb > s_zlim[1]) goto label3; + + label4: + b_compartment = 9; + etabin = 1; + goto label99; + } + + if(r_inb > s_rlim[3]) goto label4; + + if(r_inb > s_rlim[2]) { + b_compartment = 8; + etabin = 7; + goto label99; + } + + if(r_inb > s_rlim[1]) { + b_compartment = 8; + etabin = 8; + goto label99; + } + if(r_inb > s_rlim[0]) { + b_compartment = 9; + etabin = 2; + goto label99; + } + } + + if(r_inb < s_rlim[38]){ // lower corner + + if( r_inb > s_rlim[40] ) { + b_compartment = 9; + etabin = 16; + goto label99; + } + + if( r_inb > s_rlim[41] ) { + label5: + b_compartment = 8; + etabin = 37; + goto label99; + } + + if( r_inb > s_rlim[42] ) { + + d=DistanceToEtaLine( pforcell,2.35); + if(fabs(d) < s_StripWidth+s_KapGap) { + if( d < 0.) { + + label6: + b_compartment = 8; + etabin = 38; + goto label99; + } + label7: + if( z_inb < s_zlim[3] ) goto label5; + goto label6; } -label2: - b_compartment = 9; - etabin = 0; - goto label99; - } - if(r_inb > s_rlim[8]) goto label1; - if(r_inb > s_rlim[7]) goto label2; - if(r_inb > s_rlim[6]) { - b_compartment = 8; - etabin = 5; - goto label99; - } - if(r_inb > s_rlim[5]) { -label3: - b_compartment = 8; - etabin = 6; - goto label99; - } - if(r_inb > s_rlim[4]) { - if(z_inb > s_zlim[1]) goto label3; - -label4: - b_compartment = 9; - etabin = 1; - goto label99; - } - - if(r_inb > s_rlim[3]) goto label4; - - if(r_inb > s_rlim[2]) { - b_compartment = 8; - etabin = 7; - goto label99; - } - - if(r_inb > s_rlim[1]) { - b_compartment = 8; - etabin = 8; - goto label99; - } - if(r_inb > s_rlim[0]) { - b_compartment = 9; - etabin = 2; - goto label99; - } - } - - if(r_inb < s_rlim[38]){ // lower corner - - if( r_inb > s_rlim[40] ) { - b_compartment = 9; - etabin = 16; - goto label99; - } - - if( r_inb > s_rlim[41] ) { -label5: - b_compartment = 8; - etabin = 37; - goto label99; - } - - if( r_inb > s_rlim[42] ) { - - d=DistanceToEtaLine( pforcell,2.35); - if(fabs(d) < s_StripWidth+s_KapGap) { - if( d < 0.) { - -label6: - b_compartment = 8; - etabin = 38; - goto label99; - } -label7: - if( z_inb < s_zlim[3] ) goto label5; - goto label6; - } - - if( d > 0. ) goto label7; - - b_compartment = 9; - etabin = 17; - goto label99; - } - - if( r_inb > s_rlim[43] ) { - b_compartment = 8; - etabin = 39; - goto label99; - } - - if( r_inb > s_rlim[44] ) { -label8: - b_compartment = 8; - etabin = 40; - goto label99; - } - - if( r_inb > s_rlim[45] ) { - if( z_inb < s_zlim[3] ) goto label8; - -label9: - b_compartment = 9; - etabin = 18; - goto label99; - } - - if( r_inb > s_rlim[46] ) goto label9; - - if( z_inb < s_ZmaxOfSignal/(s_rlim[46]-s_rlim[47])*(r_inb-s_rlim[47])) goto label9; - - validhit=false; - goto label99; - } - -// medium r region: s_rlim[0] > r > s_rlim[38]; -// from middle of cellno 2 to middle of cellno. 16 -// - - for( i=3; i<=17; ++i){ // eta= 1.65 - 2.35 - if( eta_inb < s_S3_Etalim[i] ) { - i0=i; - break; - } - } - - i=i0; - - eta1 = s_S3_Etalim[i-1]; - eta2 = s_S3_Etalim[i]; - rlim1 = s_rlim[2*i+5 - 1]; - rlim2 = s_rlim[2*i+5]; - zlim1 = s_zlim[2]; - zlim2 = s_zlim[3]; - - if( i == 15 || i == 17) { - zlim1 = s_zlim[3]; - zlim2 = s_zlim[2]; - } - - switch(i){ - - case 3: - - if( fabs( DistanceToEtaLine(pforcell, eta2) ) < s_StripWidth+s_KapGap - || z_inb > zlim1 ){ - - b_compartment = 8; - etabin = 2*i+3;; - break; - } - - b_compartment = 9; - etabin = i-1; - break; - - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 13: - case 16: - - d1=fabs( DistanceToEtaLine( pforcell, eta1) ); - d2=fabs( DistanceToEtaLine( pforcell, eta2) ); - - if( d1 < s_StripWidth+s_KapGap ){ -label11: - b_compartment = 8; - etabin = 2*i+2; - break; - } - if( d2 < s_StripWidth+s_KapGap ){ -label12: - b_compartment = 8; - etabin = 2*i+3; - break; - } - - if( z_inb < zlim1 || (r_inb > rlim2 && r_inb < rlim1) ) { - - b_compartment = 9; - etabin = i-1; - break; - } - if( r_inb > rlim1 ) goto label11; - if( r_inb < rlim2 ) goto label12; - validhit=false; - break; -//======================================================== - case 11: - - rlim3 = s_rlim[28]; - - d1=fabs( DistanceToEtaLine( pforcell, eta1) ); - d2=fabs( DistanceToEtaLine( pforcell, eta2) ); - - if( d1 < s_StripWidth+s_KapGap ){ -label13: - b_compartment = 8; - etabin = 2*i+2; - break; - } - - if( r_inb > rlim1 && z_inb > zlim1 ) goto label13; - if( r_inb > rlim2 ){ -label14: - b_compartment = 9; - etabin = i-1; - break; - } - - if( d2 < s_StripWidth+s_KapGap ){ - if( z_inb > zlim1 ) { -label15: - b_compartment = 8; - etabin = 2*i+4; - break; - } - -label16: - b_compartment = 8; - etabin = 2*i+3; - break; - } - - if( z_inb < zlim2) goto label14; - if( r_inb > rlim3) goto label16; - if( z_inb > zlim1) goto label15; - goto label16; -//====================================================== - case 12: - - d1=fabs( DistanceToEtaLine( pforcell, eta1) ); - d2=fabs( DistanceToEtaLine( pforcell, eta2) ); - - if( d1 < s_StripWidth+s_KapGap ){ - b_compartment = 8; - etabin = 2*i+2; - break; - } - if( d2 < s_StripWidth+s_KapGap ){ -label17: - b_compartment = 8; - etabin = 2*i+3; - break; - } - - if( r_inb > rlim2 || z_inb < zlim1 ){ - b_compartment = 9; - etabin = i-1; - break; - } - goto label17; - -//======================================================== - - case 14: - case 15: - - d1=fabs( DistanceToEtaLine( pforcell, eta1) ); - d2=fabs( DistanceToEtaLine( pforcell, eta2) ); - - if( d1 < s_StripWidth+s_KapGap ){ -label18: - b_compartment = 8; - etabin = 2*i+2; - break; - } - if( d2 < s_StripWidth+s_KapGap ){ -label19: - b_compartment = 8; - etabin = 2*i+3; - break; - } - if( r_inb > rlim1 && z_inb > zlim1 ) goto label18; - if( r_inb < rlim2 && z_inb > zlim2 ) goto label19; - - b_compartment = 9; - etabin = i-1; - break; -//====================================================== - - case 17: - - d1=fabs( DistanceToEtaLine( pforcell, eta1) ); - - if( d1 < s_StripWidth+s_KapGap || z_inb > zlim1 ){ - b_compartment = 8; - etabin = 2*i+2; - break; - } - b_compartment = 9; - etabin = i-1; - break; - } - -//====================================================== - - -// end of search for compartment and etabin - -label99: - return validhit; + + if( d > 0. ) goto label7; + + b_compartment = 9; + etabin = 17; + goto label99; + } + + if( r_inb > s_rlim[43] ) { + b_compartment = 8; + etabin = 39; + goto label99; + } + + if( r_inb > s_rlim[44] ) { + label8: + b_compartment = 8; + etabin = 40; + goto label99; + } + + if( r_inb > s_rlim[45] ) { + if( z_inb < s_zlim[3] ) goto label8; + + label9: + b_compartment = 9; + etabin = 18; + goto label99; + } + + if( r_inb > s_rlim[46] ) goto label9; + + if( z_inb < s_ZmaxOfSignal/(s_rlim[46]-s_rlim[47])*(r_inb-s_rlim[47])) goto label9; + + validhit=false; + goto label99; + } + + // medium r region: s_rlim[0] > r > s_rlim[38]; + // from middle of cellno 2 to middle of cellno. 16 + // + + for( i=3; i<=17; ++i){ // eta= 1.65 - 2.35 + if( eta_inb < s_S3_Etalim[i] ) { + i0=i; + break; + } + } + + i=i0; + + eta1 = s_S3_Etalim[i-1]; + eta2 = s_S3_Etalim[i]; + rlim1 = s_rlim[2*i+5 - 1]; + rlim2 = s_rlim[2*i+5]; + zlim1 = s_zlim[2]; + zlim2 = s_zlim[3]; + + if( i == 15 || i == 17) { + zlim1 = s_zlim[3]; + zlim2 = s_zlim[2]; + } + + switch(i){ + + case 3: + + if( fabs( DistanceToEtaLine(pforcell, eta2) ) < s_StripWidth+s_KapGap + || z_inb > zlim1 ){ + + b_compartment = 8; + etabin = 2*i+3;; + break; + } + + b_compartment = 9; + etabin = i-1; + break; + + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 13: + case 16: + + d1=fabs( DistanceToEtaLine( pforcell, eta1) ); + d2=fabs( DistanceToEtaLine( pforcell, eta2) ); + + if( d1 < s_StripWidth+s_KapGap ){ + label11: + b_compartment = 8; + etabin = 2*i+2; + break; + } + if( d2 < s_StripWidth+s_KapGap ){ + label12: + b_compartment = 8; + etabin = 2*i+3; + break; + } + + if( z_inb < zlim1 || (r_inb > rlim2 && r_inb < rlim1) ) { + + b_compartment = 9; + etabin = i-1; + break; + } + if( r_inb > rlim1 ) goto label11; + if( r_inb < rlim2 ) goto label12; + validhit=false; + break; + //======================================================== + case 11: + + rlim3 = s_rlim[28]; + + d1=fabs( DistanceToEtaLine( pforcell, eta1) ); + d2=fabs( DistanceToEtaLine( pforcell, eta2) ); + + if( d1 < s_StripWidth+s_KapGap ){ + label13: + b_compartment = 8; + etabin = 2*i+2; + break; + } + + if( r_inb > rlim1 && z_inb > zlim1 ) goto label13; + if( r_inb > rlim2 ){ + label14: + b_compartment = 9; + etabin = i-1; + break; + } + + if( d2 < s_StripWidth+s_KapGap ){ + if( z_inb > zlim1 ) { + label15: + b_compartment = 8; + etabin = 2*i+4; + break; + } + + label16: + b_compartment = 8; + etabin = 2*i+3; + break; + } + + if( z_inb < zlim2) goto label14; + if( r_inb > rlim3) goto label16; + if( z_inb > zlim1) goto label15; + goto label16; + //====================================================== + case 12: + + d1=fabs( DistanceToEtaLine( pforcell, eta1) ); + d2=fabs( DistanceToEtaLine( pforcell, eta2) ); + + if( d1 < s_StripWidth+s_KapGap ){ + b_compartment = 8; + etabin = 2*i+2; + break; + } + if( d2 < s_StripWidth+s_KapGap ){ + label17: + b_compartment = 8; + etabin = 2*i+3; + break; + } + + if( r_inb > rlim2 || z_inb < zlim1 ){ + b_compartment = 9; + etabin = i-1; + break; + } + goto label17; + + //======================================================== + + case 14: + case 15: + + d1=fabs( DistanceToEtaLine( pforcell, eta1) ); + d2=fabs( DistanceToEtaLine( pforcell, eta2) ); + + if( d1 < s_StripWidth+s_KapGap ){ + label18: + b_compartment = 8; + etabin = 2*i+2; + break; + } + if( d2 < s_StripWidth+s_KapGap ){ + label19: + b_compartment = 8; + etabin = 2*i+3; + break; + } + if( r_inb > rlim1 && z_inb > zlim1 ) goto label18; + if( r_inb < rlim2 && z_inb > zlim2 ) goto label19; + + b_compartment = 9; + etabin = i-1; + break; + //====================================================== + + case 17: + + d1=fabs( DistanceToEtaLine( pforcell, eta1) ); + + if( d1 < s_StripWidth+s_KapGap || z_inb > zlim1 ){ + b_compartment = 8; + etabin = 2*i+2; + break; + } + b_compartment = 9; + etabin = i-1; + break; + } + + //====================================================== + + + // end of search for compartment and etabin + + label99: + return validhit; } // **************************************************************************** -G4bool EnergyCalculator::GetVolumeIndex(const G4Step *step) const{ -// **************************************************************************** - s_ModuleNumber = -999; - s_PhiDivNumber = -999; +G4bool EnergyCalculator::GetVolumeIndex(const G4Step *step, G4int & ModuleNumber, G4int & PhiDivNumber) const{ + // **************************************************************************** const G4StepPoint* pre_step_point = step->GetPreStepPoint(); const G4int ndepth = pre_step_point->GetTouchable()->GetHistoryDepth(); for(G4int i=0;i<=ndepth;++i){ - G4String ivolname=pre_step_point->GetTouchable()->GetVolume(i)->GetName(); + G4String ivolname=pre_step_point->GetTouchable()->GetVolume(i)->GetName(); if( ivolname.find("BackOuterBarrette::Module") != std::string::npos ){ - s_ModuleNumber = pre_step_point->GetTouchable()->GetVolume(i)->GetCopyNo(); + ModuleNumber = pre_step_point->GetTouchable()->GetVolume(i)->GetCopyNo(); } if( ivolname.find("BackOuterBarrette::Module::Phidiv") != std::string::npos ){ - s_PhiDivNumber = pre_step_point->GetTouchable()->GetVolume(i)->GetCopyNo(); + PhiDivNumber = pre_step_point->GetTouchable()->GetVolume(i)->GetCopyNo(); } } if(!lwc()->GetisModule()){ - if(s_ModuleNumber < 0 || s_PhiDivNumber < 0) {return false;} + if(ModuleNumber < 0 || PhiDivNumber < 0) {return false;} } - else if(s_PhiDivNumber < 0 ) {return false;} + else if(PhiDivNumber < 0 ) {return false;} return true; } // **************************************************************************** G4bool EnergyCalculator::FindIdentifier_Barrett( - const G4Step* step, - std::vector<LArHitData>& hdata, - G4ThreeVector &startPointLocal, - G4ThreeVector &endPointLocal - ){ -// **************************************************************************** -// works only for outer part of the full wheel or of the module in the Barrett -// at the back side of EMEC - -// check whether we are in the outer wheel - if(lwc()->type() != LArWheelCalculator::OuterAbsorberWheel && lwc()->type() != LArWheelCalculator::OuterAbsorberModule) { - (*m_msg) << MSG::FATAL - << " ERROR ::FindIdentifier_Barrett, not yet prepared for solidtype=" - << LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()) - << endmsg; - } - - G4bool validhit=true; - -// Get point coordinates in the Atlas coord. system - - const G4StepPoint* pre_step_point = step->GetPreStepPoint(); - const G4StepPoint* post_step_point = step->GetPostStepPoint(); - - const G4ThreeVector startPoint = pre_step_point->GetPosition(); - const G4ThreeVector endPoint = post_step_point->GetPosition(); - // G4ThreeVector p = 0.5 *(startPoint+endPoint); - const G4ThreeVector p = startPoint; // bec. middle point maybe out of volume - - // transform point to the coord system of Barrett::Module::Phidiv (alias local) - - const G4AffineTransform transformation = - pre_step_point->GetTouchable()->GetHistory()->GetTopTransform(); - startPointLocal = transformation.TransformPoint(startPoint); - endPointLocal = transformation.TransformPoint(endPoint); - // G4ThreeVector pinLocal = 0.5 * (startPointLocal + endPointLocal); - const G4ThreeVector pinLocal = startPointLocal; - -// get Module and Phidiv number (result is put into static VolumeNumber and s_PhiDivNumber) - - validhit=GetVolumeIndex(step); - if(!validhit){ - //std::cout - (*m_msg) << MSG::FATAL - <<" ERROR ::FindIdentifier_Barrett:Module, Phidiv is not found" - <<" ModuleNumber= "<<s_ModuleNumber<<" PhiDivNumber= "<<s_PhiDivNumber - <<endmsg; - // <<std::endl; - } - -//z,r,eta,phi_inb : Specific for Barrette at the Back side of EMEC!! - - G4double phi_inb=0.; - - const G4double z_inb= lwc()->GetdWRPtoFrontFace()/2.-pinLocal.z(); //dist. from front end of the Back Barrettes - const G4double r_inb= pinLocal.perp(); //dist from the z axis - const G4ThreeVector pforcell=G4ThreeVector( pinLocal.x(), pinLocal.y(), - lwc()->GetElecFocaltoWRP()+lwc()->GetdWRPtoFrontFace()+lwc()->GetWheelThickness()+z_inb ); - const G4double eta_inb=pforcell.pseudoRapidity(); //eta in the system where electrodes were designed - - if(lwc()->type() == LArWheelCalculator::OuterAbsorberWheel){ // for wheel calculation - s_PhiStartOfPhiDiv = lwc()->GetFanStepOnPhi()/2. + s_ModuleNumber * CLHEP::twopi/8. - + s_PhiDivNumber * lwc()->GetFanStepOnPhi(); - phi_inb = s_PhiStartOfPhiDiv + pinLocal.phi(); //in ::BackOuterBarrettes - if(phi_inb < 0.) phi_inb = phi_inb + CLHEP::twopi; - if(phi_inb > CLHEP::twopi) phi_inb = phi_inb - CLHEP::twopi; - phi_inb = CLHEP::twopi - phi_inb; // phi in ::EmecMother system; - } - else if(lwc()->type() == LArWheelCalculator::OuterAbsorberModule){ // for TB modul calculation - - G4double PhiStart = M_PI_2 - M_PI/8.; //this is from EMECSupportConstruction - s_PhiStartOfPhiDiv = PhiStart + lwc()->GetFanStepOnPhi()/2 + s_PhiDivNumber * lwc()->GetFanStepOnPhi(); - - phi_inb = s_PhiStartOfPhiDiv + pinLocal.phi(); //in BackOuterBarrettes; - phi_inb = M_PI - phi_inb; // phi in ::EmecMother system; - } + const G4Step* step, + G4double PhiStartOfPhiDiv, + std::vector<LArHitData>& hdata, + G4ThreeVector &startPointLocal, + G4ThreeVector &endPointLocal + ) const { + // **************************************************************************** + // works only for outer part of the full wheel or of the module in the Barrett + // at the back side of EMEC - G4int compartment,etabin,phigap,etaBin,phiBin; + // check whether we are in the outer wheel + if(lwc()->type() != LArG4::OuterAbsorberWheel && lwc()->type() != LArG4::OuterAbsorberModule) { + ATH_MSG_FATAL(" ERROR ::FindIdentifier_Barrett, not yet prepared for solidtype=" + << LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type())); + } -// get m_compartment and etaBin + G4bool validhit=true; - validhit=GetCompartment_Barrett(pforcell, r_inb, z_inb, eta_inb, compartment, etabin); + // Get point coordinates in the Atlas coord. system - m_compartment = compartment; - etaBin = etabin; - if (!validhit) { - m_compartment = 9; // to have some 'reasonable' number - etaBin = 0; - } + const G4StepPoint* pre_step_point = step->GetPreStepPoint(); + const G4StepPoint* post_step_point = step->GetPostStepPoint(); - const G4int c = m_compartment-1; + const G4ThreeVector startPoint = pre_step_point->GetPosition(); + const G4ThreeVector endPoint = post_step_point->GetPosition(); + // G4ThreeVector p = 0.5 *(startPoint+endPoint); + const G4ThreeVector p = startPoint; // bec. middle point maybe out of volume - G4int sampling = geometry[c].sampling; - G4int region = geometry[c].region; + // transform point to the coord system of Barrett::Module::Phidiv (alias local) -// get m_AtlasZside, it is negative if z<0. + const G4AffineTransform transformation = + pre_step_point->GetTouchable()->GetHistory()->GetTopTransform(); + startPointLocal = transformation.TransformPoint(startPoint); + endPointLocal = transformation.TransformPoint(endPoint); + // G4ThreeVector pinLocal = 0.5 * (startPointLocal + endPointLocal); + const G4ThreeVector pinLocal = startPointLocal; -// DM 2015-07-30 -// copy of -// 19-04-2007 AMS use constant m_AtlasZside obtained in constructor - // zSide is negative if z<0. -// m_AtlasZside = geometry[c].zSide; -// if(p.z() < 0.) m_AtlasZside = -m_AtlasZside; -// G4int atlasside = m_AtlasZside; - const G4int atlasside = lwc()->GetAtlasZside() * geometry[c].zSide; + //------ code transfered to getPhiStartOfPhiDiv ------// - if(lwc()->GetisModule() && atlasside < 0 ) { - (*m_msg) << MSG::FATAL - <<"EnergyCalculator: TB modul should be at pos z" - <<endmsg; - } + const G4double z_inb= lwc()->GetdWRPtoFrontFace()/2.-pinLocal.z(); //dist. from front end of the Back Barrettes + const G4double r_inb= pinLocal.perp(); //dist from the z axis + const G4ThreeVector pforcell=G4ThreeVector( pinLocal.x(), pinLocal.y(), + lwc()->GetElecFocaltoWRP()+lwc()->GetdWRPtoFrontFace()+lwc()->GetWheelThickness()+z_inb ); + const G4double eta_inb=pforcell.pseudoRapidity(); //eta in the system where electrodes were designed -// In future version we may use constant m_AtlasZside set by constructor, -// don't know if it is necessary for barettes -// G4int atlasside = m_AtlasZside * geometry[c].zSide; + G4int compartment,etabin; -// get phiBin + // get m_compartment and etaBin - phigap = GetPhiGap_Barrett(pinLocal); // in wheel numbering scheme - //int phigapwheel=phigap; //for check + validhit=GetCompartment_Barrett(pforcell, r_inb, z_inb, eta_inb, compartment, etabin); - if(lwc()->GetisModule()) { - phigap = phigap - lwc()->GetStartGapNumber() + lwc()->GetLastFan()/2; // in module numbering scheme + G4int m_compartment = compartment; + G4int etaBin = etabin; + if (!validhit) { + m_compartment = 9; // to have some 'reasonable' number + etaBin = 0; + } -/* -//CHECK!!in Module - int phigapmodul=phigap; - G4ThreeVector tmp=G4ThreeVector( r_inb*cos(phi_inb),r_inb*sin(phi_inb),0.01 ); - int phigapmodulx=LArWheelCalculator::GetPhiGap(tmp); // module numbering scheme - int phigapwheelx=lwc()->PhiGapNumberForWheel(phigapmodulx); // transformed to wheelnumbering - - if(phigapwheel != phigapwheelx) - std::cout<<"*** FindIdentifier_BArrett:ERROR:phigapwheel=" - <<phigapwheel<<" phigapwheelx="<<phigapwheelx - <<std::endl; - else std::cout<<"*** checked--wheel--Ok"<<std::endl; - if(phigapmodul != phigapmodulx) - std::cout<<"*** FindIdentifier_BArrett:ERROR:phigapmodul=" - <<phigapmodul<<" phigapmodulx="<<phigapmodulx - <<" FirstFan="<<FirstFan<<" LastFan="<<LastFan - <<std::endl; - else std::cout<<"*** checked--modul--Ok"<<std::endl; -// --- end CHECK -*/ + const G4int c = m_compartment-1; + + G4int sampling = geometry[c].sampling; + G4int region = geometry[c].region; - if(phigap < lwc()->GetFirstFan() || phigap >= lwc()->GetLastFan()){ - if (phigap<lwc()->GetFirstFan()) phigap=lwc()->GetFirstFan(); - if (phigap>=lwc()->GetLastFan()) phigap=lwc()->GetLastFan()-1; - validhit=false; - } - } + const G4int atlasside = lwc()->GetAtlasZside() * geometry[c].zSide; + + if(lwc()->GetisModule() && atlasside < 0 ) { + ATH_MSG_FATAL("EnergyCalculator: TB modul should be at pos z"); + } - phiBin = phigap / geometry[c].gapsPerBin; + // get phiBin + G4int phigap = GetPhiGap_Barrett(pinLocal, PhiStartOfPhiDiv); // in wheel numbering scheme + //int phigapwheel=phigap; //for check - if(atlasside < 0){ + if(lwc()->GetisModule()) { + phigap = phigap - lwc()->GetStartGapNumber() + lwc()->GetLastFan()/2; // in module numbering scheme + + if(phigap < lwc()->GetFirstFan() || phigap >= lwc()->GetLastFan()){ + if (phigap<lwc()->GetFirstFan()) phigap=lwc()->GetFirstFan(); + if (phigap>=lwc()->GetLastFan()) phigap=lwc()->GetLastFan()-1; + validhit=false; + } + } + + G4int phiBin = phigap / geometry[c].gapsPerBin; + + if(atlasside < 0){ // The following formula assumes that the z<0 endcap was derived // from the positive endcap by rotateY(180.*deg) // 29-March-2004 ML - phiBin = (geometry[c].maxPhi - 1)/2 - phiBin; - if(phiBin < 0) phiBin += geometry[c].maxPhi + 1; - } + phiBin = (geometry[c].maxPhi - 1)/2 - phiBin; + if(phiBin < 0) phiBin += geometry[c].maxPhi + 1; + } -// checks for phiBin and etaBin + // checks for phiBin and etaBin - if(phiBin<0) { - (*m_msg) << MSG::WARNING - << "FindIdentifier_Barrett: invalid hit, phiBin < 0" - << endmsg; - phiBin=0; - validhit=false; - } - if(phiBin>geometry[c].maxPhi) { - (*m_msg) << MSG::WARNING - << "FindIdentifier_Barrett: invalid hit, phiBin = " << phiBin - << " > geometry[" << c << "].maxPhi="<< geometry[c].maxPhi - << endmsg; - phiBin=geometry[c].maxPhi; - validhit=false; - } - if(etaBin < 0){ - (*m_msg) << MSG::WARNING - << "FindIdentifier_Barrett: invalid hit, etaBin < 0" - << endmsg; - etaBin=0; - validhit=false; - } - if(etaBin > geometry[c].maxEta){ - (*m_msg) << MSG::WARNING - << "FindIdentifier_Barrett: invalid hit, etaBin = " - << etaBin << " > geometry[" << c << "].maxEta=" - << geometry[c].maxEta << endmsg; - etaBin=geometry[c].maxEta; - validhit=false; - } + if(phiBin<0) { + ATH_MSG_WARNING("FindIdentifier_Barrett: invalid hit, phiBin < 0"); + phiBin=0; + validhit=false; + } + if(phiBin>geometry[c].maxPhi) { + ATH_MSG_WARNING("FindIdentifier_Barrett: invalid hit, phiBin = " << phiBin + << " > geometry[" << c << "].maxPhi="<< geometry[c].maxPhi); + phiBin=geometry[c].maxPhi; + validhit=false; + } + if(etaBin < 0){ + ATH_MSG_WARNING("FindIdentifier_Barrett: invalid hit, etaBin < 0"); + etaBin=0; + validhit=false; + } + if(etaBin > geometry[c].maxEta){ + ATH_MSG_WARNING("FindIdentifier_Barrett: invalid hit, etaBin = " + << etaBin << " > geometry[" << c << "].maxEta=" + << geometry[c].maxEta); + etaBin=geometry[c].maxEta; + validhit=false; + } - hdata[0].id.clear(); - hdata[0].id << 4 // LArCalorimeter - << 1 // LArEM - << atlasside - << sampling - << region - << etaBin - << phiBin; - - G4double timeOfFlight = 0.5 * - ( pre_step_point->GetGlobalTime() + - post_step_point->GetGlobalTime() ); - hdata[0].time = timeOfFlight/Units::ns - p.mag()/Units::c_light/Units::ns; - if (hdata[0].time > m_OOTcut) m_isInTime = false; - else m_isInTime = true; - - return validhit; + hdata[0].id.clear(); + hdata[0].id << 4 // LArCalorimeter + << 1 // LArEM + << atlasside + << sampling + << region + << etaBin + << phiBin; + + G4double timeOfFlight = 0.5 * + ( pre_step_point->GetGlobalTime() + + post_step_point->GetGlobalTime() ); + hdata[0].time = timeOfFlight/Units::ns - p.mag()/CLHEP::c_light/Units::ns; + + return validhit; } // **************************************************************************** -G4bool EnergyCalculator::FindDMIdentifier_Barrett(const G4Step* step, std::vector<LArHitData>& hdata){ -// **************************************************************************** +G4bool EnergyCalculator::FindDMIdentifier_Barrett(const G4Step* step, std::vector<LArHitData>& hdata) const { + // **************************************************************************** - G4bool validid = false; + // G4bool validid = false; + // hdata[0].id = LArG4Identifier(); + // G4bool validid = m_supportCalculator->Process(step, LArG4::VCalibrationCalculator::kOnlyID); + // hdata[0].id = m_supportCalculator->identifier(); + // return validid; hdata[0].id = LArG4Identifier(); + std::vector<G4double> _tmpv; + return m_supportCalculator->Process(step, hdata[0].id, _tmpv, LArG4::kOnlyID ); +} + +G4double EnergyCalculator::_AdjustedPhiOfPoint_Barrett(const G4ThreeVector& p, G4double PhiStartOfPhiDiv) const { + // G4double phi=p.phi(); // in Module::Phidiv + // phi = PhiStartOfPhiDiv + phi; // in Barrette + // if(phi < 0. ) phi=phi+CLHEP::twopi; + // if(phi >= CLHEP::twopi ) phi=phi-CLHEP::twopi; - validid = m_supportCalculator->Process(step,LArG4::VCalibrationCalculator::kOnlyID); - hdata[0].id = m_supportCalculator->identifier(); + // if(lwc()->GetisModule()) phi = M_PI - phi; // in EMECMother; TB modul + // else phi = CLHEP::twopi - phi; // in EMECMother; full wheel - return validid; + return (lwc()->GetisModule()) ? + CLHEP::pi - _normalizeAngle2Pi(PhiStartOfPhiDiv + p.phi()) // in EMECMother; TB modul + : + CLHEP::twopi - _normalizeAngle2Pi(PhiStartOfPhiDiv + p.phi()) // in EMECMother; full wheel + ; } //**************************************************************************** -G4int EnergyCalculator::GetPhiGap_Barrett(const G4ThreeVector& p) const { -// **************************************************************************** - G4double phi=p.phi(); // in Module::Phidiv - phi = s_PhiStartOfPhiDiv + phi; // in Barrette - if(phi < 0. ) phi=phi+CLHEP::twopi; - if(phi >= CLHEP::twopi ) phi=phi-CLHEP::twopi; - - if(lwc()->GetisModule()) phi = M_PI - phi; // in EMECMother; TB modul - else phi = CLHEP::twopi - phi; // in EMECMother; full wheel - +G4int EnergyCalculator::GetPhiGap_Barrett(const G4ThreeVector& p, G4double PhiStartOfPhiDiv) const { + // **************************************************************************** + const G4double phi = _AdjustedPhiOfPoint_Barrett(p, PhiStartOfPhiDiv); if(phi > CLHEP::twopi-lwc()->GetFanStepOnPhi()*0.5) {return 0;} return (G4int( (phi+lwc()->GetFanStepOnPhi()*0.5)/lwc()->GetFanStepOnPhi()) ); } // **************************************************************************** G4double EnergyCalculator::GetGapSize_Barrett(const G4ThreeVector& p) const { -// **************************************************************************** + // **************************************************************************** const G4double r=p.perp(); - const G4double ta1=1./ sqrt(4.*r/m_FanAbsThickness*r/m_FanAbsThickness - 1.); - const G4double ta2=1./ sqrt(4.*r/m_FanEleThickness*r/m_FanEleThickness - 1.); + const G4double ta1=1./ sqrt(4.*r/FanAbsThickness()*r/FanAbsThickness() - 1.); + const G4double ta2=1./ sqrt(4.*r/FanEleThickness()*r/FanEleThickness() - 1.); const G4double phieff= lwc()->GetFanStepOnPhi()*0.5-atan(ta1)-atan(ta2); return (r*phieff); } // **************************************************************************** G4double EnergyCalculator::distance_to_the_nearest_electrode_Barrett( - const G4ThreeVector &p) const { -// **************************************************************************** - G4double phi=p.phi(); // in Module::Phidiv - phi = s_PhiStartOfPhiDiv + phi; // in Barrette - if(phi < 0. ) phi=phi+CLHEP::twopi; - if(phi >= CLHEP::twopi ) phi=phi-CLHEP::twopi; - - if(lwc()->GetisModule()) phi = M_PI - phi; // in EMECMother; TB modul - else phi = CLHEP::twopi - phi; // in EMECMother; full wheel + const G4ThreeVector &p, + G4double PhiStartOfPhiDiv + ) const { + // **************************************************************************** + const G4double phi = _AdjustedPhiOfPoint_Barrett(p, PhiStartOfPhiDiv); G4double r=p.perp(); G4int igap; G4double elephi,dphi; if (phi > CLHEP::twopi-lwc()->GetFanStepOnPhi()*0.5) { - dphi=phi-CLHEP::twopi; + dphi=phi-CLHEP::twopi; } else { - igap=G4int( (phi+lwc()->GetFanStepOnPhi()*0.5)/lwc()->GetFanStepOnPhi() ); + igap=G4int( (phi+lwc()->GetFanStepOnPhi()*0.5)/lwc()->GetFanStepOnPhi() ); elephi=igap*lwc()->GetFanStepOnPhi(); - dphi=phi-elephi; + dphi=phi-elephi; } - G4double dist=r*sin(fabs(dphi))-m_FanEleThickness*0.5; + G4double dist=r*sin(fabs(dphi))-FanEleThickness()*0.5; return fabs(dist); } // **************************************************************************** -G4double EnergyCalculator::GetHV_Value_Barrett(const G4ThreeVector& p) const { -// **************************************************************************** - -// get atlasside - - const G4int atlasside = (lwc()->GetAtlasZside() > 0) ? 0 : 1; - -// get etasection - - const G4double z_inb = lwc()->GetdWRPtoFrontFace() * 0.5-p.z(); //dist. from front end of the Back Barrettes - const G4double r_inb= p.perp(); //dist from the z axis - const G4ThreeVector pforcell=G4ThreeVector( p.x(), p.y(), - lwc()->GetElecFocaltoWRP()+lwc()->GetdWRPtoFrontFace()+lwc()->GetWheelThickness()+z_inb ); - const G4double eta_inb=pforcell.pseudoRapidity(); //eta in the system where electrodes were designed - - G4int compartment=-99; G4int etabin=-99; G4int etasection=-99; - - G4bool validhit=GetCompartment_Barrett(pforcell, r_inb, z_inb, eta_inb, compartment, etabin); - - if(!validhit) { return 0.;} // p is not in the sens. region - - switch (compartment) { - - case 8: - if( etabin < 0) { validhit=false; break;} - if( etabin <= 3) { etasection = 0; break;} - if( etabin <= 7) { etasection = 1; break;} - if( etabin <= 15) { etasection = 2; break;} - if( etabin <= 23) { etasection = 3; break;} - if( etabin <= 27) { etasection = 4; break;} - if( etabin <= 35) { etasection = 5; break;} - if( etabin <= 43) { etasection = 6; break;} - validhit=false; - break; - - case 9: - if( etabin < 0) { validhit=false; break;} - if( etabin <= 1) { etasection = 1; break;} - if( etabin <= 5) { etasection = 2; break;} - if( etabin <= 9) { etasection = 3; break;} - if( etabin <= 11) { etasection = 4; break;} - if( etabin <= 15) { etasection = 5; break;} - if( etabin <= 19) { etasection = 6; break;} - validhit=false; - break; - - default: - validhit=false; - break; - } +G4double EnergyCalculator::GetHV_Value_Barrett(const G4ThreeVector& p, G4double PhiStartOfPhiDiv) const { + // **************************************************************************** - if(!validhit) { return 0.;} // p is not in the sens. region + // get atlasside + const G4int atlasside = (lwc()->GetAtlasZside() > 0) ? 0 : 1; + + // get etasection + const G4double z_inb = lwc()->GetdWRPtoFrontFace() * 0.5-p.z(); //dist. from front end of the Back Barrettes + const G4double r_inb= p.perp(); //dist from the z axis + const G4ThreeVector pforcell=G4ThreeVector( p.x(), p.y(), + lwc()->GetElecFocaltoWRP()+lwc()->GetdWRPtoFrontFace()+lwc()->GetWheelThickness()+z_inb ); + const G4double eta_inb=pforcell.pseudoRapidity(); //eta in the system where electrodes were designed + + G4int compartment=-99; G4int etabin=-99; G4int etasection=-99; + + G4bool validhit=GetCompartment_Barrett(pforcell, r_inb, z_inb, eta_inb, compartment, etabin); + + if(!validhit) { return 0.;} // p is not in the sens. region + + switch (compartment) { + case 8: + if( etabin < 0) { validhit=false; break;} + if( etabin <= 3) { etasection = 0; break;} + if( etabin <= 7) { etasection = 1; break;} + if( etabin <= 15) { etasection = 2; break;} + if( etabin <= 23) { etasection = 3; break;} + if( etabin <= 27) { etasection = 4; break;} + if( etabin <= 35) { etasection = 5; break;} + if( etabin <= 43) { etasection = 6; break;} + validhit=false; + break; + + case 9: + if( etabin < 0) { validhit=false; break;} + if( etabin <= 1) { etasection = 1; break;} + if( etabin <= 5) { etasection = 2; break;} + if( etabin <= 9) { etasection = 3; break;} + if( etabin <= 11) { etasection = 4; break;} + if( etabin <= 15) { etasection = 5; break;} + if( etabin <= 19) { etasection = 6; break;} + validhit=false; + break; + + default: + validhit=false; + break; + } -// get electrode number and side + if(!validhit) { return 0.;} // p is not in the sens. region - G4double phi=p.phi(); // in Module::Phidiv - phi = s_PhiStartOfPhiDiv + phi; // in Barrette - if(phi < 0. ) phi=phi+CLHEP::twopi; - if(phi >= CLHEP::twopi ) phi=phi-CLHEP::twopi; + // get electrode number and side - if(lwc()->GetisModule()) phi = M_PI - phi; // in EMECMother; TB modul - else phi = CLHEP::twopi - phi; // in EMECMother; full wheel + const G4double phi = _AdjustedPhiOfPoint_Barrett(p, PhiStartOfPhiDiv); G4int igap,iside; - if (phi > CLHEP::twopi-lwc()->GetFanStepOnPhi()*0.5){igap=0;iside=0;} - else{ igap=G4int( (phi+lwc()->GetFanStepOnPhi()*0.5)/lwc()->GetFanStepOnPhi() ); - G4double elephi=igap*lwc()->GetFanStepOnPhi(); - G4double dphi=phi-elephi; - if(dphi <=0. ) iside=0; - else iside=1; + if (phi > CLHEP::twopi-lwc()->GetFanStepOnPhi()*0.5) { + igap=0; + iside=0; + } else { + igap=G4int( (phi+lwc()->GetFanStepOnPhi()*0.5)/lwc()->GetFanStepOnPhi() ); + const G4double elephi=igap*lwc()->GetFanStepOnPhi(); + const G4double dphi=phi-elephi; + if (dphi <=0.) iside=0; + else iside=1; } const G4int electrodenumber = igap; const G4int electrodeside = iside; -// prepare indices for different versions of HV Map + // prepare indices for different versions of HV Map + + const G4int firstelectrode = s_HV_Start_phi[atlasside][etasection][electrodeside]; - G4int firstelectrode = s_HV_Start_phi[atlasside][etasection][electrodeside]; G4int electrodeindex = electrodenumber-firstelectrode; if(electrodeindex < 0) electrodeindex += lwc()->GetNumberOfFans(); - G4int phisection = electrodeindex / m_NumberOfElectrodesInPhiSection; - assert(phisection>=0 && phisection<=m_NofPhiSections-1); + const G4int phisection = electrodeindex / NumberOfElectrodesInPhiSection(); + + assert(phisection>=0 && phisection<=NofPhiSections()-1); -// pick up HV value from the array + // pick up HV value from the array G4double HV_value= s_HV_Values[atlasside][etasection][electrodeside][phisection]; return HV_value; } - - - diff --git a/LArCalorimeter/LArG4/LArG4EC/src/EnergyCalculator.h b/LArCalorimeter/LArG4/LArG4EC/src/EnergyCalculator.h new file mode 100644 index 0000000000000000000000000000000000000000..f3253ce0f6669c67c180d745125a8b84773d1104 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4EC/src/EnergyCalculator.h @@ -0,0 +1,391 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// EnergyCalculator.h +// Prepared 10-Apr-2002 Bill Seligman +// from code written by Jozsef Toth. +// 07-May-2003 AMS: now EnergyCalculator is not a singleton +// 02-July-2003 J.T. Charge collection added +// 20-July-2004 J.T. FieldMapVersion variable is added +// 25-May-2005 J.T. -calling sequence of GapAdj changed +// -new variables and function for reading and handling +// values of HV of power supplies +// - IonReco :for suppress signal because of ion recombination +// - DriftVelo: Walkowiak's formula for drift velocity +// Sept-2006 J.T. - collect signal from the Barrette volume +// Nov -2006 J.T. - fieldmap array structures changed, +// - lengths defined dinamically +// - field map for first/last fold and for Barrett volume are included +// May 2009 AMS move to namespace LArG4::EC +// duplicated data members removed + +#ifndef LArG4_EC_EnergyCalculator_H +#define LArG4_EC_EnergyCalculator_H + +#include <string> +#include <stdexcept> + +#include "CLHEP/Units/SystemOfUnits.h" + +#include "LArG4Code/LArG4Identifier.h" +#include "LArG4Code/LArCalculatorSvcImp.h" +#include "LArG4Code/LArG4EnumDefs.h" + +#include "GeoSpecialShapes/LArWheelCalculator.h" +#include "GeoSpecialShapes/LArWheelCalculatorEnums.h" + +#include "G4ThreeVector.hh" +#include "globals.hh" + + +class ILArCalibCalculatorSvc; +class LArG4BirksLaw; + + +namespace LArG4 { + + namespace EC { + + + class EnergyCalculator : public LArCalculatorSvcImp + { + public: + + EnergyCalculator(const std::string& name, ISvcLocator *pSvcLocator); + // Update handlers + void CorrectionTypeHandler(Property&); + void SolidTypeHandler(Property&); + + virtual StatusCode initialize() override final; + virtual StatusCode finalize() override final; + + ///////////////////////////////////////////// + // The interface for LArVCalculator. + virtual G4float OOTcut() const override final { return m_OOTcut; } + virtual G4bool Process(const G4Step*, std::vector<LArHitData>&) const override final; + + // Check if the current hitTime is in-time + virtual G4bool isInTime(G4double hitTime) const override final + { + return !(hitTime > m_OOTcut); //FIXME should we be checking the absolute value of hitTime here? + } + + + private: + + //G4int m_compartment; -> made local for FindIdentifier functions + + G4bool (EnergyCalculator::*m_Process_type) (const G4Step*, std::vector<LArHitData>&) const; + G4double (EnergyCalculator::*m_GetHV_Value_type) (const G4ThreeVector &p, G4double /*Barret_PhiStart*/) const; + G4double (EnergyCalculator::*m_GetGapSize_type) (const G4ThreeVector &p) const; + G4double (EnergyCalculator::*m_distance_to_the_nearest_electrode_type) (const G4ThreeVector &p, G4double /*Barret_PhiStart*/) const; + + G4bool Process_Default(const G4Step*, std::vector<LArHitData>&) const; + G4bool Process_Barrett(const G4Step*, std::vector<LArHitData>&) const; + G4bool FindIdentifier_Default(const G4Step *, std::vector<LArHitData>&, G4ThreeVector &, G4ThreeVector &) const; + G4bool FindIdentifier_Barrett(const G4Step *, G4double, std::vector<LArHitData>&, G4ThreeVector &, G4ThreeVector &) const; + G4bool FindDMIdentifier_Barrett(const G4Step* step, std::vector<LArHitData>&) const; + G4bool GetCompartment_Barrett(G4ThreeVector,G4double,G4double,G4double, + G4int &, G4int &) const; + G4double GetHV_Value_Default(const G4ThreeVector& p, G4double /*Barret_PhiStart*/) const { + return GetHV_Value(p); + } + G4double GetHV_Value_Barrett(const G4ThreeVector& p, G4double PhiStartOfPhiDiv) const; + G4double GetGapSize_Default(const G4ThreeVector &p) const { + return GetGapSize(p); + } + G4double GetGapSize_Barrett(const G4ThreeVector &p) const; + G4int GetPhiGap_Barrett(const G4ThreeVector &p, G4double PhiStartOfPhiDiv) const; + G4double distance_to_the_nearest_electrode_Default(const G4ThreeVector &p, G4double /*Barret_PhiStart*/) const { + return distance_to_the_nearest_electrode(p); + } + G4double distance_to_the_nearest_electrode_Barrett(const G4ThreeVector &p, G4double Barret_PhiStart) const; + + ServiceHandle<ILArCalibCalculatorSvc> m_supportCalculator; + + static void SetConst_OuterBarrett(void); // used only for initialization + static void SetConst_InnerBarrett(void); // used only for initialization + G4bool GetVolumeIndex(const G4Step *, G4int &, G4int &) const; + static G4bool s_SetConstOuterBarrett; // used as const after init + static G4bool s_SetConstInnerBarrett; // used as const after init + static const G4double s_LongBarThickness;// = 20. *mm; + static const G4double s_ColdCorrection;// =1.0036256; + static const G4double s_StripWidth;// =3.*mm/ColdCorrection; + static const G4double s_KapGap;// =1.*mm/ColdCorrection; + static const G4double s_EdgeWidth;// =1.*mm; + static const G4double s_DistOfEndofCuFromBack;// =22.77*mm/ColdCorrection; + static const G4double s_DistOfStartofCuFromBack;//=31.*mm; // frontface of the barrette + static const G4double s_ZmaxOfSignal;// DistOfStartofCuFromBack - DistOfEndofCuFromBack + EdgeWidth; + static G4double s_RefzDist; // = dElecFocaltoWRP+dWRPtoFrontFace+WheelThickness+ // used as const after + // +dWRPtoFrontFace+ LongBarThickness // initialization + // -DistOfEndofCuFromBack + + static const G4double s_S3_Etalim[21]; + static const G4double s_Rmeas_outer[50]; + static const G4double s_Zmeas_outer[2]; + static G4double s_S3_Rlim[21]; // used as const after init + static G4double s_rlim[50]; // used as const after init + static G4double s_zlim[4]; // used as const after init + + UnsignedIntegerProperty m_corrProp; + EnergyCorrection_t m_correction_type; + + G4double (EnergyCalculator::*m_ecorr_method) (G4double, const G4ThreeVector&, const G4ThreeVector&, G4double /*Barret_PhiStart*/) const; + G4double dummy_correction_method(G4double e, const G4ThreeVector&, const G4ThreeVector&, + G4double /*Barret_PhiStart*/) const { + return e; + } + G4double GapAdjustment_old(G4double, const G4ThreeVector&, const G4ThreeVector&, G4double /*Barret_PhiStart*/) const; + G4double GapAdjustment (G4double, const G4ThreeVector&, const G4ThreeVector&, G4double /*Barret_PhiStart*/) const; + G4double GapAdjustment_E (G4double, const G4ThreeVector&, const G4ThreeVector&, G4double /*Barret_PhiStart*/) const; + G4double GapAdjustment_s (G4double, const G4ThreeVector&, const G4ThreeVector&, G4double /*Barret_PhiStart*/) const; + G4double GapAdjustment__sE (G4double, const G4ThreeVector&, const G4ThreeVector&, G4double /*Barret_PhiStart*/) const; + G4double CalculateChargeCollection(G4double, const G4ThreeVector&, const G4ThreeVector&, G4double /*Barret_PhiStart*/) const; + G4double CalculateChargeCollection1(G4double, const G4ThreeVector&, const G4ThreeVector&, G4double /*Barret_PhiStart*/) const; + + G4double m_GApower; // used as const after init + inline G4double GApower() const { return m_GApower; }; + + // ************************************************************************** + //Declaration of variables,functions for charge collection + //J.T + // ************************************************************************** + + + //variables specific for wheel geometry + struct WheelGeometry { + G4int PhiGapNumber, PhiHalfGapNumber; + G4int HalfWaveNumber, SignofZinHalfWave, SignofSlopeofHalfWave; + G4double SinPhiGap, CosPhiGap, ZinHalfWave; + G4double HalfEleThickness; + WheelGeometry() : + PhiGapNumber(0), + PhiHalfGapNumber(0), + HalfWaveNumber(0), + SignofZinHalfWave(0), + SignofSlopeofHalfWave(0), + SinPhiGap(0), + CosPhiGap(0), + ZinHalfWave(0), + HalfEleThickness(0) + {} + }; + + + G4double m_ElectrodeFanHalfThickness; // used as const after init + G4double m_FanEleThicknessOld; // used as const after init + G4double m_FanEleFoldRadiusOld; // used as const after init + G4double m_FanAbsThickness; // used as const after init + G4double m_FanEleThickness; // used as const after init + G4double m_WaveLength; // used as const after init + + G4int m_NofPhiSections; // used as const after init + G4int m_NumberOfElectrodesInPhiSection; // used as const after init + + inline G4double ElectrodeFanHalfThickness() const { return m_ElectrodeFanHalfThickness; }; + inline G4double FanEleThicknessOld() const { return m_FanEleThicknessOld; }; + inline G4double FanEleFoldRadiusOld() const { return m_FanEleFoldRadiusOld; }; + inline G4double FanAbsThickness() const { return m_FanAbsThickness; }; + inline G4double FanEleThickness() const { return m_FanEleThickness; }; + inline G4double WaveLength() const { return m_WaveLength; }; + + inline G4int NofPhiSections() const { return m_NofPhiSections; }; + inline G4int NumberOfElectrodesInPhiSection() const { return m_NumberOfElectrodesInPhiSection; }; + + //variables specific for Efield calculation + + static G4bool s_FieldMapsRead; // used as const after init + static G4String s_FieldMapVersion; // used as const after init + + static const G4double s_GridSize; + static const G4double s_AverageGap; + static const G4double s_inv_AverageGap; + + struct Fold_Efield_Map{ + G4bool FieldMapPrepared; + G4double* FieldMap; // [NumberOfRadialLayers][ZYWeight][MaxNofPoints]; + G4double* MinZofLayer; //these are limits of the + G4double* MaxZofLayer; //area where the FieldMap can + G4double* MinYofLayer; //be used for interpolation + G4double* MaxYofLayer; + G4int* NofColofLayer; // a column is parallel to y + G4int* NofRowofLayer; // a row is parallel to z + G4int* NofPointsinLayer; + G4int* pLayer; + }; + + struct Wheel_Efield_Map {G4bool FieldMapPrepared; + G4int NumberOfRadialLayer; + G4double* RadiusOfLayers; + G4double* FoldinAngleOfLayers; + G4double* HalfLArGapSizeOfLayers; + Fold_Efield_Map* Fold; + Fold_Efield_Map Fold0; + Fold_Efield_Map Fold1; + G4double GridShift; + }; + + static Wheel_Efield_Map s_ChCollInner,s_ChCollOuter; // used as const after init + Wheel_Efield_Map* m_ChCollWheelType; // used as const after init + + inline const Wheel_Efield_Map* ChCollWheelType() const { return m_ChCollWheelType; }; + + struct FoldArea { + const Fold_Efield_Map* ChCollFoldType; + G4int PointFoldMapArea; + FoldArea() : + ChCollFoldType(0), + PointFoldMapArea(0) + {} + }; + + //G4double PhiStartOfPhiDiv; + + void CreateArrays(Wheel_Efield_Map &, G4int); + inline G4int Index(const Fold_Efield_Map* foldmap, G4int i, G4int j, G4int k ) const { + return foldmap->pLayer[i]+j*foldmap->NofPointsinLayer[i]+k; + }; + void SetFoldArea(G4double, FoldArea & ) const; + + //HV for current calculation + + static G4bool s_HVMapRead; // used only for initialization + std::string m_HVMapVersion; // used only for initialization + static const G4double s_AverageHV; + static const G4double s_AverageEfield; + static const G4double s_AverageCurrent; + static const G4String s_HVEMECMapFileName; //{"HVEMECMap.dat"}; + + static const G4int s_NofAtlasSide = 2; + static const G4int s_NofEtaSection = 9; + static const G4int s_NofElectrodeSide = 2; + static const G4int s_NofElectrodesOut = 768; + static const G4double s_HV_Etalim[s_NofEtaSection+1]; // = {1.375,1.5,1.6,1.8,2.,2.1,2.3,2.5,2.8,3.2}; + static G4int s_HV_Start_phi[s_NofAtlasSide][s_NofEtaSection][s_NofElectrodeSide]; // used as const after init + static G4double s_HV_Values[s_NofAtlasSide][s_NofEtaSection][s_NofElectrodeSide][s_NofElectrodesOut]; // used as const after init + + static const G4double s_LArTemperature_ECC0;//={88.15}; //K + static const G4double s_LArTemperature_ECC1;//={88.37}; + static const G4double s_LArTemperature_ECC5;//={87.97}; + static const G4double s_LArTemperature_av ;// ={88.16}; + + void GetHVMap(const G4String); // used only for initialization + G4double GetHV_Value(const G4ThreeVector& p) const; + G4double GetHV_Value_ChColl_Wheel( const G4ThreeVector& , G4int , G4int) const; + + //Efield in [kv/cm], driftvelo in [mm/microsec], Temperature in [K] + + inline static G4double IonReco(const G4double Efield) { + if(Efield<=0.000001){return 0.;} + if(Efield>2.) {return (1./(1. +0.36/Efield));} + return (1./(1.04+0.28/Efield)); + } + + inline static G4double DriftVelo(const G4double T, const G4double Efield) { + if( Efield <= 0.000001) {return 0.;} + return ( (-0.01481*(T-90.371)+1.)* + ( 0.141*Efield*log(1.+12.4/Efield)+ + 1.627*pow(Efield,0.317) ) + -0.0075*(T-90.371) + ); + } + + // functions specific for geometry + + void SetHalfWave(G4double, WheelGeometry &) const; + void GetPhiGap(const G4double *, WheelGeometry &) const; + void SetYlimitsofPhigapinWheel(G4double, G4double, const WheelGeometry & wg, G4double * Ylimits) const; + G4double YofSurface(G4double,G4double,G4double,const WheelGeometry &) const; + inline G4double YofNeutralFibre(G4double alpha,G4double rho, const WheelGeometry & wg) const { + return YofSurface(alpha,rho,0., wg); + } + G4double FoldingAngle(G4double) const; + G4double HalfLArGapSize(G4double, G4double) const; + + // functions specific for charge coll. + + void IniGeomforFieldMaps(void); // called only at init phase + void LoadFieldMaps(const G4String); // called only at init phase + void PrepareFieldMap(Wheel_Efield_Map* ChCollWheelType); // called only at init phase + G4double GetCurrent(G4double *,G4double *,G4double, G4double Barret_PhiStart) const; + void TransformWheeltoFieldMap(const G4double *,G4double *, const WheelGeometry & wg, const FoldArea & fa) const; + void SetYlimitsofPhigapinFieldMap(G4int, const WheelGeometry & wg, G4double * Ylimits) const; + void TransFromBarrtoWheel(const G4double*, G4double PhiStartOfPhiDiv, G4double*) const; + G4double GetWeightfromFieldMap(G4int,G4double,G4double, const FoldArea & fa) const; + G4double HalfLArGapSizeOld(G4double) const; + + G4double m_CHC_Esr; // used as const after init + inline G4double CHC_Esr() const { return m_CHC_Esr; }; + +#ifdef DEBUG_CHCL // non thread-safe debug of charge collection + static const G4int s_CHCMaxPrint=00; // exists only if debug activated + static G4int s_CHCIprint; // exists only if debug activated + static G4double s_CHCEbad; // exists only if debug activated + static G4double s_CHCEtotal; // exists only if debug activated + static G4double s_CHCStotal; // exists only if debug activated +#endif + + private: + // inline void vector_to_msg(G4ThreeVector &v) const; + + /* to be developed... + std::pair<double, double>DxToFans(Hep3Vector &p); + double XDistanceToTheNeutralFibre(const Hep3Vector& P) const; + */ + G4double GetGapSize(const G4ThreeVector &p) const; + + // public: + G4double distance_to_the_nearest_electrode(const G4ThreeVector &p) const; + + UnsignedIntegerProperty m_solidtypeProp; + LArG4::LArWheelCalculator_t m_solidtype; + int m_zside; + LArG4BirksLaw *m_birksLaw; + LArWheelCalculator *m_lwc; + const LArWheelCalculator * lwc() const { return m_lwc; } + + void get_HV_map_from_DB(void); + G4bool m_DB_HV; + + std::string m_suffix; + + // Aug 2007 AMS, lost Aug 2008, restored May 2009 + LArWheelCalculator *m_electrode_calculator; + const LArWheelCalculator * elc() const { return m_electrode_calculator; } + + G4double GetCurrent1(const G4ThreeVector &, const G4ThreeVector &, G4double) const; + + G4double get_HV_value(const G4ThreeVector&, const std::pair<G4int, G4int> &) const; + + EnergyCalculator (const EnergyCalculator&); + EnergyCalculator& operator= (const EnergyCalculator&); + + G4int _getIRlayer(G4double rforalpha) const; + G4int _getIRlayerA(G4double rforalpha) const; + + G4double _interpolateCurrentSubStep(G4double rforalpha, G4int gapup, const G4double vmap[], + G4double tol, const FoldArea & fa, G4int & gaperr ) const; + + + G4double _interpolateCurrentSubStep1(G4double rforalpha, const G4double vmap[], + const G4ThreeVector & Pe, int side_dte, int Pe_fan, + const G4ThreeVector & Pa, int side_dta, int Pa_fan, + const FoldArea & fa, G4int & gaperr ) const; + + G4double _AdjustedPhiOfPoint_Barrett(const G4ThreeVector& p, G4double PhiStartOfPhiDiv) const; + + static inline G4double _normalizeAngle2Pi(G4double a) { + return ( a<0.) ? + a + CLHEP::twopi + : + (a >= CLHEP::twopi ? a - CLHEP::twopi: a); + } + + G4double getPhiStartOfPhiDiv(const G4Step* step) const; + }; + + } // namespace EC +} // namespace LArG4 + +#endif // LArG4_EC_EnergyCalculator_H diff --git a/LArCalorimeter/LArG4/LArG4EC/src/GetCurrent1.cc b/LArCalorimeter/LArG4/LArG4EC/src/GetCurrent1.cc index aea57c6aa7cba64ad577e84b8697d87a24b26531..6891b3f8fd75b1d3b68ffaf40c4fb0b6bf696175 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/GetCurrent1.cc +++ b/LArCalorimeter/LArG4/LArG4EC/src/GetCurrent1.cc @@ -4,375 +4,345 @@ #include <cassert> -#include "GaudiKernel/MsgStream.h" - #include "G4ThreeVector.hh" #include "globals.hh" #include "LArG4Code/LArG4BirksLaw.h" -#include "LArG4EC/EnergyCalculator.h" +#include "EnergyCalculator.h" #include "CLHEP/Units/SystemOfUnits.h" static inline int signof(double a){ return (a == 0.) ? 0: (a < 0 ? -1: 1); } -using namespace LArG4::EC; - -G4double EnergyCalculator::GetCurrent1(const G4ThreeVector &P1, const G4ThreeVector &P2, G4double edep) // need to make const -{ -/* - FILE *F = fopen("test1.dat", "w"); - if(F == 0) abort(); - G4ThreeVector a(0., 1200., 0.); - for(double z = 0; z <= WheelThickness; z += 0.1){ - fprintf(F, "%f", z); -// for(double x = -20.; x <= 20.; x += 1.){ -// a[0] = x; - a[2] = z; -// std::cout << "(" << z << ", " << x << ") " << DistanceToTheNeutralFibre(a) << std::endl; - for(int s = -1; s <= 1; s ++){ -// std::cout << "\t" << s << " " << elc()->AmplitudeOfSurface(a, s) << std::endl; - fprintf(F, " %f", elc()->AmplitudeOfSurface(a, s)); - } -// } - fprintf(F, "\n"); - } - fclose(F); - - abort(); -*/ - -//std::cout << "GetCurrent1 -------------------------------------------------------------------------" << std::endl; -//std::cout << "input: (" << P1.x() << ", " << P1.y() << ", " << P1.z() << "), (" -// << P2.x() << ", " << P2.y() << ", " << P2.z() << "), " << edep << std::endl; - - G4int gaperr = 0; - - const std::pair<G4int, G4int> gap2 = lwc()->GetPhiGapAndSide(P2); - const std::pair<G4int, G4int> gap1 = lwc()->GetPhiGapAndSide(P1); -// gap1.first = PhiGapNumberForWheel(gap1.first); -// gap2.first = PhiGapNumberForWheel(gap2.first); - - if(gap1 != gap2) gaperr = -1; - - //JT.>>> - SetFoldArea(P1.z()); // set fold type - SetHalfWave(P1.z()); // set halfwave parameters for substep - G4double p1[3]; - p1[0] = P1.x(); - p1[1] = P1.y(); - p1[2] = P1.z(); - - //std::cout<<"===>>>GetCurrent1: before GetPhiGap** CosPhiGap,SinPhiGap=" - // <<CosPhiGap<<" "<<SinPhiGap<<std::endl; - - GetPhiGap(p1); //set rotation angle from the wheel to the efield Map system; once for each G4 step - - //std::cout<<"===>>>GetCurrent1: after GetPhiGap** CosPhiGap,SinPhiGap=" - // <<CosPhiGap<<" "<<SinPhiGap<<std::endl; - //<<<JT - - const G4double step = (P2 - P1).mag(); - const G4int nofstep = G4int(step / s_GridSize) + 1; // step is divided to substeps - G4double current = 0.; //current to be returned - const G4double step_current = edep / nofstep / s_AverageCurrent; // base current for each step - -//std::cout << "gap1: " << gap1.first << ", " << gap1.second -// << "; gap2: " << gap2.first << ", " << gap2.second << std::endl; -//std::cout << "input: (" << P1.x() << ", " << P1.y() << ", " << P1.z() << "), (" -// << P2.x() << ", " << P2.y() << ", " << P2.z() << "), " << edep << std::endl; - - - const G4double inv_nofstep = 1. / static_cast<double>(nofstep); - for(G4int i = 0; i < nofstep; ++ i){ - G4double ds = (i + 0.5) * inv_nofstep; - G4ThreeVector Pe = P1 * (1. - ds) + P2 * ds; - G4ThreeVector Pa = Pe; -//std::cout << "step " << i << std::endl; -//std::cout << "\tpoint (" << Pe.x() << ", " << Pe.y() << ", " << Pe.z() << ")" << std::endl; - - SetFoldArea(Pe.z()); // set fold type - SetHalfWave(Pe.z()); // set halfwave parameters for substep - G4double vstep[3], vmap[3]; - vstep[0] = Pe.x(); - vstep[1] = Pe.y(); - vstep[2] = Pe.z(); - TransformWheeltoFieldMap(vstep, vmap); //get corresponding point in Map - - //JT.>>> - const G4double rvstep2=vstep[0]*vstep[0]+vstep[1]*vstep[1] ; - const G4double rforalpha=sqrt( rvstep2-vmap[1]*vmap[1] ); - const G4double gap=HalfLArGapSize(rforalpha,rforalpha);// LAr gap at the straight section on the fieldmap - const G4double yshift_on_map = rforalpha*M_PI/lwc()->GetNumberOfFans()-(m_FanAbsThickness+m_FanEleThickness)/2.; - const G4double yshift_on_wheel=sqrt(rvstep2)*M_PI/lwc()->GetNumberOfFans()-(m_FanAbsThickness+m_FanEleThickness)/2.; - const G4double cylgapcorr=yshift_on_wheel/yshift_on_map; // scale difference between plane and cylindrical surface - /* - std::cout<< " GetCurrent1**Nabs="<<lwc()->GetNumberOfFans()<<" absthick="<<FanAbsThickness<<" elethick="<<FanEleThickness - <<" cylgapcorr-1="<<cylgapcorr-1 - <<" ZinHalfWave="<<ZinHalfWave<<" HalfWaveNumber="<<HalfWaveNumber - <<std::endl; - */ - //<<<JT - -//std::cout << "\tvmap: (" << vmap[0] << ", " << vmap[1] << ", " << vmap[2] << ")" << std::endl; - - const G4double HV_value = get_HV_value(Pe, gap1); - - int Pe_fan = 0; - const G4double dte = elc()->DistanceToTheNearestFan(Pe, Pe_fan); - G4int side = signof(dte); - int Pa_fan = 0; - const G4double dta = lwc()->DistanceToTheNearestFan(Pa, Pa_fan); -//std::cout << "\tdte: " << dte << ", dta: " << dta << std::endl; -//std::cout << "\tPe: (" << Pe.x() << ", " << Pe.y() << ", " << Pe.z() << ")" << std::endl; -//std::cout << "\tPa: (" << Pa.x() << ", " << Pa.y() << ", " << Pa.z() << ")" << std::endl; - - const G4double suppression_range = m_ElectrodeFanHalfThickness + s_CHC_Esr; - if(fabs(dte) < suppression_range){ -// std::cout << " S"; - continue; //skip point if too close to the electrode - } - - const G4double agap = fabs(dte) - m_ElectrodeFanHalfThickness - + fabs(dta) - lwc()->GetFanHalfThickness(); //correction to electrode suppression not to - G4double suppression = agap / (agap - s_CHC_Esr); // change av. signal in the gap - if(suppression < 0.) suppression = 1.; -//std::cout << "\tagap: " << agap << ", suppression: " << suppression << std::endl; - - //search for radial layers the substep is in between; -/* G4int irlayer = 0; - const G4int &n_layers = m_ChCollWheelType->NumberOfRadialLayer; - G4double R = Pe.r(); - for(G4int j = 1; j < n_layers; ++ j){ - if(R < m_ChCollWheelType->RadiusOfLayers[j]){ - irlayer = j - 1; - break; - } - }*/ - // AMS - G4int irlayer = 0; - const G4int &n_layers = m_ChCollWheelType->NumberOfRadialLayer; - - - //JT>>>>>G4double fold_angle = M_PI - 2. * parameterized_slant_angle(Pe.r()); - - const G4double fold_angle = M_PI - 2. * lwc()->parameterized_slant_angle(rforalpha); //<<<JT - const G4double fold_angle_deg=fold_angle/M_PI*180.; //<<<JT - - for(G4int j = 1; j < n_layers; ++ j){ - if(fold_angle_deg > m_ChCollWheelType->FoldinAngleOfLayers[j]){ - irlayer = j - 1; - break; - } - } -//std::cout << "\tirlayer: " << irlayer << ", R " << R << std::endl; - assert(irlayer >= 0 && irlayer < n_layers - 1); - - G4double cur = 1.; - - if(!m_ChCollFoldType->FieldMapPrepared // fieldmap is not available for this fold - || ( vmap[2] < m_ChCollFoldType->MinZofLayer[irlayer] // or out of z range of both maps - && vmap[2] < m_ChCollFoldType->MinZofLayer[irlayer + 1]) - ){ - // interpolation not needed -//std::cout << "\tinterpolation not needed" << std::endl; - } else { // interpolation needed - // compute radial interpolation parameter -/* G4double dr = (R - m_ChCollWheelType->RadiusOfLayers[irlayer]) - / (m_ChCollWheelType->RadiusOfLayers[irlayer + 1] - m_ChCollWheelType->RadiusOfLayers[irlayer]); -*/ - // AMS - // JT>> - G4double dr = -(m_ChCollWheelType->FoldinAngleOfLayers[irlayer] - fold_angle_deg) - / (m_ChCollWheelType->FoldinAngleOfLayers[irlayer + 1] - m_ChCollWheelType->FoldinAngleOfLayers[irlayer]); - - //std::cout<<"**** GetCurrent1 dr="<<dr<<" n_layers="<< n_layers<<" irlayer= "<<irlayer<<std::endl; - //<<JT - - if(dr < 0.) dr = 0.; - if(dr > 1.) dr = 1.; - -//std::cout << "\tdr " << dr << " <- "; -//std::cout << R << " " << m_ChCollWheelType->RadiusOfLayers[irlayer] -// << " " << m_ChCollWheelType->RadiusOfLayers[irlayer+1] -// << " " << m_ChCollWheelType->RadiusOfLayers[irlayer] << std::endl; - - const G4double a_e = elc()->AmplitudeOfSurface(Pe, side, Pe_fan); - const G4double a_a = lwc()->AmplitudeOfSurface(Pa, signof(dta), Pa_fan); -//std::cout << "\ta_e: " << a_e << ", a_a: " << a_a << std::endl; - - const G4double x_e = fabs(Pe.x() - a_e); - const G4double x_a = fabs(Pa.x() - a_a); - - //check geom. err condition if point is outside of LAr gap - if(gaperr > -100 && (x_e < 0. || x_a < 0.)) gaperr -= 100; - - - const G4double z1 = Pe.z() - lwc()->GetStraightStartSection(); - G4int nhwave = G4int(z1 / lwc()->GetHalfWaveLength()); - if(nhwave < 0) nhwave = 0; - if(nhwave >= lwc()->GetNumberOfHalfWaves()) nhwave = lwc()->GetNumberOfHalfWaves() - 1; - if((nhwave % 2) == 1) side = -side; - - // get relative y coordinate - G4double yratio = ((side > 0)? x_e: x_a) / (x_e + x_a); -//std::cout << "\tyratio: " << yratio << std::endl; - - if(yratio <= 0.) yratio = 0.00001; // pull the point into the gap if it wouldn't be there; - else if(yratio >= 1.) yratio = 0.99999; // this may happen bec.G4 does not grantee that the full - // step-line is within the same volume - - //std::cout<<"**GetCurrent1: side="<<side<<" x_a,x_e="<<x_a<<" "<<x_e<<" yratio="<< - // yratio<<std::endl; - -// get corresponding y coordinates on the radial layers -// where the weight is to be taken from; - G4double shift = lwc()->GetStraightStartSection(); - if(m_PointFoldMapArea != 0) shift += m_WaveLength; - SetHalfWave(shift + vmap[2]); -//std::cout << "\tPointFoldMapArea: " << s_PointFoldMapArea << ", SetHalfWave(" << shift + vmap[2] << ")" << std::endl; - - SetYlimitsofPhigapinFieldMap(irlayer); //on the lower layer -//std::cout << "\tFieldmap limits: " << m_Ylimits[0] << " " << m_Ylimits[1] << " " << m_Ylimits[2] << " " << m_Ylimits[3] << std::endl; - G4double pos_low = 0.; - if(side < 0) pos_low = m_Ylimits[0] * (1. - yratio) + m_Ylimits[1] * yratio; - else if(side > 0) pos_low = m_Ylimits[2] * (1. - yratio) + m_Ylimits[3] * yratio; - - SetYlimitsofPhigapinFieldMap(irlayer + 1); //on the upper layer - G4double pos_up = 0.; - if(side < 0) pos_up = m_Ylimits[0] * (1. - yratio) + m_Ylimits[1] * yratio; - else if(side > 0) pos_up = m_Ylimits[2] * (1. - yratio) + m_Ylimits[3] * yratio; - -// get weights from the maps of lower and upper layer - const G4double w_low = GetWeightfromFieldMap(irlayer, vmap[2], pos_low); - const G4double w_up = GetWeightfromFieldMap(irlayer + 1, vmap[2], pos_up); - -// get the interpolated normalized Efield alias cur - cur = w_low * (1. - dr) + w_up * dr; - }// end of interpolation - -//(25-05-2005) new current calculation: edep*1/U*IonReco*E*v_drift -// normalized so that signal=edep in the straight section of the same gap -// as above; -// where: HV=1250V,E=9.615 [kv/cm] ,T=88.16 K, -// vdrift=4.62 [mm/mikrosec], Ionreco=96.4% -// ==> s_AverageCurrent=3.425/[mikrosec]; - -// G4double gap = HalfLArGapSize(Pe.r(), Pe.r()); // gapsize in the straight section -// AMS: why "straight section"? I would better use agap... -// JT: because the fieldmap table is normalized to the efield in the straight section - - // JT>>const G4double &gap = agap; - - const G4double efield = cur * (HV_value * CLHEP::volt) / (gap * CLHEP::mm) / (CLHEP::kilovolt / CLHEP::cm) /cylgapcorr; - // efield = efield/cylgapcorr; //<<JT // DM division by cylgapcorr combined to prev. line - const G4double substep_current = step_current * cur / gap * IonReco(efield) * - DriftVelo(s_LArTemperature_av, efield) * suppression / cylgapcorr; - //substep_current = substep_current / cylgapcorr; // <<JT // DM division by cylgapcorr combined to prev. line - -// if(birksLaw){ -// current += (*birksLaw)(substep_current, step/nofstep/cm, efield); -// } else { - current += substep_current; -// } - } // end of loop for substeps -//std::cout << std::endl; - if(current < 0.){ - gaperr -= 1000; - current = 0.; - } - - if(gaperr != 0){ - s_CHCEbad = s_CHCEbad + edep; - if(s_CHCIprint < s_CHCMaxPrint){ - ++ s_CHCIprint; - (*m_msg) << MSG::WARNING - << "GetCurrent has strange step, gaperr=" - << gaperr << " correction still computed" - << " bad edep ratio=" << s_CHCEbad/s_CHCEtotal - << endmsg; - } - } - - //std::cout<<"GetCurrent1::edep="<<edep<<" current="<<current <<" gaperr="<<gaperr<<std::endl; - return current; +//using namespace LArG4::EC; + +G4int LArG4::EC::EnergyCalculator::_getIRlayerA(G4double fold_angle_deg) const { + //search for radial layers the substep is in between; + /* G4int irlayer = 0; + const G4int &n_layers = ChCollWheelType->NumberOfRadialLayer; + G4double R = Pe.r(); + for(G4int j = 1; j < n_layers; ++ j){ + if(R < ChCollWheelType->RadiusOfLayers[j]){ + irlayer = j - 1; + break; + } + }*/ + // AMS + G4int irlayer = 0; + const G4int n_layers = ChCollWheelType()->NumberOfRadialLayer; + + for(G4int j = 1; j < n_layers; ++ j) { + if(fold_angle_deg > ChCollWheelType()->FoldinAngleOfLayers[j]) { + irlayer = j - 1; + break; + } + } + //std::cout << "\tirlayer: " << irlayer << ", R " << R << std::endl; + assert(irlayer >= 0 && irlayer < n_layers - 1); + return irlayer; } - -G4double EnergyCalculator::get_HV_value( - const G4ThreeVector& p, const std::pair<G4int, G4int> &gap) const -{ - const G4int atlas_side = (lwc()->GetAtlasZside() > 0) ? 0 : 1; - - G4ThreeVector p1 ( p ); - p1[2] += lwc()->GetElecFocaltoWRP() + lwc()->GetdWRPtoFrontFace(); - const G4double eta = p1.pseudoRapidity(); - G4int eta_section = -1; - for(G4int i = 1; i <= s_NofEtaSection; ++ i){ - if(eta <= s_HV_Etalim[i]){ - eta_section = i - 1; - break; - } - } - if(!(eta_section>=0 && eta_section <=s_NofEtaSection-1)) throw std::runtime_error("Index out of range"); - - //assert(eta_section >= 0 && eta_section < s_NofEtaSection); - - /*(right side of e large phi)*/ /*left side of electrode(small phi)*/ - const G4int e_side = (gap.second > 0) ? 1 : 0; - - const G4int first_electrode = s_HV_Start_phi[atlas_side][eta_section][e_side]; - - if(first_electrode < 0 || first_electrode >= lwc()->GetNumberOfFans()){ - (*m_msg) << MSG::FATAL - << " get_HV_value: first_electrode number is out of range" - << endmsg; - G4Exception("EnergyCalculator", "ElectrodeOutOfRange", FatalException, - "get_HV_value: first_electrode number is out of range"); - } - - G4int e_index = lwc()->PhiGapNumberForWheel(gap.first) - first_electrode; - if(e_index < 0) e_index += lwc()->GetNumberOfFans(); - const G4int &phi_section = e_index; -/* G4int nofelectrodesinphisection = lwc()->GetNumberOfFans() / NofPhiSections;//24(8) for outer(inner) wheel - G4int phi_section = e_index / nofelectrodesinphisection; - - if(phi_section < 0 || phi_section >= NofPhiSections){ - (*m_msg) << MSG::FATAL - << " get_HV_value: phi_section number is out of range" - << endmsg; - G4Exception("EnergyCalculator::get_HV_value"); - }*/ -/* -printf("HV: %.2f at eta %.4f, phi %.4f", - s_HV_Values[atlas_side][eta_section][e_side][phi_section], eta, p.phi()); -std::cout << " " << gap.first << " | " - << atlas_side << " " << eta_section << " " << e_side << " " << phi_section - << std::endl; -*/ - return s_HV_Values[atlas_side][eta_section][e_side][phi_section]; +G4double LArG4::EC::EnergyCalculator::_interpolateCurrentSubStep1(G4double rforalpha, const G4double vmap[], + const G4ThreeVector & Pe, int side_dte, int Pe_fan, + const G4ThreeVector & Pa, int side_dta, int Pa_fan, + const FoldArea & fa, G4int & gaperr ) const { + + const G4double fold_angle = M_PI - 2. * lwc()->parameterized_slant_angle(rforalpha); //<<<JT + const G4double fold_angle_deg=fold_angle/M_PI*180.; //<<<JT + const G4int irlayer = _getIRlayerA(fold_angle_deg); + + if(!fa.ChCollFoldType->FieldMapPrepared // fieldmap is not available for this fold + || ( vmap[2] < fa.ChCollFoldType->MinZofLayer[irlayer] // or out of z range of both maps + && vmap[2] < fa.ChCollFoldType->MinZofLayer[irlayer + 1]) + ){ + // interpolation not needed + return 1.0; + } + + // interpolation needed + // compute radial interpolation parameter + G4double dr = -(ChCollWheelType()->FoldinAngleOfLayers[irlayer] - fold_angle_deg) + / (ChCollWheelType()->FoldinAngleOfLayers[irlayer + 1] - ChCollWheelType()->FoldinAngleOfLayers[irlayer]); + + if(dr < 0.) dr = 0.; + if(dr > 1.) dr = 1.; + + const G4double a_e = elc()->AmplitudeOfSurface(Pe, side_dte, Pe_fan); + const G4double a_a = lwc()->AmplitudeOfSurface(Pa, side_dta, Pa_fan); + //std::cout << "\ta_e: " << a_e << ", a_a: " << a_a << std::endl; + + const G4double x_e = fabs(Pe.x() - a_e); + const G4double x_a = fabs(Pa.x() - a_a); + + //check geom. err condition if point is outside of LAr gap + if(gaperr > -100 && (x_e < 0. || x_a < 0.)) gaperr -= 100; + + + const G4double z1 = Pe.z() - lwc()->GetStraightStartSection(); + G4int nhwave = G4int(z1 / lwc()->GetHalfWaveLength()); + if(nhwave < 0) nhwave = 0; + if(nhwave >= lwc()->GetNumberOfHalfWaves()) nhwave = lwc()->GetNumberOfHalfWaves() - 1; + //if((nhwave % 2) == 1) side = -side; + const int side = ((nhwave % 2) == 1) ? -side_dte : side_dte ; + + // get relative y coordinate + G4double yratio = ((side > 0)? x_e: x_a) / (x_e + x_a); + //std::cout << "\tyratio: " << yratio << std::endl; + + if(yratio <= 0.) yratio = 0.00001; // pull the point into the gap if it wouldn't be there; + else if(yratio >= 1.) yratio = 0.99999; // this may happen bec.G4 does not grantee that the full + // step-line is within the same volume + + // get corresponding y coordinates on the radial layers + // where the weight is to be taken from; + G4double shift = lwc()->GetStraightStartSection(); + if(fa.PointFoldMapArea != 0) shift += WaveLength(); + + WheelGeometry _wg; + SetHalfWave(shift + vmap[2], _wg); + //std::cout << "\tPointFoldMapArea: " << PointFoldMapArea << ", SetHalfWave(" << shift + vmap[2] << ")" << std::endl; + + G4double Ylimits[4]; + SetYlimitsofPhigapinFieldMap(irlayer, _wg, Ylimits); //on the lower layer + //std::cout << "\tFieldmap limits: " << Ylimits[0] << " " << Ylimits[1] << " " << Ylimits[2] << " " << Ylimits[3] << std::endl; + G4double pos_low = 0.; + if(side < 0) pos_low = Ylimits[0] * (1. - yratio) + Ylimits[1] * yratio; + else if(side > 0) pos_low = Ylimits[2] * (1. - yratio) + Ylimits[3] * yratio; + + SetYlimitsofPhigapinFieldMap(irlayer + 1, _wg, Ylimits); //on the upper layer + G4double pos_up = 0.; + if(side < 0) pos_up = Ylimits[0] * (1. - yratio) + Ylimits[1] * yratio; + else if(side > 0) pos_up = Ylimits[2] * (1. - yratio) + Ylimits[3] * yratio; + + // get weights from the maps of lower and upper layer + const G4double w_low = GetWeightfromFieldMap(irlayer, vmap[2], pos_low, fa); + const G4double w_up = GetWeightfromFieldMap(irlayer + 1, vmap[2], pos_up, fa); + + // get the interpolated normalized Efield alias cur + return w_low * (1. - dr) + w_up * dr; + // end of interpolation } -/* -G4double EnergyCalculator::transform_z_to_fieldmap(const G4ThreeVector &p) +G4double LArG4::EC::EnergyCalculator::GetCurrent1(const G4ThreeVector &P1, const G4ThreeVector &P2, G4double edep) const { - // fieldmap is defined for - // -- 'normal' folds : - // in the coord syst. of a halfwave of pos.slope - // in the range of 0<z<QuarterWaveLength; - // -- 0th and last fold in the range -13mm < z < QuarterWaveLength/2. - // SetHalfWave() and GetPhiGap() should be called previously; - - G4double result = 0.; - - if(s_PointFoldMapArea == 0){ - if(HalfWaveNumber == 0) result = ZinHalfWave; // 0th fold - else result = -ZinHalfWave; // last fold - } else { // normal folds - result = fabs(ZinHalfWave); - } - return result; -} - -*/ + /* + FILE *F = fopen("test1.dat", "w"); + if(F == 0) abort(); + G4ThreeVector a(0., 1200., 0.); + for(double z = 0; z <= WheelThickness; z += 0.1){ + fprintf(F, "%f", z); + // for(double x = -20.; x <= 20.; x += 1.){ + // a[0] = x; + a[2] = z; + // std::cout << "(" << z << ", " << x << ") " << DistanceToTheNeutralFibre(a) << std::endl; + for(int s = -1; s <= 1; s ++){ + // std::cout << "\t" << s << " " << elc()->AmplitudeOfSurface(a, s) << std::endl; + fprintf(F, " %f", elc()->AmplitudeOfSurface(a, s)); + } + // } + fprintf(F, "\n"); + } + fclose(F); + + abort(); + */ + + //std::cout << "GetCurrent1 -------------------------------------------------------------------------" << std::endl; + //std::cout << "input: (" << P1.x() << ", " << P1.y() << ", " << P1.z() << "), (" + // << P2.x() << ", " << P2.y() << ", " << P2.z() << "), " << edep << std::endl; + + G4int gaperr = 0; + + const std::pair<G4int, G4int> gap2 = lwc()->GetPhiGapAndSide(P2); + const std::pair<G4int, G4int> gap1 = lwc()->GetPhiGapAndSide(P1); + // gap1.first = PhiGapNumberForWheel(gap1.first); + // gap2.first = PhiGapNumberForWheel(gap2.first); + + if(gap1 != gap2) gaperr = -1; + + WheelGeometry _wg; + FoldArea _fa; + //JT.>>> + SetFoldArea(P1.z(), _fa); // set fold type + SetHalfWave(P1.z(), _wg); // set halfwave parameters for substep + G4double p1[3]; + p1[0] = P1.x(); + p1[1] = P1.y(); + p1[2] = P1.z(); + + GetPhiGap(p1, _wg); //set rotation angle from the wheel to the efield Map system; once for each G4 step + + const G4double step = (P2 - P1).mag(); + const G4int nofstep = G4int(step / s_GridSize) + 1; // step is divided to substeps + G4double current = 0.; //current to be returned + const G4double step_current = edep / nofstep / s_AverageCurrent; // base current for each step + + //std::cout << "gap1: " << gap1.first << ", " << gap1.second + // << "; gap2: " << gap2.first << ", " << gap2.second << std::endl; + //std::cout << "input: (" << P1.x() << ", " << P1.y() << ", " << P1.z() << "), (" + // << P2.x() << ", " << P2.y() << ", " << P2.z() << "), " << edep << std::endl; + + + const G4double inv_nofstep = 1. / static_cast<double>(nofstep); + for(G4int i = 0; i < nofstep; ++ i){ + G4double ds = (i + 0.5) * inv_nofstep; + G4ThreeVector Pe = P1 * (1. - ds) + P2 * ds; + G4ThreeVector Pa = Pe; + //std::cout << "step " << i << std::endl; + //std::cout << "\tpoint (" << Pe.x() << ", " << Pe.y() << ", " << Pe.z() << ")" << std::endl; + + SetFoldArea(Pe.z(), _fa); // set fold type + SetHalfWave(Pe.z(), _wg); // set halfwave parameters for substep + G4double vstep[3], vmap[3]; + vstep[0] = Pe.x(); + vstep[1] = Pe.y(); + vstep[2] = Pe.z(); + TransformWheeltoFieldMap(vstep, vmap, _wg, _fa); //get corresponding point in Map + + //JT.>>> + const G4double rvstep2=vstep[0]*vstep[0]+vstep[1]*vstep[1] ; + const G4double rforalpha=sqrt( rvstep2-vmap[1]*vmap[1] ); + const G4double gap=HalfLArGapSize(rforalpha,rforalpha);// LAr gap at the straight section on the fieldmap + const G4double yshift_on_map = rforalpha*M_PI/lwc()->GetNumberOfFans()-(FanAbsThickness() + FanEleThickness() )/2.; + const G4double yshift_on_wheel=sqrt(rvstep2)*M_PI/lwc()->GetNumberOfFans()-(FanAbsThickness() + FanEleThickness() )/2.; + const G4double cylgapcorr=yshift_on_wheel/yshift_on_map; // scale difference between plane and cylindrical surface + /* + std::cout<< " GetCurrent1**Nabs="<<lwc()->GetNumberOfFans()<<" absthick="<<FanAbsThickness<<" elethick="<<FanEleThickness + <<" cylgapcorr-1="<<cylgapcorr-1 + <<" ZinHalfWave="<<ZinHalfWave<<" HalfWaveNumber="<<HalfWaveNumber + <<std::endl; + */ + //<<<JT + + //std::cout << "\tvmap: (" << vmap[0] << ", " << vmap[1] << ", " << vmap[2] << ")" << std::endl; + + const G4double HV_value = get_HV_value(Pe, gap1); + + int Pe_fan = 0; + const G4double dte = elc()->DistanceToTheNearestFan(Pe, Pe_fan); + //G4int side = signof(dte); + int Pa_fan = 0; + const G4double dta = lwc()->DistanceToTheNearestFan(Pa, Pa_fan); + //std::cout << "\tdte: " << dte << ", dta: " << dta << std::endl; + //std::cout << "\tPe: (" << Pe.x() << ", " << Pe.y() << ", " << Pe.z() << ")" << std::endl; + //std::cout << "\tPa: (" << Pa.x() << ", " << Pa.y() << ", " << Pa.z() << ")" << std::endl; + + const G4double suppression_range = ElectrodeFanHalfThickness() + CHC_Esr(); + if(fabs(dte) < suppression_range){ + // std::cout << " S"; + continue; //skip point if too close to the electrode + } + + const G4double agap = fabs(dte) - ElectrodeFanHalfThickness() + + fabs(dta) - lwc()->GetFanHalfThickness(); //correction to electrode suppression not to + G4double suppression = agap / ( agap - CHC_Esr() ); // change av. signal in the gap + if(suppression < 0.) suppression = 1.; + //std::cout << "\tagap: " << agap << ", suppression: " << suppression << std::endl; + + const G4double cur = _interpolateCurrentSubStep1( rforalpha, vmap, Pe, signof(dte), Pe_fan, Pa, signof(dta), Pa_fan, _fa, gaperr ); + //(25-05-2005) new current calculation: edep*1/U*IonReco*E*v_drift + // normalized so that signal=edep in the straight section of the same gap + // as above; + // where: HV=1250V,E=9.615 [kv/cm] ,T=88.16 K, + // vdrift=4.62 [mm/mikrosec], Ionreco=96.4% + // ==> s_AverageCurrent=3.425/[mikrosec]; + + // G4double gap = HalfLArGapSize(Pe.r(), Pe.r()); // gapsize in the straight section + // AMS: why "straight section"? I would better use agap... + // JT: because the fieldmap table is normalized to the efield in the straight section + + // JT>>const G4double &gap = agap; + + const G4double efield = cur * (HV_value * CLHEP::volt) / (gap * CLHEP::mm) / (CLHEP::kilovolt / CLHEP::cm) /cylgapcorr; + const G4double substep_current = step_current * cur / gap * IonReco(efield) * + DriftVelo(s_LArTemperature_av, efield) * suppression / cylgapcorr; + + // if(birksLaw){ + // current += (*birksLaw)(substep_current, step/nofstep/cm, efield); + // } else { + current += substep_current; + // } + } // end of loop for substeps + //std::cout << std::endl; + if(current < 0.){ + gaperr -= 1000; + current = 0.; + } + +#ifdef DEBUG_CHCL + if(gaperr != 0){ + s_CHCEbad = s_CHCEbad + edep; + if(s_CHCIprint < s_CHCMaxPrint){ + ++ s_CHCIprint; + ATH_MSG_WARNING("GetCurrent has strange step, gaperr=" + << gaperr << " correction still computed" + << " bad edep ratio=" << s_CHCEbad/s_CHCEtotal + << endmsg; + } + } +#endif + + //std::cout<<"GetCurrent1::edep="<<edep<<" current="<<current <<" gaperr="<<gaperr<<std::endl; + return current; + } + + + G4double LArG4::EC::EnergyCalculator::get_HV_value( + const G4ThreeVector& p, const std::pair<G4int, G4int> &gap) const + { + const G4int atlas_side = (lwc()->GetAtlasZside() > 0) ? 0 : 1; + + G4ThreeVector p1 ( p ); + p1[2] += lwc()->GetElecFocaltoWRP() + lwc()->GetdWRPtoFrontFace(); + const G4double eta = p1.pseudoRapidity(); + G4int eta_section = -1; + for(G4int i = 1; i <= s_NofEtaSection; ++ i){ + if(eta <= s_HV_Etalim[i]){ + eta_section = i - 1; + break; + } + } + if(!(eta_section>=0 && eta_section <=s_NofEtaSection-1)) throw std::runtime_error("Index out of range"); + + //assert(eta_section >= 0 && eta_section < s_NofEtaSection); + + /*(right side of e large phi)*/ /*left side of electrode(small phi)*/ + const G4int e_side = (gap.second > 0) ? 1 : 0; + + const G4int first_electrode = s_HV_Start_phi[atlas_side][eta_section][e_side]; + + if(first_electrode < 0 || first_electrode >= lwc()->GetNumberOfFans()){ + ATH_MSG_FATAL(" get_HV_value: first_electrode number is out of range"); + G4Exception("EnergyCalculator", "ElectrodeOutOfRange", FatalException, + "get_HV_value: first_electrode number is out of range"); + } + + G4int phi_section = lwc()->PhiGapNumberForWheel(gap.first) - first_electrode; + if(phi_section < 0) phi_section += lwc()->GetNumberOfFans(); + + return s_HV_Values[atlas_side][eta_section][e_side][phi_section]; + } + + /* + G4double LArG4::EC::EnergyCalculator::transform_z_to_fieldmap(const G4ThreeVector &p) + { + // fieldmap is defined for + // -- 'normal' folds : + // in the coord syst. of a halfwave of pos.slope + // in the range of 0<z<QuarterWaveLength; + // -- 0th and last fold in the range -13mm < z < QuarterWaveLength/2. + // SetHalfWave() and GetPhiGap() should be called previously; + + G4double result = 0.; + + if(s_PointFoldMapArea == 0){ + if(HalfWaveNumber == 0) result = ZinHalfWave; // 0th fold + else result = -ZinHalfWave; // last fold + } else { // normal folds + result = fabs(ZinHalfWave); + } + return result; + } + + */ diff --git a/LArCalorimeter/LArG4/LArG4EC/src/LArEMECChargeCollection.cc b/LArCalorimeter/LArG4/LArG4EC/src/LArEMECChargeCollection.cc index ea2d2d104ae1f5b793007bf9b79d58dde8137884..53bd5aac99a780dedb7413b4e6b8b579e88c4a31 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/LArEMECChargeCollection.cc +++ b/LArCalorimeter/LArG4/LArG4EC/src/LArEMECChargeCollection.cc @@ -20,16 +20,16 @@ // 25-May-2005 (J.T.): * // - HV values for each power supplies are treated: * // read it from file * -// /afs/cern.ch/atlas/offline/data/lar/emec/efield/HVEMECMap.dat; * +// /afs/cern.ch/atlas/offline/data/lar/emec/efield/HVEMECMap.dat; * // (the values are the nominal ones from TB) * // - current computation changed: * // - HV value from the above file is taken into account * // - IonRecombination effect is taken into accont * // - drift velocity parametrized as a function of T and Efield * -// from:note ATLAS-LARG-99-008; * +// from:note ATLAS-LARG-99-008; * // T is set to te average tempr. measured for ECC0,1,5 at TB * -// - current ~ edep*1/HV* Efield*v_drift(T,Efield); * -// normalized at eta=2.25 where the gapsize is 1.3mm(=AverageGap) * +// - current ~ edep*1/HV* Efield*v_drift(T,Efield); * +// normalized at eta=2.25 where the gapsize is 1.3mm(=AverageGap) * // * // 20-May-2005 (J.T.): * // - in case of err=-999, * @@ -82,26 +82,24 @@ #include <cassert> #include <cmath> -#include "GaudiKernel/MsgStream.h" - #include "G4ThreeVector.hh" #include "globals.hh" #include "LArG4Code/LArG4BirksLaw.h" -#include "LArG4EC/EnergyCalculator.h" +#include "EnergyCalculator.h" #include "CLHEP/Units/PhysicalConstants.h" // #define DEBUGGetCur -using namespace LArG4::EC; +//using namespace LArG4::EC; // *************************************************************************** -void EnergyCalculator::CreateArrays(Wheel_Efield_Map &wheel, G4int n){ -// *************************************************************************** +void LArG4::EC::EnergyCalculator::CreateArrays(Wheel_Efield_Map &wheel, G4int n){ + // *************************************************************************** -// std::cout<<"***CreateArrays wheeltype; n="<<n -// <<std::endl; + // std::cout<<"***CreateArrays wheeltype; n="<<n + // <<std::endl; wheel.NumberOfRadialLayer = n; wheel.RadiusOfLayers =new G4double [n]; @@ -135,457 +133,429 @@ void EnergyCalculator::CreateArrays(Wheel_Efield_Map &wheel, G4int n){ // *************************************************************************** -void EnergyCalculator::IniGeomforFieldMaps(void){ -// *************************************************************************** -// std::cout - (*m_msg) << MSG::INFO - << "***IniGeomforFieldMaps() called for FieldMapVersion = " - << s_FieldMapVersion - << endmsg; -// <<std::endl; - - if(s_FieldMapVersion == "v00" || s_FieldMapVersion == "v01" || - s_FieldMapVersion == "v02"){ - - s_ChCollInner.Fold1.FieldMapPrepared=true; - s_ChCollOuter.Fold1.FieldMapPrepared=true; - - s_ChCollInner.Fold0.FieldMapPrepared=false; - s_ChCollOuter.Fold0.FieldMapPrepared=false; - - if(s_FieldMapVersion == "v00") { - - G4int nlayer=6; // number of radial layers - std::cout<<" ***IniGeomforFieldMaps calls CreateArrays" - <<std::endl; - CreateArrays(s_ChCollInner,nlayer); - CreateArrays(s_ChCollOuter,nlayer); - - s_ChCollInner.RadiusOfLayers[0]=300.;//[mm] - s_ChCollInner.RadiusOfLayers[1]=400.; - s_ChCollInner.RadiusOfLayers[2]=500.; - s_ChCollInner.RadiusOfLayers[3]=600.; - s_ChCollInner.RadiusOfLayers[4]=700.; - s_ChCollInner.RadiusOfLayers[5]=800.; - - s_ChCollOuter.RadiusOfLayers[0]= 600.; //[mm] - s_ChCollOuter.RadiusOfLayers[1]= 900.; - s_ChCollOuter.RadiusOfLayers[2]=1200.; - s_ChCollOuter.RadiusOfLayers[3]=1500.; - s_ChCollOuter.RadiusOfLayers[4]=1800.; - s_ChCollOuter.RadiusOfLayers[5]=2100.; - - s_ChCollInner.FoldinAngleOfLayers[0]= 112.7;//[degree] - s_ChCollInner.FoldinAngleOfLayers[1]= 92.2; - s_ChCollInner.FoldinAngleOfLayers[2]= 78.7; - s_ChCollInner.FoldinAngleOfLayers[3]= 68.8; - s_ChCollInner.FoldinAngleOfLayers[4]= 61.3; - s_ChCollInner.FoldinAngleOfLayers[5]= 55.2; - - s_ChCollInner.HalfLArGapSizeOfLayers[0]= 1.44; //[mm] - s_ChCollInner.HalfLArGapSizeOfLayers[1]= 1.94; - s_ChCollInner.HalfLArGapSizeOfLayers[2]= 2.29; - s_ChCollInner.HalfLArGapSizeOfLayers[3]= 2.56; - s_ChCollInner.HalfLArGapSizeOfLayers[4]= 2.78; - s_ChCollInner.HalfLArGapSizeOfLayers[5]= 2.96; - - s_ChCollOuter.FoldinAngleOfLayers[0]=129.;//[degree] - s_ChCollOuter.FoldinAngleOfLayers[1]=101.4; - s_ChCollOuter.FoldinAngleOfLayers[2]= 84.8; - s_ChCollOuter.FoldinAngleOfLayers[3]= 73.2; - s_ChCollOuter.FoldinAngleOfLayers[4]= 64.5; - s_ChCollOuter.FoldinAngleOfLayers[5]= 57.7; - - s_ChCollOuter.HalfLArGapSizeOfLayers[0]=0.87; //[mm] - s_ChCollOuter.HalfLArGapSizeOfLayers[1]=1.5; - s_ChCollOuter.HalfLArGapSizeOfLayers[2]=1.96; - s_ChCollOuter.HalfLArGapSizeOfLayers[3]=2.31; - s_ChCollOuter.HalfLArGapSizeOfLayers[4]=2.58; - s_ChCollOuter.HalfLArGapSizeOfLayers[5]=2.79; - } - - if(s_FieldMapVersion == "v01") { - - G4int nlayer=6; - CreateArrays(s_ChCollInner,nlayer); - CreateArrays(s_ChCollOuter,nlayer); - - s_ChCollInner.RadiusOfLayers[0]=300.;//[mm] - s_ChCollInner.RadiusOfLayers[1]=400.; - s_ChCollInner.RadiusOfLayers[2]=500.; - s_ChCollInner.RadiusOfLayers[3]=600.; - s_ChCollInner.RadiusOfLayers[4]=700.; - s_ChCollInner.RadiusOfLayers[5]=800.; - - s_ChCollOuter.RadiusOfLayers[0]= 600.; //[mm] - s_ChCollOuter.RadiusOfLayers[1]= 900.; - s_ChCollOuter.RadiusOfLayers[2]=1200.; - s_ChCollOuter.RadiusOfLayers[3]=1500.; - s_ChCollOuter.RadiusOfLayers[4]=1800.; - s_ChCollOuter.RadiusOfLayers[5]=2100.; - - s_ChCollInner.FoldinAngleOfLayers[0]= 112.742024; //[degree] - s_ChCollInner.FoldinAngleOfLayers[1]= 92.2379512; - s_ChCollInner.FoldinAngleOfLayers[2]= 78.6993545; - s_ChCollInner.FoldinAngleOfLayers[3]= 68.8423119; - s_ChCollInner.FoldinAngleOfLayers[4]= 61.2714745; - s_ChCollInner.FoldinAngleOfLayers[5]= 55.2462062; - - s_ChCollInner.HalfLArGapSizeOfLayers[0]= 1.47806735; //[mm] - s_ChCollInner.HalfLArGapSizeOfLayers[1]= 1.95080191; - s_ChCollInner.HalfLArGapSizeOfLayers[2]= 2.30318731; - s_ChCollInner.HalfLArGapSizeOfLayers[3]= 2.57486515; - s_ChCollInner.HalfLArGapSizeOfLayers[4]= 2.79014569; - s_ChCollInner.HalfLArGapSizeOfLayers[5]= 2.96463479; - - s_ChCollOuter.FoldinAngleOfLayers[0]= 129.00197; //[degree] - s_ChCollOuter.FoldinAngleOfLayers[1]= 101.408128; - s_ChCollOuter.FoldinAngleOfLayers[2]= 84.7966382; - s_ChCollOuter.FoldinAngleOfLayers[3]= 73.1643989; - s_ChCollOuter.FoldinAngleOfLayers[4]= 64.4458572; - s_ChCollOuter.FoldinAngleOfLayers[5]= 57.6301588; - - s_ChCollOuter.HalfLArGapSizeOfLayers[0]= 0.877808149; //[mm] - s_ChCollOuter.HalfLArGapSizeOfLayers[1]= 1.5116158; - s_ChCollOuter.HalfLArGapSizeOfLayers[2]= 1.97238634; - s_ChCollOuter.HalfLArGapSizeOfLayers[3]= 2.31937997; - s_ChCollOuter.HalfLArGapSizeOfLayers[4]= 2.58864056; - s_ChCollOuter.HalfLArGapSizeOfLayers[5]= 2.80290925; - } - - if(s_FieldMapVersion == "v02") { - - G4int nilayer=6; // number of layers for inner/outer wheel - G4int nolayer=11; - CreateArrays(s_ChCollInner,nilayer); - CreateArrays(s_ChCollOuter,nolayer); - - s_ChCollInner.RadiusOfLayers[0]=300.;//[mm] - s_ChCollInner.RadiusOfLayers[1]=400.; - s_ChCollInner.RadiusOfLayers[2]=500.; - s_ChCollInner.RadiusOfLayers[3]=600.; - s_ChCollInner.RadiusOfLayers[4]=700.; - s_ChCollInner.RadiusOfLayers[5]=800.; - - s_ChCollOuter.RadiusOfLayers[0] = 600.; //[mm] - s_ChCollOuter.RadiusOfLayers[1] = 900.; - s_ChCollOuter.RadiusOfLayers[2] =1200.; - s_ChCollOuter.RadiusOfLayers[3] =1250.; - s_ChCollOuter.RadiusOfLayers[4] =1300.; - s_ChCollOuter.RadiusOfLayers[5] =1350.; - s_ChCollOuter.RadiusOfLayers[6] =1400.; - s_ChCollOuter.RadiusOfLayers[7] =1450.; - s_ChCollOuter.RadiusOfLayers[8] =1500.; - s_ChCollOuter.RadiusOfLayers[9] =1800.; - s_ChCollOuter.RadiusOfLayers[10]=2100.; - - s_ChCollInner.FoldinAngleOfLayers[0]= 112.742024; //[degree] - s_ChCollInner.FoldinAngleOfLayers[1]= 92.2379512; - s_ChCollInner.FoldinAngleOfLayers[2]= 78.6993545; - s_ChCollInner.FoldinAngleOfLayers[3]= 68.8423119; - s_ChCollInner.FoldinAngleOfLayers[4]= 61.2714745; - s_ChCollInner.FoldinAngleOfLayers[5]= 55.2462062; - - s_ChCollInner.HalfLArGapSizeOfLayers[0]= 1.47806735; //[mm] - s_ChCollInner.HalfLArGapSizeOfLayers[1]= 1.95080191; - s_ChCollInner.HalfLArGapSizeOfLayers[2]= 2.30318731; - s_ChCollInner.HalfLArGapSizeOfLayers[3]= 2.57486515; - s_ChCollInner.HalfLArGapSizeOfLayers[4]= 2.79014569; - s_ChCollInner.HalfLArGapSizeOfLayers[5]= 2.96463479; - - s_ChCollOuter.FoldinAngleOfLayers[0]= 129.00197; //[degree] - s_ChCollOuter.FoldinAngleOfLayers[1]= 101.408128; - s_ChCollOuter.FoldinAngleOfLayers[2]= 84.7966382; - s_ChCollOuter.FoldinAngleOfLayers[3]= 82.5893317; - s_ChCollOuter.FoldinAngleOfLayers[4]= 80.5022136; - s_ChCollOuter.FoldinAngleOfLayers[5]= 78.524804; - s_ChCollOuter.FoldinAngleOfLayers[6]= 76.6479315; - s_ChCollOuter.FoldinAngleOfLayers[7]= 74.8635164; - s_ChCollOuter.FoldinAngleOfLayers[8]= 73.1643989; - s_ChCollOuter.FoldinAngleOfLayers[9]= 64.4458572; - s_ChCollOuter.FoldinAngleOfLayers[10]= 57.6301588; - - s_ChCollOuter.HalfLArGapSizeOfLayers[0]= 0.877808149; //[mm] - s_ChCollOuter.HalfLArGapSizeOfLayers[1]= 1.5116158; - s_ChCollOuter.HalfLArGapSizeOfLayers[2]= 1.97238634; - s_ChCollOuter.HalfLArGapSizeOfLayers[3]= 2.03692756; - s_ChCollOuter.HalfLArGapSizeOfLayers[4]= 2.09855584; - s_ChCollOuter.HalfLArGapSizeOfLayers[5]= 2.15745335; - s_ChCollOuter.HalfLArGapSizeOfLayers[6]= 2.21378826; - s_ChCollOuter.HalfLArGapSizeOfLayers[7]= 2.26771591; - s_ChCollOuter.HalfLArGapSizeOfLayers[8]= 2.31937997; - s_ChCollOuter.HalfLArGapSizeOfLayers[9]= 2.58864056; - s_ChCollOuter.HalfLArGapSizeOfLayers[10]=2.80290925; - } - } - else if(s_FieldMapVersion == "v03"){ - - s_ChCollInner.Fold1.FieldMapPrepared=true; - s_ChCollOuter.Fold1.FieldMapPrepared=true; - - s_ChCollInner.Fold0.FieldMapPrepared=true; - s_ChCollOuter.Fold0.FieldMapPrepared=true; - - G4int nilayer=6; //number of radial layers; should be the same for - G4int nolayer=16;// all fold type - CreateArrays(s_ChCollInner,nilayer); - CreateArrays(s_ChCollOuter,nolayer); - - for(G4int i=0;i<nilayer;++i){ - s_ChCollInner.RadiusOfLayers[i]=300.+i*100.; - } - s_ChCollInner.FoldinAngleOfLayers[0]= 112.7420; //[degree] - s_ChCollInner.FoldinAngleOfLayers[1]= 92.238; - s_ChCollInner.FoldinAngleOfLayers[2]= 78.6994; - s_ChCollInner.FoldinAngleOfLayers[3]= 68.8423; - s_ChCollInner.FoldinAngleOfLayers[4]= 61.2715; - s_ChCollInner.FoldinAngleOfLayers[5]= 55.2462; - - s_ChCollInner.HalfLArGapSizeOfLayers[0]= 1.5326; //[mm] - s_ChCollInner.HalfLArGapSizeOfLayers[1]= 2.0053; - s_ChCollInner.HalfLArGapSizeOfLayers[2]= 2.3577; - s_ChCollInner.HalfLArGapSizeOfLayers[3]= 2.6294; - s_ChCollInner.HalfLArGapSizeOfLayers[4]= 2.8446; - s_ChCollInner.HalfLArGapSizeOfLayers[5]= 3.0191; - - for(G4int i=0;i<nolayer;++i){ - s_ChCollOuter.RadiusOfLayers[i]=600.+i*100.; - } - - s_ChCollOuter.FoldinAngleOfLayers[0]= 129.002; //[degree] - s_ChCollOuter.FoldinAngleOfLayers[1]= 117.7235; - s_ChCollOuter.FoldinAngleOfLayers[2]= 108.8045; - s_ChCollOuter.FoldinAngleOfLayers[3]= 101.4081; - s_ChCollOuter.FoldinAngleOfLayers[4]= 95.1012; - s_ChCollOuter.FoldinAngleOfLayers[5]= 89.6220; - s_ChCollOuter.FoldinAngleOfLayers[6]= 84.7966; - s_ChCollOuter.FoldinAngleOfLayers[7]= 80.5022; - s_ChCollOuter.FoldinAngleOfLayers[8]= 76.6479; - s_ChCollOuter.FoldinAngleOfLayers[9]= 73.1644; - s_ChCollOuter.FoldinAngleOfLayers[10]= 69.9972; - s_ChCollOuter.FoldinAngleOfLayers[11]= 67.1028; - s_ChCollOuter.FoldinAngleOfLayers[12]= 64.4459; - s_ChCollOuter.FoldinAngleOfLayers[13]= 61.9970; - s_ChCollOuter.FoldinAngleOfLayers[14]= 59.7320; - s_ChCollOuter.FoldinAngleOfLayers[15]= 57.6302; - - s_ChCollOuter.HalfLArGapSizeOfLayers[0]= 0.9367; //[mm] - s_ChCollOuter.HalfLArGapSizeOfLayers[1]= 1.1723; - s_ChCollOuter.HalfLArGapSizeOfLayers[2]= 1.3824; - s_ChCollOuter.HalfLArGapSizeOfLayers[3]= 1.5705; - s_ChCollOuter.HalfLArGapSizeOfLayers[4]= 1.7398; - s_ChCollOuter.HalfLArGapSizeOfLayers[5]= 1.8927; - s_ChCollOuter.HalfLArGapSizeOfLayers[6]= 2.0313; - s_ChCollOuter.HalfLArGapSizeOfLayers[7]= 2.1575; - s_ChCollOuter.HalfLArGapSizeOfLayers[8]= 2.2727; - s_ChCollOuter.HalfLArGapSizeOfLayers[9]= 2.3783; - s_ChCollOuter.HalfLArGapSizeOfLayers[10]=2.4754; - s_ChCollOuter.HalfLArGapSizeOfLayers[11]=2.5648; - s_ChCollOuter.HalfLArGapSizeOfLayers[12]=2.6476; - s_ChCollOuter.HalfLArGapSizeOfLayers[13]=2.7242; - s_ChCollOuter.HalfLArGapSizeOfLayers[14]=2.7955; - s_ChCollOuter.HalfLArGapSizeOfLayers[15]=2.8618; - - } - else{ - (*m_msg) << MSG::FATAL - << "IniGeomforFieldMaps - FieldMapVersion = '" - << s_FieldMapVersion << "' not found!" << endmsg; - } - - s_ChCollInner.GridShift=0.050; - s_ChCollOuter.GridShift=0.0667; +void LArG4::EC::EnergyCalculator::IniGeomforFieldMaps(void){ + // *************************************************************************** + ATH_MSG_INFO("***IniGeomforFieldMaps() called for FieldMapVersion = " + << s_FieldMapVersion); + + if(s_FieldMapVersion == "v00" || s_FieldMapVersion == "v01" || + s_FieldMapVersion == "v02"){ + + s_ChCollInner.Fold1.FieldMapPrepared=true; + s_ChCollOuter.Fold1.FieldMapPrepared=true; + + s_ChCollInner.Fold0.FieldMapPrepared=false; + s_ChCollOuter.Fold0.FieldMapPrepared=false; + + if(s_FieldMapVersion == "v00") { + + G4int nlayer=6; // number of radial layers + ATH_MSG_INFO(" ***IniGeomforFieldMaps calls CreateArrays"); + CreateArrays(s_ChCollInner,nlayer); + CreateArrays(s_ChCollOuter,nlayer); + + s_ChCollInner.RadiusOfLayers[0]=300.;//[mm] + s_ChCollInner.RadiusOfLayers[1]=400.; + s_ChCollInner.RadiusOfLayers[2]=500.; + s_ChCollInner.RadiusOfLayers[3]=600.; + s_ChCollInner.RadiusOfLayers[4]=700.; + s_ChCollInner.RadiusOfLayers[5]=800.; + + s_ChCollOuter.RadiusOfLayers[0]= 600.; //[mm] + s_ChCollOuter.RadiusOfLayers[1]= 900.; + s_ChCollOuter.RadiusOfLayers[2]=1200.; + s_ChCollOuter.RadiusOfLayers[3]=1500.; + s_ChCollOuter.RadiusOfLayers[4]=1800.; + s_ChCollOuter.RadiusOfLayers[5]=2100.; + + s_ChCollInner.FoldinAngleOfLayers[0]= 112.7;//[degree] + s_ChCollInner.FoldinAngleOfLayers[1]= 92.2; + s_ChCollInner.FoldinAngleOfLayers[2]= 78.7; + s_ChCollInner.FoldinAngleOfLayers[3]= 68.8; + s_ChCollInner.FoldinAngleOfLayers[4]= 61.3; + s_ChCollInner.FoldinAngleOfLayers[5]= 55.2; + + s_ChCollInner.HalfLArGapSizeOfLayers[0]= 1.44; //[mm] + s_ChCollInner.HalfLArGapSizeOfLayers[1]= 1.94; + s_ChCollInner.HalfLArGapSizeOfLayers[2]= 2.29; + s_ChCollInner.HalfLArGapSizeOfLayers[3]= 2.56; + s_ChCollInner.HalfLArGapSizeOfLayers[4]= 2.78; + s_ChCollInner.HalfLArGapSizeOfLayers[5]= 2.96; + + s_ChCollOuter.FoldinAngleOfLayers[0]=129.;//[degree] + s_ChCollOuter.FoldinAngleOfLayers[1]=101.4; + s_ChCollOuter.FoldinAngleOfLayers[2]= 84.8; + s_ChCollOuter.FoldinAngleOfLayers[3]= 73.2; + s_ChCollOuter.FoldinAngleOfLayers[4]= 64.5; + s_ChCollOuter.FoldinAngleOfLayers[5]= 57.7; + + s_ChCollOuter.HalfLArGapSizeOfLayers[0]=0.87; //[mm] + s_ChCollOuter.HalfLArGapSizeOfLayers[1]=1.5; + s_ChCollOuter.HalfLArGapSizeOfLayers[2]=1.96; + s_ChCollOuter.HalfLArGapSizeOfLayers[3]=2.31; + s_ChCollOuter.HalfLArGapSizeOfLayers[4]=2.58; + s_ChCollOuter.HalfLArGapSizeOfLayers[5]=2.79; + } + + if(s_FieldMapVersion == "v01") { + + G4int nlayer=6; + CreateArrays(s_ChCollInner,nlayer); + CreateArrays(s_ChCollOuter,nlayer); + + s_ChCollInner.RadiusOfLayers[0]=300.;//[mm] + s_ChCollInner.RadiusOfLayers[1]=400.; + s_ChCollInner.RadiusOfLayers[2]=500.; + s_ChCollInner.RadiusOfLayers[3]=600.; + s_ChCollInner.RadiusOfLayers[4]=700.; + s_ChCollInner.RadiusOfLayers[5]=800.; + + s_ChCollOuter.RadiusOfLayers[0]= 600.; //[mm] + s_ChCollOuter.RadiusOfLayers[1]= 900.; + s_ChCollOuter.RadiusOfLayers[2]=1200.; + s_ChCollOuter.RadiusOfLayers[3]=1500.; + s_ChCollOuter.RadiusOfLayers[4]=1800.; + s_ChCollOuter.RadiusOfLayers[5]=2100.; + + s_ChCollInner.FoldinAngleOfLayers[0]= 112.742024; //[degree] + s_ChCollInner.FoldinAngleOfLayers[1]= 92.2379512; + s_ChCollInner.FoldinAngleOfLayers[2]= 78.6993545; + s_ChCollInner.FoldinAngleOfLayers[3]= 68.8423119; + s_ChCollInner.FoldinAngleOfLayers[4]= 61.2714745; + s_ChCollInner.FoldinAngleOfLayers[5]= 55.2462062; + + s_ChCollInner.HalfLArGapSizeOfLayers[0]= 1.47806735; //[mm] + s_ChCollInner.HalfLArGapSizeOfLayers[1]= 1.95080191; + s_ChCollInner.HalfLArGapSizeOfLayers[2]= 2.30318731; + s_ChCollInner.HalfLArGapSizeOfLayers[3]= 2.57486515; + s_ChCollInner.HalfLArGapSizeOfLayers[4]= 2.79014569; + s_ChCollInner.HalfLArGapSizeOfLayers[5]= 2.96463479; + + s_ChCollOuter.FoldinAngleOfLayers[0]= 129.00197; //[degree] + s_ChCollOuter.FoldinAngleOfLayers[1]= 101.408128; + s_ChCollOuter.FoldinAngleOfLayers[2]= 84.7966382; + s_ChCollOuter.FoldinAngleOfLayers[3]= 73.1643989; + s_ChCollOuter.FoldinAngleOfLayers[4]= 64.4458572; + s_ChCollOuter.FoldinAngleOfLayers[5]= 57.6301588; + + s_ChCollOuter.HalfLArGapSizeOfLayers[0]= 0.877808149; //[mm] + s_ChCollOuter.HalfLArGapSizeOfLayers[1]= 1.5116158; + s_ChCollOuter.HalfLArGapSizeOfLayers[2]= 1.97238634; + s_ChCollOuter.HalfLArGapSizeOfLayers[3]= 2.31937997; + s_ChCollOuter.HalfLArGapSizeOfLayers[4]= 2.58864056; + s_ChCollOuter.HalfLArGapSizeOfLayers[5]= 2.80290925; + } + + if(s_FieldMapVersion == "v02") { + + G4int nilayer=6; // number of layers for inner/outer wheel + G4int nolayer=11; + CreateArrays(s_ChCollInner,nilayer); + CreateArrays(s_ChCollOuter,nolayer); + + s_ChCollInner.RadiusOfLayers[0]=300.;//[mm] + s_ChCollInner.RadiusOfLayers[1]=400.; + s_ChCollInner.RadiusOfLayers[2]=500.; + s_ChCollInner.RadiusOfLayers[3]=600.; + s_ChCollInner.RadiusOfLayers[4]=700.; + s_ChCollInner.RadiusOfLayers[5]=800.; + + s_ChCollOuter.RadiusOfLayers[0] = 600.; //[mm] + s_ChCollOuter.RadiusOfLayers[1] = 900.; + s_ChCollOuter.RadiusOfLayers[2] =1200.; + s_ChCollOuter.RadiusOfLayers[3] =1250.; + s_ChCollOuter.RadiusOfLayers[4] =1300.; + s_ChCollOuter.RadiusOfLayers[5] =1350.; + s_ChCollOuter.RadiusOfLayers[6] =1400.; + s_ChCollOuter.RadiusOfLayers[7] =1450.; + s_ChCollOuter.RadiusOfLayers[8] =1500.; + s_ChCollOuter.RadiusOfLayers[9] =1800.; + s_ChCollOuter.RadiusOfLayers[10]=2100.; + + s_ChCollInner.FoldinAngleOfLayers[0]= 112.742024; //[degree] + s_ChCollInner.FoldinAngleOfLayers[1]= 92.2379512; + s_ChCollInner.FoldinAngleOfLayers[2]= 78.6993545; + s_ChCollInner.FoldinAngleOfLayers[3]= 68.8423119; + s_ChCollInner.FoldinAngleOfLayers[4]= 61.2714745; + s_ChCollInner.FoldinAngleOfLayers[5]= 55.2462062; + + s_ChCollInner.HalfLArGapSizeOfLayers[0]= 1.47806735; //[mm] + s_ChCollInner.HalfLArGapSizeOfLayers[1]= 1.95080191; + s_ChCollInner.HalfLArGapSizeOfLayers[2]= 2.30318731; + s_ChCollInner.HalfLArGapSizeOfLayers[3]= 2.57486515; + s_ChCollInner.HalfLArGapSizeOfLayers[4]= 2.79014569; + s_ChCollInner.HalfLArGapSizeOfLayers[5]= 2.96463479; + + s_ChCollOuter.FoldinAngleOfLayers[0]= 129.00197; //[degree] + s_ChCollOuter.FoldinAngleOfLayers[1]= 101.408128; + s_ChCollOuter.FoldinAngleOfLayers[2]= 84.7966382; + s_ChCollOuter.FoldinAngleOfLayers[3]= 82.5893317; + s_ChCollOuter.FoldinAngleOfLayers[4]= 80.5022136; + s_ChCollOuter.FoldinAngleOfLayers[5]= 78.524804; + s_ChCollOuter.FoldinAngleOfLayers[6]= 76.6479315; + s_ChCollOuter.FoldinAngleOfLayers[7]= 74.8635164; + s_ChCollOuter.FoldinAngleOfLayers[8]= 73.1643989; + s_ChCollOuter.FoldinAngleOfLayers[9]= 64.4458572; + s_ChCollOuter.FoldinAngleOfLayers[10]= 57.6301588; + + s_ChCollOuter.HalfLArGapSizeOfLayers[0]= 0.877808149; //[mm] + s_ChCollOuter.HalfLArGapSizeOfLayers[1]= 1.5116158; + s_ChCollOuter.HalfLArGapSizeOfLayers[2]= 1.97238634; + s_ChCollOuter.HalfLArGapSizeOfLayers[3]= 2.03692756; + s_ChCollOuter.HalfLArGapSizeOfLayers[4]= 2.09855584; + s_ChCollOuter.HalfLArGapSizeOfLayers[5]= 2.15745335; + s_ChCollOuter.HalfLArGapSizeOfLayers[6]= 2.21378826; + s_ChCollOuter.HalfLArGapSizeOfLayers[7]= 2.26771591; + s_ChCollOuter.HalfLArGapSizeOfLayers[8]= 2.31937997; + s_ChCollOuter.HalfLArGapSizeOfLayers[9]= 2.58864056; + s_ChCollOuter.HalfLArGapSizeOfLayers[10]=2.80290925; + } + } + else if(s_FieldMapVersion == "v03"){ + + s_ChCollInner.Fold1.FieldMapPrepared=true; + s_ChCollOuter.Fold1.FieldMapPrepared=true; + + s_ChCollInner.Fold0.FieldMapPrepared=true; + s_ChCollOuter.Fold0.FieldMapPrepared=true; + + G4int nilayer=6; //number of radial layers; should be the same for + G4int nolayer=16;// all fold type + CreateArrays(s_ChCollInner,nilayer); + CreateArrays(s_ChCollOuter,nolayer); + + for(G4int i=0;i<nilayer;++i){ + s_ChCollInner.RadiusOfLayers[i]=300.+i*100.; + } + s_ChCollInner.FoldinAngleOfLayers[0]= 112.7420; //[degree] + s_ChCollInner.FoldinAngleOfLayers[1]= 92.238; + s_ChCollInner.FoldinAngleOfLayers[2]= 78.6994; + s_ChCollInner.FoldinAngleOfLayers[3]= 68.8423; + s_ChCollInner.FoldinAngleOfLayers[4]= 61.2715; + s_ChCollInner.FoldinAngleOfLayers[5]= 55.2462; + + s_ChCollInner.HalfLArGapSizeOfLayers[0]= 1.5326; //[mm] + s_ChCollInner.HalfLArGapSizeOfLayers[1]= 2.0053; + s_ChCollInner.HalfLArGapSizeOfLayers[2]= 2.3577; + s_ChCollInner.HalfLArGapSizeOfLayers[3]= 2.6294; + s_ChCollInner.HalfLArGapSizeOfLayers[4]= 2.8446; + s_ChCollInner.HalfLArGapSizeOfLayers[5]= 3.0191; + + for(G4int i=0;i<nolayer;++i){ + s_ChCollOuter.RadiusOfLayers[i]=600.+i*100.; + } + + s_ChCollOuter.FoldinAngleOfLayers[0]= 129.002; //[degree] + s_ChCollOuter.FoldinAngleOfLayers[1]= 117.7235; + s_ChCollOuter.FoldinAngleOfLayers[2]= 108.8045; + s_ChCollOuter.FoldinAngleOfLayers[3]= 101.4081; + s_ChCollOuter.FoldinAngleOfLayers[4]= 95.1012; + s_ChCollOuter.FoldinAngleOfLayers[5]= 89.6220; + s_ChCollOuter.FoldinAngleOfLayers[6]= 84.7966; + s_ChCollOuter.FoldinAngleOfLayers[7]= 80.5022; + s_ChCollOuter.FoldinAngleOfLayers[8]= 76.6479; + s_ChCollOuter.FoldinAngleOfLayers[9]= 73.1644; + s_ChCollOuter.FoldinAngleOfLayers[10]= 69.9972; + s_ChCollOuter.FoldinAngleOfLayers[11]= 67.1028; + s_ChCollOuter.FoldinAngleOfLayers[12]= 64.4459; + s_ChCollOuter.FoldinAngleOfLayers[13]= 61.9970; + s_ChCollOuter.FoldinAngleOfLayers[14]= 59.7320; + s_ChCollOuter.FoldinAngleOfLayers[15]= 57.6302; + + s_ChCollOuter.HalfLArGapSizeOfLayers[0]= 0.9367; //[mm] + s_ChCollOuter.HalfLArGapSizeOfLayers[1]= 1.1723; + s_ChCollOuter.HalfLArGapSizeOfLayers[2]= 1.3824; + s_ChCollOuter.HalfLArGapSizeOfLayers[3]= 1.5705; + s_ChCollOuter.HalfLArGapSizeOfLayers[4]= 1.7398; + s_ChCollOuter.HalfLArGapSizeOfLayers[5]= 1.8927; + s_ChCollOuter.HalfLArGapSizeOfLayers[6]= 2.0313; + s_ChCollOuter.HalfLArGapSizeOfLayers[7]= 2.1575; + s_ChCollOuter.HalfLArGapSizeOfLayers[8]= 2.2727; + s_ChCollOuter.HalfLArGapSizeOfLayers[9]= 2.3783; + s_ChCollOuter.HalfLArGapSizeOfLayers[10]=2.4754; + s_ChCollOuter.HalfLArGapSizeOfLayers[11]=2.5648; + s_ChCollOuter.HalfLArGapSizeOfLayers[12]=2.6476; + s_ChCollOuter.HalfLArGapSizeOfLayers[13]=2.7242; + s_ChCollOuter.HalfLArGapSizeOfLayers[14]=2.7955; + s_ChCollOuter.HalfLArGapSizeOfLayers[15]=2.8618; + + } + else{ + ATH_MSG_FATAL("IniGeomforFieldMaps - FieldMapVersion = '" + << s_FieldMapVersion << "' not found!"); + } + + s_ChCollInner.GridShift=0.050; + s_ChCollOuter.GridShift=0.0667; } // *********************************************************** -void EnergyCalculator::GetFieldMaps(const G4String fname){ -// *********************************************************** +void LArG4::EC::EnergyCalculator::LoadFieldMaps(const G4String fname){ + // *********************************************************** + + G4int foldtypemx=0; + char fieldmapversion[10] = { 0 }; + + ATH_MSG_INFO("GetFieldMaps from file = " << fname); - G4int i,j,npoints,wheeltype,foldtype,foldtypemx=0,nlayer; - char fieldmapversion[10]; - - (*m_msg) << MSG::INFO - << "GetFieldMaps from file = " << fname << endmsg; - - FILE *lun = fopen(fname, "r"); - - if(lun == 0){ - (*m_msg) << MSG::FATAL - << "GetFieldMaps - file '" << fname << "' not found!" - << endmsg; - throw std::runtime_error("LArEMECChargeCollection: File not found!"); - } - - if(s_FieldMapVersion != "v00"){ - if (fscanf(lun, "%9s", fieldmapversion) < 1) { - (*m_msg) << MSG::ERROR - << "GetFieldMaps Error reading field map" << endmsg; - } - (*m_msg) << MSG::INFO - << "This file contains fieldmap of version '" << fieldmapversion - << "'" - << endmsg; - } - -// Check which fold should have a map - - if (s_ChCollInner.Fold1.FieldMapPrepared && - s_ChCollOuter.Fold1.FieldMapPrepared && - s_ChCollInner.Fold0.FieldMapPrepared && - s_ChCollOuter.Fold0.FieldMapPrepared) foldtypemx=2; - else if(s_ChCollInner.Fold1.FieldMapPrepared && - s_ChCollOuter.Fold1.FieldMapPrepared && - !s_ChCollInner.Fold0.FieldMapPrepared && - !s_ChCollOuter.Fold0.FieldMapPrepared) foldtypemx=1; - else{ - - (*m_msg) << MSG::FATAL - <<" ***GetFieldMaps file format is incompatible" - <<endmsg; + FILE *lun = fopen(fname, "r"); + + if(lun == 0){ + ATH_MSG_FATAL("GetFieldMaps - file '" << fname << "' not found!"); + throw std::runtime_error("LArEMECChargeCollection: File not found!"); + } + + if(s_FieldMapVersion != "v00"){ + if (fscanf(lun, "%9s", fieldmapversion) < 1) { + ATH_MSG_ERROR("GetFieldMaps Error reading field map"); } + ATH_MSG_INFO("This file contains fieldmap of version '" << fieldmapversion << "'"); + } -// occupy store for the FieldMaps - - for(foldtype = 0; foldtype < foldtypemx; ++ foldtype){ - for(wheeltype = 0; wheeltype < 2; ++ wheeltype){ - - if(wheeltype == 0) m_ChCollWheelType = &s_ChCollInner; - if(wheeltype == 1) m_ChCollWheelType = &s_ChCollOuter; - if(foldtype == 0 ) m_ChCollFoldType = &(m_ChCollWheelType->Fold1); - if(foldtype == 1 ) m_ChCollFoldType = &(m_ChCollWheelType->Fold0); - - nlayer = m_ChCollWheelType->NumberOfRadialLayer; // should be the same for Fold0 and Fold1 - - for(i=0; i<nlayer; ++i){ - if (fscanf(lun, "%lg%lg%lg%lg", &m_ChCollFoldType->MinZofLayer[i], - &m_ChCollFoldType->MaxZofLayer[i], - &m_ChCollFoldType->MinYofLayer[i], - &m_ChCollFoldType->MaxYofLayer[i]) < 4) - { - (*m_msg) << MSG::ERROR - << "GetFieldMaps Error reading field map" << endmsg; - } - if (fscanf(lun, "%i%i", &m_ChCollFoldType->NofColofLayer[i], - &m_ChCollFoldType->NofRowofLayer[i]) < 2) - { - (*m_msg) << MSG::ERROR - << "GetFieldMaps Error reading field map" << endmsg; - } - - m_ChCollFoldType->NofColofLayer[i] ++; - m_ChCollFoldType->NofRowofLayer[i] ++; - npoints = m_ChCollFoldType->NofColofLayer[i]*m_ChCollFoldType->NofRowofLayer[i]; - if(npoints>0 && npoints < std::numeric_limits<int>::max()){ - m_ChCollFoldType->NofPointsinLayer[i]=npoints; - if(i==0) m_ChCollFoldType->pLayer[i]=0; - else{ m_ChCollFoldType->pLayer[i]=m_ChCollFoldType->pLayer[i-1]+ - 3*m_ChCollFoldType->NofPointsinLayer[i-1]; - } - - for(j=0;j<npoints;++j){ - G4double zdummy,ydummy,wdummy; - if (fscanf(lun, "%lg%lg%lg", &zdummy,&ydummy,&wdummy) < 3) { - (*m_msg) << MSG::ERROR - << "GetFieldMaps Error reading field map" << endmsg; - } - } // end for points - } -// std::cout - (*m_msg) << MSG::INFO - <<" foldtype="<<foldtype<< " wheeltype="<<wheeltype - <<" ilayer = " << i << " zmin, max = " - << m_ChCollFoldType->MinZofLayer[i] << " " - << m_ChCollFoldType->MaxZofLayer[i] << " " - << " ymin, max = " - << m_ChCollFoldType->MinYofLayer[i] << " " - << m_ChCollFoldType->MaxYofLayer[i] << " " - << " ncol = " << m_ChCollFoldType->NofColofLayer[i] - << " nrow = " << m_ChCollFoldType->NofRowofLayer[i] - << " npoints = " << npoints - <<endmsg; -// << std::endl; - - } // end for layers - - G4int length=m_ChCollFoldType->pLayer[nlayer-1]+3*m_ChCollFoldType->NofPointsinLayer[nlayer-1]; - m_ChCollFoldType->FieldMap = new G4double [length]; - - // std::cout<<" ***GetFieldMaps : length of FieldMap="<<length - // <<std::endl; - - if(m_ChCollFoldType->FieldMap == 0 ) { - - (*m_msg) << MSG::FATAL - <<" ***GetFieldMaps: FATAL FieldMap array cannot be created" - <<endmsg; - } - - } // end for wheels - } //end for foldtypes - - rewind(lun); - if(s_FieldMapVersion != "v00") { - if (fscanf(lun, "%9s", fieldmapversion) < 1) { - (*m_msg) << MSG::ERROR - << "GetFieldMaps Error reading field map" << endmsg; + // Check which fold should have a map + + if (s_ChCollInner.Fold1.FieldMapPrepared && + s_ChCollOuter.Fold1.FieldMapPrepared && + s_ChCollInner.Fold0.FieldMapPrepared && + s_ChCollOuter.Fold0.FieldMapPrepared) foldtypemx=2; + else if(s_ChCollInner.Fold1.FieldMapPrepared && + s_ChCollOuter.Fold1.FieldMapPrepared && + !s_ChCollInner.Fold0.FieldMapPrepared && + !s_ChCollOuter.Fold0.FieldMapPrepared) foldtypemx=1; + else{ + + ATH_MSG_FATAL(" ***GetFieldMaps file format is incompatible"); + } + + // occupy store for the FieldMaps + + for(G4int foldtype = 0; foldtype < foldtypemx; ++ foldtype) { + for(G4int wheeltype = 0; wheeltype < 2; ++ wheeltype) { + //if(wheeltype == 0) ChCollWheelType = &ChCollInner; + //if(wheeltype == 1) ChCollWheelType = &ChCollOuter; + Wheel_Efield_Map *ChCollWheelType = (wheeltype == 0) ? &s_ChCollInner : + ( (wheeltype == 1) ? &s_ChCollOuter : 0 ); + + //if(foldtype == 0 ) ChCollFoldType = &(ChCollWheelType->Fold1); + //if(foldtype == 1 ) ChCollFoldType = &(ChCollWheelType->Fold0); + Fold_Efield_Map *ChCollFoldType = ( foldtype == 0 ) ? &(ChCollWheelType->Fold1) : + ( ( foldtype == 1 ) ? &(ChCollWheelType->Fold0) : 0 ); + + const G4int nlayer = ChCollWheelType->NumberOfRadialLayer; // should be the same for Fold0 and Fold1 + + for(G4int i=0; i<nlayer; ++i) { + if (fscanf(lun, "%lg%lg%lg%lg", &ChCollFoldType->MinZofLayer[i], + &ChCollFoldType->MaxZofLayer[i], + &ChCollFoldType->MinYofLayer[i], + &ChCollFoldType->MaxYofLayer[i]) < 4 + ) { + ATH_MSG_ERROR("GetFieldMaps Error reading field map"); + } + if (fscanf(lun, "%i%i", &ChCollFoldType->NofColofLayer[i], &ChCollFoldType->NofRowofLayer[i]) < 2 + ) { + ATH_MSG_ERROR("GetFieldMaps Error reading field map"); + } + + ChCollFoldType->NofColofLayer[i] ++; + ChCollFoldType->NofRowofLayer[i] ++; + const G4int npoints = ChCollFoldType->NofColofLayer[i]*ChCollFoldType->NofRowofLayer[i]; + if(npoints>0 && npoints < std::numeric_limits<int>::max()) { + ChCollFoldType->NofPointsinLayer[i]=npoints; + if (i==0) { + ChCollFoldType->pLayer[i]=0; + } else { + ChCollFoldType->pLayer[i]=ChCollFoldType->pLayer[i-1]+ 3*ChCollFoldType->NofPointsinLayer[i-1]; + } + + for(G4int j=0;j<npoints;++j){ + G4double zdummy,ydummy,wdummy; + if (fscanf(lun, "%lg%lg%lg", &zdummy,&ydummy,&wdummy) < 3) { + ATH_MSG_ERROR("GetFieldMaps Error reading field map"); + } + } // end for points + } + ATH_MSG_INFO(" foldtype="<<foldtype<< " wheeltype="<<wheeltype + <<" ilayer = " << i << " zmin, max = " + << ChCollFoldType->MinZofLayer[i] << " " + << ChCollFoldType->MaxZofLayer[i] << " " + << " ymin, max = " + << ChCollFoldType->MinYofLayer[i] << " " + << ChCollFoldType->MaxYofLayer[i] << " " + << " ncol = " << ChCollFoldType->NofColofLayer[i] + << " nrow = " << ChCollFoldType->NofRowofLayer[i] + << " npoints = " << npoints); + } // end for layers + + const G4int length=ChCollFoldType->pLayer[nlayer-1]+3*ChCollFoldType->NofPointsinLayer[nlayer-1]; + ChCollFoldType->FieldMap = new G4double [length]; + + if(ChCollFoldType->FieldMap == 0 ) { + + ATH_MSG_FATAL(" ***GetFieldMaps: FATAL FieldMap array cannot be created"); } + + } // end for wheels + } //end for foldtypes + + rewind(lun); + if(s_FieldMapVersion != "v00") { + if (fscanf(lun, "%9s", fieldmapversion) < 1) { + ATH_MSG_ERROR( "GetFieldMaps Error reading field map"); } + } -// now fill the coordinates and efield in the FieldMaps - - for(foldtype = 0; foldtype < foldtypemx; ++ foldtype){ - for(wheeltype = 0; wheeltype < 2; ++ wheeltype){ - - if(wheeltype == 0) m_ChCollWheelType = &s_ChCollInner; - if(wheeltype == 1) m_ChCollWheelType = &s_ChCollOuter; - if(foldtype == 0 ) m_ChCollFoldType = &(m_ChCollWheelType->Fold1); - if(foldtype == 1 ) m_ChCollFoldType = &(m_ChCollWheelType->Fold0); - - nlayer = m_ChCollWheelType->NumberOfRadialLayer; // should be the same for Fold0 and Fold1 - - for(i=0; i<nlayer; ++i){ - - G4double dummy1,dummy2,dummy3,dummy4; - G4int dummy5,dummy6; - if (fscanf(lun, "%lg%lg%lg%lg", &dummy1, &dummy2, &dummy3, &dummy4) < 4) { - (*m_msg) << MSG::ERROR - << "GetFieldMaps Error reading field map" << endmsg; - } - if (fscanf(lun, "%i%i", &dummy5, &dummy6) < 2) { - (*m_msg) << MSG::ERROR - << "GetFieldMaps Error reading field map" << endmsg; - } - - npoints = m_ChCollFoldType->NofPointsinLayer[i]; - if(npoints>0){ - for(j = 0; j < npoints; ++ j){ - if (fscanf(lun, "%lg%lg%lg", &m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,0,j)], - &m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,1,j)], - &m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,2,j)]) < 3) - { - (*m_msg) << MSG::ERROR - << "GetFieldMaps Error reading field map" << endmsg; - } - -/* if(j<10) G4cout<<" z,y,weight=" - <<m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,0,j)]<<" " - <<m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,1,j)]<<" " - <<m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,2,j)] - <<G4endl; */ - - } // end of loop(j) on points - } - } // end of loop(i) on layers - } // end of loop on wheeltype - } // end of loop for foldtypes - // (*m_msg) << endmsg; - fclose(lun); - s_FieldMapsRead = true; + // now fill the coordinates and efield in the FieldMaps + + for(G4int foldtype = 0; foldtype < foldtypemx; ++ foldtype) { + for(G4int wheeltype = 0; wheeltype < 2; ++ wheeltype){ + //if(wheeltype == 0) ChCollWheelType = &ChCollInner; + //if(wheeltype == 1) ChCollWheelType = &ChCollOuter; + Wheel_Efield_Map *ChCollWheelType = (wheeltype == 0) ? &s_ChCollInner : + ( (wheeltype == 1) ? &s_ChCollOuter : 0 ); + + //if(foldtype == 0 ) ChCollFoldType = &(ChCollWheelType->Fold1); + //if(foldtype == 1 ) ChCollFoldType = &(ChCollWheelType->Fold0); + Fold_Efield_Map *ChCollFoldType = ( foldtype == 0 ) ? &(ChCollWheelType->Fold1) : + ( ( foldtype == 1 ) ? &(ChCollWheelType->Fold0) : 0 ); + + const G4int nlayer = ChCollWheelType->NumberOfRadialLayer; // should be the same for Fold0 and Fold1 + for(G4int i=0; i<nlayer; ++i){ + G4double dummy1,dummy2,dummy3,dummy4; + G4int dummy5,dummy6; + if (fscanf(lun, "%lg%lg%lg%lg", &dummy1, &dummy2, &dummy3, &dummy4) < 4) { + ATH_MSG_ERROR("GetFieldMaps Error reading field map"); + } + if (fscanf(lun, "%i%i", &dummy5, &dummy6) < 2) { + ATH_MSG_ERROR("GetFieldMaps Error reading field map"); + } + + const G4int npoints = ChCollFoldType->NofPointsinLayer[i]; + if(npoints>0){ + for(G4int j = 0; j < npoints; ++ j){ + if (fscanf(lun, "%lg%lg%lg", &ChCollFoldType->FieldMap[Index(ChCollFoldType,i,0,j)], + &ChCollFoldType->FieldMap[Index(ChCollFoldType,i,1,j)], + &ChCollFoldType->FieldMap[Index(ChCollFoldType,i,2,j)]) < 3) { + ATH_MSG_ERROR("GetFieldMaps Error reading field map"); + } + + /* if(j<10) G4cout<<" z,y,weight=" + <<ChCollFoldType->FieldMap[Index(ChCollFoldType,i,0,j)]<<" " + <<ChCollFoldType->FieldMap[Index(ChCollFoldType,i,1,j)]<<" " + <<ChCollFoldType->FieldMap[Index(ChCollFoldType,i,2,j)] + <<G4endl; */ + + } // end of loop(j) on points + } + } // end of loop(i) on layers + } // end of loop on wheeltype + } // end of loop for foldtypes + fclose(lun); + s_FieldMapsRead = true; } // ********************************************************** -void EnergyCalculator::PrepareFieldMap(void){ -// ********************************************************** +void LArG4::EC::EnergyCalculator::PrepareFieldMap(Wheel_Efield_Map* ChCollWheelType) { + // ********************************************************** //Selects points which are in the range -0<z<QuarterWaveLength; //Set weights to 1 for points in LAr if they were not defined //previously; @@ -599,418 +569,456 @@ void EnergyCalculator::PrepareFieldMap(void){ //coordinates can be computed from the point-address and // minz,maxz,miny,maxy parameters. - G4int nredef,nlayer,ncol,ipnt,ipold,i,j,foldtype,foldtypemx; - G4double minz,y,z,w,wx; - G4int npoints; G4double maxz=0.; - - (*m_msg) << MSG::INFO - << "PrepareFieldMap for solidtype = " - << LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type()) - << endmsg; - - nlayer = m_ChCollWheelType->NumberOfRadialLayer; // should be the same for Fold0 and Fold1 - foldtypemx=1; - if( m_ChCollWheelType->Fold1.FieldMapPrepared && - m_ChCollWheelType->Fold0.FieldMapPrepared) foldtypemx=2; - - for(foldtype = 0; foldtype < foldtypemx; ++ foldtype){ - - if(foldtype == 0 ) m_ChCollFoldType = &(m_ChCollWheelType->Fold1); //normal fold - if(foldtype == 1 ) m_ChCollFoldType = &(m_ChCollWheelType->Fold0); //very first fold - - for(i=0; i<nlayer; ++i){ - - if(foldtype == 0) { //normal fold - minz=m_ChCollFoldType->MinZofLayer[i]; - maxz=lwc()->GetQuarterWaveLength(); - ncol=G4int( (maxz-minz)/s_GridSize+1.1 ); - m_ChCollFoldType->NofColofLayer[i]=ncol; - m_ChCollFoldType->MaxZofLayer[i]=lwc()->GetQuarterWaveLength(); - } - - ipnt=-1; // new counter for numbering the selected points - nredef=0; //counter to know how many weights are redefined to be 1 (only for V00) - npoints=m_ChCollFoldType->NofPointsinLayer[i]; - if(npoints>0){ - for(j=0;j<npoints;++j){ - - z=m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,0,j)]; - y=m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,1,j)]; - w=m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,2,j)]; - wx=w; - - ipold=ipnt; - - if(foldtype == 1 ){ // very first fold - ++ipnt; - if(wx < 0.00001 ) wx=0.; - } - else{ // normal folds - if(z<maxz){ // only grid points within quarterwavelength is to be included - ++ipnt; - if(w<0.00001){ // check weight in the file - if(s_FieldMapVersion != "v00") wx=0.; // new map - else{ // old map - SetHalfWave(lwc()->GetStraightStartSection()+m_WaveLength+z); - m_PointFoldMapArea=1; - SetYlimitsofPhigapinFieldMap(i); - if((y>=m_Ylimits[0] && y<=m_Ylimits[1]) || - (y>=m_Ylimits[2] && y<=m_Ylimits[3])){ //point in LAr - wx=1.; // Dice computes the m_Ylimits at (z+GridShift) value, - ++nredef; // I don't know why...By neglecting GridShift nredef - // is much less. - } - }// endif for old map - } //endif for w<0 - }// endif for z<maxz - }//end for normal fold - - if(ipold != ipnt){ - - m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,0,ipnt)]=z; - m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,1,ipnt)]=y; - m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,2,ipnt)]=wx; - -/* if(ipnt<10) - G4cout<<" ilayer="<<i<<" ipnt="<<ipnt<<" weights=" - <<m_ChCollFoldType->FieldMap[Index(m_ChCollFoldType,i,2,ipnt)] - <<G4endl;*/ - } - - } // end j loop for points - } - if(ipnt+1 != m_ChCollFoldType->NofColofLayer[i]*m_ChCollFoldType->NofRowofLayer[i] ){ - (*m_msg) << MSG::FATAL - <<" ERROR: ipnt+1="<<ipnt+1<<" npoints="<< - m_ChCollFoldType->NofColofLayer[i]*m_ChCollFoldType->NofRowofLayer[i] - <<endmsg; - } - } //end i loop for layers - } //end for foldtype + //G4int nredef,nlayer,ncol,ipnt,ipold/*,i,j,foldtype,foldtypemx*/; + G4double minz/*,y,z,w,wx*/; + //G4int npoints; + G4double maxz=0.; + + ATH_MSG_INFO("PrepareFieldMap for solidtype = " + << LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type())); + + const G4int nlayer = ChCollWheelType->NumberOfRadialLayer; // should be the same for Fold0 and Fold1 + //foldtypemx=1; + //if ( ChCollWheelType->Fold1.FieldMapPrepared && ChCollWheelType->Fold0.FieldMapPrepared) { + // foldtypemx=2; + //} + + const G4int foldtypemx = (ChCollWheelType->Fold1.FieldMapPrepared && ChCollWheelType->Fold0.FieldMapPrepared) ? 2 : 1; + + for(G4int foldtype = 0; foldtype < foldtypemx; ++ foldtype) { + + //if(foldtype == 0 ) ChCollFoldType = &(ChCollWheelType->Fold1); //normal fold + //if(foldtype == 1 ) ChCollFoldType = &(ChCollWheelType->Fold0); //very first fold + Fold_Efield_Map *ChCollFoldType = ( foldtype == 0 ) ? &(ChCollWheelType->Fold1) : + ( ( foldtype == 1 ) ? &(ChCollWheelType->Fold0) : 0 ); + + for(G4int i=0; i<nlayer; ++i) { + if(foldtype == 0) { //normal fold + minz = ChCollFoldType->MinZofLayer[i]; + maxz = lwc()->GetQuarterWaveLength(); + ChCollFoldType->NofColofLayer[i] = G4int( (maxz-minz)/s_GridSize+1.1 ); + ChCollFoldType->MaxZofLayer[i] = lwc()->GetQuarterWaveLength(); + } + + G4int ipnt=-1; // new counter for numbering the selected points + G4int nredef=0; //counter to know how many weights are redefined to be 1 (only for V00) + const G4int npoints=ChCollFoldType->NofPointsinLayer[i]; + //if(npoints>0) { + for(G4int j=0;j<npoints;++j){ + const G4double z=ChCollFoldType->FieldMap[Index(ChCollFoldType,i,0,j)]; + const G4double y=ChCollFoldType->FieldMap[Index(ChCollFoldType,i,1,j)]; + const G4double w=ChCollFoldType->FieldMap[Index(ChCollFoldType,i,2,j)]; + G4double wx=w; + + const G4int ipold=ipnt; + + if(foldtype == 1 ) { // very first fold + ++ipnt; + if( wx < 0.00001 ) wx=0.; + } else { // normal folds + if(z<maxz) { // only grid points within quarterwavelength is to be included + ++ipnt; + if( w<0.00001 ) { // check weight in the file + if(s_FieldMapVersion != "v00") { + wx=0.; // new map + } else { // old map + WheelGeometry _wg; + SetHalfWave(lwc()->GetStraightStartSection()+WaveLength()+z, _wg); + //PointFoldMapArea=1; // looks like this assignment does not affect on something + G4double Ylimits[4]; + SetYlimitsofPhigapinFieldMap(i, _wg, Ylimits); + if ((y>=Ylimits[0] && y<=Ylimits[1]) || + (y>=Ylimits[2] && y<=Ylimits[3])) { //point in LAr + wx=1.; // Dice computes the Ylimits at (z+GridShift) value, + ++nredef; // I don't know why...By neglecting GridShift nredef + // is much less. + } + }// endif for old map + } //endif for w<0 + }// endif for z<maxz + }//end for normal fold + + + if(ipold != ipnt){ + + ChCollFoldType->FieldMap[Index(ChCollFoldType,i,0,ipnt)]=z; + ChCollFoldType->FieldMap[Index(ChCollFoldType,i,1,ipnt)]=y; + ChCollFoldType->FieldMap[Index(ChCollFoldType,i,2,ipnt)]=wx; + + /* if(ipnt<10) + G4cout<<" ilayer="<<i<<" ipnt="<<ipnt<<" weights=" + <<ChCollFoldType->FieldMap[Index(ChCollFoldType,i,2,ipnt)] + <<G4endl;*/ + } + + } // end j loop for points + //} + if(ipnt+1 != ChCollFoldType->NofColofLayer[i]*ChCollFoldType->NofRowofLayer[i] ){ + ATH_MSG_FATAL(" ERROR: ipnt+1="<<ipnt+1<<" npoints="<< + ChCollFoldType->NofColofLayer[i]*ChCollFoldType->NofRowofLayer[i]); + } + } //end i loop for layers + } //end for foldtype } //end of function // **************************************************************************** -G4double EnergyCalculator::GetHV_Value_ChColl_Wheel( - const G4ThreeVector& p, G4int phigap, G4int phihalfgap) const{ -// **************************************************************************** - const G4int atlasside = (lwc()->GetAtlasZside() > 0) ? 0 : 1; +G4double LArG4::EC::EnergyCalculator::GetHV_Value_ChColl_Wheel( + const G4ThreeVector& p, G4int phigap, G4int phihalfgap) const{ + // **************************************************************************** + const G4int atlasside = (lwc()->GetAtlasZside() > 0) ? 0 : 1; + + const G4ThreeVector pforeta= G4ThreeVector(p.x(),p.y(),p.z()+lwc()->GetElecFocaltoWRP()+lwc()->GetdWRPtoFrontFace()); + const G4double eta=pforeta.pseudoRapidity(); + G4int etasection=-1; + for(G4int i=1;i<=s_NofEtaSection;++i){ + if(eta<=s_HV_Etalim[i]) {etasection=i-1;break;} + } - const G4ThreeVector pforeta= G4ThreeVector(p.x(),p.y(),p.z()+lwc()->GetElecFocaltoWRP()+lwc()->GetdWRPtoFrontFace()); - const G4double eta=pforeta.pseudoRapidity(); - G4int etasection=-1; - for(G4int i=1;i<=s_NofEtaSection;++i){ - if(eta<=s_HV_Etalim[i]) {etasection=i-1;break;} - } + if(!(etasection>=0 && etasection <=s_NofEtaSection-1)) throw std::runtime_error("Index out of range"); + //assert(etasection>=0 && etasection <=s_NofEtaSection-1); + /*(right side of e large phi)*/ /*left side of electrode(small phi)*/ + const G4int electrodeside = (phihalfgap%2 == 0 ) ? 1 : 0 ; - if(!(etasection>=0 && etasection <=s_NofEtaSection-1)) throw std::runtime_error("Index out of range"); - //assert(etasection>=0 && etasection <=s_NofEtaSection-1); - /*(right side of e large phi)*/ /*left side of electrode(small phi)*/ - const G4int electrodeside = (phihalfgap%2 == 0 ) ? 1 : 0 ; + const G4int firstelectrode=s_HV_Start_phi[atlasside][etasection][electrodeside]; - const G4int firstelectrode=s_HV_Start_phi[atlasside][etasection][electrodeside]; + if(!( firstelectrode>=0 && firstelectrode<= lwc()->GetNumberOfFans()-1)){ + ATH_MSG_FATAL(" GetCurrent:Electrode number is out of range"); + G4Exception("EnergyCalculator", "ElectrodeOutOfRange", FatalException, "GetCurrent: Electrode number is out of range"); + } + G4int electrodeindex=(phigap-1)-firstelectrode; + if(electrodeindex<0) electrodeindex=electrodeindex+lwc()->GetNumberOfFans(); + const G4int phisection=electrodeindex/NumberOfElectrodesInPhiSection();//24(8) for outer(inner) wheel - if(!( firstelectrode>=0 && firstelectrode<= lwc()->GetNumberOfFans()-1)){ - (*m_msg) << MSG::FATAL <<" GetCurrent:Electrode number is out of range" << endmsg; - G4Exception("EnergyCalculator", "ElectrodeOutOfRange", FatalException, "GetCurrent: Electrode number is out of range"); - } - G4int electrodeindex=(phigap-1)-firstelectrode; - if(electrodeindex<0) electrodeindex=electrodeindex+lwc()->GetNumberOfFans(); - const G4int nofelectrodesinphisection=lwc()->GetNumberOfFans()/m_NofPhiSections;//24(8) for outer(inner) wheel - const G4int phisection=electrodeindex/nofelectrodesinphisection; - - if(!(phisection>=0 && phisection<=m_NofPhiSections-1)){ - (*m_msg) << MSG::FATAL <<" GetCurrent::Electrode number is out of range" << endmsg; - G4Exception("EnergyCalculator", "ElectrodeOutOfRange", FatalException,"GetCurrent: Electrode number is out of range"); - } + if(!(phisection>=0 && phisection<=NofPhiSections()-1)){ + ATH_MSG_FATAL(" GetCurrent::Electrode number is out of range"); + G4Exception("EnergyCalculator", "ElectrodeOutOfRange", FatalException,"GetCurrent: Electrode number is out of range"); + } - G4double HV_value= s_HV_Values[atlasside][etasection][electrodeside][phisection]; + const G4double HV_value = s_HV_Values[atlasside][etasection][electrodeside][phisection]; - return HV_value; + return HV_value; } // ********************************************************************** -void EnergyCalculator::TransFromBarrtoWheel(G4double vb[], G4double v[]){ -// ********************************************************************** -// this is valid for BacOuterBarrett -// vb: point coord. in the local system of the BackOuterBarrett:PhiDiv -// v : point coord. in the Wheel's system (extended in - and + z direction) -// ellenorizni, hogy p.phi() 0-2pi kozott valtozik-e!! +void LArG4::EC::EnergyCalculator::TransFromBarrtoWheel(const G4double vb[], G4double PhiStartOfPhiDiv, G4double v[]) const { + // ********************************************************************** + // this is valid for BacOuterBarrett + // vb: point coord. in the local system of the BackOuterBarrett:PhiDiv + // v : point coord. in the Wheel's system (extended in - and + z direction) + // ellenorizni, hogy p.phi() 0-2pi kozott valtozik-e!! const G4ThreeVector pb=G4ThreeVector(vb[0],vb[1],vb[2]); v[2]=lwc()->GetWheelThickness()+lwc()->GetdWRPtoFrontFace()*0.5-vb[2]; const G4double rb = pb.perp(); - const G4double phib = pb.phi(); // local phi coord. of a point in the PhiDiv - G4double phi_inb = s_PhiStartOfPhiDiv + phib; //s_PhiStartOfPhiDiv defined in FindIdentifier!! - // it is the phi pos. of the PhiDiv in the Barrette system - //phi_inb is the point's phi coord. in the BArrette volume - // it can be bigger than 2pi! - if(lwc()->type() == LArWheelCalculator::OuterAbsorberWheel ){ + const G4double phib = pb.phi(); // local phi coord. of a point in the PhiDiv + G4double phi_inb = PhiStartOfPhiDiv + phib; // PhiStartOfPhiDiv defined in FindIdentifier!! + // it is the phi pos. of the PhiDiv in the Barrette system + // phi_inb is the point's phi coord. in the Barrette volume + // it can be bigger than 2pi! + if(lwc()->type() == LArG4::OuterAbsorberWheel ){ if(phi_inb<0.) phi_inb= phi_inb + CLHEP::twopi; if(phi_inb>CLHEP::twopi) phi_inb= phi_inb - CLHEP::twopi; phi_inb = CLHEP::twopi - phi_inb; //now:phi_inb is the phi coord in the Wheel's system } - else if(lwc()->type() == LArWheelCalculator::OuterAbsorberModule) { + else if(lwc()->type() == LArG4::OuterAbsorberModule) { phi_inb = CLHEP::pi - phi_inb; //now:phi_inb is the point's phi coord in the Wheel's system; }else{ // the transfromation is different bec. the back support // positioned with an extra rotation into the Mother - (*m_msg) << MSG::FATAL <<" ERROR: TransFromBarrtoWheel: type("<<LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type())<<") is unknown" - <<endmsg; + ATH_MSG_FATAL(" ERROR: TransFromBarrtoWheel: type("<<LArWheelCalculator::LArWheelCalculatorTypeString(lwc()->type())<<") is unknown"); } v[0]=rb*cos(phi_inb); v[1]=rb*sin(phi_inb); } -// ********************************************************************** -G4double EnergyCalculator::GetCurrent( - G4double StartofStep[],G4double EndofStep[],G4double edep) { // need to make const -// ********************************************************************** - G4double v1b[3],v2b[3],vstepb[3]/*,vstepx[3]*/,hvpoint[3]; - G4double current/*,z1,z2*/,v1[3],v2[3],vstep[3],vmap[3];//,vmid[3],vmidmap[3]; - G4double steplength,Ymid,yratiox/*,rvmid*/,gap; - G4double yratio,yonlowerlayer,yonupperlayer,weightdown,weightup,r,dr;//,weight; - G4double ds/*,curdown,curup*/,cur,rvstep/*,halflargapsizefrommap*/,rforalpha; - //G4double cura,curb,currenta,currentb; - G4double /*efield,efieldnormalized,*/tol,shift; - G4double yshift_on_map,yshift_on_wheel,cylgapcorr; +G4int LArG4::EC::EnergyCalculator::_getIRlayer(G4double rforalpha) const { + G4int irlayer=0; + const G4int numberofradiallayers=ChCollWheelType()->NumberOfRadialLayer; + for(G4int j=0;j<numberofradiallayers;++j){ + if(rforalpha < ChCollWheelType()->RadiusOfLayers[j]) { + irlayer=j-1; + break; + } + } + assert(irlayer>=0 && irlayer<numberofradiallayers-1); + return irlayer; +} + +G4double LArG4::EC::EnergyCalculator::_interpolateCurrentSubStep(G4double rforalpha, G4int gapup, const G4double vmap[], G4double tol, const FoldArea & fa, G4int & gaperr ) const { + + assert(gapup == 1 || gapup == -1); + //search for radial layers the substep is in between; + const G4int irlayer = _getIRlayer(rforalpha); + + // check whether interpolation is needed + if (!fa.ChCollFoldType->FieldMapPrepared || // fieldmap is not available for this fold + (vmap[2] < fa.ChCollFoldType->MinZofLayer[irlayer] && // or out of z range of both maps + vmap[2] < fa.ChCollFoldType->MinZofLayer[irlayer+1]) + ) { + return 1.0; // interpolation not needed + } + + // interpolation needed + // compute radial interpolation parameter + const G4double dr = (rforalpha-ChCollWheelType()->RadiusOfLayers[irlayer]) + /(ChCollWheelType()->RadiusOfLayers[irlayer+1] - ChCollWheelType()->RadiusOfLayers[irlayer]); - G4int i,j/*,yup*/,irlayer,igap1,igap2,ihalfgap1,ihalfgap2,gapup,gaperr; + // get Ylimits limiting the LAr gap along the y axis; + G4double shift = lwc()->GetStraightStartSection(); + if(fa.PointFoldMapArea != 0) shift += WaveLength(); - yratio=0.,yonlowerlayer=0.; yonupperlayer=0.; //to avoid compiler warning + WheelGeometry _wg; + SetHalfWave(shift+vmap[2], _wg); - tol=0.1*CLHEP::mm; // tolerance for geom. check - gaperr=0; + G4double Ylimits[4]; + SetYlimitsofPhigapinWheel(rforalpha, rforalpha, _wg, Ylimits); - if(lwc()->GetisBarrette()){ - for(i=0;i<3;++i){ + //check geom. err condition if point is outside of LAr gap + if ( gaperr > -100 && + (vmap[1] > Ylimits[3]+tol || vmap[1] < Ylimits[0]-tol || + (vmap[1] < Ylimits[2]-tol && vmap[1] > Ylimits[1]+tol) ) + ) { + gaperr=gaperr-100; + } + + // get relative y coordinate + // if (gapup==-1) { + // yratio=(vmap[1]- Ylimits[0])/(Ylimits[1]- Ylimits[0]); + // } else if (gapup==+1) { + // yratio=(vmap[1]- Ylimits[2])/(Ylimits[3]- Ylimits[2]); + // } + G4double yratio = (gapup==-1) ? + (vmap[1]- Ylimits[0])/(Ylimits[1]- Ylimits[0]) + : + (vmap[1]- Ylimits[2])/(Ylimits[3]- Ylimits[2]) + ; + + const G4double yratiox=yratio; + if (yratiox<=0.) { + yratio=0.00001; // pull the point into the gap if it wouldn't be there; + } else if(yratiox>=1.) { + yratio=0.99999; // this may happen bec.G4 does not grantee that the full + } // step-line is within the same volume + // get corresponding y coordinates on the radial layers + // where the weight is to be taken from; + + SetYlimitsofPhigapinFieldMap(irlayer, _wg, Ylimits); //on the lower layer + + // if (gapup==-1) { + // yonlowerlayer = Ylimits[0]*(1.-yratio)+Ylimits[1]*yratio; + // } + // else if(gapup==1) { + // yonlowerlayer = Ylimits[2]*(1.-yratio)+Ylimits[3]*yratio; + // } + const G4double yonlowerlayer = (gapup==-1) ? + Ylimits[0]*(1.-yratio)+Ylimits[1]*yratio + : + Ylimits[2]*(1.-yratio)+Ylimits[3]*yratio + ; + + SetYlimitsofPhigapinFieldMap(irlayer+1, _wg, Ylimits); //on the upper layer + + // if(gapup==-1) { + // yonupperlayer = Ylimits[0]*(1.-yratio)+Ylimits[1]*yratio; + // } else if(gapup==1) { + // yonupperlayer = Ylimits[2]*(1.-yratio)+Ylimits[3]*yratio; + // } + const G4double yonupperlayer = (gapup==-1) ? + Ylimits[0]*(1.-yratio)+Ylimits[1]*yratio + : + Ylimits[2]*(1.-yratio)+Ylimits[3]*yratio + ; + + // get weights from the maps of lower and upper layer + const G4double weightdown = GetWeightfromFieldMap(irlayer, vmap[2], yonlowerlayer, fa); + const G4double weightup = GetWeightfromFieldMap(irlayer+1,vmap[2], yonupperlayer, fa); + + // get the interpolated normalized Efield alias cur + return weightdown*(1.-dr)+weightup*dr; + // end of interpolation +} + +// ********************************************************************** +G4double LArG4::EC::EnergyCalculator::GetCurrent( + G4double StartofStep[],G4double EndofStep[],G4double edep, G4double Barret_PhiStart) const { + // ********************************************************************** + G4double v1b[3],v2b[3],hvpoint[3]; + G4double v1[3],v2[3],vstep[3]; + + //yratio=0.; + //yonlowerlayer=0.; + //yonupperlayer=0.; //to avoid compiler warning + + const G4double tol=0.1*CLHEP::mm; // tolerance for geom. check + G4int gaperr=0; + + if(lwc()->GetisBarrette()) { + for(G4int i=0;i<3;++i) { v1b[i]=StartofStep[i]; v2b[i]=EndofStep[i]; } - TransFromBarrtoWheel(v1b,v1); - TransFromBarrtoWheel(v2b,v2); - } - else{ - for(i=0;i<3;++i){ + TransFromBarrtoWheel(v1b, Barret_PhiStart, v1); + TransFromBarrtoWheel(v2b, Barret_PhiStart, v2); + } else { + for(G4int i=0;i<3;++i) { v1[i]=StartofStep[i]; v2[i]=EndofStep[i]; } } - SetHalfWave(v2[2]); //check whether start and endpoints are in the same gap - GetPhiGap(v2); - igap2 = m_PhiGapNumber; - ihalfgap2= m_PhiHalfGapNumber; + WheelGeometry _wg; + + SetHalfWave(v2[2], _wg); //check whether start and endpoints are in the same gap + GetPhiGap(v2, _wg); + const G4int igap2 = _wg.PhiGapNumber; + const G4int ihalfgap2 = _wg.PhiHalfGapNumber; + + SetHalfWave(v1[2], _wg); + GetPhiGap(v1, _wg); - SetHalfWave(v1[2]); - GetPhiGap(v1); - SetFoldArea(v1[2]); - igap1 = m_PhiGapNumber; // from 1 to NumberOfFans - ihalfgap1= m_PhiHalfGapNumber; + FoldArea _fa; + + SetFoldArea(v1[2], _fa); + const G4int igap1 = _wg.PhiGapNumber; // from 1 to NumberOfFans + const G4int ihalfgap1 = _wg.PhiHalfGapNumber; if( (igap1 != igap2) || (ihalfgap1 != ihalfgap2) ) gaperr = -1; - m_chcollPhiGap=igap1-1; - -// define electrode side on the field map; -// start point is used, because G4 does not garantee that the middlepoint is in the LAr gap - - TransformWheeltoFieldMap(v1,vmap); - r=sqrt(v1[0]*v1[0]+v1[1]*v1[1]); - r=sqrt(r*r-vmap[1]*vmap[1]); - - shift = lwc()->GetStraightStartSection(); - if(m_PointFoldMapArea != 0) shift += m_WaveLength; - SetHalfWave(shift+vmap[2]); - SetYlimitsofPhigapinWheel(r,r); // get the y limits of LAr gap - - Ymid=0.5*(m_Ylimits[1]+m_Ylimits[2]); - if(vmap[1]>Ymid) gapup=+1; //step is above electrode - else gapup=-1; //step is below electrode - //this should be true for the full step - - if( vmap[1] > m_Ylimits[3]+tol || vmap[1] < m_Ylimits[0]-tol || - (vmap[1] < m_Ylimits[2]-tol && vmap[1] > m_Ylimits[1]+tol) ) gaperr=gaperr-10; - -//loop for substeps - - steplength=sqrt((v1[0]-v2[0])*(v1[0]-v2[0])+(v1[1]-v2[1])*(v1[1]-v2[1])+ - (v1[2]-v2[2])*(v1[2]-v2[2])); - const G4int nofstep=int(steplength/s_GridSize)+1; // step is divided to substeps - current=0.; //current to be returned - - const G4double inv_nofstep = 1. / static_cast<double>(nofstep); - for(i=0;i<nofstep;++i){ - - G4double supcorr =1.; - -// compute substep point - ds=(i+0.5)*inv_nofstep; - for(j=0;j<3;++j){ - vstep[j]=v1[j]*(1.-ds)+v2[j]*ds; // get the middle point of substep - hvpoint[j]=vstep[j]; // hvpoint is always in local coord. Wheel or PhiDiv) - if(lwc()->GetisBarrette()){ - vstepb[j]=v1b[j]*(1.-ds)+v2b[j]*ds; - hvpoint[j]=vstepb[j]; - } - } - - G4double HV_value; - if(lwc()->GetisBarrette()) - HV_value=GetHV_Value_Barrett( - G4ThreeVector(hvpoint[0],hvpoint[1],hvpoint[2])); - else - HV_value=GetHV_Value_ChColl_Wheel( - G4ThreeVector(hvpoint[0],hvpoint[1],hvpoint[2]),igap1,ihalfgap1); - - G4ThreeVector tmp = G4ThreeVector( hvpoint[0],hvpoint[1],hvpoint[2]); - G4double dte = (this->*m_distance_to_the_nearest_electrode_type)(tmp); - - if(fabs(dte) < s_CHC_Esr) continue; //skip point if too close to the electrode - - G4double agap=(this->*m_GetGapSize_type)(tmp); //correction to electrode suppression not to - G4double x= agap/(agap-s_CHC_Esr); // change av. signal in the gap - if(x >=0.) supcorr=x; - - SetFoldArea(vstep[2]); // set fold type - SetHalfWave(vstep[2]); // set halfwave parameters for substep - TransformWheeltoFieldMap(vstep,vmap); //get corresponding point in Map - //system (it is equivalent to the - //halfwave system of pos. slope) - rvstep =sqrt(vstep[0]*vstep[0]+vstep[1]*vstep[1]); - rforalpha=sqrt(rvstep*rvstep-vmap[1]*vmap[1]); // radius in the electrode system - gap=HalfLArGapSize(rforalpha,rforalpha); // gapsize in the straight section - yshift_on_map = rforalpha*M_PI/lwc()->GetNumberOfFans()-(m_FanAbsThickness+m_FanEleThickness)/2.; - yshift_on_wheel= rvstep*M_PI/lwc()->GetNumberOfFans()-(m_FanAbsThickness+m_FanEleThickness)/2.; - cylgapcorr=yshift_on_wheel/yshift_on_map; // scale difference between plane and cylindrical surface - /* - std::cout<< " GetCurrent0**Nabs="<<lwc()->GetNumberOfFans()<<" absthick="<<m_FanAbsThickness - <<" elethick="<<m_FanEleThickness - <<" cylgapcorr-1="<<cylgapcorr-1 - <<" ZinHalfWave="<<m_ZinHalfWave<<" HalfWaveNumber="<<m_HalfWaveNumber - <<std::endl; - */ -//search for radial layers the substep is in between; - - irlayer=0; - G4int numberofradiallayers=m_ChCollWheelType->NumberOfRadialLayer; - for(j=0;j<numberofradiallayers;++j){ - if(rforalpha<m_ChCollWheelType->RadiusOfLayers[j]) { - irlayer=j-1; - break;} - } - assert(irlayer>=0 && irlayer<numberofradiallayers-1); - -// check whether interpolation is needed - - if(!m_ChCollFoldType->FieldMapPrepared || // fieldmap is not available for this fold - (vmap[2]<m_ChCollFoldType->MinZofLayer[irlayer] && // or out of z range of both maps - vmap[2]<m_ChCollFoldType->MinZofLayer[irlayer+1]) ){ - - cur=1.; // interpolation not needed - } - else{ // interpolation needed - -// compute radial interpolation parameter - - dr=(rforalpha-m_ChCollWheelType->RadiusOfLayers[irlayer]) - /(m_ChCollWheelType->RadiusOfLayers[irlayer+1]- - m_ChCollWheelType->RadiusOfLayers[irlayer]); - -// get m_Ylimits limiting the LAr gap along the y axis; - - shift = lwc()->GetStraightStartSection(); - if(m_PointFoldMapArea != 0) shift += m_WaveLength; - SetHalfWave(shift+vmap[2]); - SetYlimitsofPhigapinWheel(rforalpha,rforalpha); - -//check geom. err condition if point is outside of LAr gap - if( gaperr > -100 && - ( vmap[1] > m_Ylimits[3]+tol || vmap[1] < m_Ylimits[0]-tol || - (vmap[1] < m_Ylimits[2]-tol && vmap[1] > m_Ylimits[1]+tol) )) gaperr=gaperr-100; - -// get relative y coordinate - - if (gapup==-1) yratio=(vmap[1]- m_Ylimits[0])/(m_Ylimits[1]- m_Ylimits[0]); - else if (gapup==+1) yratio=(vmap[1]- m_Ylimits[2])/(m_Ylimits[3]- m_Ylimits[2]); - - yratiox=yratio; - if(yratiox<=0.) yratio=0.00001; // pull the point into the gap if it wouldn't be there; - else if(yratiox>=1.) yratio=0.99999; // this may happen bec.G4 does not grantee that the full - // step-line is within the same volume -// get corresponding y coordinates on the radial layers -// where the weight is to be taken from; - - SetYlimitsofPhigapinFieldMap(irlayer); //on the lower layer - - if (gapup==-1) - yonlowerlayer=m_Ylimits[0]*(1.-yratio)+m_Ylimits[1]*yratio; - else if(gapup==1) - yonlowerlayer=m_Ylimits[2]*(1.-yratio)+m_Ylimits[3]*yratio; - - SetYlimitsofPhigapinFieldMap(irlayer+1); //on the upper layer - - if(gapup==-1) - yonupperlayer=m_Ylimits[0]*(1.-yratio)+m_Ylimits[1]*yratio; - else if(gapup==1) - yonupperlayer=m_Ylimits[2]*(1.-yratio)+m_Ylimits[3]*yratio; - -// get weights from the maps of lower and upper layer - - weightdown=GetWeightfromFieldMap(irlayer, vmap[2],yonlowerlayer); - weightup =GetWeightfromFieldMap(irlayer+1,vmap[2],yonupperlayer); - - // get the interpolated normalized Efield alias cur - - cur=weightdown*(1.-dr)+weightup*dr; - - } // end of interpolation - -// old current calculation: edep*E**1.3*(gap0/gap)**1.3 -// normalized so, that signal=edep in the straight section of gap0=1.3mm -// (it is at eta=2.25, r=787mm, foldingangle~110 degree) -// currentb=currentb+(edep/nofstep)*pow(curb*AverageGap/gap,1.3); -//(25-05-2005) new current calculation: edep*1/U*IonReco*E*v_drift -// normalized so that signal=edep in the straight section of the same gap -// as above; -// where: HV=1250V,E=9.615 [kv/cm] ,T=88.16 K, -// vdrift=4.62 [mm/mikrosec], Ionreco=96.4% -// ==> AverageCurrent=3.425/[mikrosec]; - - G4double efield=0.01*cur*HV_value/gap/cylgapcorr; // [kV/cm], bec.HV[V],gap[mm] - - double dc = (edep*inv_nofstep)/s_AverageCurrent* - cur/gap/cylgapcorr*IonReco(efield)*DriftVelo(s_LArTemperature_av,efield)* - supcorr; - - current += dc; + // define electrode side on the field map; + // start point is used, because G4 does not garantee that the middlepoint is in the LAr gap + + G4double vmap[3]; + TransformWheeltoFieldMap(v1 ,vmap, _wg, _fa); + //r=sqrt(v1[0]*v1[0]+v1[1]*v1[1]); + //r=sqrt(r*r-vmap[1]*vmap[1]); + const G4double r = sqrt(v1[0]*v1[0] + v1[1]*v1[1] - vmap[1]*vmap[1]); + + { // shift scope + G4double shift = lwc()->GetStraightStartSection(); + if(_fa.PointFoldMapArea != 0) shift += WaveLength(); + + SetHalfWave(shift+vmap[2], _wg); + } + + G4double Ylimits[4]; + SetYlimitsofPhigapinWheel(r, r, _wg, Ylimits); // get the y limits of LAr gap + + const G4double Ymid=0.5*(Ylimits[1]+Ylimits[2]); + + //if(vmap[1]>Ymid) gapup=+1; //step is above electrode + //else gapup=-1; //step is below electrode + //this should be true for the full step + const G4int gapup = (vmap[1]>Ymid) ? +1 : -1; + + if ( vmap[1] > Ylimits[3]+tol || vmap[1] < Ylimits[0]-tol || + (vmap[1] < Ylimits[2]-tol && vmap[1] > Ylimits[1]+tol) + ) { + gaperr=gaperr-10; + } + + //loop for substeps + const G4double steplength=sqrt( + (v1[0]-v2[0])*(v1[0]-v2[0]) + + (v1[1]-v2[1])*(v1[1]-v2[1]) + + (v1[2]-v2[2])*(v1[2]-v2[2]) + ); + const G4int nofstep=G4int(steplength/s_GridSize)+1; // step is divided to substeps + G4double current=0.; //current to be returned + + for(G4int _nstep=0;_nstep < nofstep;++_nstep) { + G4double supcorr =1.; + + // compute substep point + const G4double ds=(_nstep+0.5)/nofstep; + for(G4int j=0;j<3;++j){ + vstep[j]=v1[j]*(1.-ds)+v2[j]*ds; // get the middle point of substep + hvpoint[j]=vstep[j]; // hvpoint is always in local coord. Wheel or PhiDiv) + if(lwc()->GetisBarrette()){ + //vstepb[j]=v1b[j]*(1.-ds)+v2b[j]*ds; + //hvpoint[j]=vstepb[j]; + hvpoint[j]=v1b[j]*(1.-ds)+v2b[j]*ds; + } + } + + G4double HV_value; + if(lwc()->GetisBarrette()) { + HV_value=GetHV_Value_Barrett( + G4ThreeVector(hvpoint[0],hvpoint[1],hvpoint[2]), Barret_PhiStart); + } else { + HV_value=GetHV_Value_ChColl_Wheel( + G4ThreeVector(hvpoint[0],hvpoint[1],hvpoint[2]),igap1,ihalfgap1); + } + + const G4ThreeVector tmp = G4ThreeVector( hvpoint[0],hvpoint[1],hvpoint[2]); + const G4double dte = (this->*m_distance_to_the_nearest_electrode_type)(tmp, Barret_PhiStart); + + if( fabs(dte) < CHC_Esr() ) continue; //skip point if too close to the electrode + + const G4double agap=(this->*m_GetGapSize_type)(tmp); //correction to electrode suppression not to + G4double x = agap/( agap - CHC_Esr() ); // change av. signal in the gap + if(x >=0.) supcorr=x; + + SetFoldArea(vstep[2], _fa); // set fold type + SetHalfWave(vstep[2], _wg); // set halfwave parameters for substep + TransformWheeltoFieldMap(vstep, vmap, _wg, _fa); //get corresponding point in Map + //system (it is equivalent to the + //halfwave system of pos. slope) + //rvstep = sqrt(vstep[0]*vstep[0]+vstep[1]*vstep[1]); + const G4double rvstep = hypot(vstep[0], vstep[1]); + const G4double rforalpha = sqrt(rvstep*rvstep-vmap[1]*vmap[1]); // radius in the electrode system + const G4double gap = HalfLArGapSize(rforalpha,rforalpha); // gapsize in the straight section + const G4double yshift_on_map = rforalpha*M_PI/lwc()->GetNumberOfFans()-(FanAbsThickness() + FanEleThickness())/2.; + const G4double yshift_on_wheel= rvstep*M_PI/lwc()->GetNumberOfFans()-(FanAbsThickness() + FanEleThickness())/2.; + const G4double cylgapcorr=yshift_on_wheel/yshift_on_map; // scale difference between plane and cylindrical surface + + const G4double cur = _interpolateCurrentSubStep( rforalpha, gapup, vmap, tol, _fa, gaperr ); + // old current calculation: edep*E**1.3*(gap0/gap)**1.3 + // normalized so, that signal=edep in the straight section of gap0=1.3mm + // (it is at eta=2.25, r=787mm, foldingangle~110 degree) + // currentb=currentb+(edep/nofstep)*pow(curb*AverageGap/gap,1.3); + //(25-05-2005) new current calculation: edep*1/U*IonReco*E*v_drift + // normalized so that signal=edep in the straight section of the same gap + // as above; + // where: HV=1250V,E=9.615 [kv/cm] ,T=88.16 K, + // vdrift=4.62 [mm/mikrosec], Ionreco=96.4% + // ==> AverageCurrent=3.425/[mikrosec]; + + const G4double efield=0.01*cur*HV_value/gap/cylgapcorr; // [kV/cm], bec.HV[V],gap[mm] + + const G4double dc = (edep/nofstep)/s_AverageCurrent* + cur/gap/cylgapcorr*IonReco(efield)*DriftVelo(s_LArTemperature_av,efield)* + supcorr; + + current += dc; } // end of loop for substeps - + if(current < 0.) { gaperr=gaperr-1000; current=0.; } + +#ifdef DEBUG_CHCL if(gaperr != 0 ) { s_CHCEbad=s_CHCEbad+edep; if(s_CHCIprint < s_CHCMaxPrint ){ s_CHCIprint=s_CHCIprint+1; - (*m_msg) << MSG::WARNING - <<"GetCurrent has strange step,gaperr="<<gaperr<<" correction still computed" - <<" bad edep ratio="<<s_CHCEbad/s_CHCEtotal - << endmsg; + ATH_MSG_WARNING("GetCurrent has strange step,gaperr="<<gaperr<<" correction still computed" + <<" bad edep ratio="<<CHCEbad/CHCEtotal); } } //std::cout <<"GetCurrent0:: edep="<<edep<<" current="<<current<<" gaperr="<<gaperr<<std::endl; - +#endif + return current; } // ********************************************************** -G4double EnergyCalculator::GetWeightfromFieldMap( - G4int ilayer, G4double z, G4double y){ -// ********************************************************** +G4double LArG4::EC::EnergyCalculator::GetWeightfromFieldMap( + G4int ilayer, G4double z, G4double y, const FoldArea & fa) const { + // ********************************************************** //return interpolated weight from the fieldmap; // inp: ilayer= layernumber; // z,y = z and y coord. of the point where the weight @@ -1018,186 +1026,185 @@ G4double EnergyCalculator::GetWeightfromFieldMap( // they are defined in the coord system of the Map; // interpolated weight =1 by default; - G4int i,icol,irow,ip11,ip12,ip21,ip22; - G4double weight,eps; + G4int /*i,*/icol,irow,ip11,ip12,ip21,ip22; + G4double weight/*,eps*/; G4double w11,w12,w21,w22,z11/*,z12,z21,z22*/,y11/*,y12,y21,y22*/,wdown,wup, - w,dz,dy,dzx,dyx; + w,dz,dy,dzx,dyx; w11=1.; w12=1.; w21=1.; w22=1.; z11=0.; y11=0.; // to avoid compiler warning - weight=1.; - eps=0.0005; - i=ilayer; + weight=1.; + const G4double eps=0.0005; + const G4int i=ilayer; - //check whether the point is in the area of validity of the table - if(z<m_ChCollFoldType->MinZofLayer[i]-eps || z>m_ChCollFoldType->MaxZofLayer[i]+eps || - y<m_ChCollFoldType->MinYofLayer[i]-eps || y>m_ChCollFoldType->MaxYofLayer[i]+eps ){ - return weight; - } - - //Search for the 4 points in the grid surrounding P(z,y). - //Index of points in the FieldMap: - // (21)----(22) - // | P | - // (11)----(12) - //If some of them is outside of LAr their weight=0 by default. - //Weights set to zero by hand for those surrounding points which - //have no correspondant grid point in the table. - //Such situation will happen for example at the z border, - //because the z coordinate of the last - //column is less then QuarteWaveLength by 50 and 67 mikron for - //inner and outer wheel respectively; - //Only gridpoints of nonzero weight are taken into account - //for interpolation. - //The case of all 4 weights are zero should not happen. If still, - // interpolated weight =1 is returned. - - - icol=int((z-m_ChCollFoldType->MinZofLayer[i])/s_GridSize)+1; //column number of left corners - - if(icol>m_ChCollFoldType->NofColofLayer[i]) icol=m_ChCollFoldType->NofColofLayer[i]; - - irow=int((y-m_ChCollFoldType->MinYofLayer[i])/s_GridSize)+1; //row number of lower corners - if(irow>m_ChCollFoldType->NofRowofLayer[i]) irow=m_ChCollFoldType->NofRowofLayer[i]; - - assert(icol>0 && irow>0); - - ip11=(icol-1)*m_ChCollFoldType->NofRowofLayer[i]+irow-1; //index of points in the FieldMap - ip21=ip11+1; // (21)----(22) - ip12= icol *m_ChCollFoldType->NofRowofLayer[i]+irow-1; // (11)----(12) - ip22=ip12+1; - - G4int i2ip11=Index(m_ChCollFoldType,i,2,ip11); - G4int i2ip12=Index(m_ChCollFoldType,i,2,ip12); - G4int i2ip21=Index(m_ChCollFoldType,i,2,ip21); - G4int i2ip22=Index(m_ChCollFoldType,i,2,ip22); - G4int i0ip11=Index(m_ChCollFoldType,i,0,ip11); - //G4int i0ip12=Index(m_ChCollFoldType,i,0,ip12); - //G4int i0ip21=Index(m_ChCollFoldType,i,0,ip21); - //G4int i0ip22=Index(m_ChCollFoldType,i,0,ip22); - G4int i1ip11=Index(m_ChCollFoldType,i,1,ip11); - //G4int i1ip12=Index(m_ChCollFoldType,i,1,ip12); - //G4int i1ip21=Index(m_ChCollFoldType,i,1,ip21); - //G4int i1ip22=Index(m_ChCollFoldType,i,1,ip22); - - - if(icol<m_ChCollFoldType->NofColofLayer[i] && irow<m_ChCollFoldType->NofRowofLayer[i]){ - w11=m_ChCollFoldType->FieldMap[i2ip11]; //[i][2][ip11]; - w12=m_ChCollFoldType->FieldMap[i2ip12]; //[i][2][ip12]; - w21=m_ChCollFoldType->FieldMap[i2ip21]; //[i][2][ip21]; - w22=m_ChCollFoldType->FieldMap[i2ip22]; //[i][2][ip22]; - z11=m_ChCollFoldType->FieldMap[i0ip11]; //[i][0][ip11]; - //z12=m_ChCollFoldType->FieldMap[i0ip12]; //[i][0][ip12]; - //z21=m_ChCollFoldType->FieldMap[i0ip21]; //[i][0][ip21]; - //z22=m_ChCollFoldType->FieldMap[i0ip22]; //[i][0][ip22]; - y11=m_ChCollFoldType->FieldMap[i1ip11]; //[i][1][ip11]; - //y12=m_ChCollFoldType->FieldMap[i1ip12]; //[i][1][ip12]; - //y21=m_ChCollFoldType->FieldMap[i1ip21]; //[i][1][ip21]; - //y22=m_ChCollFoldType->FieldMap[i1ip22]; //[i][1][ip22]; - } - else if(icol==m_ChCollFoldType->NofColofLayer[i] && irow<m_ChCollFoldType->NofRowofLayer[i]){ - w11=m_ChCollFoldType->FieldMap[i2ip11]; //[i][2][ip11]; - w12=0.; - w21=m_ChCollFoldType->FieldMap[i2ip21]; //[i][2][ip21]; - w22=0.; - z11=m_ChCollFoldType->FieldMap[i0ip11]; //[i][0][ip11]; - //z12=z11+s_GridSize; - //z21=m_ChCollFoldType->FieldMap[i0ip21]; //[i][0][ip21]; - //z22=z11+s_GridSize; - y11=m_ChCollFoldType->FieldMap[i1ip11]; //[i][1][ip11]; - //y12=y11; - //y21=m_ChCollFoldType->FieldMap[i1ip21]; //[i][1][ip21]; - //y22=y11+s_GridSize; - } - else if(icol<m_ChCollFoldType->NofColofLayer[i] && irow==m_ChCollFoldType->NofRowofLayer[i]){ - w11=m_ChCollFoldType->FieldMap[i2ip11]; //[i][2][ip11]; - w12=m_ChCollFoldType->FieldMap[i2ip12]; //[i][2][ip12]; - w21=0.; - w22=0.; - z11=m_ChCollFoldType->FieldMap[i0ip11]; //[i][0][ip11]; - //z12=m_ChCollFoldType->FieldMap[i0ip12]; //[i][0][ip12]; - //z21=z11; - //z22=z11+s_GridSize; - y11=m_ChCollFoldType->FieldMap[i1ip11]; //[i][1][ip11]; - //y12=m_ChCollFoldType->FieldMap[i1ip12]; //[i][1][ip12]; - //y21=y11+s_GridSize; - //y22=y11+s_GridSize; - } - else if(icol==m_ChCollFoldType->NofColofLayer[i] && irow==m_ChCollFoldType->NofRowofLayer[i]){ - w11=m_ChCollFoldType->FieldMap[i2ip11]; //[i][2][ip11]; - w12=0.; - w21=0.; - w22=0.; - z11=m_ChCollFoldType->FieldMap[i0ip11]; //[i][0][ip11]; - //z12=z11+s_GridSize; - //z21=z11; - //z22=z11+s_GridSize; - y11=m_ChCollFoldType->FieldMap[i1ip11]; //[i][1][ip11]; - //y12=y11; - //y21=y11+s_GridSize; - //y22=y11+s_GridSize; - } + //check whether the point is in the area of validity of the table + if(z<fa.ChCollFoldType->MinZofLayer[i]-eps || z>fa.ChCollFoldType->MaxZofLayer[i]+eps || + y<fa.ChCollFoldType->MinYofLayer[i]-eps || y>fa.ChCollFoldType->MaxYofLayer[i]+eps ){ + return weight; + } - dz=(z-z11)/s_GridSize; - dy=(y-y11)/s_GridSize; - - if(dz<0.) dz=0.; - if(dz>1.) dz=1.; - if(dy<0.) dy=0.; - if(dy>1.) dy=1.; - - dzx=dz; - if(w11<0.000001) dzx=1.; - if(w12<0.000001) dzx=0.; - wdown=w11*(1.-dzx)+w12*dzx; //interpol. along lower line - dzx=dz; - if(w21<0.000001) dzx=1.; - if(w22<0.000001) dzx=0.; - wup=w21*(1.-dzx)+w22*dzx; //interpol. along upper line - - dyx=dy; - if(wdown<0.000001) dyx=1.; - if(wup <0.000001) dyx=0.; - w=wdown*(1.-dyx)+wup*dyx; //interpol along column - if(w>0.000001) weight=w; + //Search for the 4 points in the grid surrounding P(z,y). + //Index of points in the FieldMap: + // (21)----(22) + // | P | + // (11)----(12) + //If some of them is outside of LAr their weight=0 by default. + //Weights set to zero by hand for those surrounding points which + //have no correspondant grid point in the table. + //Such situation will happen for example at the z border, + //because the z coordinate of the last + //column is less then QuarteWaveLength by 50 and 67 mikron for + //inner and outer wheel respectively; + //Only gridpoints of nonzero weight are taken into account + //for interpolation. + //The case of all 4 weights are zero should not happen. If still, + // interpolated weight =1 is returned. + + + icol=int((z-fa.ChCollFoldType->MinZofLayer[i])/s_GridSize)+1; //column number of left corners + + if(icol>fa.ChCollFoldType->NofColofLayer[i]) icol=fa.ChCollFoldType->NofColofLayer[i]; + + irow=int((y-fa.ChCollFoldType->MinYofLayer[i])/s_GridSize)+1; //row number of lower corners + if(irow>fa.ChCollFoldType->NofRowofLayer[i]) irow=fa.ChCollFoldType->NofRowofLayer[i]; + + assert(icol>0 && irow>0); + + ip11=(icol-1)*fa.ChCollFoldType->NofRowofLayer[i]+irow-1; //index of points in the FieldMap + ip21=ip11+1; // (21)----(22) + ip12= icol *fa.ChCollFoldType->NofRowofLayer[i]+irow-1; // (11)----(12) + ip22=ip12+1; + + G4int i2ip11=Index(fa.ChCollFoldType,i,2,ip11); + G4int i2ip12=Index(fa.ChCollFoldType,i,2,ip12); + G4int i2ip21=Index(fa.ChCollFoldType,i,2,ip21); + G4int i2ip22=Index(fa.ChCollFoldType,i,2,ip22); + G4int i0ip11=Index(fa.ChCollFoldType,i,0,ip11); + //G4int i0ip12=Index(fa.ChCollFoldType,i,0,ip12); + //G4int i0ip21=Index(fa.ChCollFoldType,i,0,ip21); + //G4int i0ip22=Index(fa.ChCollFoldType,i,0,ip22); + G4int i1ip11=Index(fa.ChCollFoldType,i,1,ip11); + //G4int i1ip12=Index(fa.ChCollFoldType,i,1,ip12); + //G4int i1ip21=Index(fa.ChCollFoldType,i,1,ip21); + //G4int i1ip22=Index(fa.ChCollFoldType,i,1,ip22); + + + if(icol<fa.ChCollFoldType->NofColofLayer[i] && irow<fa.ChCollFoldType->NofRowofLayer[i]){ + w11=fa.ChCollFoldType->FieldMap[i2ip11]; //[i][2][ip11]; + w12=fa.ChCollFoldType->FieldMap[i2ip12]; //[i][2][ip12]; + w21=fa.ChCollFoldType->FieldMap[i2ip21]; //[i][2][ip21]; + w22=fa.ChCollFoldType->FieldMap[i2ip22]; //[i][2][ip22]; + z11=fa.ChCollFoldType->FieldMap[i0ip11]; //[i][0][ip11]; + //z12=fa.ChCollFoldType->FieldMap[i0ip12]; //[i][0][ip12]; + //z21=fa.ChCollFoldType->FieldMap[i0ip21]; //[i][0][ip21]; + //z22=fa.ChCollFoldType->FieldMap[i0ip22]; //[i][0][ip22]; + y11=fa.ChCollFoldType->FieldMap[i1ip11]; //[i][1][ip11]; + //y12=fa.ChCollFoldType->FieldMap[i1ip12]; //[i][1][ip12]; + //y21=fa.ChCollFoldType->FieldMap[i1ip21]; //[i][1][ip21]; + //y22=fa.ChCollFoldType->FieldMap[i1ip22]; //[i][1][ip22]; + } + else if(icol==fa.ChCollFoldType->NofColofLayer[i] && irow<fa.ChCollFoldType->NofRowofLayer[i]){ + w11=fa.ChCollFoldType->FieldMap[i2ip11]; //[i][2][ip11]; + w12=0.; + w21=fa.ChCollFoldType->FieldMap[i2ip21]; //[i][2][ip21]; + w22=0.; + z11=fa.ChCollFoldType->FieldMap[i0ip11]; //[i][0][ip11]; + //z12=z11+GridSize; + //z21=fa.ChCollFoldType->FieldMap[i0ip21]; //[i][0][ip21]; + //z22=z11+GridSize; + y11=fa.ChCollFoldType->FieldMap[i1ip11]; //[i][1][ip11]; + //y12=y11; + //y21=fa.ChCollFoldType->FieldMap[i1ip21]; //[i][1][ip21]; + //y22=y11+GridSize; + } + else if(icol<fa.ChCollFoldType->NofColofLayer[i] && irow==fa.ChCollFoldType->NofRowofLayer[i]){ + w11=fa.ChCollFoldType->FieldMap[i2ip11]; //[i][2][ip11]; + w12=fa.ChCollFoldType->FieldMap[i2ip12]; //[i][2][ip12]; + w21=0.; + w22=0.; + z11=fa.ChCollFoldType->FieldMap[i0ip11]; //[i][0][ip11]; + //z12=fa.ChCollFoldType->FieldMap[i0ip12]; //[i][0][ip12]; + //z21=z11; + //z22=z11+GridSize; + y11=fa.ChCollFoldType->FieldMap[i1ip11]; //[i][1][ip11]; + //y12=fa.ChCollFoldType->FieldMap[i1ip12]; //[i][1][ip12]; + //y21=y11+GridSize; + //y22=y11+GridSize; + } + else if(icol==fa.ChCollFoldType->NofColofLayer[i] && irow==fa.ChCollFoldType->NofRowofLayer[i]){ + w11=fa.ChCollFoldType->FieldMap[i2ip11]; //[i][2][ip11]; + w12=0.; + w21=0.; + w22=0.; + z11=fa.ChCollFoldType->FieldMap[i0ip11]; //[i][0][ip11]; + //z12=z11+GridSize; + //z21=z11; + //z22=z11+GridSize; + y11=fa.ChCollFoldType->FieldMap[i1ip11]; //[i][1][ip11]; + //y12=y11; + //y21=y11+s_GridSize; + //y22=y11+s_GridSize; + } - return weight; + dz=(z-z11)/s_GridSize; + dy=(y-y11)/s_GridSize; + + if(dz<0.) dz=0.; + if(dz>1.) dz=1.; + if(dy<0.) dy=0.; + if(dy>1.) dy=1.; + + dzx=dz; + if(w11<0.000001) dzx=1.; + if(w12<0.000001) dzx=0.; + wdown=w11*(1.-dzx)+w12*dzx; //interpol. along lower line + dzx=dz; + if(w21<0.000001) dzx=1.; + if(w22<0.000001) dzx=0.; + wup=w21*(1.-dzx)+w22*dzx; //interpol. along upper line + + dyx=dy; + if(wdown<0.000001) dyx=1.; + if(wup <0.000001) dyx=0.; + w=wdown*(1.-dyx)+wup*dyx; //interpol along column + if(w>0.000001) weight=w; + + return weight; } // *********************************************************** -void EnergyCalculator::SetFoldArea(G4double zinwheel){ -// *********************************************************** +void LArG4::EC::EnergyCalculator::SetFoldArea(G4double zinwheel, FoldArea & fa) const { + // *********************************************************** if(zinwheel > lwc()->GetStraightStartSection()+lwc()->GetQuarterWaveLength()*0.5 && zinwheel < lwc()->GetWheelThickness()-lwc()->GetStraightStartSection()-lwc()->GetQuarterWaveLength()*0.5){ - m_PointFoldMapArea=1; - m_ChCollFoldType=&(m_ChCollWheelType->Fold1); + fa.PointFoldMapArea=1; + fa.ChCollFoldType=&(ChCollWheelType()->Fold1); } else{ - m_PointFoldMapArea=0; - m_ChCollFoldType=&(m_ChCollWheelType->Fold0); + fa.PointFoldMapArea=0; + fa.ChCollFoldType=&(ChCollWheelType()->Fold0); } } // *********************************************************** -void EnergyCalculator::SetHalfWave(G4double zinwheel){ -// *********************************************************** +void LArG4::EC::EnergyCalculator::SetHalfWave(G4double zinwheel, WheelGeometry & wg) const { + // *********************************************************** -// G4cout<<"***SetHalfWave zin="<<zinwheel<<G4endl; + // G4cout<<"***SetHalfWave zin="<<zinwheel<<G4endl; - G4double z; - z=zinwheel - lwc()->GetStraightStartSection(); - m_HalfWaveNumber =int((z+lwc()->GetQuarterWaveLength())/lwc()->GetHalfWaveLength()); - m_ZinHalfWave=z-m_HalfWaveNumber*lwc()->GetHalfWaveLength(); - m_SignofZinHalfWave=+1; - if(m_ZinHalfWave<0.) m_SignofZinHalfWave=-1; - m_SignofSlopeofHalfWave=-1; - if(m_HalfWaveNumber %2 == 0) m_SignofSlopeofHalfWave=+1; + const G4double z = zinwheel - lwc()->GetStraightStartSection(); + wg.HalfWaveNumber = int((z+lwc()->GetQuarterWaveLength())/lwc()->GetHalfWaveLength()); + wg.ZinHalfWave=z - wg.HalfWaveNumber*lwc()->GetHalfWaveLength(); + wg.SignofZinHalfWave = (wg.ZinHalfWave < 0.) ? -1 : +1; + wg.SignofSlopeofHalfWave = (wg.HalfWaveNumber % 2 == 0) ? +1 : -1; } // *********************************************************** -void EnergyCalculator::TransformWheeltoFieldMap( - G4double PointinWheel[], G4double PointinFieldMap[]){ -// *********************************************************** +void LArG4::EC::EnergyCalculator::TransformWheeltoFieldMap( + const G4double PointinWheel[], G4double PointinFieldMap[], + const WheelGeometry & wg, const FoldArea & fa + ) const { + // *********************************************************** // fieldmap is defined for // -- 'normal' folds : // in the coord syst. of a halfwave of pos.slope @@ -1205,48 +1212,45 @@ void EnergyCalculator::TransformWheeltoFieldMap( // -- 0th and last fold in the range -13mm < z < QuarterWaveLength/2. // SetHalfWave() and GetPhiGap() should be called previously; - PointinFieldMap[0]=PointinWheel[0]* m_CosPhiGap +PointinWheel[1]*m_SinPhiGap; - PointinFieldMap[1]=PointinWheel[0]*(-m_SinPhiGap)+PointinWheel[1]*m_CosPhiGap; + PointinFieldMap[0]=PointinWheel[0]* wg.CosPhiGap + PointinWheel[1]*wg.SinPhiGap; + PointinFieldMap[1]=PointinWheel[0]*(-wg.SinPhiGap) + PointinWheel[1]*wg.CosPhiGap; - if(m_PointFoldMapArea == 0){ - if(m_HalfWaveNumber == 0 ) /*0th fold*/ - PointinFieldMap[2]= m_ZinHalfWave; + if(fa.PointFoldMapArea == 0){ + if(wg.HalfWaveNumber == 0 ) /*0th fold*/ + PointinFieldMap[2]= wg.ZinHalfWave; else{ /*last fold*/ - PointinFieldMap[1]=-PointinFieldMap[1]; - PointinFieldMap[2]= -m_ZinHalfWave; + PointinFieldMap[1]=-PointinFieldMap[1]; + PointinFieldMap[2]= -wg.ZinHalfWave; } - } - else{ // normal folds - PointinFieldMap[1]=m_SignofZinHalfWave*m_SignofSlopeofHalfWave - *PointinFieldMap[1]; - PointinFieldMap[2]=fabs(m_ZinHalfWave); + } else{ // normal folds + PointinFieldMap[1]=wg.SignofZinHalfWave*wg.SignofSlopeofHalfWave + *PointinFieldMap[1]; + PointinFieldMap[2]=fabs(wg.ZinHalfWave); } } // ********************************************************************* -void EnergyCalculator::SetYlimitsofPhigapinFieldMap(G4int ilayer){ -// ********************************************************************* +void LArG4::EC::EnergyCalculator::SetYlimitsofPhigapinFieldMap(G4int ilayer, const WheelGeometry & wg, G4double Ylimits[4]) const { + // ********************************************************************* // compute limits of LAr gap along y axis in the system of Halfwaves // using the geometry defined at the time when fieldmap was created; - // + // // SetHalfWave, GetPhiGap, TransformWheeltoFieldMap should be called previously - G4double /*y[4],*/alpha/*,s*/,halfgap;//,eleshift,absshift; - - alpha=m_ChCollWheelType->FoldinAngleOfLayers[ilayer] * (CLHEP::deg / CLHEP::rad); + const G4double alpha = ChCollWheelType()->FoldinAngleOfLayers[ilayer] / CLHEP::rad * CLHEP::deg; //s=sin(alpha/2.); - halfgap=m_ChCollWheelType->RadiusOfLayers[ilayer]*CLHEP::pi/lwc()->GetNumberOfFans(); //half of y distance + const G4double halfgap = ChCollWheelType()->RadiusOfLayers[ilayer]*CLHEP::pi/lwc()->GetNumberOfFans(); //half of y distance - m_Ylimits[3]=YofSurface(alpha,lwc()->GetFanFoldRadius(),-m_FanAbsThickness)+halfgap; - m_Ylimits[2]=YofSurface(alpha,lwc()->GetFanFoldRadius(),+m_FanEleThickness); - m_Ylimits[1]=YofSurface(alpha,lwc()->GetFanFoldRadius(),-m_FanEleThickness); - m_Ylimits[0]=YofSurface(alpha,lwc()->GetFanFoldRadius(),+m_FanAbsThickness)-halfgap; + Ylimits[3]=YofSurface(alpha,lwc()->GetFanFoldRadius(),-FanAbsThickness(), wg)+halfgap; + Ylimits[2]=YofSurface(alpha,lwc()->GetFanFoldRadius(),+FanEleThickness(), wg); + Ylimits[1]=YofSurface(alpha,lwc()->GetFanFoldRadius(),-FanEleThickness(), wg); + Ylimits[0]=YofSurface(alpha,lwc()->GetFanFoldRadius(),+FanAbsThickness(), wg)-halfgap; } // ****************************************************************** -void EnergyCalculator::SetYlimitsofPhigapinWheel( - G4double rforpoint, G4double rforalpha){ -// ****************************************************************** +void LArG4::EC::EnergyCalculator::SetYlimitsofPhigapinWheel( + G4double rforpoint, G4double rforalpha, const WheelGeometry & wg, G4double Ylimits[4]) const { + // ****************************************************************** // compute limits of LAr gap in the system of Halfwaves using the // present geometry of the wheels; // valid in 0<z<QuaterWavelength for normal fold; @@ -1254,39 +1258,36 @@ void EnergyCalculator::SetYlimitsofPhigapinWheel( // SetHalfWave GetPhiGap and // TransformWheeltoFieldMap should be called previously - G4double /*y[4],*/alpha/*,s*/,halfgap;//,eleshift,absshift; - - alpha=FoldingAngle(rforalpha); + const G4double alpha = FoldingAngle(rforalpha); //s=sin(alpha*0.5); - halfgap=rforpoint*CLHEP::pi/lwc()->GetNumberOfFans(); //half of y distance between 2 abs. + const G4double halfgap = rforpoint*CLHEP::pi/lwc()->GetNumberOfFans(); //half of y distance between 2 abs. - m_Ylimits[3]=YofSurface(alpha,lwc()->GetFanFoldRadius(),-m_FanAbsThickness)+halfgap; - m_Ylimits[2]=YofSurface(alpha,lwc()->GetFanFoldRadius(),+m_FanEleThickness); - m_Ylimits[1]=YofSurface(alpha,lwc()->GetFanFoldRadius(),-m_FanEleThickness); - m_Ylimits[0]=YofSurface(alpha,lwc()->GetFanFoldRadius(),+m_FanAbsThickness)-halfgap; + Ylimits[3]=YofSurface(alpha,lwc()->GetFanFoldRadius(),-FanAbsThickness(), wg)+halfgap; + Ylimits[2]=YofSurface(alpha,lwc()->GetFanFoldRadius(),+FanEleThickness(), wg); + Ylimits[1]=YofSurface(alpha,lwc()->GetFanFoldRadius(),-FanEleThickness(), wg); + Ylimits[0]=YofSurface(alpha,lwc()->GetFanFoldRadius(),+FanAbsThickness(), wg)-halfgap; } // *********************************************************** -void EnergyCalculator::GetPhiGap(G4double SpacePoint[]){ // need to make const -// *********************************************************** -// inp: x,y of SpacePoint defined in the Wheel's system -// outp: gap number(=1,2,..NumberOfFans); -// first gap is at phi=0 +- FanStepOnPhi/2 -// : HalfGapNumber, number of half LAr gaps, -// indexed from 1 to 2*NumberOfFans -// 1st and 2nd halfgaps are in the 1st gap -// SetHalfWave(z) should be called previously - - G4double x,y,r,r2,phiofSpacePoint,y0,phiCross,dphi,phi; - G4int phigap,phihalfgap; - - x=SpacePoint[0]; - y=SpacePoint[1]; - r2=x*x+y*y; - r=sqrt(r2); - phiofSpacePoint=atan2(y,x); //-pi<phi<+pi; - if(phiofSpacePoint<0.) phiofSpacePoint=CLHEP::twopi+phiofSpacePoint; +void LArG4::EC::EnergyCalculator::GetPhiGap(const G4double SpacePoint[], WheelGeometry & wg) const { + // *********************************************************** + // inp: x,y of SpacePoint defined in the Wheel's system + // outp: gap number(=1,2,..NumberOfFans); + // first gap is at phi=0 +- FanStepOnPhi/2 + // : HalfGapNumber, number of half LAr gaps, + // indexed from 1 to 2*NumberOfFans + // 1st and 2nd halfgaps are in the 1st gap + // SetHalfWave(z) should be called previously + + const G4double x=SpacePoint[0]; + const G4double y=SpacePoint[1]; + const G4double r2=x*x+y*y; + G4double r = sqrt(r2); + + // G4double phiofSpacePoint = atan2(y,x); //-pi<phi<+pi; + // if(phiofSpacePoint<0.) phiofSpacePoint=CLHEP::twopi+phiofSpacePoint; + const G4double phiofSpacePoint = _normalizeAngle2Pi( atan2(y,x) ); assert(phiofSpacePoint>0. && phiofSpacePoint<CLHEP::twopi); //compute the crossingpoint of the circle of radius r on the x-y plane @@ -1294,53 +1295,54 @@ void EnergyCalculator::GetPhiGap(G4double SpacePoint[]){ // need to make const // fan 1 positioned at phi=0. One iteration gives precise result. // It was checked by solving exact equations. - y0=YofNeutralFibre(FoldingAngle(r),lwc()->GetFanFoldRadius()); - r =sqrt(r2-y0*y0); // this is an approximation, based on 2 conditons: - // surface tangent in the transvrsal plane is almost - // pointing to the beamline, - // (rold-rnew)/rold << 1. - y0=YofNeutralFibre(FoldingAngle(r),lwc()->GetFanFoldRadius()); - phiCross=atan(y0/r); //-pi<phi<+pi; // asin is used in Dice - it is a bug - phiCross=phiCross-lwc()->GetFanStepOnPhi()/2.; - if(phiCross<0.) phiCross=CLHEP::twopi+phiCross; - //position of the crossing point - //on the neutral fibre of the left absorber of the first gap - dphi=phiofSpacePoint-phiCross; - if(dphi<0.) dphi=CLHEP::twopi+dphi; //distance in phi from the SpacePoint to the - //point on the left absorber's neu.fibre - //at the same radius + G4double y0=YofNeutralFibre(FoldingAngle(r),lwc()->GetFanFoldRadius(), wg); + r = sqrt(r2-y0*y0); // this is an approximation, based on 2 conditons: + // surface tangent in the transvrsal plane is almost + // pointing to the beamline, + // (rold-rnew)/rold << 1. + y0=YofNeutralFibre(FoldingAngle(r),lwc()->GetFanFoldRadius(), wg); + //phiCross=atan(y0/r); //-pi<phi<+pi; // asin is used in Dice - it is a bug + //phiCross=phiCross-lwc()->GetFanStepOnPhi()/2.; + //if(phiCross<0.) phiCross=CLHEP::twopi+phiCross; + const G4double phiCross = _normalizeAngle2Pi( atan2(y0, r) - lwc()->GetFanStepOnPhi()/2. ); + //position of the crossing point + //on the neutral fibre of the left absorber of the first gap + const G4double dphi = _normalizeAngle2Pi( phiofSpacePoint - phiCross ); + //if(dphi<0.) dphi=CLHEP::twopi+dphi; //distance in phi from the SpacePoint to the + //point on the left absorber's neu.fibre + //at the same radius assert (dphi>=0. && dphi<=CLHEP::twopi); - phigap=int(dphi/lwc()->GetFanStepOnPhi())+1; + const G4int phigap=int(dphi/lwc()->GetFanStepOnPhi())+1; assert(phigap>=1 && phigap<=lwc()->GetNumberOfFans()); - phihalfgap=int(2.*dphi/lwc()->GetFanStepOnPhi())+1; + const G4int phihalfgap=int(2.*dphi/lwc()->GetFanStepOnPhi())+1; assert(phihalfgap>=1 && phihalfgap<=2*lwc()->GetNumberOfFans()); - m_PhiGapNumber=phigap; - m_PhiHalfGapNumber=phihalfgap; - phi=(phigap-1)*lwc()->GetFanStepOnPhi(); - m_CosPhiGap=cos(phi); - m_SinPhiGap=sin(phi); + wg.PhiGapNumber=phigap; + wg.PhiHalfGapNumber=phihalfgap; + const G4double phi=(phigap-1)*lwc()->GetFanStepOnPhi(); + wg.CosPhiGap=cos(phi); + wg.SinPhiGap=sin(phi); } // *********************************************************************************** -G4double EnergyCalculator::YofSurface(G4double alpha,G4double rho,G4double thickness) const { -// *********************************************************************************** -// compute y coord of of the fan surface -// -// coord system of halfwave is used -// y axis: parallel to y axis of ATLAS -// z axis: parallel to z axis of Atlas -// z is limited by: -wavelength/4 < z < +wavelength/4 -// origin of the system is fixed at the node of the halfwave -// inp: -// halfwave parameters: should be set previously by SetHalfWave(); -// m_ZinHalfWave :z coord of a point where YofSurf is to be computed -// alpha :folding angle[rad] -// rho : curvature radius of the fold -// thickness: >0 --> compute y of the upper surface -// =0 --> compute y of the neutral fibre -// <0 --> compute y of the lower surface +G4double LArG4::EC::EnergyCalculator::YofSurface(G4double alpha,G4double rho,G4double thickness, const WheelGeometry & wg) const { + // *********************************************************************************** + // compute y coord of of the fan surface + // + // coord system of halfwave is used + // y axis: parallel to y axis of ATLAS + // z axis: parallel to z axis of Atlas + // z is limited by: -wavelength/4 < z < +wavelength/4 + // origin of the system is fixed at the node of the halfwave + // inp: + // halfwave parameters: should be set previously by SetHalfWave(); + // m_ZinHalfWave :z coord of a point where YofSurf is to be computed + // alpha :folding angle[rad] + // rho : curvature radius of the fold + // thickness: >0 --> compute y of the upper surface + // =0 --> compute y of the neutral fibre + // <0 --> compute y of the lower surface const G4double alp=alpha/2.; @@ -1349,55 +1351,58 @@ G4double EnergyCalculator::YofSurface(G4double alpha,G4double rho,G4double thick const G4double t=s/c; //tan(alpha/2); const G4double tb=(1.-s)/c; //tan(beta); beta=0.5*(90-alpha/2); const G4double th=thickness/2.; - - if(m_HalfWaveNumber==0){ //0.th 'halfwave' + + if(wg.HalfWaveNumber==0){ //0.th 'halfwave' const G4double zminoffirstfold = -rho*tb; const G4double zmaxoffirstfold = -rho*tb+(rho-th)*tb*(1.+s); const G4double zminofsecondfold = lwc()->GetQuarterWaveLength()-(rho+th)*c; - - if(m_ZinHalfWave<=zminoffirstfold) return th; - if(m_ZinHalfWave<=zmaxoffirstfold) return rho-sqrt( pow((rho-th),2)-pow((m_ZinHalfWave+rho*tb),2) ); - if(m_ZinHalfWave<=zminofsecondfold)return m_ZinHalfWave/t+th/s; - return (lwc()->GetQuarterWaveLength()*c-rho)/s + sqrt( pow((rho+th),2)-pow((m_ZinHalfWave-lwc()->GetQuarterWaveLength()),2)); - + + if(wg.ZinHalfWave<=zminoffirstfold) return th; + if(wg.ZinHalfWave<=zmaxoffirstfold) return rho-sqrt( pow((rho-th),2)-pow((wg.ZinHalfWave+rho*tb),2) ); + if(wg.ZinHalfWave<=zminofsecondfold) return wg.ZinHalfWave/t+th/s; + return (lwc()->GetQuarterWaveLength()*c-rho)/s + sqrt( pow((rho+th),2)-pow((wg.ZinHalfWave-lwc()->GetQuarterWaveLength()),2)); + } // end of first fold - - else if(m_HalfWaveNumber==lwc()->GetNumberOfHalfWaves()){ //last 'halfwave' - + + else if(wg.HalfWaveNumber==lwc()->GetNumberOfHalfWaves()){ //last 'halfwave' + const G4double zmaxoflastfold=rho*tb; const G4double zminoflastfold=rho*tb-(rho+th)*tb*(1.+s); const G4double zmaxofpreviousfold=-lwc()->GetQuarterWaveLength()+(rho-th)*c; - - if(m_ZinHalfWave>=zmaxoflastfold) return th; - if(m_ZinHalfWave>=zminoflastfold) return -rho+sqrt( pow((rho+th),2)-pow((m_ZinHalfWave-rho*tb),2) ); - if(m_ZinHalfWave>=zmaxofpreviousfold) return m_ZinHalfWave/t+th/s; - return -(lwc()->GetQuarterWaveLength()*c-rho)/s-sqrt( pow((rho-th),2)-pow((m_ZinHalfWave+lwc()->GetQuarterWaveLength()),2) ); - + + if(wg.ZinHalfWave>=zmaxoflastfold) return th; + if(wg.ZinHalfWave>=zminoflastfold) return -rho+sqrt( pow((rho+th),2)-pow((wg.ZinHalfWave-rho*tb),2) ); + if(wg.ZinHalfWave>=zmaxofpreviousfold) return wg.ZinHalfWave/t+th/s; + return -(lwc()->GetQuarterWaveLength()*c-rho)/s-sqrt( pow((rho-th),2)-pow((wg.ZinHalfWave+lwc()->GetQuarterWaveLength()),2) ); + } // end of last fold - - else if(m_HalfWaveNumber>0 && m_HalfWaveNumber<lwc()->GetNumberOfHalfWaves()){ - - const G4double sn=m_SignofZinHalfWave*m_SignofSlopeofHalfWave; - const G4double z2= -lwc()->GetQuarterWaveLength()+(rho-m_SignofSlopeofHalfWave*th)*c; - const G4double z3= lwc()->GetQuarterWaveLength()-(rho+m_SignofSlopeofHalfWave*th)*c; - - if(m_ZinHalfWave<=z2 || z3<=m_ZinHalfWave) + + else if(wg.HalfWaveNumber>0 && wg.HalfWaveNumber<lwc()->GetNumberOfHalfWaves()) { + + const G4double sn=wg.SignofZinHalfWave*wg.SignofSlopeofHalfWave; + const G4double z2= -lwc()->GetQuarterWaveLength()+(rho-wg.SignofSlopeofHalfWave*th)*c; + const G4double z3= lwc()->GetQuarterWaveLength()-(rho+wg.SignofSlopeofHalfWave*th)*c; + + if(wg.ZinHalfWave<=z2 || z3<=wg.ZinHalfWave) { return sn*(lwc()->GetQuarterWaveLength()*c-rho)/s+ - sn*sqrt( pow((rho+sn*th),2)-pow((m_ZinHalfWave-m_SignofZinHalfWave*lwc()->GetQuarterWaveLength()),2) ); - - if(z2<=m_ZinHalfWave && m_ZinHalfWave<=z3) return m_SignofSlopeofHalfWave*m_ZinHalfWave/t+th/s; - + sn*sqrt( pow((rho+sn*th),2)-pow((wg.ZinHalfWave-wg.SignofZinHalfWave*lwc()->GetQuarterWaveLength()),2) ); + } + + if(z2<=wg.ZinHalfWave && wg.ZinHalfWave<=z3) { + return wg.SignofSlopeofHalfWave*wg.ZinHalfWave/t+th/s; + } + // std::cout<<"*** ERROR1 in YofSURF!!!!"<<std::endl; - return 0.; + return 0.; } //std::cout<<"*** ERROR2 in YofSURF!!!!"<<std::endl; - return 0.; + return 0.; } // ********************************************************** -G4double EnergyCalculator::FoldingAngle(G4double radius) const { -// ********************************************************** +G4double LArG4::EC::EnergyCalculator::FoldingAngle(G4double radius) const { + // ********************************************************** // inp: radius in [mm] // outp: angle in [radian] // @@ -1411,29 +1416,21 @@ G4double EnergyCalculator::FoldingAngle(G4double radius) const { // is present as well, however it is smaller by a factor of 2. // In case of 'medium' radia the fitted parameters are ok. - return CLHEP::pi - 2. * lwc()->parameterized_slant_angle(radius); + return CLHEP::pi - 2. * lwc()->parameterized_slant_angle(radius); } // *************************************************************** -G4double EnergyCalculator::HalfLArGapSizeOld(G4double radius) const { -// *************************************************************** +G4double LArG4::EC::EnergyCalculator::HalfLArGapSizeOld(G4double radius) const { + // *************************************************************** const G4double alpha=FoldingAngle(radius); const G4double s=sin(alpha *0.5); - const G4double halfgap=CLHEP::pi*radius/lwc()->GetNumberOfFans()*s-(m_FanAbsThickness+m_FanEleThicknessOld)*0.5; + const G4double halfgap=CLHEP::pi*radius/lwc()->GetNumberOfFans()*s-( FanAbsThickness() + FanEleThicknessOld() )*0.5; return halfgap; } // *************************************************************** -G4double EnergyCalculator::HalfLArGapSize(G4double rforpoint,G4double rforalpha) const { -// *************************************************************** +G4double LArG4::EC::EnergyCalculator::HalfLArGapSize(G4double rforpoint,G4double rforalpha) const { + // *************************************************************** const G4double alpha=FoldingAngle(rforalpha); const G4double s=sin(alpha/2.); - const G4double halfgap=CLHEP::pi*rforpoint/lwc()->GetNumberOfFans()*s-(m_FanAbsThickness+m_FanEleThickness)/2.; + const G4double halfgap=CLHEP::pi*rforpoint/lwc()->GetNumberOfFans()*s-( FanAbsThickness() + FanEleThickness() )/2.; return halfgap; } - - - - - - - - diff --git a/LArCalorimeter/LArG4/LArG4EC/src/LArEndcapPresamplerCalculator.cc b/LArCalorimeter/LArG4/LArG4EC/src/LArEndcapPresamplerCalculator.cc index cea4f58b155e0ddba779b372ea3ccaacd14bd205..58dbabf267d46b048d1492d67e32df290a402da6 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/LArEndcapPresamplerCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4EC/src/LArEndcapPresamplerCalculator.cc @@ -14,13 +14,12 @@ // 17-Aug-2004 WGS: Use a "common geometry" routine for both the // standard calculator and the calibration hits. -#include "LArG4EC/LArEndcapPresamplerCalculator.h" +#include "LArEndcapPresamplerCalculator.h" #include "LArG4EC/PresamplerGeometry.h" #include "LArG4Code/LArG4Identifier.h" #include "LArG4Code/LArVG4DetectorParameters.h" #include "LArG4Code/LArG4BirksLaw.h" -#include "LArG4RunControl/LArG4EMECOptions.h" #include "G4ThreeVector.hh" #include "G4StepPoint.hh" @@ -29,8 +28,6 @@ #include "G4NavigationHistory.hh" #include "G4VTouchable.hh" #include "G4TouchableHistory.hh" -#include "LArG4RunControl/LArG4EMECOptions.h" -#include "LArG4RunControl/LArG4GlobalOptions.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/Bootstrap.h" #include "StoreGate/StoreGateSvc.h" @@ -40,84 +37,44 @@ #include <cmath> #include <climits> - namespace Units = Athena::Units; - -// Standard implementation of a singleton pattern. - -LArEndcapPresamplerCalculator* LArEndcapPresamplerCalculator::GetCalculator() +LArEndcapPresamplerCalculator::LArEndcapPresamplerCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalculatorSvcImp(name, pSvcLocator) + , m_geometry(nullptr) + , m_birksLaw(nullptr) { - static LArEndcapPresamplerCalculator instance; - return &instance; } - -LArEndcapPresamplerCalculator::LArEndcapPresamplerCalculator() : - m_birksLaw(NULL) +StatusCode LArEndcapPresamplerCalculator::initialize() { - // Constructor initializes the geometry. - - // Make sure we don't have any undefined values. - //m_identifier = LArG4Identifier(); - - //m_time = 0.; - //m_energy = 0.; - m_isInTime = false; - - StoreGateSvc* detStore; - LArG4EMECOptions *emecOptions; - LArG4GlobalOptions *globalOptions; - StatusCode status; - ISvcLocator* svcLocator = Gaudi::svcLocator(); - status = svcLocator->service("DetectorStore", detStore); - - if(status.isSuccess()){ - status = detStore->retrieve(emecOptions, "LArG4EMECOptions"); - if(status.isFailure()){ - throw std::runtime_error("LArWheelEnergyCalculator: cannot retrieve \ -LArG4EMECOptions"); + + if(m_BirksLaw) + { + const double Birks_LAr_density = 1.396; + m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,m_Birksk); + ATH_MSG_INFO(" LArEndcapPresamplerCalculator: Birks' law ON "); + ATH_MSG_INFO(" LArEndcapPresamplerCalculator: parameter k " << m_birksLaw->k()); } - status = detStore->retrieve(globalOptions, "LArG4GlobalOptions"); - if(status.isFailure()){ - throw std::runtime_error("LArWheelEnergyCalculator: cannot retrieve \ -LArG4GlobalOptions"); + else + { + ATH_MSG_INFO(" LArEndcapPresamplerCalculator: Birks' law OFF"); } - } else { - throw std::runtime_error("LArWheelEnergyCalculator: cannot initialize \ -StoreGate interface"); - } - - - - // Get the values from the detector parameters routine. - m_OOTcut = globalOptions->OutOfTimeCut(); - - if(emecOptions->EMECBirksLaw()){ - const double Birks_LAr_density = 1.396; - const double Birks_k = emecOptions->EMECBirksk(); - m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,Birks_k); - } - - - if(m_birksLaw) { - std::cout << " LArEndcapPresamplerCalculator: Birks' law ON " << std::endl; - std::cout << " LArEndcapPresamplerCalculator: parameter k " << m_birksLaw->k() << std::endl; - } - else - std::cout << " LArEndcapPresamplerCalculator: Birks' law OFF" << std::endl; - // Get the geometry routine. m_geometry = LArG4::EC::PresamplerGeometry::GetInstance(); + + return StatusCode::SUCCESS; } -LArEndcapPresamplerCalculator::~LArEndcapPresamplerCalculator() { +StatusCode LArEndcapPresamplerCalculator::finalize() +{ if (m_birksLaw) delete m_birksLaw; + return StatusCode::SUCCESS; } -G4bool LArEndcapPresamplerCalculator::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) +G4bool LArEndcapPresamplerCalculator::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) const { // make sure hdata is reset hdata.resize(1); @@ -149,11 +106,7 @@ G4bool LArEndcapPresamplerCalculator::Process(const G4Step* a_step, std::vector< G4ThreeVector p = (startPoint + endPoint) * 0.5; // Determine if the hit was in-time. - hdata[0].time = timeOfFlight/Units::ns - p.mag()/Units::c_light/Units::ns; - if (hdata[0].time > m_OOTcut) - m_isInTime = false; - else - m_isInTime = true; + hdata[0].time = timeOfFlight/Units::ns - p.mag()/CLHEP::c_light/Units::ns; // Use the geometry routine to determine the identifier. hdata[0].id = m_geometry->CalculateIdentifier( a_step ); diff --git a/LArCalorimeter/LArG4/LArG4EC/src/LArEndcapPresamplerCalculator.h b/LArCalorimeter/LArG4/LArG4EC/src/LArEndcapPresamplerCalculator.h new file mode 100644 index 0000000000000000000000000000000000000000..3192feea34cb319a8980453735a97ea19a5a73d2 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4EC/src/LArEndcapPresamplerCalculator.h @@ -0,0 +1,63 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// LArEndcapPresamplerCalculator.hh +// Prepared 27-Dec-2002 Bill Seligman + +// This is a separate "calculator" class for the endcap presampler. +// For more information about what a "calculator" class does, see the +// documentation: LArG4/doc/LArG4.ps. + +#ifndef LARG4EC_LARENDCAPPRESAMPLERCALCULATOR_H +#define LARG4EC_LARENDCAPPRESAMPLERCALCULATOR_H + +#include "globals.hh" +#include "G4ThreeVector.hh" +#include "LArG4Code/LArG4Identifier.h" +#include "LArG4Code/LArCalculatorSvcImp.h" +#include "LArG4Code/LArVG4DetectorParameters.h" +#include <stdexcept> +// Forward declarations. +class G4Step; +class LArG4BirksLaw; + +namespace LArG4 { + namespace EC { + class PresamplerGeometry; + } +} + +class LArEndcapPresamplerCalculator : public LArCalculatorSvcImp { +public: + + LArEndcapPresamplerCalculator(const std::string& name, ISvcLocator *pSvcLocator); + + virtual StatusCode initialize() override final; + virtual StatusCode finalize() override final; + + ///////////////////////////////////////////// + + virtual G4float OOTcut() const override final { return m_OOTcut; } + + // Check if the current hitTime is in-time + virtual G4bool isInTime(G4double hitTime) const override final + { + return !(hitTime > m_OOTcut); //FIXME should we be checking the absolute value of hitTime here? + } + + virtual G4bool Process(const G4Step*, std::vector<LArHitData>&) const override final; + + +private: + + // Pointer to geometry routine. + const LArG4::EC::PresamplerGeometry* m_geometry; + + LArG4BirksLaw *m_birksLaw; + + LArEndcapPresamplerCalculator (const LArEndcapPresamplerCalculator&); + LArEndcapPresamplerCalculator& operator= (const LArEndcapPresamplerCalculator&); +}; + +#endif diff --git a/LArCalorimeter/LArG4/LArG4EC/src/PresamplerCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4EC/src/PresamplerCalibrationCalculator.cc index f062557dc371ee12403ddde3b37926d5bcbca9df..afae28eee3859267a46783f4c7e65292a0ec2185 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/PresamplerCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4EC/src/PresamplerCalibrationCalculator.cc @@ -10,7 +10,7 @@ #undef DEBUG_HITS -#include "LArG4EC/PresamplerCalibrationCalculator.h" +#include "PresamplerCalibrationCalculator.h" #include "LArG4EC/PresamplerGeometry.h" #include "LArG4Code/LArG4Identifier.h" @@ -22,62 +22,66 @@ namespace LArG4 { namespace EC { - PresamplerCalibrationCalculator::PresamplerCalibrationCalculator() + PresamplerCalibrationCalculator::PresamplerCalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + { } + + StatusCode PresamplerCalibrationCalculator::initialize() { // Initialize the geometry calculator. m_geometryCalculator = PresamplerGeometry::GetInstance(); + return StatusCode::SUCCESS; } - PresamplerCalibrationCalculator::~PresamplerCalibrationCalculator() { } - G4bool PresamplerCalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) + G4bool PresamplerCalibrationCalculator::Process (const G4Step* a_step, + LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing a_process) const { // Use the calculators to determine the energies and the // identifier associated with this G4Step. Note that the // default is to process both the energy and the ID. - m_energies.clear(); + _energies.clear(); if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { + { #ifdef DEBUG_HITS - std::cout << "LArG4::EC::PresamplerCalibrationCalculator::Process" - << " calling SimulationEnergies" << std::endl; + ATH_MSG_DEBUG("Process(): calling SimulationEnergies"); #endif - m_energyCalculator.Energies( a_step, m_energies ); - } + m_energyCalculator.Energies( a_step, _energies ); + } else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); + for (unsigned int i=0; i != 4; i++) _energies.push_back( 0. ); if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. - m_identifier = m_geometryCalculator->CalculateIdentifier( a_step ); - } + { + // Calculate the identifier. + _identifier = m_geometryCalculator->CalculateIdentifier( a_step ); + } else - m_identifier = LArG4Identifier(); + _identifier = LArG4Identifier(); + - #ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); - std::cout << "LArG4::EC::PresamplerCalibrationCalculator::Process" - << " ID=" << std::string(m_identifier) - << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + G4double energy = accumulate(_energies.begin(),_energies.end(),0.); + ATH_MSG_DEBUG("Process(): " + << " ID=" << std::string(_identifier) + << " energy=" << energy + << " energies=(" << _energies[0] + << "," << _energies[1] + << "," << _energies[2] + << "," << _energies[3] << ")"); #endif // Check for bad result. - if ( m_identifier == LArG4Identifier() ) - return false; + if ( _identifier == LArG4Identifier() ) + return false; return true; } diff --git a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/PresamplerCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4EC/src/PresamplerCalibrationCalculator.h similarity index 72% rename from LArCalorimeter/LArG4/LArG4EC/LArG4EC/PresamplerCalibrationCalculator.h rename to LArCalorimeter/LArG4/LArG4EC/src/PresamplerCalibrationCalculator.h index db324279b30a8754e53d480ba37a2f9df5356659..96b31ebe272551671993f8f4d59268a04b922960 100644 --- a/LArCalorimeter/LArG4/LArG4EC/LArG4EC/PresamplerCalibrationCalculator.h +++ b/LArCalorimeter/LArG4/LArG4EC/src/PresamplerCalibrationCalculator.h @@ -16,7 +16,7 @@ #ifndef LArG4_EC_PresamplerCalibrationCalculator_H #define LArG4_EC_PresamplerCalibrationCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" @@ -38,12 +38,13 @@ namespace LArG4 { // Forward declaration class PresamplerGeometry; - class PresamplerCalibrationCalculator : public VCalibrationCalculator { + class PresamplerCalibrationCalculator : public LArCalibCalculatorSvcImp { public: - - PresamplerCalibrationCalculator(); + + PresamplerCalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize() override final; virtual ~PresamplerCalibrationCalculator(); - + // The Process method returns a boolean value. If it's true, the // hit can be used by Geant4; if it's false, there's something wrong // with the energy deposit and it should be ignored. @@ -55,19 +56,12 @@ namespace LArG4 { // yet, but you can never tell). Use the enum (defined in // VCalibrationCalculator.h) to control any special processing. - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } + + virtual G4bool Process (const G4Step* step, LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing p = kEnergyAndID) const override final; private: - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; // Geometry calculator const PresamplerGeometry* m_geometryCalculator; diff --git a/LArCalorimeter/LArG4/LArG4EC/src/PresamplerGeometry.cc b/LArCalorimeter/LArG4/LArG4EC/src/PresamplerGeometry.cc index 9d89f50875c2545cf148fc63b80b2a4279e7df3a..88324defd8bda20fc4ad9ff1520af28b32209072 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/PresamplerGeometry.cc +++ b/LArCalorimeter/LArG4/LArG4EC/src/PresamplerGeometry.cc @@ -210,9 +210,6 @@ namespace LArG4 { G4double phi=pForCell.phi(); if (phi < 0.) phi += 2.*M_PI; - // Start with a blank identifier. - LArG4Identifier identifier; - // zSide is negative if z<0. G4int zSide = geometry.zSide; if (p.z() < 0.) zSide = -zSide; @@ -244,6 +241,10 @@ namespace LArG4 { assert ( etaBin >= 0 ); assert ( phiBin >= 0 ); // assert ( etaBin <= geometry[c].maxEta ); + + // Start with a blank identifier. + LArG4Identifier identifier; + if ( etaBin > geometry.maxEta ) { G4cerr << "LArG4::EC::PresamplerGeometry::CalculateIdentifier: invalid hit, etaBin=" diff --git a/LArCalorimeter/LArG4/LArG4EC/src/components/LArG4EC_entries.cxx b/LArCalorimeter/LArG4/LArG4EC/src/components/LArG4EC_entries.cxx new file mode 100644 index 0000000000000000000000000000000000000000..ac9966e6114ec6bfca4448392672508b895c1d1b --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4EC/src/components/LArG4EC_entries.cxx @@ -0,0 +1,19 @@ +#include "GaudiKernel/DeclareFactoryEntries.h" + +#include "../CalibrationCalculator.h" +#include "../CryostatCalibrationLArCalculator.h" +#include "../EMECSupportCalibrationCalculator.h" +#include "../LArEndcapPresamplerCalculator.h" +#include "../CryostatCalibrationCalculator.h" +#include "../CryostatCalibrationMixedCalculator.h" +#include "../EnergyCalculator.h" +#include "../PresamplerCalibrationCalculator.h" + +DECLARE_SERVICE_FACTORY(LArG4::EC::CalibrationCalculator) +DECLARE_SERVICE_FACTORY(LArG4::EMECSupportCalibrationCalculator) +DECLARE_SERVICE_FACTORY(LArEndcapPresamplerCalculator) +DECLARE_SERVICE_FACTORY(LArG4::EndcapCryostat::CalibrationLArCalculator) +DECLARE_SERVICE_FACTORY(LArG4::EndcapCryostat::CalibrationCalculator) +DECLARE_SERVICE_FACTORY(LArG4::EndcapCryostat::CalibrationMixedCalculator) +DECLARE_SERVICE_FACTORY(LArG4::EC::EnergyCalculator) +DECLARE_SERVICE_FACTORY(LArG4::EC::PresamplerCalibrationCalculator) diff --git a/LArCalorimeter/LArG4/LArG4FCAL/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4FCAL/CMakeLists.txt index 3f4cc7999b6004b7a4662cae51515d880182f136..77bec6a06dd3b3f90c42790186980878d38594a4 100644 --- a/LArCalorimeter/LArG4/LArG4FCAL/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4FCAL/CMakeLists.txt @@ -6,17 +6,15 @@ atlas_subdir( LArG4FCAL ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC +atlas_depends_on_subdirs( PRIVATE Calorimeter/CaloG4Sim LArCalorimeter/LArG4/LArG4Code LArCalorimeter/LArGeoModel/LArReadoutGeometry - PRIVATE Control/AthenaKernel Control/StoreGate Database/AthenaPOOL/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces GaudiKernel - LArCalorimeter/LArG4/LArG4RunControl Tools/PathResolver ) # External dependencies: @@ -27,11 +25,14 @@ find_package( Geant4 ) find_package( XercesC ) # Component(s) in the package: -atlas_add_library( LArG4FCAL +atlas_add_component( LArG4FCAL src/*.cc + src/components/*.cxx PUBLIC_HEADERS LArG4FCAL PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES LArG4Code LArReadoutGeometry CaloG4SimLib StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel LArG4RunControl PathResolver ) +atlas_install_python_modules( python/*.py ) + diff --git a/LArCalorimeter/LArG4/LArG4FCAL/GNUmakefile b/LArCalorimeter/LArG4/LArG4FCAL/GNUmakefile old mode 100755 new mode 100644 diff --git a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL1Calculator.h b/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL1Calculator.h deleted file mode 100755 index 5bf80dab76082e3fd356b1f330e9221c8f671e95..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL1Calculator.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArFCAL1Calculator -// Prepared 20-Feb-2003 Bill Seligman (from Peter Loch) - -// Defines constants specific to a single FCAL module. - -#ifndef LArFCAL1Calculator_H -#define LArFCAL1Calculator_H - -#include "LArG4FCAL/LArFCALCalculatorBase.h" -#include "globals.hh" - -class LArFCAL1Calculator: public LArFCALCalculatorBase -{ -public: - - // This class follows the singleton design pattern; there can be - // only one calculator class for this module. - static LArFCAL1Calculator* GetInstance(); - - // destructor - virtual ~LArFCAL1Calculator() { }; - -protected: - - // The constructor is protected according to the singleton pattern. - LArFCAL1Calculator(); - -private: - - // Private instance required by the singleton pattern. - static LArFCAL1Calculator* m_instance; - -}; -#endif diff --git a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL1CalibCalculator.h b/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL1CalibCalculator.h deleted file mode 100755 index 611be467e7fd09d7f9d73137f6fb3b859a2ebd69..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL1CalibCalculator.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#ifndef LArFCAL1CalibCalculator_H -#define LArFCAL1CalibCalculator_H - -//#include "LArG4FCAL/LArFCAL1CalibCalculator.h" -#include "LArG4FCAL/LArFCALCalibCalculatorBase.h" - -#include "globals.hh" - - -// Standard implementation of a singleton pattern. -namespace LArG4 { - - namespace FCAL { - - class LArFCAL1CalibCalculator : public LArFCALCalibCalculatorBase { - - public: - - static LArFCAL1CalibCalculator* GetCalculator(); - - virtual ~LArFCAL1CalibCalculator(); - - protected: - - LArFCAL1CalibCalculator(); - private: - - static LArFCAL1CalibCalculator* m_calculator; - - }; - - } - -} -#endif diff --git a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL2Calculator.h b/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL2Calculator.h deleted file mode 100755 index b9d9889299df85362a8ed00aa93478206dcb2d8f..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL2Calculator.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArFCAL2Calculator -// Prepared 20-Feb-2003 Bill Seligman (from Peter Loch) - -// Defines constants specific to a single FCAL module. - -#ifndef LArFCAL2Calculator_H -#define LArFCAL2Calculator_H - -#include "LArG4FCAL/LArFCALCalculatorBase.h" -#include "globals.hh" - -class LArFCAL2Calculator: public LArFCALCalculatorBase -{ -public: - - // This class follows the singleton design pattern; there can be - // only one calculator class for this module. - static LArFCAL2Calculator* GetInstance(); - - // destructor - virtual ~LArFCAL2Calculator() { }; - -protected: - - // The constructor is protected according to the singleton pattern. - LArFCAL2Calculator(); - -private: - - // Private instance required by the singleton pattern. - static LArFCAL2Calculator* m_instance; - -}; -#endif diff --git a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL2CalibCalculator.h b/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL2CalibCalculator.h deleted file mode 100755 index be059f09174c81200df2604905d88d3a542321a0..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL2CalibCalculator.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#ifndef LArFCAL2CalibCalculator_H -#define LArFCAL2CalibCalculator_H - -//#include "LArG4FCAL/LArFCAL2CalibCalculator.h" -#include "LArG4FCAL/LArFCALCalibCalculatorBase.h" - -#include "globals.hh" - - -// Standard implementation of a singleton pattern. -namespace LArG4 { - - namespace FCAL { - - class LArFCAL2CalibCalculator : public LArFCALCalibCalculatorBase { - - public: - - static LArFCAL2CalibCalculator* GetCalculator(); - - virtual ~LArFCAL2CalibCalculator(); - - protected: - - LArFCAL2CalibCalculator(); - private: - - static LArFCAL2CalibCalculator* m_calculator; - - }; - - } - -} -#endif diff --git a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL3Calculator.h b/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL3Calculator.h deleted file mode 100755 index 2735283b83c65a146e5a215747cca0fc1633256d..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL3Calculator.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArFCAL3Calculator -// Prepared 20-Feb-2003 Bill Seligman (from Peter Loch) - -// Defines constants specific to a single FCAL module. - -#ifndef LArFCAL3Calculator_H -#define LArFCAL3Calculator_H - -#include "LArG4FCAL/LArFCALCalculatorBase.h" -#include "globals.hh" - -class LArFCAL3Calculator: public LArFCALCalculatorBase -{ -public: - - // This class follows the singleton design pattern; there can be - // only one calculator class for this module. - static LArFCAL3Calculator* GetInstance(); - - // destructor - virtual ~LArFCAL3Calculator() { }; - -protected: - - // The constructor is protected according to the singleton pattern. - LArFCAL3Calculator(); - -private: - - // Private instance required by the singleton pattern. - static LArFCAL3Calculator* m_instance; - -}; -#endif diff --git a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL3CalibCalculator.h b/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL3CalibCalculator.h deleted file mode 100755 index ea3b88ce66c3e7c7e715ddfd209ed4024105c396..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCAL3CalibCalculator.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#ifndef LArFCAL3CalibCalculator_H -#define LArFCAL3CalibCalculator_H - -//#include "LArG4FCAL/LArFCAL3CalibCalculator.h" -#include "LArG4FCAL/LArFCALCalibCalculatorBase.h" - -#include "globals.hh" - - -// Standard implementation of a singleton pattern. -namespace LArG4 { - - namespace FCAL { - - class LArFCAL3CalibCalculator : public LArFCALCalibCalculatorBase { - - public: - - static LArFCAL3CalibCalculator* GetCalculator(); - - virtual ~LArFCAL3CalibCalculator(); - - protected: - - LArFCAL3CalibCalculator(); - private: - - static LArFCAL3CalibCalculator* m_calculator; - - }; - - } - -} -#endif diff --git a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCALCalculatorBase.h b/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCALCalculatorBase.h deleted file mode 100755 index 686c5293eb0f05e255ccffc7ec00d5dd0fd17032..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCALCalculatorBase.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArFCALCalculator -// 20-Feb-2003 Bill Seligman (from Peter Loch) - -// A base class for the calculators required for the individual -// modules. - -#ifndef LArFCALCalculatorBase_H -#define LArFCALCalculatorBase_H - -//----------------------------------------------------------------------------- -// -// Forward Calorimeter Construction in GEANT4 -// -//----------------------------------------------------------------------------- -#include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVCalculator.h" -#include "LArReadoutGeometry/FCAL_ChannelMap.h" -#include "globals.hh" -#include <stdexcept> -class LArG4BirksLaw; -class FCALModule; - -class LArFCALCalculatorBase : public LArVCalculator -{ - public: - // constructor - LArFCALCalculatorBase(); - // destructor - virtual ~LArFCALCalculatorBase(); - - ///////////////////////////////////////////// - // The interface for LArVCalculator. - - virtual G4float OOTcut() const { return m_OOTcut; } - - virtual G4bool Process(const G4Step* a_step){return Process(a_step, m_hdata);} - virtual G4bool Process(const G4Step*, std::vector<LArHitData>&); - - virtual const LArG4Identifier& identifier(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].id; - } - - virtual G4double time(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].time; - } - virtual G4double energy(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].energy; - }; - virtual G4bool isInTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_isInTime; - } - virtual G4bool isOutOfTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return ( ! m_isInTime ); - } - ///////////////////////////////////////////// - - - protected: - - // Store the endcap shift and out-of-time cut from the description: - G4float m_OOTcut; - - // The results of the Process calculation: - //LArG4Identifier m_identifier; - //G4double m_time; - //G4double m_energy; - std::vector<LArHitData> m_hdata; - - G4bool m_isInTime; - - FCAL_ChannelMap *m_ChannelMap; - const FCALModule *m_posModule; // for hv access here... - const FCALModule *m_negModule; // for hv access here... - // sampling - G4int m_FCalSampling; - LArG4BirksLaw *m_birksLaw; - - LArFCALCalculatorBase (const LArFCALCalculatorBase&); - LArFCALCalculatorBase operator= (const LArFCALCalculatorBase&); -}; - -#endif // LArFCALCalculatorBase_H - - diff --git a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCALCalibCalculatorBase.h b/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCALCalibCalculatorBase.h deleted file mode 100755 index 1c9a301c13c9cc6513ed0c9eb2509fbfce65c1a1..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/LArG4FCAL/LArFCALCalibCalculatorBase.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArG4::FCAL::LArFCALCalibCalculator -// Prepared Oct./2004 Mohsen Khakzad - -// This class calculates the values needed for calibration hits in the -// simulation. - -// A "calculator" is used in much the same way as a hand-held -// calculator might be. The user supplies a value and hits 'Enter' -// Forward declaractions: -// (i.e., invokes the Process() method). Then they read off whatever -// values are of interest. - -#ifndef LArFCALCalibCalculatorBase_H -#define LArFCALCalibCalculatorBase_H - -#include "LArG4Code/VCalibrationCalculator.h" -#include "LArG4Code/LArG4Identifier.h" - -#include "LArG4FCAL/LArFCALCalculatorBase.h" - -#include "CaloG4Sim/SimulationEnergies.h" - -#include "LArG4Code/LArVCalculator.h" -#include "globals.hh" -#include <vector> -// Forward declaration for namespace CaloG4. -class G4Step; - -namespace LArG4 { - - namespace FCAL { - - class LArFCALCalibCalculatorBase : public VCalibrationCalculator { - public: - LArFCALCalibCalculatorBase(); - virtual ~LArFCALCalibCalculatorBase(); - - - // The Process method returns a boolean value. If it's true, the - // hit can be used by Geant4; if it's false, there's something wrong - // with the energy deposit and it should be ignored. - - // For calibration work, most of the time we want the calculator - // to determine both the energy and the identifier. However, - // sometimes we want it calculate only the identifier (for - // escaped energy), or only the energy (no known application - // yet, but you can never tell). Use the enum (defined in - // VCalibrationCalculator.h) to control any special processing. - - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - - virtual G4float OOTcut() const { return m_OOTcut; } - - virtual G4double time() const { return m_time; } - virtual const std::vector<G4double>& energies() const { return m_energies; } - virtual G4bool isInTime() const { return m_isInTime; } - virtual G4bool isOutOfTime() const { return ( ! m_isInTime ); } - ///////////////////////////////////////////// - - virtual G4double GetdeltaX(){return m_deltaX;} - virtual G4double GetdeltaY(){return m_deltaY;} - - protected: - - G4double m_deltaX; - G4double m_deltaY; - - G4int m_FCalSampling; - - private: - - // The values calculated by Process() - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; - - - // Energy calculator - CaloG4::SimulationEnergies m_energyCalculator; - - ////$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$CalculatorBase - // Store the endcap shift and out-of-time cut from the description: - G4float m_OOTcut; - G4float m_zShift; - - // The results of the Process calculation: - G4double m_time; - G4bool m_isInTime; - - FCAL_ChannelMap *m_ChannelMap; - - }; - } // namespace FCAL - -} // namespace LArG4 - -#endif // LArG4_HEC_CalibrationCalculator_H diff --git a/LArCalorimeter/LArG4/LArG4FCAL/cmt/requirements b/LArCalorimeter/LArG4/LArG4FCAL/cmt/requirements index 8c14f98ab0fd0a37eaf730405fe5548a2e4b248b..96d72cd59584e8f3dc44ce0cfb82cea91ff332ee 100755 --- a/LArCalorimeter/LArG4/LArG4FCAL/cmt/requirements +++ b/LArCalorimeter/LArG4/LArG4FCAL/cmt/requirements @@ -9,26 +9,27 @@ author Mikhail Leltchouk <lelchuk@nevis.columbia.edu> # forward calorimeter (FCAL). use AtlasPolicy AtlasPolicy-* -use LArG4Code LArG4Code-* LArCalorimeter/LArG4 # The following lines assure us that the FCAL data files are loaded # into the InstallArea - and give us the tools to read them. -use LArReadoutGeometry LArReadoutGeometry-* LArCalorimeter/LArGeoModel -use CaloG4Sim CaloG4Sim-* Calorimeter # Build the library (and export the headers) -library LArG4FCAL *.cc +library LArG4FCAL *.cc -s=components *.cxx +apply_pattern declare_python_modules files="*.py" -apply_pattern installed_library +apply_pattern component_library private use AthenaKernel AthenaKernel-* Control use StoreGate StoreGate-* Control use Geant4 Geant4-* External use PathResolver PathResolver-* Tools -use LArG4RunControl LArG4RunControl-* LArCalorimeter/LArG4 +#use LArG4RunControl LArG4RunControl-* LArCalorimeter/LArG4 use GaudiInterface GaudiInterface-* External use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel use RDBAccessSvc RDBAccessSvc-* Database/AthenaPOOL +use LArReadoutGeometry LArReadoutGeometry-* LArCalorimeter/LArGeoModel +use CaloG4Sim CaloG4Sim-* Calorimeter +use LArG4Code LArG4Code-* LArCalorimeter/LArG4 diff --git a/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfig.py b/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..5fbb6d40e84b3eb167342311a7cb23b7a7dc726d --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfig.py @@ -0,0 +1,36 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon import CfgMgr +from AthenaCommon.SystemOfUnits import mm,deg +import math + +def getFCAL1Calculator(name="FCAL1Calculator", **kwargs): + kwargs.setdefault("FCALSampling",1); + return CfgMgr.LArFCALCalculatorBase(name, **kwargs) + +def getFCAL2Calculator(name="FCAL2Calculator", **kwargs): + kwargs.setdefault("FCALSampling",2); + return CfgMgr.LArFCALCalculatorBase(name, **kwargs) + +def getFCAL3Calculator(name="FCAL3Calculator", **kwargs): + kwargs.setdefault("FCALSampling",3); + return CfgMgr.LArFCALCalculatorBase(name, **kwargs) + +def getFCAL1CalibCalculator(name="FCAL1CalibCalculator", **kwargs): + kwargs.setdefault("FCALdeltaX",7.5*mm); + kwargs.setdefault("FCALdeltaY",7.5*mm*math.sin(60*deg)); + kwargs.setdefault("FCALSampling",1); + return CfgMgr.LArG4__FCAL__LArFCALCalibCalculatorBase(name, **kwargs) + +def getFCAL2CalibCalculator(name="FCAL2CalibCalculator", **kwargs): + kwargs.setdefault("FCALdeltaX",8.179*mm); + kwargs.setdefault("FCALdeltaY",8.179*mm*math.sin(60*deg)); + kwargs.setdefault("FCALSampling",2); + return CfgMgr.LArG4__FCAL__LArFCALCalibCalculatorBase(name, **kwargs) + +def getFCAL3CalibCalculator(name="FCAL3CalibCalculator", **kwargs): + kwargs.setdefault("FCALdeltaX",9.0*mm); + kwargs.setdefault("FCALdeltaY",9.0*mm*math.sin(60*deg)); + kwargs.setdefault("FCALSampling",3); + return CfgMgr.LArG4__FCAL__LArFCALCalibCalculatorBase(name, **kwargs) + diff --git a/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfigDb.py b/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfigDb.py new file mode 100644 index 0000000000000000000000000000000000000000..02c9f4a00b79b4cd054f5f26b621a38ea6cce911 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4FCAL/python/LArG4FCALConfigDb.py @@ -0,0 +1,10 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.CfgGetter import addService + +addService("LArG4FCAL.LArG4FCALConfig.getFCAL1Calculator","FCAL1Calculator") +addService("LArG4FCAL.LArG4FCALConfig.getFCAL2Calculator","FCAL2Calculator") +addService("LArG4FCAL.LArG4FCALConfig.getFCAL3Calculator","FCAL3Calculator") +addService("LArG4FCAL.LArG4FCALConfig.getFCAL1CalibCalculator","FCAL1CalibCalculator") +addService("LArG4FCAL.LArG4FCALConfig.getFCAL2CalibCalculator","FCAL2CalibCalculator") +addService("LArG4FCAL.LArG4FCALConfig.getFCAL3CalibCalculator","FCAL3CalibCalculator") diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL1Calculator.cc b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL1Calculator.cc deleted file mode 100755 index ab3e02007fe77d87a87c7273d487dd9098e53929..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL1Calculator.cc +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#include "LArG4FCAL/LArFCAL1Calculator.h" -#include "LArG4FCAL/LArFCALCalculatorBase.h" - -#include "globals.hh" - - -// Standard implementation of a singleton pattern. - -LArFCAL1Calculator* LArFCAL1Calculator::m_instance = 0; - -LArFCAL1Calculator* LArFCAL1Calculator::GetInstance() -{ - if (m_instance == 0) - { - m_instance = new LArFCAL1Calculator(); - } - return m_instance; -} - -// constructor -LArFCAL1Calculator::LArFCAL1Calculator() -{ - m_FCalSampling = 1; -} diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL1CalibCalculator.cc b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL1CalibCalculator.cc deleted file mode 100755 index 2197a8270f6640c7d1d4912cb8bade9293c2ee99..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL1CalibCalculator.cc +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#include "LArG4FCAL/LArFCAL1CalibCalculator.h" -#include "LArG4FCAL/LArFCALCalibCalculatorBase.h" - -#include "LArG4Code/LArG4Identifier.h" - -#include "G4Step.hh" -#include "globals.hh" - -#include <algorithm> - -namespace LArG4 { - - namespace FCAL { - - LArFCAL1CalibCalculator* LArFCAL1CalibCalculator::m_calculator = 0; - - LArFCAL1CalibCalculator* LArFCAL1CalibCalculator::GetCalculator() - - { - if (m_calculator == 0 ) - { - m_calculator = new LArFCAL1CalibCalculator(); - } - return m_calculator; - } - - LArFCAL1CalibCalculator::LArFCAL1CalibCalculator() - { - - m_deltaX = 7.5*CLHEP::mm; - m_deltaY = 7.5*CLHEP::mm*sin(60*CLHEP::deg); - - m_FCalSampling = 1; - } - LArFCAL1CalibCalculator::~LArFCAL1CalibCalculator(){} - } - -} diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL2Calculator.cc b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL2Calculator.cc deleted file mode 100755 index ff90ad0105c5ab94464dea91f4dfc30111a07c5f..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL2Calculator.cc +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#include "LArG4FCAL/LArFCAL2Calculator.h" -#include "LArG4FCAL/LArFCALCalculatorBase.h" - -#include "globals.hh" - - -// Standard implementation of a singleton pattern. - -LArFCAL2Calculator* LArFCAL2Calculator::m_instance = 0; - -LArFCAL2Calculator* LArFCAL2Calculator::GetInstance() -{ - if (m_instance == 0) - { - m_instance = new LArFCAL2Calculator(); - } - return m_instance; -} - -// constructor -LArFCAL2Calculator::LArFCAL2Calculator() -{ - m_FCalSampling = 2; -} diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL2CalibCalculator.cc b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL2CalibCalculator.cc deleted file mode 100755 index 51be8ed2b1e66c34a22875f06a1ccb429da7caa9..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL2CalibCalculator.cc +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#include "LArG4FCAL/LArFCAL2CalibCalculator.h" -#include "LArG4FCAL/LArFCALCalibCalculatorBase.h" - -#include "LArG4Code/LArG4Identifier.h" - -#include "G4Step.hh" -#include "globals.hh" - -#include <algorithm> - -namespace LArG4 { - - namespace FCAL { - - LArFCAL2CalibCalculator* LArFCAL2CalibCalculator::m_calculator = 0; - - LArFCAL2CalibCalculator* LArFCAL2CalibCalculator::GetCalculator() - - { - if (m_calculator == 0 ) - { - m_calculator = new LArFCAL2CalibCalculator(); - } - return m_calculator; - } - - LArFCAL2CalibCalculator::LArFCAL2CalibCalculator() - { - - m_deltaX = 8.179*CLHEP::mm; - m_deltaY = 8.179*CLHEP::mm*sin(60*CLHEP::deg); - - m_FCalSampling = 2; - } - LArFCAL2CalibCalculator::~LArFCAL2CalibCalculator(){} - } - -} diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL3Calculator.cc b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL3Calculator.cc deleted file mode 100755 index 99e43240b5b8b16bd7c78d8f53d06ec17969db45..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL3Calculator.cc +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#include "LArG4FCAL/LArFCAL3Calculator.h" -#include "LArG4FCAL/LArFCALCalculatorBase.h" - -#include "globals.hh" - - -// Standard implementation of a singleton pattern. - -LArFCAL3Calculator* LArFCAL3Calculator::m_instance = 0; - -LArFCAL3Calculator* LArFCAL3Calculator::GetInstance() -{ - if (m_instance == 0) - { - m_instance = new LArFCAL3Calculator(); - } - return m_instance; -} - - -// constructor -LArFCAL3Calculator::LArFCAL3Calculator() -{ - m_FCalSampling = 3; -} diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL3CalibCalculator.cc b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL3CalibCalculator.cc deleted file mode 100755 index 888ebb6ffbbb251194990d00527540840e50d0c3..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCAL3CalibCalculator.cc +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#include "LArG4FCAL/LArFCAL3CalibCalculator.h" -#include "LArG4FCAL/LArFCALCalibCalculatorBase.h" - -#include "LArG4Code/LArG4Identifier.h" - -#include "G4Step.hh" -#include "globals.hh" - -#include <algorithm> - -namespace LArG4 { - - namespace FCAL { - - LArFCAL3CalibCalculator* LArFCAL3CalibCalculator::m_calculator = 0; - - LArFCAL3CalibCalculator* LArFCAL3CalibCalculator::GetCalculator() - - { - if (m_calculator == 0 ) - { - m_calculator = new LArFCAL3CalibCalculator(); - } - return m_calculator; - } - - LArFCAL3CalibCalculator::LArFCAL3CalibCalculator() - { - - m_deltaX = 9.0*CLHEP::mm; - m_deltaY = 9.0*CLHEP::mm*sin(60*CLHEP::deg); - - m_FCalSampling = 3; - } - LArFCAL3CalibCalculator::~LArFCAL3CalibCalculator(){} - } - -} diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalculatorBase.cc b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalculatorBase.cc old mode 100755 new mode 100644 index 0cf08b5da3df2558efcfd89f35161202e15d4401..b593f6262869bef813e0dec70d3ff3fa6508505e --- a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalculatorBase.cc +++ b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalculatorBase.cc @@ -8,12 +8,12 @@ // //---------------------------------------------------------------------------- -#include "LArG4FCAL/LArFCALCalculatorBase.h" +#include "LArFCALCalculatorBase.h" #include "LArG4Code/LArG4Identifier.h" #include "LArG4Code/LArG4BirksLaw.h" #include "StoreGate/StoreGate.h" -#include "LArG4RunControl/LArG4FCALOptions.h" +//#include "LArG4RunControl/LArG4FCALOptions.h" // Geant4 includes #include "G4LogicalVolume.hh" #include "G4VPhysicalVolume.hh" @@ -33,56 +33,57 @@ namespace Units = Athena::Units; // // constructor // -LArFCALCalculatorBase::LArFCALCalculatorBase() - : m_OOTcut(2.5*CLHEP::ns),m_posModule(NULL),m_negModule(NULL), m_FCalSampling(0), m_birksLaw(NULL) +LArFCALCalculatorBase::LArFCALCalculatorBase(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalculatorSvcImp(name, pSvcLocator) + , m_doHV(false) + , m_ChannelMap(nullptr) + , m_posModule(nullptr) + , m_negModule(nullptr) + , m_FCalSampling(0) + , m_birksLaw(nullptr) { - //m_identifier = LArG4Identifier(); - - //m_time = 0.; - //m_energy = 0.; - m_isInTime = false; + declareProperty("FCALHVEnable",m_doHV); + declareProperty("FCALSampling",m_FCalSampling); + //m_FCalSampling.verifier().setUpper(3); //Would need to make m_FCalSampling an IntegerProperty for this to work. Overkill? +} +StatusCode LArFCALCalculatorBase::initialize() +{ + m_OOTcut = (2.5*CLHEP::ns); //FIXME should be done via configurable property - LArG4FCALOptions *fcalOptions=NULL; StoreGateSvc *detStore = StoreGate::pointer("DetectorStore"); if (detStore->retrieve(m_ChannelMap)==StatusCode::FAILURE) { } - if (detStore->retrieve(fcalOptions, "LArG4FCALOptions")==StatusCode::FAILURE) { + if (m_BirksLaw) { + const double Birks_LAr_density = 1.396; + m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,m_Birksk); } + if(m_doHV) { - if (fcalOptions) { - if (fcalOptions->FCALBirksLaw()) { - const double Birks_LAr_density = 1.396; - const double Birks_k = fcalOptions->FCALBirksk(); - m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,Birks_k); + const LArDetectorManager *manager=nullptr; + if (detStore->retrieve(manager)!=StatusCode::SUCCESS) { + throw std::runtime_error("Cannot locate FCAL Manager"); } - - if (fcalOptions->FCALHVEnable()) { - const LArDetectorManager *manager=NULL; - if (detStore->retrieve(manager)!=StatusCode::SUCCESS) { - throw std::runtime_error("Cannot locate FCAL Manager"); - } - else { - const FCALDetectorManager* fcalManager=manager->getFcalManager(); - m_posModule = fcalManager->getFCAL(FCALModule::Module(m_FCalSampling),FCALModule::POS); - m_negModule = fcalManager->getFCAL(FCALModule::Module(m_FCalSampling),FCALModule::NEG); - } + else { + const FCALDetectorManager* fcalManager=manager->getFcalManager(); + m_posModule = fcalManager->getFCAL(FCALModule::Module(m_FCalSampling),FCALModule::POS); + m_negModule = fcalManager->getFCAL(FCALModule::Module(m_FCalSampling),FCALModule::NEG); } } + return StatusCode::SUCCESS; } // // destructor // -LArFCALCalculatorBase::~LArFCALCalculatorBase() -{ - delete m_birksLaw; +StatusCode LArFCALCalculatorBase::finalize() +{ + if(m_birksLaw) delete m_birksLaw; + return StatusCode::SUCCESS; } - - -G4bool LArFCALCalculatorBase::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) +G4bool LArFCALCalculatorBase::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) const { // Given a G4Step, determine the cell identifier. @@ -91,7 +92,7 @@ G4bool LArFCALCalculatorBase::Process(const G4Step* a_step, std::vector<LArHitDa // with the hit and it should be ignored. // make sure hdata is reset - hdata.resize(1); + hdata.resize(1); // First, get the energy. hdata[0].energy = a_step->GetTotalEnergyDeposit(); @@ -109,17 +110,13 @@ G4bool LArFCALCalculatorBase::Process(const G4Step* a_step, std::vector<LArHitDa // Determine if the hit was in-time. - hdata[0].time = timeOfFlight/Units::ns - p.mag()/Units::c_light/Units::ns; - if (hdata[0].time > m_OOTcut) - m_isInTime = false; - else - m_isInTime = true; + hdata[0].time = (timeOfFlight - p.mag()/CLHEP::c_light)/Units::ns; // zSide is negative if z<0. G4int zSide = 2; if (p.z() < 0.) zSide = -zSide; - + // Get the physical volume associated with this G4Step. G4VPhysicalVolume* thisPV = a_step->GetPreStepPoint()->GetPhysicalVolume(); //a_step->GetTrack()->GetVolume(); G4int sampling = m_FCalSampling; @@ -138,35 +135,34 @@ G4bool LArFCALCalculatorBase::Process(const G4Step* a_step, std::vector<LArHitDa const FCALTile *tile = fcalMod->getTile(phiIndex, etaIndex); for (unsigned int i=0;i<tile->getNumTubes();i++) { - FCALTubeConstLink tube=tile->getTube(i); - if (tube->getXLocal() == (*t).second.x() && tube->getYLocal()==(*t).second.y()) { - FCALHVLineConstLink line =tube->getHVLine(); - if (line) { - double voltage = line->voltage(); - //double current = line->current(); - bool hvOn = line->hvOn(); - if (!hvOn) hdata[0].energy=0.0; - hdata[0].energy *= pow((voltage)/2000.0,0.6); - tubeFound=true; - break; - } - } + FCALTubeConstLink tube=tile->getTube(i); + if (tube->getXLocal() == (*t).second.x() && tube->getYLocal()==(*t).second.y()) { + FCALHVLineConstLink line =tube->getHVLine(); + if (line) { + double voltage = line->voltage(); + //double current = line->current(); + bool hvOn = line->hvOn(); + if (!hvOn) hdata[0].energy=0.0; + hdata[0].energy *= pow((voltage)/2000.0,0.6); + tubeFound=true; + break; + } + } } - if (!tubeFound) throw std::runtime_error("FCAL Tube not found (for HV calculation)"); + if (!tubeFound) throw std::runtime_error("FCAL Tube not found (for HV calculation)"); } - + } hdata[0].id.clear(); // Append the values to the empty identifier. hdata[0].id << 4 // LArCalorimeter - << 3 // LArFCAL - << zSide // EndCap - << sampling // FCal Module # - << etaIndex - << phiIndex; + << 3 // LArFCAL + << zSide // EndCap + << sampling // FCal Module # + << etaIndex + << phiIndex; return true; } - diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalculatorBase.h b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalculatorBase.h new file mode 100644 index 0000000000000000000000000000000000000000..f57ee3a9401db971a763416d0f93979fdd42ef03 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalculatorBase.h @@ -0,0 +1,68 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// LArFCALCalculator +// 20-Feb-2003 Bill Seligman (from Peter Loch) + +// A base class for the calculators required for the individual +// modules. + +#ifndef LArFCALCalculatorBase_H +#define LArFCALCalculatorBase_H + +//----------------------------------------------------------------------------- +// +// Forward Calorimeter Construction in GEANT4 +// +//----------------------------------------------------------------------------- +#include "LArG4Code/LArG4Identifier.h" +#include "LArG4Code/LArCalculatorSvcImp.h" +#include "LArReadoutGeometry/FCAL_ChannelMap.h" +#include "globals.hh" +#include <stdexcept> +class LArG4BirksLaw; +class FCALModule; + +class LArFCALCalculatorBase : public LArCalculatorSvcImp +{ + public: + // constructor + LArFCALCalculatorBase(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize(); + StatusCode finalize(); + + ///////////////////////////////////////////// + + virtual G4float OOTcut() const override final { return m_OOTcut; } + + virtual G4bool Process(const G4Step*, std::vector<LArHitData>&) const override final; + + // Check if the current hitTime is in-time + virtual G4bool isInTime(G4double hitTime) const override final + { + return !(hitTime > m_OOTcut); //FIXME should we be checking the absolute value of hitTime here? + } + + ///////////////////////////////////////////// + + + protected: + + // Store the endcap shift and out-of-time cut from the description: + G4float m_OOTcut; + + bool m_doHV; + + FCAL_ChannelMap *m_ChannelMap; + const FCALModule *m_posModule; // for hv access here... + const FCALModule *m_negModule; // for hv access here... + // sampling + G4int m_FCalSampling; + LArG4BirksLaw *m_birksLaw; + + LArFCALCalculatorBase (const LArFCALCalculatorBase&); + LArFCALCalculatorBase operator= (const LArFCALCalculatorBase&); +}; + +#endif // LArFCALCalculatorBase_H diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalibCalculatorBase.cc b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalibCalculatorBase.cc old mode 100755 new mode 100644 index d06d3f5f97dc15083a5e11fc37e0f185a1a79b82..e2d70928cbacc4934dcbee6ea22a0b3937f01652 --- a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalibCalculatorBase.cc +++ b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalibCalculatorBase.cc @@ -2,7 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ - //----------------------------------------------------------------------------- // // Base class describing common behaviour in FCal G4 calculator. @@ -10,12 +9,13 @@ //---------------------------------------------------------------------------- // ATLAS LAr includes -#include "LArG4FCAL/LArFCALCalibCalculatorBase.h" -#include "LArG4FCAL/LArFCALCalculatorBase.h" +#include "LArFCALCalibCalculatorBase.h" +#include "LArFCALCalculatorBase.h" #include "LArG4Code/LArG4Identifier.h" //#include "LArG4Code/SimulationEnergies.h" #include "CaloG4Sim/SimulationEnergies.h" +#include "LArReadoutGeometry/FCAL_ChannelMap.h" // For reading the data files in Athena. #ifndef LARG4_STAND_ALONE @@ -63,11 +63,21 @@ namespace LArG4 { namespace FCAL { - LArFCALCalibCalculatorBase::LArFCALCalibCalculatorBase() - : m_deltaX(0), m_deltaY(0), m_FCalSampling(0), m_identifier(LArG4Identifier()), m_OOTcut(0), m_zShift(0.), - m_time(0), m_isInTime(0), - m_ChannelMap(nullptr) - { + LArFCALCalibCalculatorBase::LArFCALCalibCalculatorBase(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_deltaX(0.) + , m_deltaY(0.) + , m_FCalSampling(0) + , m_zShift(0.) + , m_ChannelMap(nullptr) + { + declareProperty("FCALdeltaX",m_deltaX); + declareProperty("FCALdeltaY",m_deltaY); + declareProperty("FCALSampling",m_FCalSampling); + //m_FCalSampling.verifier().setUpper(3); //Would need to make m_FCalSampling an IntegerProperty for this to work. Overkill? + } + + StatusCode LArFCALCalibCalculatorBase::initialize() { // Initialize the energy calculators. // m_electrode.GetElectrodes(); //// m_ElectrodeFile = "FCal1-electrodes.sorted.dat"; @@ -75,24 +85,24 @@ namespace LArG4 { ////m_deltaY=7.5*sin(60.0); StoreGateSvc *detStore = StoreGate::pointer("DetectorStore"); - if (detStore->retrieve(m_ChannelMap)==StatusCode::FAILURE) - throw std::runtime_error ("LArFCALCalibCalculatorBase ERROR: Cannot retrieve FCAL Channel Map!"); + if (detStore->retrieve(m_ChannelMap)==StatusCode::FAILURE) + throw std::runtime_error ("LArFCALCalibCalculatorBase ERROR: Cannot retrieve FCAL Channel Map!"); // get GeoModelSvc & RDBAccessSvc ISvcLocator *svcLocator = Gaudi::svcLocator(); IGeoModelSvc *geoModel(0); StatusCode status = svcLocator->service ("GeoModelSvc",geoModel); - if (status != StatusCode::SUCCESS) - throw std::runtime_error ("LArFCALCalibCalculatorBase ERROR: Cannot locate GeoModelSvc!"); - + if (status != StatusCode::SUCCESS) + throw std::runtime_error ("LArFCALCalibCalculatorBase ERROR: Cannot locate GeoModelSvc!"); + // Access the geometry database: IRDBAccessSvc *pAccessSvc(0); status=svcLocator->service("RDBAccessSvc",pAccessSvc); - if (status != StatusCode::SUCCESS) - throw std::runtime_error ("LArFCALCalibCalculatorBase ERROR: Cannot locate RDBAccessSvc!"); + if (status != StatusCode::SUCCESS) + throw std::runtime_error ("LArFCALCalibCalculatorBase ERROR: Cannot locate RDBAccessSvc!"); // Obtain the geometry version information: - + std::string AtlasVersion = geoModel->atlasVersion(); std::string LArVersion = geoModel->LAr_VersionOverride(); @@ -101,37 +111,29 @@ namespace LArG4 { pAccessSvc->connect(); IRDBRecordset_ptr emecGeoPtr = pAccessSvc->getRecordsetPtr("EmecGeometry",detectorKey,detectorNode); - if (emecGeoPtr->size()==0) - throw std::runtime_error ("LArFCALCalibCalculatorBase ERROR: Cannot find the EmecGeometry Table"); - + if (emecGeoPtr->size()==0) + throw std::runtime_error ("LArFCALCalibCalculatorBase ERROR: Cannot find the EmecGeometry Table"); + m_zShift = (*emecGeoPtr)[0]->getDouble("ZSHIFT")*CLHEP::cm; pAccessSvc->disconnect(); + return StatusCode::SUCCESS; } -// -// destructor -// - LArFCALCalibCalculatorBase::~LArFCALCalibCalculatorBase() - { - } - - - G4bool LArFCALCalibCalculatorBase::Process(const G4Step* a_step, - const eCalculatorProcessing a_process) + G4bool LArFCALCalibCalculatorBase::Process(const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process) const { // First, get the energy. - - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) + if ( process == kEnergyAndID || process == kOnlyEnergy ) { - m_energyCalculator.Energies( a_step, m_energies ); + m_energyCalculator.Energies( step, energies ); } else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); // find the space point for this deposit - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - G4StepPoint* post_step_point = a_step->GetPostStepPoint(); + G4StepPoint* pre_step_point = step->GetPreStepPoint(); + G4StepPoint* post_step_point = step->GetPostStepPoint(); G4ThreeVector startPoint = pre_step_point->GetPosition(); G4ThreeVector endPoint = post_step_point->GetPosition(); G4ThreeVector p = (startPoint + endPoint) * 0.5; @@ -143,22 +145,22 @@ namespace LArG4 { // instead ... // S.M. // get LOCAL (u,v) coordinates! - // S.M. G4Navigator* theNavigator = - // S.M. G4TransportationManager::GetTransportationManager()-> - // S.M. GetNavigatorForTracking(); + // S.M. G4Navigator* theNavigator = + // S.M. G4TransportationManager::GetTransportationManager()-> + // S.M. GetNavigatorForTracking(); // S.M. G4ThreeVector theLocalPoint = theNavigator-> - // S.M. GetGlobalToLocalTransform(). - // S.M. TransformPoint(p); - + // S.M. GetGlobalToLocalTransform(). + // S.M. TransformPoint(p); + G4ThreeVector theLocalPoint(p); // we've shifted the endcap, we have to project the geometry to a // different point). G4double pointZ = p.z(); - + G4double pointZshift = pointZ - copysign(m_zShift,pointZ); - + G4ThreeVector pointShift(p.x(), p.y(), pointZshift); @@ -167,137 +169,131 @@ namespace LArG4 { float x = theLocalPoint.x(),y=theLocalPoint.y(); int sampling = m_FCalSampling; bool ok = m_ChannelMap->getTileID(sampling, - x, - y, - etaIndex, - phiIndex); + x, + y, + etaIndex, + phiIndex); + - // zSide is negative if z<0. G4int zSide = 2; if (pointZshift < 0.) zSide = -zSide; - - m_identifier.clear(); - if (ok) { - // we have a active or non-active hit inside the FCal - G4int sampling = m_FCalSampling; - - - // Append the values to the empty identifier. - m_identifier << 4 // LArCalorimeter - << 3 // LArFCAL - << zSide // EndCap - << sampling // FCal Module # - << etaIndex - << phiIndex; - -// std::cout << "LArG4FCAL/LArFCALCalibCalculatorBase: 4/3/" -// <<zSide<<"/" -// <<sampling<<"/" -// <<etaIndex<<"/" -// <<phiIndex<<": " -// << m_energies[0] << ", " -// << m_energies[1] << ", " -// << m_energies[2] << ", " -// << m_energies[3] -// << ", i=" << i -// << ", j=" << j -// << ", l.x=" << theLocalPoint.x() -// << ", l.y=" << theLocalPoint.y() -// << ", p.x=" << p.x() -// << ", p.y=" << p.y() -// << ", deltaX=" << m_deltaX -// << ", deltaY=" << m_deltaY -// << std::endl; + + identifier.clear(); + if (ok) { + // we have a active or non-active hit inside the FCal + G4int sampling = m_FCalSampling; + + + // Append the values to the empty identifier. + identifier << 4 // LArCalorimeter + << 3 // LArFCAL + << zSide // EndCap + << sampling // FCal Module # + << etaIndex + << phiIndex; + + // std::cout << "LArG4FCAL/LArFCALCalibCalculatorBase: 4/3/" + // <<zSide<<"/" + // <<sampling<<"/" + // <<etaIndex<<"/" + // <<phiIndex<<": " + // << energies[0] << ", " + // << energies[1] << ", " + // << energies[2] << ", " + // << energies[3] + // << ", i=" << i + // << ", j=" << j + // << ", l.x=" << theLocalPoint.x() + // << ", l.y=" << theLocalPoint.y() + // << ", p.x=" << p.x() + // << ", p.y=" << p.y() + // << ", deltaX=" << m_deltaX + // << ", deltaY=" << m_deltaY + // << std::endl; } else { - // S.M.: we have a hit which fails the electrode identifier - // calculation. It's likely just a the border of the FCAL - // (outer or inner) and not really dead material ... Lacking a - // better method of assigning it to a correct cell I make a - // dead material identifier for it ... - G4int sampling(3); // FCAL leakage - G4int type(1); // FCAL leakage - G4double eta = fabs( pointShift.pseudoRapidity() ); - G4double phi = pointShift.phi(); + // S.M.: we have a hit which fails the electrode identifier + // calculation. It's likely just a the border of the FCAL + // (outer or inner) and not really dead material ... Lacking a + // better method of assigning it to a correct cell I make a + // dead material identifier for it ... + G4int sampling(3); // FCAL leakage + G4int type(1); // FCAL leakage + G4double eta = fabs( pointShift.pseudoRapidity() ); + G4double phi = pointShift.phi(); G4double rho = pointShift.perp(); // since the outer edge of the FCal has a irregular shape we // take the innermost position of the outermost tubes as min // radius - this is about 3 cm from the outermost tube // position ... const G4double fcal_edge_approx = 415.0*CLHEP::mm; - G4int subdet; // LAr - if ( pointZshift < 0. ) - subdet = -4; - else - subdet = 4; - if (phi < 0) phi += 2*M_PI; - G4int etaIndex; - G4int phiIndex; - G4int region; - if ( eta < 5 ) { - if(rho > fcal_edge_approx) { - type = 2; - sampling = m_FCalSampling; - region = 4; - etaIndex = 0; - phiIndex = G4int(phi*(32/M_PI)); - } else { - region = 0; - etaIndex = G4int((eta-1.7)/0.1); - phiIndex = G4int(phi*(32/M_PI)); + G4int subdet; // LAr + if ( pointZshift < 0. ) + subdet = -4; + else + subdet = 4; + if (phi < 0) phi += 2*M_PI; + G4int etaIndex; + G4int phiIndex; + G4int region; + if ( eta < 5 ) { + if(rho > fcal_edge_approx) { + type = 2; + sampling = m_FCalSampling; + region = 4; + etaIndex = 0; + phiIndex = G4int(phi*(32/M_PI)); + } else { + region = 0; + etaIndex = G4int((eta-1.7)/0.1); + phiIndex = G4int(phi*(32/M_PI)); + } + } + else if ( eta < 8 ) { + region = 1; + etaIndex = G4int((eta-5)/0.2); + phiIndex = G4int(phi*(32/M_PI)); } - } - else if ( eta < 8 ) { - region = 1; - etaIndex = G4int((eta-5)/0.2); - phiIndex = G4int(phi*(32/M_PI)); - } - else { - region = 2; - etaIndex = 0; - phiIndex = 0; - } - - // Append the values to the empty identifier. - m_identifier << 10 // Calorimeter Dead Material - << subdet // LAr - << type - << sampling - << region - << etaIndex - << phiIndex; - -// std::cout << "LArG4FCAL/LArFCALCalibCalculatorBase: 10/4/" -// <<type<<"/" -// <<sampling<<"/" -// <<region<<"/" -// <<etaIndex<<"/" -// <<phiIndex<<": " -// << m_energies[0] << ", " -// << m_energies[1] << ", " -// << m_energies[2] << ", " -// << m_energies[3] -// << ", i=" << i -// << ", j=" << j -// << ", l.x=" << theLocalPoint.x() -// << ", l.y=" << theLocalPoint.y() -// << ", p.x=" << p.x() -// << ", p.y=" << p.y() -// << ", deltaX=" << m_deltaX -// << ", deltaY=" << m_deltaY -// << std::endl; + else { + region = 2; + etaIndex = 0; + phiIndex = 0; + } + + // Append the values to the empty identifier. + identifier << 10 // Calorimeter Dead Material + << subdet // LAr + << type + << sampling + << region + << etaIndex + << phiIndex; + + // std::cout << "LArG4FCAL/LArFCALCalibCalculatorBase: 10/4/" + // <<type<<"/" + // <<sampling<<"/" + // <<region<<"/" + // <<etaIndex<<"/" + // <<phiIndex<<": " + // << energies[0] << ", " + // << energies[1] << ", " + // << energies[2] << ", " + // << energies[3] + // << ", i=" << i + // << ", j=" << j + // << ", l.x=" << theLocalPoint.x() + // << ", l.y=" << theLocalPoint.y() + // << ", p.x=" << p.x() + // << ", p.y=" << p.y() + // << ", deltaX=" << m_deltaX + // << ", deltaY=" << m_deltaY + // << std::endl; } - + return true; } } // namespace FCAL - -} // namespace LArG4 - - - - - +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalibCalculatorBase.h b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalibCalculatorBase.h new file mode 100644 index 0000000000000000000000000000000000000000..43420b7dfd90b4ce6f241f92f26b2506b3b57f9c --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalibCalculatorBase.h @@ -0,0 +1,87 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// LArG4::FCAL::LArFCALCalibCalculator +// Prepared Oct./2004 Mohsen Khakzad + +// This class calculates the values needed for calibration hits in the +// simulation. + +// A "calculator" is used in much the same way as a hand-held +// calculator might be. The user supplies a value and hits 'Enter' +// Forward declaractions: +// (i.e., invokes the Process() method). Then they read off whatever +// values are of interest. + +#ifndef LArFCALCalibCalculatorBase_H +#define LArFCALCalibCalculatorBase_H + +#include "LArG4Code/LArCalibCalculatorSvcImp.h" +#include "LArG4Code/LArG4Identifier.h" + +//#include "LArG4FCAL/LArFCALCalculatorBase.h" + +#include "CaloG4Sim/SimulationEnergies.h" + +#include "globals.hh" +#include <vector> +// Forward declaration for namespace CaloG4. +class G4Step; +class FCAL_ChannelMap; + +namespace LArG4 { + + namespace FCAL { + + class LArFCALCalibCalculatorBase : public LArCalibCalculatorSvcImp { + public: + LArFCALCalibCalculatorBase(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize(); + StatusCode finalize() {return StatusCode::SUCCESS;} + virtual ~LArFCALCalibCalculatorBase(){}; + + + // The Process method returns a boolean value. If it's true, the + // hit can be used by Geant4; if it's false, there's something wrong + // with the energy deposit and it should be ignored. + + // For calibration work, most of the time we want the calculator + // to determine both the energy and the identifier. However, + // sometimes we want it calculate only the identifier (for + // escaped energy), or only the energy (no known application + // yet, but you can never tell). Use the enum (defined in + // VCalibrationCalculator.h) to control any special processing. + + + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process = kEnergyAndID) const override final; + + ///////////////////////////////////////////// + + virtual G4double GetdeltaX(){return m_deltaX;} //FIXME public but not part of interface class + virtual G4double GetdeltaY(){return m_deltaY;} //FIXME public but not part of interface class + + protected: + + G4double m_deltaX; + G4double m_deltaY; + + G4int m_FCalSampling; + + private: + + // Energy calculator + CaloG4::SimulationEnergies m_energyCalculator; + + G4float m_zShift; + + FCAL_ChannelMap *m_ChannelMap; + + }; + } // namespace FCAL + +} // namespace LArG4 + +#endif // LArG4_HEC_CalibrationCalculator_H diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/components/LArG4FCAL_entries.cxx b/LArCalorimeter/LArG4/LArG4FCAL/src/components/LArG4FCAL_entries.cxx new file mode 100644 index 0000000000000000000000000000000000000000..935550b81f097ffb2f292bc869c40e212700182b --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4FCAL/src/components/LArG4FCAL_entries.cxx @@ -0,0 +1,7 @@ +#include "GaudiKernel/DeclareFactoryEntries.h" + +#include "../LArFCALCalculatorBase.h" +#include "../LArFCALCalibCalculatorBase.h" + +DECLARE_SERVICE_FACTORY(LArG4::FCAL::LArFCALCalibCalculatorBase) +DECLARE_SERVICE_FACTORY(LArFCALCalculatorBase) diff --git a/LArCalorimeter/LArG4/LArG4FastSimulation/src/EndcapFastSimDedicatedSD.cxx b/LArCalorimeter/LArG4/LArG4FastSimulation/src/EndcapFastSimDedicatedSD.cxx index e1001702ad3135c5975fffb2ced98e34edeb8d4e..4b8f0082eb02638ff1765755c58d3a26360f57f7 100644 --- a/LArCalorimeter/LArG4/LArG4FastSimulation/src/EndcapFastSimDedicatedSD.cxx +++ b/LArCalorimeter/LArG4/LArG4FastSimulation/src/EndcapFastSimDedicatedSD.cxx @@ -28,10 +28,10 @@ EndcapFastSimDedicatedSD::EndcapFastSimDedicatedSD(StoreGateSvc* detStore) if ( detStore->retrieve( m_emecManager ).isFailure() ){ throw std::runtime_error("Could not retrieve EMEC manager"); } - m_innerWheelCalculatorPos = new LArWheelCalculator(LArWheelCalculator::InnerAbsorberWheel,+1); - m_innerWheelCalculatorNeg = new LArWheelCalculator(LArWheelCalculator::InnerAbsorberWheel,-1); - m_outerWheelCalculatorPos = new LArWheelCalculator(LArWheelCalculator::OuterAbsorberWheel,+1); - m_outerWheelCalculatorNeg = new LArWheelCalculator(LArWheelCalculator::OuterAbsorberWheel,-1); + m_innerWheelCalculatorPos = new LArWheelCalculator(LArG4::InnerAbsorberWheel,+1); + m_innerWheelCalculatorNeg = new LArWheelCalculator(LArG4::InnerAbsorberWheel,-1); + m_outerWheelCalculatorPos = new LArWheelCalculator(LArG4::OuterAbsorberWheel,+1); + m_outerWheelCalculatorNeg = new LArWheelCalculator(LArG4::OuterAbsorberWheel,-1); } // ProcessHitsMethod diff --git a/LArCalorimeter/LArG4/LArG4GenShowerLib/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4GenShowerLib/CMakeLists.txt index 617f8fdde3b3e958cc6c40e1e7ba1d030c348345..f53dd2f0efc4578e8b6580d2ef756355cf96bdc2 100644 --- a/LArCalorimeter/LArG4/LArG4GenShowerLib/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4GenShowerLib/CMakeLists.txt @@ -15,16 +15,12 @@ atlas_depends_on_subdirs( PUBLIC GaudiKernel Simulation/G4Atlas/G4AtlasTools Simulation/G4Atlas/G4AtlasInterfaces + LArCalorimeter/LArG4/LArG4Code PRIVATE Control/CxxUtils DetectorDescription/GeoModel/GeoModelInterfaces Event/EventInfo Generators/GeneratorObjects - LArCalorimeter/LArG4/LArG4Barrel - LArCalorimeter/LArG4/LArG4Code - LArCalorimeter/LArG4/LArG4EC - LArCalorimeter/LArG4/LArG4FCAL - LArCalorimeter/LArG4/LArG4HEC LArCalorimeter/LArG4/LArG4ShowerLib ) # External dependencies: @@ -40,18 +36,18 @@ atlas_add_library( LArG4GenShowerLibLib PRIVATE_INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES AthenaBaseComps DataModel SGTools GaudiKernel G4AtlasToolsLib - PRIVATE_LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} EventInfo GeneratorObjects LArG4Barrel LArG4Code LArG4EC LArG4FCAL LArG4HEC LArG4ShowerLib ) + PRIVATE_LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} EventInfo GeneratorObjects LArG4Code LArG4ShowerLib ) atlas_add_component( LArG4GenShowerLib src/components/*.cxx INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps DataModel SGTools GaudiKernel G4AtlasToolsLib EventInfo GeneratorObjects LArG4Barrel LArG4Code LArG4EC LArG4FCAL LArG4HEC LArG4ShowerLib LArG4GenShowerLibLib ) + LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps DataModel SGTools GaudiKernel G4AtlasToolsLib EventInfo GeneratorObjects LArG4Code LArG4ShowerLib LArG4GenShowerLibLib ) atlas_add_dictionary( LArG4GenShowerLibDict LArG4GenShowerLib/LArG4GenShowerLibDict.h LArG4GenShowerLib/selection.xml INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps DataModel SGTools GaudiKernel G4AtlasToolsLib EventInfo GeneratorObjects LArG4Barrel LArG4Code LArG4EC LArG4FCAL LArG4HEC LArG4ShowerLib LArG4GenShowerLibLib ) + LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps DataModel SGTools GaudiKernel G4AtlasToolsLib EventInfo GeneratorObjects LArG4Code LArG4ShowerLib LArG4GenShowerLibLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/LArCalorimeter/LArG4/LArG4GenShowerLib/LArG4GenShowerLib/TestActionShowerLib.h b/LArCalorimeter/LArG4/LArG4GenShowerLib/LArG4GenShowerLib/TestActionShowerLib.h index 7e825fe1133dc84b9355384b78564cc9c40998d2..d27644445ae2e086e6f4077f91468854f6e9174c 100755 --- a/LArCalorimeter/LArG4/LArG4GenShowerLib/LArG4GenShowerLib/TestActionShowerLib.h +++ b/LArCalorimeter/LArG4/LArG4GenShowerLib/LArG4GenShowerLib/TestActionShowerLib.h @@ -2,7 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ - #ifndef TestActionShowerLib_H #define TestActionShowerLib_H @@ -20,7 +19,7 @@ namespace HepMC { } // forward declarations in global namespace //class StoreGateSvc; -class LArVCalculator; +class EnergyCalculator; class G4VSolid; class G4AffineTransform; @@ -35,7 +34,7 @@ class G4AffineTransform; * @author Wolfgang Ehrenfeld, University of Hamburg, Germany * @author Sasha Glazov, DESY Hamburg, Germany * - * @version \$Id: TestActionShowerLib.h 767177 2016-08-10 08:49:45Z disimone $ + * @version \$Id: TestActionShowerLib.h 780759 2016-10-27 13:48:04Z pavol $ * */ @@ -46,6 +45,8 @@ class G4AffineTransform; #include "G4AtlasInterfaces/IEndRunAction.h" #include "G4AtlasInterfaces/ISteppingAction.h" +#include "LArG4Code/ILArCalculatorSvc.h" + #include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/ServiceHandle.h" namespace G4UA{ @@ -72,14 +73,17 @@ namespace G4UA{ /* data members */ - LArVCalculator* m_current_calculator; + ServiceHandle<ILArCalculatorSvc> m_current_calculator; G4VSolid* m_current_solid; G4AffineTransform* m_current_transform; // calculators - LArVCalculator* m_calculator_EMECIW; //!< pointer to EMEC inner wheel calculator - LArVCalculator* m_calculator_EMECOW; //!< pointer to EMEC outer wheel calculator - + ServiceHandle<ILArCalculatorSvc> m_calculator_EMECIW; //!< pointer to EMEC inner wheel calculator + ServiceHandle<ILArCalculatorSvc> m_calculator_EMECOW; //!< pointer to EMEC outer wheel calculator + ServiceHandle<ILArCalculatorSvc> m_calculator_FCAL1; + ServiceHandle<ILArCalculatorSvc> m_calculator_FCAL2; + ServiceHandle<ILArCalculatorSvc> m_calculator_FCAL3; + ServiceHandle<ILArCalculatorSvc> m_calculator_EMB; ShowerLib::StepInfoCollection* m_eventSteps; //!< collection of StepInfo diff --git a/LArCalorimeter/LArG4/LArG4GenShowerLib/cmt/requirements b/LArCalorimeter/LArG4/LArG4GenShowerLib/cmt/requirements index 7f2d87038e80bf5b4082761595d5019f7ca766fb..9cb471e7099178405600d940fc2d122538d00f57 100755 --- a/LArCalorimeter/LArG4/LArG4GenShowerLib/cmt/requirements +++ b/LArCalorimeter/LArG4/LArG4GenShowerLib/cmt/requirements @@ -13,6 +13,7 @@ use GaudiInterface GaudiInterface-* External use G4AtlasInterfaces G4AtlasInterfaces-* Simulation/G4Atlas use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas use StoreGate StoreGate-* Control +use LArG4Code LArG4Code-* LArCalorimeter/LArG4 private use AtlasROOT AtlasROOT-* External @@ -21,11 +22,6 @@ use EventInfo EventInfo-* Event use Geant4 Geant4-* External use GeneratorObjects GeneratorObjects-* Generators use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel -use LArG4Barrel LArG4Barrel-* LArCalorimeter/LArG4 -use LArG4Code LArG4Code-* LArCalorimeter/LArG4 -use LArG4EC LArG4EC-* LArCalorimeter/LArG4 -use LArG4FCAL LArG4FCAL-* LArCalorimeter/LArG4 -use LArG4HEC LArG4HEC-* LArCalorimeter/LArG4 use LArG4ShowerLib LArG4ShowerLib-* LArCalorimeter/LArG4 end_private diff --git a/LArCalorimeter/LArG4/LArG4GenShowerLib/src/TestActionShowerLib.cxx b/LArCalorimeter/LArG4/LArG4GenShowerLib/src/TestActionShowerLib.cxx index 10127dee4744ddde97bd75acc2c5db0b997234f7..795d42758a0af15466a503a21e4871573481b27a 100755 --- a/LArCalorimeter/LArG4/LArG4GenShowerLib/src/TestActionShowerLib.cxx +++ b/LArCalorimeter/LArG4/LArG4GenShowerLib/src/TestActionShowerLib.cxx @@ -2,7 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ - #include "LArG4GenShowerLib/TestActionShowerLib.h" #include <stdexcept> @@ -16,16 +15,6 @@ #include "G4EventManager.hh" #include "G4ThreeVector.hh" -// all the LAr calculators -#include "LArG4Code/LArVCalculator.h" -#include "LArG4Barrel/LArBarrelCalculator.h" -#include "LArG4EC/EnergyCalculator.h" -#include "LArG4FCAL/LArFCAL1Calculator.h" -#include "LArG4FCAL/LArFCAL2Calculator.h" -#include "LArG4FCAL/LArFCAL3Calculator.h" -#include "LArG4HEC/LArHECCalculator.h" -#include "LArG4HEC/LArHECLocalCalculator.h" - #include "LArG4GenShowerLib/StepInfo.h" #include "LArG4GenShowerLib/StepInfoCollection.h" @@ -35,17 +24,27 @@ namespace G4UA{ - TestActionShowerLib::TestActionShowerLib(): m_evtStore("StoreGateSvc/StoreGateSvc","TestActionShowerLib"), m_detStore("StoreGateSvc/DetectorStore","TestActionShowerLib"), - m_current_calculator(0), - m_current_solid(0), - m_current_transform(0), - m_calculator_EMECIW(0), - m_calculator_EMECOW(0), - m_eventSteps(0) + m_current_calculator("","TestActionShowerLib"), + m_current_solid(nullptr), + m_current_transform(nullptr), + m_calculator_EMECIW("EMECPosInnerWheelCalculator","TestActionShowerLib"), + m_calculator_EMECOW("EMECPosOuterWheelCalculator","TestActionShowerLib"), + m_calculator_FCAL1("FCAL1Calculator","TestActionShowerLib"), + m_calculator_FCAL2("FCAL2Calculator","TestActionShowerLib"), + m_calculator_FCAL3("FCAL3Calculator","TestActionShowerLib"), + m_calculator_EMB("EMBCalculator","TestActionShowerLib"), + m_eventSteps(nullptr) { + + //declareProperty("EMECIWCalculator", m_calculator_EMECIW); + //declareProperty("EMECOWCalculator", m_calculator_EMECOW); + //declareProperty("FCAL1Calculator", m_calculator_FCAL1); + //declareProperty("FCAL2Calculator", m_calculator_FCAL2); + //declareProperty("FCAL3Calculator", m_calculator_FCAL3); + //declareProperty("EMBCalculator",m_calculator_EMB); #ifdef _myDEBUG_ G4cout << "#########################################" << G4endl << "## TestActionShowerLib - Constructor ##" << G4endl @@ -55,11 +54,6 @@ namespace G4UA{ void TestActionShowerLib::beginOfEvent(const G4Event*){ - // init calculator - if (m_calculator_EMECIW == 0) - m_calculator_EMECIW = new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel); - if (m_calculator_EMECOW == 0) - m_calculator_EMECOW = new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel); if (m_current_transform == 0) m_current_transform = new G4AffineTransform (); @@ -140,41 +134,53 @@ namespace G4UA{ << "## TestActionShowerLib - BeginOfRun ##" << G4endl << "#########################################" << G4endl; #endif - // init calculator - if (m_calculator_EMECIW == 0) - m_calculator_EMECIW = new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel); - if (m_calculator_EMECOW == 0) - m_calculator_EMECOW = new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel); - if (m_current_transform == 0) - m_current_transform = new G4AffineTransform (); - - return; - } - - void TestActionShowerLib::endOfRun(const G4Run*){ - - if (m_calculator_EMECIW != 0) { - delete m_calculator_EMECIW; - m_calculator_EMECIW = 0; + if(!m_calculator_EMECIW.retrieve().isSuccess()) { + G4cout<<"Could not get ILArCalculatorSvc/InnerAbsorberWheel"<<G4endl; + return; } - - if (m_calculator_EMECOW != 0) { - delete m_calculator_EMECOW; - m_calculator_EMECOW = 0; + if(!m_calculator_EMECOW.retrieve().isSuccess()) { + G4cout<<"Could not get ILArCalculatorSvc/OuterAbsorberWheel"<<G4endl; + return; + } + if(!m_calculator_FCAL1.retrieve().isSuccess()) { + G4cout<<"Could not get ILArCalculatorSvc/FCAL1Calculator"<<G4endl; + return; + } + if(!m_calculator_FCAL2.retrieve().isSuccess()) { + G4cout<<"Could not get ILArCalculatorSvc/FCAL2Calculator"<<G4endl; + return; } + if(!m_calculator_FCAL3.retrieve().isSuccess()) { + G4cout<<"Could not get ILArCalculatorSvc/FCAL3Calculator"<<G4endl; + return; + } + if(!m_calculator_EMB.retrieve().isSuccess()) { + G4cout<<"Could not get ILArCalculatorSvc/BarrelCalculator"<<G4endl; + return; + } + + if (m_current_transform == 0) + m_current_transform = new G4AffineTransform (); + + return; +} + +void TestActionShowerLib::endOfRun(const G4Run*){ #ifdef _myDEBUG_ G4cout << "#########################################" << G4endl << "## TestActionShowerLib - EndOfRun ##" << G4endl << "#########################################" << G4endl; #endif - - return; - } + + return; +} + - void TestActionShowerLib::processStep(const G4Step* aStep){ +void TestActionShowerLib::processStep(const G4Step* aStep){ + bool hasCalc=true; bool emptydet = (m_eventSteps->detector[0] == '\0'); //empty string. man, i hate pure C! if (emptydet) { //give name to the detector, set calculator, transformation and G4Solid for the whole shower G4ThreeVector pos = aStep->GetPostStepPoint()->GetPosition(); @@ -215,11 +221,11 @@ namespace G4UA{ if (cur_log_volume->GetName() == "LArMgr::LAr::FCAL::Module1::Absorber") { // shower is inside FCAL1 - m_current_calculator = LArFCAL1Calculator::GetInstance(); + m_current_calculator = m_calculator_FCAL1; strcpy(m_eventSteps->detector,"FCAL1"); } else if (cur_log_volume->GetName() == "LArMgr::LAr::FCAL::Module2::Absorber") { // shower is inside FCAL2 - m_current_calculator = LArFCAL2Calculator::GetInstance(); + m_current_calculator = m_calculator_FCAL2; strcpy(m_eventSteps->detector,"FCAL2"); } else if ((cur_log_volume->GetName() == "LArMgr::LAr::EMEC::Pos::InnerWheel") || (cur_log_volume->GetName() == "LArMgr::LAr::EMEC::Neg::InnerWheel")) { @@ -233,17 +239,18 @@ namespace G4UA{ strcpy(m_eventSteps->detector,"EMEC"); } else if (cur_log_volume->GetName() == "LArMgr::LAr::EMB::STAC") { // shower is inside EMB positive - m_current_calculator = LArBarrelCalculator::GetCalculator(); + m_current_calculator = m_calculator_EMB; strcpy(m_eventSteps->detector,"EMB"); } else { // outside. - m_current_calculator = NULL; + //m_current_calculator = NULL; + hasCalc=false; } } if (aStep->GetTotalEnergyDeposit()>0) { //first, let's see if the shower is valid - if (m_current_calculator == NULL) { + if (!hasCalc) { m_eventSteps->invalid_energy += aStep->GetTotalEnergyDeposit(); return; } @@ -269,16 +276,19 @@ namespace G4UA{ } double et = 0; // Total collected charge - - if (m_current_calculator->Process(aStep)) { - int nlarh = m_current_calculator->getNumHits(); - for (int i=0; i<nlarh; ++i) { - et += (m_current_calculator->energy(i)); - } - } else { - G4cout << "Error: Hit not processed by calculator!" << G4endl; - return; - } + std::vector<LArHitData> results; + if (m_current_calculator->Process(aStep, results)) + { + for (auto larhit: results) + { + et += larhit.energy; + } + } + else + { + G4cout << "Error: Hit not processed by calculator!" << G4endl; + return; + } // drop hits with zero deposited energy (could still happen with negative corrections from calculator) if (et <= 0.) { diff --git a/LArCalorimeter/LArG4/LArG4H6SD/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4H6SD/CMakeLists.txt index 081f5bc4d2be0a49981ea78f5cd09bd9dc6243b5..cc637bf48903d47a642156a1902d79696b402e38 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4H6SD/CMakeLists.txt @@ -21,13 +21,11 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/Identifier Generators/GeneratorObjects LArCalorimeter/LArG4/LArG4Code - LArCalorimeter/LArG4/LArG4EC - LArCalorimeter/LArG4/LArG4FCAL - LArCalorimeter/LArG4/LArG4HEC LArCalorimeter/LArG4/LArG4RunControl LArCalorimeter/LArG4TB/LArG4TBSimEvent LArCalorimeter/LArGeoModel/LArReadoutGeometry LArCalorimeter/LArSimEvent + Simulation/G4Atlas/G4AtlasInterfaces Simulation/G4Atlas/G4AtlasTools Simulation/G4Sim/SimHelpers Simulation/HitManagement @@ -48,7 +46,7 @@ atlas_add_component( LArG4H6SD src/*.cc src/components/*.cxx INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} - LINK_LIBRARIES ${CORAL_LIBRARIES} ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${GEANT4_LIBRARIES} GaudiKernel CaloG4SimLib CaloSimEvent AthenaBaseComps AthenaKernel CxxUtils StoreGateLib SGtests GeoModelUtilities Identifier GeneratorObjects LArG4Code LArG4EC LArG4FCAL LArG4HEC LArG4RunControl LArG4TBSimEvent LArReadoutGeometry LArSimEvent G4AtlasToolsLib SimHelpers HitManagement TBEvent PathResolver ) + LINK_LIBRARIES ${CORAL_LIBRARIES} ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${GEANT4_LIBRARIES} GaudiKernel CaloG4SimLib CaloSimEvent AthenaBaseComps AthenaKernel CxxUtils StoreGateLib SGtests GeoModelUtilities Identifier GeneratorObjects LArG4Code LArG4RunControl LArG4TBSimEvent LArReadoutGeometry LArSimEvent G4AtlasInterfaces G4AtlasToolsLib SimHelpers HitManagement TBEvent PathResolver ) # Install files from the package: atlas_install_headers( LArG4H6SD ) diff --git a/LArCalorimeter/LArG4/LArG4H6SD/cmt/requirements b/LArCalorimeter/LArG4/LArG4H6SD/cmt/requirements index 6140e53077f48b1c6c37cc1a5c612496104e935c..54f5731c1d514e65b29fa9af5521fcca64a6522b 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/cmt/requirements +++ b/LArCalorimeter/LArG4/LArG4H6SD/cmt/requirements @@ -25,16 +25,17 @@ use AtlasBoost AtlasBoost-* External use CaloG4Sim CaloG4Sim-* Calorimeter #use CaloIdentifier CaloIdentifier-* Calorimeter use CaloSimEvent CaloSimEvent-* Calorimeter +use G4AtlasInterfaces G4AtlasInterfaces-* Simulation/G4Atlas use Geant4 Geant4-* External use GeneratorObjects GeneratorObjects-* Generators use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel use GeoModelUtilities GeoModelUtilities-* DetectorDescription/GeoModel -use HitManagement HitManagement-* Simulation +use HitManagement HitManagement-* Simulation use LArG4Code LArG4Code-* LArCalorimeter/LArG4 -use LArG4HEC LArG4HEC-* LArCalorimeter/LArG4 -use LArG4EC LArG4EC-* LArCalorimeter/LArG4 -use LArG4FCAL LArG4FCAL-* LArCalorimeter/LArG4 -#use LArG4SD LArG4SD-* LArCalorimeter/LArG4 +#use LArG4HEC LArG4HEC-* LArCalorimeter/LArG4 +#use LArG4EC LArG4EC-* LArCalorimeter/LArG4 +#use LArG4FCAL LArG4FCAL-* LArCalorimeter/LArG4 +#use LArG4SD LArG4SD-* LArCalorimeter/LArG4 use LArG4TBSimEvent LArG4TBSimEvent-* LArCalorimeter/LArG4TB use LArSimEvent LArSimEvent-* LArCalorimeter use LArG4RunControl LArG4RunControl-* LArCalorimeter/LArG4 diff --git a/LArCalorimeter/LArG4/LArG4H6SD/python/LArG4H6SDConfig.py b/LArCalorimeter/LArG4/LArG4H6SD/python/LArG4H6SDConfig.py index 710c472994f26969264a0c869e7af88c492600b6..1a72b841683f29bf624efd87d9c35d6098cf6bec 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/python/LArG4H6SDConfig.py +++ b/LArCalorimeter/LArG4/LArG4H6SD/python/LArG4H6SDConfig.py @@ -1,8 +1,14 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr +from AthenaCommon.SystemOfUnits import mm, deg,ns +import math def getLArG4TBECBeamChSDTool(name="LArG4TBECBeamChSensitiveDetector", **kwargs): - kwargs.setdefault("LogicalVolumeNames", ["LArMgr::LAr::TBEC::BeamChamber0","LArMgr::LAr::TBEC::BeamChamber1","LArMgr::LAr::TBEC::BeamChamber2","LArMgr::LAr::TBEC::BeamChamber3"]) + kwargs.setdefault("LogicalVolumeNames", [ + "LArMgr::LAr::TBEC::BeamChamber0", + "LArMgr::LAr::TBEC::BeamChamber1", + "LArMgr::LAr::TBEC::BeamChamber2", + "LArMgr::LAr::TBEC::BeamChamber3"]) return CfgMgr.LArG4TBECBeamChSDTool(name, **kwargs) def getFrontLArG4H6BeamSDTool(name="LArG4H6BeamSD::Front", **kwargs): @@ -10,46 +16,53 @@ def getFrontLArG4H6BeamSDTool(name="LArG4H6BeamSD::Front", **kwargs): return CfgMgr.LArG4H6BeamSDTool(name, **kwargs) def getMovableLArG4H6BeamSDTool(name="LArG4H6BeamSD::Movable", **kwargs): - kwargs.setdefault("LogicalVolumeNames", ["LArMgr::LAr::TBH62004::MovableTable::Scintillator","LArMgr::LAr::TB::BPCOLD::bpco_div","LArMgr::LAr::TB::BPC::bpc_xdiv","LArMgr::LAr::TB::BPC::bpc_ydiv","LArMgr::LAr::TB::MWPC::XDiv","LArMgr::LAr::TB::MWPC::YDiv"]) + kwargs.setdefault("LogicalVolumeNames", [ + "LArMgr::LAr::TBH62004::MovableTable::Scintillator", + "LArMgr::LAr::TB::BPCOLD::bpco_div", + "LArMgr::LAr::TB::BPC::bpc_xdiv", + "LArMgr::LAr::TB::BPC::bpc_ydiv", + "LArMgr::LAr::TB::MWPC::XDiv", + "LArMgr::LAr::TB::MWPC::YDiv"]) return CfgMgr.LArG4H6BeamSDTool(name, **kwargs) def getLArG4H6WarmTC_X(name="LArG4H6WarmTC::X", **kwargs): kwargs.setdefault("LogicalVolumeNames", ["LArMgr::LAr::WarmTC::Sci::X"]) - return CfgMgr.getLArG4H6WarmTC(name, **kwargs) + return CfgMgr.LArG4H6WarmTCSDTool(name, **kwargs) def getLArG4H6WarmTC_Y(name="LArG4H6WarmTC::Y", **kwargs): kwargs.setdefault("LogicalVolumeNames", ["LArMgr::LAr::WarmTC::Sci::Y"]) - return CfgMgr.getLArG4H6WarmTC(name, **kwargs) + return CfgMgr.LArG4H6WarmTCSDTool(name, **kwargs) def getLArG4H6WarmTC_Abs(name="LArG4H6WarmTC::Abs", **kwargs): kwargs.setdefault("LogicalVolumeNames", ["LArMgr::LAr::WarmTC::Absorber"]) - return CfgMgr.getLArG4H6WarmTC(name, **kwargs) + return CfgMgr.LArG4H6WarmTCSDTool(name, **kwargs) def getTBECInnerModuleTool(name="TBECInnerModuleMult", **kwargs): kwargs.setdefault("LogicalVolumeNames", ["LArMgr::LAr::EMEC::InnerModule"]) - return CfgMgr.getTBECInnerModuleTool(name,**kwargs) + return CfgMgr.TBECInnerModuleTool(name,**kwargs) def getTBECOuterModuleTool(name="TBECOuterModuleMult", **kwargs): kwargs.setdefault("LogicalVolumeNames", ["LArMgr::LAr::EMEC::OuterModule"]) - return CfgMgr.getTBECOuterModuleTool(name,**kwargs) + return CfgMgr.TBECOuterModuleTool(name,**kwargs) def getTBECBackOuterBarretteTool(name="TBECBackOuterBarretteMult", **kwargs): - kwargs.setdefault("LogicalVolumeNames", ["LArMgr::LAr::EMEC::BackOuterBarrette::Module::Phidiv"]) - return CfgMgr.getTBECBackOuterBarretteTool(name,**kwargs) + kwargs.setdefault("LogicalVolumeNames", + ["LArMgr::LAr::EMEC::BackOuterBarrette::Module::Phidiv"]) + return CfgMgr.TBECBackOuterBarretteTool(name,**kwargs) def getLArG4H62004HECSDTool(name="LArG4H62004HECSDTool", **kwargs): kwargs.setdefault("LogicalVolumeNames", ["LArMgr::LAr::HEC::Module::Depth::Slice"]) - return CfgMgr.getLArG4H62004HECSDTool(name,**kwargs) + return CfgMgr.LArG4__H62004HECSDTool(name,**kwargs) def getLArG4H62004EMECSDTool(name="LArG4H62004EMECSDTool", **kwargs): kwargs.setdefault("LogicalVolumeNames", ["LArMgr::LAr::EMEC::InnerWheel"]) - return CfgMgr.getLArG4H62004EMECSDTool(name,**kwargs) + return CfgMgr.LArG4__H62004EMECSDTool(name,**kwargs) def getLArG4H62004FCALSDTool(name="LArG4H62004FCALSDTool", **kwargs): kwargs.setdefault("FCAL1Volumes", ["LArMgr::LAr::FCAL::Module1::Gap"]) kwargs.setdefault("FCAL2Volumes", ["LArMgr::LAr::FCAL::Module2::Gap"]) kwargs.setdefault("FCALColdVolumes", ["LArMgr::LAr::FCAL::ColdTC::Gap"]) - return CfgMgr.getLArG4H62004FCALSDTool(name,**kwargs) + return CfgMgr.LArG4__H62004FCALSDTool(name,**kwargs) def getLArG4H62004ActiveSDTool(name="LArG4H62004ActiveSDTool", **kwargs): from G4AtlasApps.SimFlags import simFlags @@ -61,26 +74,233 @@ def getLArG4H62004ActiveSDTool(name="LArG4H62004ActiveSDTool", **kwargs): kwargs.setdefault("FCAL1Volumes", ["LArMgr::LAr::FCAL::Module1::Gap"]) kwargs.setdefault("FCAL2Volumes", ["LArMgr::LAr::FCAL::Module2::Gap"]) kwargs.setdefault("FCALColdVolumes", ["LArMgr::LAr::FCAL::ColdTC::Gap"]) - return CfgMgr.getLArG4H62004ActiveSDTool(name,**kwargs) + return CfgMgr.LArG4__H62004ActiveSDTool(name,**kwargs) def getLArG4H62004DeadSDTool(name="LArG4H62004DeadSDTool", **kwargs): theVolumes = [] if simFlags.LArTB_H6Hec.get_Value(): - theVolumes += [ "LArMgr::LAr::HEC::Module","LArMgr::LAr::HEC::Module::Depth","LArMgr::LAr::HEC::Module::Depth::Slice","LArMgr::LAr::HEC::Module::Depth::Slice::TieRod","LArMgr::LAr::HEC::Module::Depth::FirstAbsorber" ] + theVolumes += [ "LArMgr::LAr::HEC::Module", + "LArMgr::LAr::HEC::Module::Depth", + "LArMgr::LAr::HEC::Module::Depth::Slice", + "LArMgr::LAr::HEC::Module::Depth::Slice::TieRod", + "LArMgr::LAr::HEC::Module::Depth::FirstAbsorber" ] if simFlags.LArTB_H6Emec.get_Value(): - theVolumes += [ "LArMgr::LAr::EMEC::Mother*","LArMgr::LAr::EMEC::Front*","LArMgr::LAr::EMEC::BackSupport*","LArMgr::LAr::EMEC::Back*Barrettes","LArMgr::LAr::EMEC::Back*Barrette::Module","LArMgr::LAr::EMEC::BackInnerBarrette::Module::Phidiv","LArMgr::LAr::EMEC::Back*Abs","LArMgr::LAr::EMEC::Back*Ele","LArMgr::LAr::EMEC::Back*Ring","LArMgr::LAr::EMEC::Back*Bar","LArMgr::LAr::EMEC::Back*Hole","LArMgr::LAr::EMEC::Back*GTen","LArMgr::LAr::EMEC::Top*","LArMgr::LAr::EMEC::*Stretchers","LArMgr::LAr::EMEC::InnerAluCone*","LArMgr::LAr::EMEC::InnerTransversalBars" ] + theVolumes += [ "LArMgr::LAr::EMEC::Mother*", + "LArMgr::LAr::EMEC::Front*", + "LArMgr::LAr::EMEC::BackSupport*", + "LArMgr::LAr::EMEC::Back*Barrettes", + "LArMgr::LAr::EMEC::Back*Barrette::Module", + "LArMgr::LAr::EMEC::BackInnerBarrette::Module::Phidiv", + "LArMgr::LAr::EMEC::Back*Abs", + "LArMgr::LAr::EMEC::Back*Ele", + "LArMgr::LAr::EMEC::Back*Ring", + "LArMgr::LAr::EMEC::Back*Bar", + "LArMgr::LAr::EMEC::Back*Hole", + "LArMgr::LAr::EMEC::Back*GTen", + "LArMgr::LAr::EMEC::Top*", + "LArMgr::LAr::EMEC::*Stretchers", + "LArMgr::LAr::EMEC::InnerAluCone*", + "LArMgr::LAr::EMEC::InnerTransversalBars" ] if simFlags.LArTB_H6Fcal.get_Value(): - theVolumes += [ "LArMgr::LAr::FCAL::LiquidArgonC","LArMgr::LAr::FCAL::ColdTC::Absorber","LArMgr::LAr::FCAL::ColdTC::Active","LArMgr::LAr::FCAL::ColdTC::Electrode" ] - theVolumes += [ "LArMgr::LAr::WarmTC::Sci::X","LArMgr::LAr::WarmTC::Sci::Y","LArMgr::LAr::WarmTC::Absorber","LArMgr::LAr::TBH62004::FrontBeam::Scintillator","LArMgr::LAr::TBH62004::MovableTable::Scintillator","LArMgr::LAr::TB::BPCOLD::bpco_div","LArMgr::LAr::TB::BPC::bpc_xdiv","LArMgr::LAr::TB::BPC::bpc_ydiv","LArMgr::LAr::TB::MWPC::XDiv","LArMgr::LAr::TB::MWPC::YDiv","LARTBWORLD::LARTBWORLD","LArMgr::ExpHallLog","LArMgr::LArGeoTB::LeakageDet::ColdNose","LArMgr::LAr::H6::Cryostat::MotherVolume","LArMgr::LArTB::H6::Cryostat::WarmWall","LArMgr::LArTB::H6::Cryostat::Vacuum","LArMgr::LArTB::H6::Cryostat::ColdWall","LArMgr::LArTB::H6::Cryostat::LAr","LArMgr::LArGeoTB::LeakageDet::LAr","LArMgr::LArGeoTB::EMEC::Excluder","LArMgr::LArGeoTB::FCAL::Excluder","LArMgr::LArGeoTB::Front::Excluder","LArMgr::LArGeoTB::Back::Excluder","LArMgr::LAr::WarmTC::MuonWall","LArMgr::LAr::TBH62004::FrontBeam","LArMgr::LAr::TB::MWPC","LArMgr::LAr::TB::MWPC::Mylar","LArMgr::LAr::TB::MWPC::AlFoil","LArMgr::LAr::TB::MWPC::XPlane","LArMgr::LAr::TB::MWPC::YPlane","LArMgr::LAr::TB::MWPC::Wire","LArMgr::LAr::TB::BPC","LArMgr::LAr::TB::BPC::bpcalmylar","LArMgr::LAr::TB::BPC::bpc_mylar","LArMgr::LAr::TB::BPC::bpc_xplane","LArMgr::LAr::TB::BPC::bpc_wire","LArMgr::LAr::TB::BPC::bpc_cwire","LArMgr::LAr::TB::BPC::bpc_yplane","LArMgr::LAr::TBH62004::MiddleBeam","LArMgr::LAr::TB::BPCOLD","LArMgr::LAr::TB::BPCOLD::bpcalmylar","LArMgr::LAr::TB::BPCOLD::bpc_mylar","LArMgr::LAr::TB::BPCOLD::bpco_plane","LArMgr::LAr::TB::BPCOLD::bpco_wire","LArMgr::LAr::TB::BPCOLD::bpco_cwire","LArMgr::LAr::TBH62004::MovableTable","LArMgr::WarmTC_Mother" ] + theVolumes += [ "LArMgr::LAr::FCAL::LiquidArgonC", + "LArMgr::LAr::FCAL::ColdTC::Absorber", + "LArMgr::LAr::FCAL::ColdTC::Active", + "LArMgr::LAr::FCAL::ColdTC::Electrode" ] + theVolumes += [ "LArMgr::LAr::WarmTC::Sci::X", + "LArMgr::LAr::WarmTC::Sci::Y", + "LArMgr::LAr::WarmTC::Absorber", + "LArMgr::LAr::TBH62004::FrontBeam::Scintillator", + "LArMgr::LAr::TBH62004::MovableTable::Scintillator", + "LArMgr::LAr::TB::BPCOLD::bpco_div", + "LArMgr::LAr::TB::BPC::bpc_xdiv", + "LArMgr::LAr::TB::BPC::bpc_ydiv", + "LArMgr::LAr::TB::MWPC::XDiv", + "LArMgr::LAr::TB::MWPC::YDiv", + "LARTBWORLD::LARTBWORLD", + "LArMgr::ExpHallLog", + "LArMgr::LArGeoTB::LeakageDet::ColdNose", + "LArMgr::LAr::H6::Cryostat::MotherVolume", + "LArMgr::LArTB::H6::Cryostat::WarmWall", + "LArMgr::LArTB::H6::Cryostat::Vacuum", + "LArMgr::LArTB::H6::Cryostat::ColdWall", + "LArMgr::LArTB::H6::Cryostat::LAr", + "LArMgr::LArGeoTB::LeakageDet::LAr", + "LArMgr::LArGeoTB::EMEC::Excluder", + "LArMgr::LArGeoTB::FCAL::Excluder", + "LArMgr::LArGeoTB::Front::Excluder", + "LArMgr::LArGeoTB::Back::Excluder", + "LArMgr::LAr::WarmTC::MuonWall", + "LArMgr::LAr::TBH62004::FrontBeam", + "LArMgr::LAr::TB::MWPC", + "LArMgr::LAr::TB::MWPC::Mylar", + "LArMgr::LAr::TB::MWPC::AlFoil", + "LArMgr::LAr::TB::MWPC::XPlane", + "LArMgr::LAr::TB::MWPC::YPlane", + "LArMgr::LAr::TB::MWPC::Wire", + "LArMgr::LAr::TB::BPC", + "LArMgr::LAr::TB::BPC::bpcalmylar", + "LArMgr::LAr::TB::BPC::bpc_mylar", + "LArMgr::LAr::TB::BPC::bpc_xplane", + "LArMgr::LAr::TB::BPC::bpc_wire", + "LArMgr::LAr::TB::BPC::bpc_cwire", + "LArMgr::LAr::TB::BPC::bpc_yplane", + "LArMgr::LAr::TBH62004::MiddleBeam", + "LArMgr::LAr::TB::BPCOLD", + "LArMgr::LAr::TB::BPCOLD::bpcalmylar", + "LArMgr::LAr::TB::BPCOLD::bpc_mylar", + "LArMgr::LAr::TB::BPCOLD::bpco_plane", + "LArMgr::LAr::TB::BPCOLD::bpco_wire", + "LArMgr::LAr::TB::BPCOLD::bpco_cwire", + "LArMgr::LAr::TBH62004::MovableTable", + "LArMgr::WarmTC_Mother" ] kwargs.setdefault("LogicalVolumeNames",theVolumes) - return CfgMgr.getLArG4H62004DeadSDTool(name,**kwargs) + return CfgMgr.LArG4__H62004DeadSDTool(name,**kwargs) def getLArG4H62004InactiveSDTool(name="LArG4H62004InactiveSDTool", **kwargs): if simFlags.LArTB_H6Hec.get_Value(): - kwargs.setdefault("HECVolumes", ["LArMgr::LAr::HEC::Module::Depth::Absorber","LArMgr::LAr::HEC::Module::Depth::Slice::Electrode","LArMgr::LAr::HEC::Module::Depth::Slice::Electrode::Copper","LArMgr::LAr::HEC::Module::Depth::Slice::TieRod"]) + kwargs.setdefault("HECVolumes", [ + "LArMgr::LAr::HEC::Module::Depth::Absorber", + "LArMgr::LAr::HEC::Module::Depth::Slice::Electrode", + "LArMgr::LAr::HEC::Module::Depth::Slice::Electrode::Copper", + "LArMgr::LAr::HEC::Module::Depth::Slice::TieRod"]) if simFlags.LArTB_H6Emec.get_Value(): - kwargs.setdefault("EMECVolumes", ["LArMgr::LAr::EMEC::InnerWheel::Absorber","LArMgr::LAr::EMEC::InnerWheel::Electrode"]) + kwargs.setdefault("EMECVolumes", [ + "LArMgr::LAr::EMEC::InnerWheel::Absorber", + "LArMgr::LAr::EMEC::InnerWheel::Electrode"]) if simFlags.LArTB_H6Fcal.get_Value(): - kwargs.setdefault("FCAL1Volumes", ["LArMgr::LAr::FCAL::Module1::Absorber","LArMgr::LAr::FCAL::Module1::CableTrough"]) - kwargs.setdefault("FCAL2Volumes", ["LArMgr::LAr::FCAL::Module2::Rod","LArMgr::LAr::FCAL::Module2::Absorber","LArMgr::LAr::FCAL::Module2::CableTrough"]) - return CfgMgr.getLArG4H62004InactiveSDTool(name,**kwargs) + kwargs.setdefault("FCAL1Volumes", [ + "LArMgr::LAr::FCAL::Module1::Absorber", + "LArMgr::LAr::FCAL::Module1::CableTrough"]) + kwargs.setdefault("FCAL2Volumes", [ + "LArMgr::LAr::FCAL::Module2::Rod", + "LArMgr::LAr::FCAL::Module2::Absorber", + "LArMgr::LAr::FCAL::Module2::CableTrough"]) + return CfgMgr.LArG4__H62004InactiveSDTool(name,**kwargs) + +## Calculators + +#--------- +def getLArG4H6WarmTCCalculator(name="LArG4H6WarmTCCalculator", **kwargs): + kwargs.setdefault("OOTCut", 2.5*ns) + return CfgMgr.LArG4H6WarmTCCalculator(name, **kwargs) + +def getLArG4H6WarmTCCalculatorWTC_X(name="LArG4H6WarmTCCalculatorWTC_X", **kwargs): + kwargs.setdefault("isX", True) + kwargs.setdefault("isABS", False) + return getLArG4H6WarmTCCalculator(name, **kwargs) + +def getLArG4H6WarmTCCalculatorWTC_Y(name="LArG4H6WarmTCCalculatorWTC_Y", **kwargs): + kwargs.setdefault("isX", False) + kwargs.setdefault("isABS", False) + return getLArG4H6WarmTCCalculator(name, **kwargs) + +def getLArG4H6WarmTCCalculatorWTC_ABS(name="LArG4H6WarmTCCalculatorWTC_ABS", **kwargs): + kwargs.setdefault("isX", False) + kwargs.setdefault("isABS", True) + return getLArG4H6WarmTCCalculator(name, **kwargs) + +#---------- +def getLArG4H6COLDTCMod0Calculator(name="LArG4H6COLDTCMod0Calculator", **kwargs): + return CfgMgr.LArG4H6COLDTCMod0Calculator(name, **kwargs) + +def getFCALColdCalculator(name="FCALColdCalculator", **kwargs): + kwargs.setdefault("OOTCut", 10000.) #FIXME units of ns? + return getLArG4H6COLDTCMod0Calculator(name, **kwargs) + +#---------- +def getLArG4H6COLDTCMod0CalibCalculator(name="LArG4H6COLDTCMod0CalibCalculator", **kwargs): + return CfgMgr.LArG4H6COLDTCMod0CalibCalculator(name, **kwargs) + +def getLArG4H62004DeadCalibrationCalculator(name="LArG4H62004DeadCalibrationCalculator", **kwargs): + return CfgMgr.LArG4H62004DeadCalibrationCalculator(name, **kwargs) + +#---------- +def getLArFCALH62004CalibCalculatorBase(name="LArFCALH62004CalibCalculatorBase", **kwargs): + return CfgGetter.LArFCALH62004CalibCalculatorBase(name, **kwargs) + +def getLArFCAL1H62004CalibCalculator(name="LArFCAL1H62004CalibCalculator", **kwargs): + kwargs.setdefault("deltaX", 7.5*mm) + kwargs.setdefault("deltaY", 7.5*mm*math.sin(60*deg)) + kwargs.setdefault("FCalSampling", 1) + return getLArFCALH62004CalibCalculatorBase(name, **kwargs) + +def getLArFCAL2H62004CalibCalculator(name="LArFCAL2H62004CalibCalculator", **kwargs): + kwargs.setdefault("deltaX", 8.179*mm) + kwargs.setdefault("deltaY", 8.179*mm*math.sin(60*deg)) + kwargs.setdefault("FCalSampling", 2) + return getLArFCALH62004CalibCalculatorBase(name, **kwargs) + +#-------- +# Calculators from other packages +#-------- + +from LArG4EC.LArG4ECConfig import getEMECPosOuterWheelCalculator + +def getEMECPosOuterWheel_ECOR_GADJCalculator(name="EMECPosOuterWheel_ECOR_GADJCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 2) #LArG4::EMEC_ECOR_GADJ) + return getEMECPosOuterWheelCalculator(name, **kwargs) + +def getEMECPosOuterWheel_ECOR_GADJ_OLDCalculator(name="EMECPosOuterWheel_ECOR_GADJ_OLDCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 4) # LArG4::EMEC_ECOR_GADJ_OLD) + return getEMECPosOuterWheelCalculator(name, **kwargs) + +def getEMECPosOuterWheel_ECOR_GADJ_ECalculator(name="EMECPosOuterWheel_ECOR_GADJ_ECalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 5) # LArG4::EMEC_ECOR_GADJ_E) + return getEMECPosOuterWheelCalculator(name, **kwargs) + +def getEMECPosOuterWheel_ECOR_GADJ_SCalculator(name="EMECPosOuterWheel_ECOR_GADJ_SCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 6) # LArG4::EMEC_ECOR_GADJ_S) + return getEMECPosOuterWheelCalculator(name, **kwargs) + +def getEMECPosOuterWheel_ECOR_GADJ_SECalculator(name="EMECPosOuterWheel_ECOR_GADJ_SECalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 7) # LArG4::EMEC_ECOR_GADJ_SE) + return getEMECPosOuterWheelCalculator(name, **kwargs) + +def getEMECPosOuterWheel_ECOR_CHCLCalculator(name="EMECPosOuterWheel_ECOR_CHCLCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 3) # LArG4::::EMEC_ECOR_CHCL) + return getEMECPosOuterWheelCalculator(name, **kwargs) + +from LArG4EC.LArG4ECConfig import getEMECPosInnerWheelCalculator + +def getEMECPosInnerWheel_ECOR_GADJCalculator(name="EMECPosInnerWheel_ECOR_GADJCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 2) #LArG4::EMEC_ECOR_GADJ) + return getEMECPosInnerWheelCalculator(name, **kwargs) + +def getEMECPosInnerWheel_ECOR_GADJ_OLDCalculator(name="EMECPosInnerWheel_ECOR_GADJ_OLDCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 4) # LArG4::EMEC_ECOR_GADJ_OLD) + return getEMECPosInnerWheelCalculator(name, **kwargs) + +def getEMECPosInnerWheel_ECOR_GADJ_ECalculator(name="EMECPosInnerWheel_ECOR_GADJ_ECalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 5) # LArG4::EMEC_ECOR_GADJ_E) + return getEMECPosInnerWheelCalculator(name, **kwargs) + +def getEMECPosInnerWheel_ECOR_GADJ_SCalculator(name="EMECPosInnerWheel_ECOR_GADJ_SCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 6) # LArG4::EMEC_ECOR_GADJ_S) + return getEMECPosInnerWheelCalculator(name, **kwargs) + +def getEMECPosInnerWheel_ECOR_GADJ_SECalculator(name="EMECPosInnerWheel_ECOR_GADJ_SECalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 7) # LArG4::EMEC_ECOR_GADJ_SE) + return getEMECPosInnerWheelCalculator(name, **kwargs) + +def getEMECPosInnerWheel_ECOR_CHCLCalculator(name="EMECPosInnerWheel_ECOR_CHCLCalculator", **kwargs): + kwargs.setdefault("EnergyCorrection", 3) # LArG4::::EMEC_ECOR_CHCL) + return getEMECPosInnerWheelCalculator(name, **kwargs) + +from LArG4HEC.LArG4HECConfig import getLArHECLocalCalculator, getLocalCalibrationCalculator + +def getLArH62004HECLocalCalculator(name="LArH62004HECLocalCalculator", **kwargs): + kwargs.setdefaults("OOCut", 10000.)(name, **kwargs) + + kwargs.setdefaults("IsX", True) + return getLArHECLocalCalculator(name, **kwargs) + +def getLocalCalibrationInactiveCalculator(name="LocalCalibrationInactiveCalculator", **kwargs): + from LArG4HEC import HECGeometryType + kwargs.setdefault("GeometryType", HECGeometryType.kWheelInactive) + return getLocalCalibrationCalculator(name, **kwargs) + +def getLocalCalibrationActiveCalculator(name="LocalCalibrationActiveCalculator", **kwargs): + from LArG4HEC import HECGeometryType + kwargs.setdefault("GeometryType", HECGeometryType.kWheelActive) + return getLocalCalibrationCalculator(name, **kwargs) + diff --git a/LArCalorimeter/LArG4/LArG4H6SD/python/LArG4H6SDConfigDb.py b/LArCalorimeter/LArG4/LArG4H6SD/python/LArG4H6SDConfigDb.py index d44a53cf819aab504d59675fd8f42219fbed103a..ccdb1947dc87f194742f8a86b38a24c3d78393af 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/python/LArG4H6SDConfigDb.py +++ b/LArCalorimeter/LArG4/LArG4H6SD/python/LArG4H6SDConfigDb.py @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -from AthenaCommon.CfgGetter import addTool +from AthenaCommon.CfgGetter import addTool, addService addTool("LArG4H6SD.LArG4H6SDTools.LArGeoH62004EventAction", "LArGeoH62004EventAction") addTool("LArG4H6SD.LArG4H6SDTools.LArGeoH62004SteppingAction", "LArGeoH62004SteppingAction") addTool("LArG4H6SD.LArG4H6SDTools.LArHitsH6EventAction", "LArHitsH6EventAction") @@ -29,3 +29,33 @@ addTool("LArG4H6SD.LArG4H6SDConfig.getLArG4H62004ActiveSDTool", "LArG4H62004Acti addTool("LArG4H6SD.LArG4H6SDConfig.getLArG4H62004DeadSDTool", "LArG4H62004DeadSDTool") addTool("LArG4H6SD.LArG4H6SDConfig.getLArG4H62004InactiveSDTool", "LArG4H62004InactiveSDTool") +# Calculators +addService("LArG4H6SD.LArG4H6SDConfig.getLArG4H6WarmTCCalculatorWTC_X", "LArG4H6WarmTCCalculatorWTC_X") +addService("LArG4H6SD.LArG4H6SDConfig.getLArG4H6WarmTCCalculatorWTC_Y", "LArG4H6WarmTCCalculatorWTC_Y") +addService("LArG4H6SD.LArG4H6SDConfig.getLArG4H6WarmTCCalculatorWTC_ABS", "LArG4H6WarmTCCalculatorWTC_ABS") +addService("LArG4H6SD.LArG4H6SDConfig.getLArG4H6COLDTCMod0Calculator", "LArG4H6COLDTCMod0Calculator") +addService("LArG4H6SD.LArG4H6SDConfig.getFCALColdCalculator", "FCALColdCalculator") + +addService("LArG4H6SD.LArG4H6SDConfig.getLArG4H6COLDTCMod0CalibCalculator", "LArG4H6COLDTCMod0CalibCalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getLArG4H62004DeadCalibrationCalculator", "LArG4H62004DeadCalibrationCalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getLArFCAL1H62004CalibCalculator", "LArFCAL1H62004CalibCalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getLArFCAL2H62004CalibCalculator", "LArFCAL2H62004CalibCalculator") + +# Calculators from other packages +addService("LArG4H6SD.LArG4H6SDConfig.getEMECPosOuterWheel_ECOR_GADJCalculator", "EMECPosOuterWheel_ECOR_GADJCalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getEMECPosOuterWheel_ECOR_GADJ_OLDCalculator", "EMECPosOuterWheel_ECOR_GADJ_OLDCalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getEMECPosOuterWheel_ECOR_GADJ_ECalculator", "EMECPosOuterWheel_ECOR_GADJ_ECalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getEMECPosOuterWheel_ECOR_GADJ_SCalculator", "EMECPosOuterWheel_ECOR_GADJ_SCalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getEMECPosOuterWheel_ECOR_GADJ_SECalculator", "EMECPosOuterWheel_ECOR_GADJ_SECalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getEMECPosOuterWheel_ECOR_CHCLCalculator", "EMECPosOuterWheel_ECOR_CHCLCalculator") + +addService("LArG4H6SD.LArG4H6SDConfig.getEMECPosInnerWheel_ECOR_GADJCalculator", "EMECPosInnerWheel_ECOR_GADJCalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getEMECPosInnerWheel_ECOR_GADJ_OLDCalculator", "EMECPosInnerWheel_ECOR_GADJ_OLDCalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getEMECPosInnerWheel_ECOR_GADJ_ECalculator", "EMECPosInnerWheel_ECOR_GADJ_ECalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getEMECPosInnerWheel_ECOR_GADJ_SCalculator", "EMECPosInnerWheel_ECOR_GADJ_SCalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getEMECPosInnerWheel_ECOR_GADJ_SECalculator", "EMECPosInnerWheel_ECOR_GADJ_SECalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getEMECPosInnerWheel_ECOR_CHCLCalculator", "EMECPosInnerWheel_ECOR_CHCLCalculator") + +addService("LArG4H6SD.LArG4H6SDConfig.getLArH62004HECLocalCalculator","LArH62004HECLocalCalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getLocalCalibrationInactiveCalculator", "LocalCalibrationInactiveCalculator") +addService("LArG4H6SD.LArG4H6SDConfig.getLocalCalibrationActiveCalculator", "LocalCalibrationActiveCalculator") diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004ActiveSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004ActiveSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..d189b6502ebc38159d69873a724ef2cbf01dfa0c --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004ActiveSDTool.cc @@ -0,0 +1,84 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "H62004ActiveSDTool.h" + +// LArG4 includes +#include "LArG4Code/SDWrapper.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + H62004ActiveSDTool::H62004ActiveSDTool(const std::string& type, const std::string& name, + const IInterface *parent) + : H62004CalibSDTool(type, name, parent) + , m_hitCollName("LArCalibrationHitActive") + , m_emepiwcalc("EMECPosInnerWheelCalibrationCalculator", name) + , m_heccalc("LocalCalibrationActiveCalculator", name) + , m_fcal1calc("LArFCAL1H62004CalibCalculator", name) + , m_fcal2calc("LArFCAL2H62004CalibCalculator", name) + , m_fcalcoldcalc("LArG4H6COLDTCMod0CalibCalculator", name) + { + declareProperty("EMECPosIWCalibrationCalculator", m_emepiwcalc); + declareProperty("HECWheelActiveCalculator", m_heccalc); + declareProperty("FCAL1CalibCalculator", m_fcal1calc); + declareProperty("FCAL2CalibCalculator", m_fcal2calc); + declareProperty("FCALCOLDMod0CalibCalculator", m_fcalcoldcalc); + declareProperty("EMECVolumes", m_emecVolumes); + declareProperty("HECVolumes", m_hecVolumes); + declareProperty("FCAL1Volumes", m_fcal1Volumes); + declareProperty("FCAL2Volumes", m_fcal2Volumes); + declareProperty("FCALColdVolumes", m_fcalColdVolumes); + } + + StatusCode H62004ActiveSDTool::initializeCalculators() + { + ATH_CHECK(m_emepiwcalc.retrieve()); + ATH_CHECK(m_heccalc.retrieve()); + ATH_CHECK(m_fcal1calc.retrieve()); + ATH_CHECK(m_fcal2calc.retrieve()); + ATH_CHECK(m_fcalcoldcalc.retrieve()); + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the SD wrapper for current worker thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* H62004ActiveSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new CalibSDWrapper("LArH62004ActiveSDWrapper", m_hitCollName); + + // Add the SDs. + // Lots of singleton calculators !!! + + if (m_emecVolumes.size() > 0) { + sdWrapper->addSD( makeOneSD( + "EMEC::InnerModule::Calibration::H6", &*m_emepiwcalc, m_emecVolumes ) ); + } + if (m_hecVolumes.size() > 0) { + sdWrapper->addSD( makeOneSD( + "HEC::Module::Depth::Slice::Local::Calibration::H6", &*m_heccalc, m_hecVolumes ) ); + } + if (m_fcal1Volumes.size() > 0) { + sdWrapper->addSD( makeOneSD( + "LAr::FCAL::Module1::Gap::Calibration::H6", &*m_fcal1calc, m_fcal1Volumes ) ); + } + if (m_fcal2Volumes.size() > 0) { + sdWrapper->addSD( makeOneSD( + "LAr::FCAL::Module2::Gap::Calibration::H6", &*m_fcal2calc, m_fcal2Volumes ) ); + } + if (m_fcalColdVolumes.size() > 0) { + sdWrapper->addSD( makeOneSD( + "LAr::FCAL::ColdTC::Gap::Calibration::H6", &*m_fcalcoldcalc, m_fcalColdVolumes ) ); + } + + // Return the wrapper as my SD + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004ActiveSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004ActiveSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..c405c6c2d6b923bc3d3dda68158eec8ca3715317 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004ActiveSDTool.h @@ -0,0 +1,63 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4H62004SD_H62004ACTIVESDTOOL_H +#define LARG4H62004SD_H62004ACTIVESDTOOL_H + +// System includes +#include <string> +#include <vector> + +// Local includes +#include "H62004CalibSDTool.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" + +namespace LArG4 +{ + + /// @class H62004ActiveSDTool + /// @brief Tool for constructing H62004 calib SDs for active material. + /// + /// Based on the previous LArG4H62004ActiveSDTool implementation. + /// + /// This implementation uses the LAr SD wrapper design for managing multiple + /// SDs when running multi-threaded. See ATLASSIM-2606 for discussions. + /// + class H62004ActiveSDTool : public H62004CalibSDTool + { + + public: + + /// Constructor + H62004ActiveSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + ServiceHandle<ILArCalibCalculatorSvc> m_emepiwcalc; + ServiceHandle<ILArCalibCalculatorSvc> m_heccalc; + ServiceHandle<ILArCalibCalculatorSvc> m_fcal1calc; + ServiceHandle<ILArCalibCalculatorSvc> m_fcal2calc; + ServiceHandle<ILArCalibCalculatorSvc> m_fcalcoldcalc; + + /// @name SD volumes + /// @{ + std::vector<std::string> m_emecVolumes; + std::vector<std::string> m_hecVolumes; + std::vector<std::string> m_fcal1Volumes; + std::vector<std::string> m_fcal2Volumes; + std::vector<std::string> m_fcalColdVolumes; + /// @} + + }; // class H62004ActiveSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004CalibSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004CalibSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..1dc45118c8bb6b061efd844fd8412c326ef46627 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004CalibSDTool.cc @@ -0,0 +1,52 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "H62004CalibSDTool.h" + +// Framework utilities +#include "CxxUtils/make_unique.h" + +// LArG4 includes +#include "LArG4Code/VolumeUtils.h" + +// Local includes +#include "LArG4H62004CalibSD.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Tool constructor + //--------------------------------------------------------------------------- + H62004CalibSDTool::H62004CalibSDTool(const std::string& type, + const std::string& name, + const IInterface* parent) + : CalibSDTool(type, name, parent) + {} + + //--------------------------------------------------------------------------- + // Create one SD + //--------------------------------------------------------------------------- + std::unique_ptr<LArG4CalibSD> + H62004CalibSDTool::makeOneSD(const std::string& sdName, ILArCalibCalculatorSvc* calc, + const std::vector<std::string>& volumes) const + { + ATH_MSG_VERBOSE( name() << " makeOneSD" ); + + // Parse the wildcard patterns for existing volume names + auto parsedVolumes = findLogicalVolumes(volumes, msg()); + + // Create the simple SD + auto sd = CxxUtils::make_unique<LArG4H62004CalibSD>(sdName, calc, m_doPID); + sd->setupHelpers(m_larEmID, m_larFcalID, m_larHecID, m_larMiniFcalID, m_caloDmID); + + // Assign the volumes to the SD + if( assignSD( sd.get(), parsedVolumes ).isFailure() ) { + throw GaudiException("Failed to assign sd: " + sdName, + name(), StatusCode::FAILURE); + } + return std::move(sd); + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004CalibSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004CalibSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..97d62c5ddc78f146b6c94f343f632e2e60e86850 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004CalibSDTool.h @@ -0,0 +1,39 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4H6SD_H62004CALIBSDTOOL_H +#define LARG4H6SD_H62004CALIBSDTOOL_H + +// LAr G4 includes +#include "LArG4Code/CalibSDTool.h" + +namespace LArG4 +{ + + /// @class H62004CalibSDTool + /// @brief Tool base class for LAr H6 2004 calibration SD tools. + /// + /// This tool overrides the SD creation from CalibSDTool to create + /// the custom LArG4H62004CalibSD objects. + /// + /// See LArG4::CalibSDTool documentation for more details. + /// + /// @author Steve Farrell <Steven.Farrell@cern.ch> + /// + class H62004CalibSDTool : public CalibSDTool + { + public: + /// Constructor + H62004CalibSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + protected: + /// Override helper method to create one SD + std::unique_ptr<LArG4CalibSD> + makeOneSD(const std::string& name, ILArCalibCalculatorSvc* calc, + const std::vector<std::string>& volumes) const; + }; + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004DeadSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004DeadSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..9f654e6e0be61d4f40bf300f9a0edb4251f20ed9 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004DeadSDTool.cc @@ -0,0 +1,74 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "H62004DeadSDTool.h" + +// LArG4 includes +#include "LArG4Code/SDWrapper.h" +#include "CaloG4Sim/EscapedEnergyRegistry.h" +#include "LArG4Code/EscapedEnergyProcessing.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + H62004DeadSDTool::H62004DeadSDTool(const std::string& type, const std::string& name, + const IInterface *parent) + : H62004CalibSDTool(type, name, parent) + , m_hitCollName("LArCalibrationHitDeadMaterial") + , m_calculator("LArG4H62004DeadCalibrationCalculator", name) + { + declareProperty("doEscapedEnergy", m_do_eep=false); + declareProperty("Calculator", m_calculator); + } + + StatusCode H62004DeadSDTool::initializeCalculators() + { + ATH_CHECK(m_calculator.retrieve()); + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the SD wrapper for current worker thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* H62004DeadSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new CalibSDWrapper("LArH62004DeadSDWrapper", m_hitCollName); + + // Add the SDs + sdWrapper->addSD( makeOneSD( "LArDead::Dead::H6", &*m_calculator, m_volumeNames ) ); + + // Take care of the default material + if (m_do_eep) { + const std::vector<std::string> noVolumes; + auto uninstSD = makeOneSD("Default::Dead::Uninstrumented::Calibration::H6", &*m_calculator, noVolumes); + + // Initialize the escaped energy processing for LAr volumes. + // This is from initialize processing in the former LArG4CalibSD. + // I still think we can do better than this, though. + // FIXME: I don't think this is thread safe!! + ATH_MSG_DEBUG("Creating EscapedEnergyProcessing and adding to registry"); + CaloG4::VEscapedEnergyProcessing* eep = + new EscapedEnergyProcessing( uninstSD.get() ); + CaloG4::EscapedEnergyRegistry* registry = + CaloG4::EscapedEnergyRegistry::GetInstance(); + registry->AddAndAdoptProcessing( "LAr::", eep ); + CaloG4::VEscapedEnergyProcessing* eep1 = + new EscapedEnergyProcessing( uninstSD.get() ); + registry->AddAndAdoptProcessing( "LArMgr::", eep1 ); + CaloG4::VEscapedEnergyProcessing* eep2 = + new EscapedEnergyProcessing( uninstSD.get() ); + registry->AddAndAdoptProcessing( "LAr", eep2 ); + + sdWrapper->addSD( std::move(uninstSD) ); + } + + // Return the wrapper as my SD + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004DeadSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004DeadSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..fc821b65ae419aa1938cdb59ccc0104fc6a16d39 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004DeadSDTool.h @@ -0,0 +1,54 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4H62004SD_H62004DEADSDTOOL_H +#define LARG4H62004SD_H62004DEADSDTOOL_H + +// System includes +#include <string> +#include <vector> + +// Local includes +#include "H62004CalibSDTool.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" + +namespace LArG4 +{ + + /// @class H62004DeadSDTool + /// @brief Tool for constructing H62004 calib SDs for dead material. + /// + /// Based on the previous LArG4H62004DeadSDTool implementation. + /// + /// This implementation uses the LAr SD wrapper design for managing multiple + /// SDs when running multi-threaded. See ATLASSIM-2606 for discussions. + /// + class H62004DeadSDTool : public H62004CalibSDTool + { + + public: + + /// Constructor + H62004DeadSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + + ServiceHandle<ILArCalibCalculatorSvc> m_calculator; + /// Do we add the escaped energy processing? + /// This is only in "mode 1" (Tile+LAr), not in "DeadLAr" mode + bool m_do_eep; + + }; // class H62004DeadSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004EMECSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004EMECSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..e9fa25fa454825e732dadb317a8b08fe9f313470 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004EMECSDTool.cc @@ -0,0 +1,48 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "H62004EMECSDTool.h" + +// LArG4 includes +#include "LArG4Code/SDWrapper.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + H62004EMECSDTool::H62004EMECSDTool(const std::string& type, const std::string& name, + const IInterface *parent) + : H62004SimpleSDTool(type, name, parent) + , m_hitCollName("LArHitEMEC") + , m_calculator("EMECPosInnerWheel_ECOR_GADJCalculator", name) + { + declareProperty("Calculator", m_calculator); + } + + StatusCode H62004EMECSDTool::initializeCalculators() + { + ATH_CHECK(m_calculator.retrieve()); + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the SD wrapper for current worker thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* H62004EMECSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new SimpleSDWrapper("LArH62004EMECSDWrapper", m_hitCollName); + + // Add the SDs. In this case there is actually only one SD. + sdWrapper->addSD( + makeOneSD( "LAr::EMEC::InnerModule::H6", &*m_calculator, m_volumeNames ) + ); + + // Return the wrapper as my SD + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004EMECSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004EMECSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..a140470a86fb2c7fc8799b7209b3da05c9b0e248 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004EMECSDTool.h @@ -0,0 +1,50 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4H62004SD_H62004EMECSDTOOL_H +#define LARG4H62004SD_H62004EMECSDTOOL_H + +// System includes +#include <string> + +// Local includes +#include "H62004SimpleSDTool.h" +#include "LArG4Code/ILArCalculatorSvc.h" + +namespace LArG4 +{ + + /// @class H62004EMECSDTool + /// @brief Tool for constructing H62004 SDs for EMEC. + /// + /// Based on the previous LArG4H62004EMECSDTool implementation. + /// + /// This implementation uses the LAr SD wrapper design for managing multiple + /// SDs when running multi-threaded. See ATLASSIM-2606 for discussions. + /// + class H62004EMECSDTool : public H62004SimpleSDTool + { + + public: + + /// Constructor + H62004EMECSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + + ServiceHandle<ILArCalculatorSvc> m_calculator; + }; // class H62004EMECSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004FCALSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004FCALSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..02f6915b8768b67b37e52de01548371321661c09 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004FCALSDTool.cc @@ -0,0 +1,57 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "H62004FCALSDTool.h" + +// LArG4 includes +#include "LArG4Code/SDWrapper.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + H62004FCALSDTool::H62004FCALSDTool(const std::string& type, const std::string& name, + const IInterface *parent) + : H62004SimpleSDTool(type, name, parent) + , m_hitCollName("LArHitFCAL") + , m_fcal1calc("FCAL1Calculator", name) + , m_fcal2calc("FCAL2Calculator", name) + , m_fcalcoldcalc("FCALColdCalculator", name) + { + declareProperty("FCAL1Calculator", m_fcal1calc); + declareProperty("FCAL2Calculator", m_fcal2calc); + declareProperty("FCALColdCalculator", m_fcalcoldcalc); + declareProperty("FCAL1Volumes", m_fcal1Volumes); + declareProperty("FCAL2Volumes", m_fcal2Volumes); + declareProperty("FCALColdVolumes", m_fcalColdVolumes); + } + + StatusCode H62004FCALSDTool::initializeCalculators() + { + ATH_CHECK(m_fcal1calc.retrieve()); + ATH_CHECK(m_fcal2calc.retrieve()); + ATH_CHECK(m_fcalcoldcalc.retrieve()); + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the SD wrapper for current worker thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* H62004FCALSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new SimpleSDWrapper("LArH62004FCALSDWrapper", m_hitCollName); + + // Add the SDs + sdWrapper->addSD( makeOneSD( "LAr::FCAL::Module1::Gap::H6", &*m_fcal1calc, m_fcal1Volumes ) ); + sdWrapper->addSD( makeOneSD( "LAr::FCAL::Module2::Gap::H6", &*m_fcal2calc, m_fcal2Volumes ) ); + sdWrapper->addSD( makeOneSD("LAr::FCAL::ColdTC::H6", &*m_fcalcoldcalc, m_fcalColdVolumes) ); + + // Return the wrapper as my SD + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004FCALSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004FCALSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..794e31033a9c658235714390a8dcb815a38ca0ec --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004FCALSDTool.h @@ -0,0 +1,60 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4H62004SD_H62004FCALSDTOOL_H +#define LARG4H62004SD_H62004FCALSDTOOL_H + +// System includes +#include <string> +#include <vector> + +// Local includes +#include "H62004SimpleSDTool.h" +#include "LArG4Code/ILArCalculatorSvc.h" + +namespace LArG4 +{ + + /// @class H62004FCALSDTool + /// @brief Tool for constructing H62004 SDs for FCAL. + /// + /// Based on the previous LArG4H62004FCALSDTool implementation. + /// + /// This implementation uses the LAr SD wrapper design for managing multiple + /// SDs when running multi-threaded. See ATLASSIM-2606 for discussions. + /// + class H62004FCALSDTool : public H62004SimpleSDTool + { + + public: + + /// Constructor + H62004FCALSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + + ServiceHandle<ILArCalculatorSvc> m_fcal1calc; + ServiceHandle<ILArCalculatorSvc> m_fcal2calc; + ServiceHandle<ILArCalculatorSvc> m_fcalcoldcalc; + /// @name SD volumes + /// @{ + std::vector<std::string> m_fcal1Volumes; + std::vector<std::string> m_fcal2Volumes; + std::vector<std::string> m_fcalColdVolumes; + /// @} + + }; // class H62004FCALSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004HECSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004HECSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..02944de5c965ca5f93fb47e17a6062fcca0885fe --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004HECSDTool.cc @@ -0,0 +1,46 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "H62004HECSDTool.h" + +// LArG4 includes +#include "LArG4Code/SDWrapper.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + H62004HECSDTool::H62004HECSDTool(const std::string& type, const std::string& name, + const IInterface *parent) + : H62004SimpleSDTool(type, name, parent) + , m_hitCollName("LArHitHEC") + , m_calculator("LArH62004HECLocalCalculator", name) + { + declareProperty("Calculator", m_calculator); + } + + StatusCode H62004HECSDTool::initializeCalculators() + { + ATH_CHECK(m_calculator.retrieve()); + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the SD wrapper for current worker thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* H62004HECSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new SimpleSDWrapper("LArH62004HECSDWrapper", m_hitCollName); + + // Add the SDs. In this case there is actually only one SD. + sdWrapper->addSD( makeOneSD( "LAr::HEC::Module::Depth::Slice::Local::H6", &*m_calculator, m_volumeNames ) ); + + // Return the wrapper as my SD + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004HECSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004HECSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..b2b71d77259841e6ae8c8f868db9b9c358ee3789 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004HECSDTool.h @@ -0,0 +1,48 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4H62004SD_H62004HECSDTOOL_H +#define LARG4H62004SD_H62004HECSDTOOL_H + +// System includes +#include <string> + +// Local includes +#include "H62004SimpleSDTool.h" +#include "LArG4Code/ILArCalculatorSvc.h" +namespace LArG4 +{ + + /// @class H62004HECSDTool + /// @brief Tool for constructing H62004 SDs for HEC. + /// + /// Based on the previous LArG4H62004HECSDTool implementation. + /// + /// This implementation uses the LAr SD wrapper design for managing multiple + /// SDs when running multi-threaded. See ATLASSIM-2606 for discussions. + /// + class H62004HECSDTool : public H62004SimpleSDTool + { + + public: + + /// Constructor + H62004HECSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + ServiceHandle<ILArCalculatorSvc> m_calculator; + }; // class H62004HECSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004InactiveSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004InactiveSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..fe6c8eae3dd657d69db4b3e569753c3e9fbeaeaa --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004InactiveSDTool.cc @@ -0,0 +1,77 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "H62004InactiveSDTool.h" + +// LArG4 includes +#include "LArG4Code/SDWrapper.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + H62004InactiveSDTool::H62004InactiveSDTool(const std::string& type, + const std::string& name, + const IInterface* parent) + : H62004CalibSDTool(type, name, parent), + m_hitCollName("LArCalibrationHitInactive") + , m_emepiwcalc("EMECPosInnerWheelCalibrationCalculator", name) + , m_heccalc("LocalCalibrationInactiveCalculator", name) + , m_fcal1calc("LArFCAL1H62004CalibCalculator", name) + , m_fcal2calc("LArFCAL2H62004CalibCalculator", name) + { + declareProperty("EMECVolumes", m_emecVolumes); + declareProperty("HECVolumes", m_hecVolumes); + declareProperty("FCAL1Volumes", m_fcal1Volumes); + declareProperty("FCAL2Volumes", m_fcal2Volumes); + declareProperty("EMECPosIWCalibrationCalculator", m_emepiwcalc); + declareProperty("HECWheelInactiveCalculator", m_heccalc); + declareProperty("FCAL1CalibCalculator", m_fcal1calc); + declareProperty("FCAL2CalibCalculator", m_fcal2calc); + } + + StatusCode H62004InactiveSDTool::initializeCalculators() + { + ATH_CHECK(m_emepiwcalc.retrieve()); + ATH_CHECK(m_heccalc.retrieve()); + ATH_CHECK(m_fcal1calc.retrieve()); + ATH_CHECK(m_fcal2calc.retrieve()); + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the SD wrapper for current worker thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* H62004InactiveSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new CalibSDWrapper("LArH62004InactiveSDWrapper", m_hitCollName); + + // Add the SDs. + // Lots of singleton calculators !!! + + if (m_emecVolumes.size() > 0) { + sdWrapper->addSD( makeOneSD( + "LAr::EMEC::InnerModule::Inactive::H6", &*m_emepiwcalc, m_emecVolumes ) ); + } + if (m_hecVolumes.size() > 0) { + sdWrapper->addSD( makeOneSD( + "LAr::HEC::Local::Inactive::H6", &*m_heccalc, m_hecVolumes ) ); + } + if (m_fcal1Volumes.size() > 0) { + sdWrapper->addSD( makeOneSD( + "LAr::FCAL::Inactive1::H6", &*m_fcal1calc, m_fcal1Volumes ) ); + } + if (m_fcal2Volumes.size() > 0) { + sdWrapper->addSD( makeOneSD( + "LAr::FCAL::Inactive2::H6", &*m_fcal2calc, m_fcal2Volumes ) ); + } + + // Return the wrapper as my SD + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004InactiveSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004InactiveSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..6389a0f16749b93925ae3e58b781920c8d5c0892 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004InactiveSDTool.h @@ -0,0 +1,63 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4H62004SD_H62004INACTIVESDTOOL_H +#define LARG4H62004SD_H62004INACTIVESDTOOL_H + +// System includes +#include <string> +#include <vector> + +// Local includes +#include "H62004CalibSDTool.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" + +namespace LArG4 +{ + + /// @class H62004InactiveSDTool + /// @brief Tool for constructing H62004 calib SDs for inactive material. + /// + /// Based on the previous LArG4H62004InactiveSDTool implementation. + /// + /// This implementation uses the LAr SD wrapper design for managing multiple + /// SDs when running multi-threaded. See ATLASSIM-2606 for discussions. + /// + class H62004InactiveSDTool : public H62004CalibSDTool + { + + public: + + /// Constructor + H62004InactiveSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + + ServiceHandle<ILArCalibCalculatorSvc>m_emepiwcalc; + ServiceHandle<ILArCalibCalculatorSvc>m_heccalc; + ServiceHandle<ILArCalibCalculatorSvc>m_fcal1calc; + ServiceHandle<ILArCalibCalculatorSvc>m_fcal2calc; + + /// @name SD volumes + /// @{ + std::vector<std::string> m_emecVolumes; + std::vector<std::string> m_hecVolumes; + std::vector<std::string> m_fcal1Volumes; + std::vector<std::string> m_fcal2Volumes; + /// @} + + }; // class H62004InactiveSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004SimpleSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004SimpleSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..7fa84af66e0f315617980b73f36ded4934ca4cc4 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004SimpleSDTool.cc @@ -0,0 +1,53 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "H62004SimpleSDTool.h" + +// Framework utilities +#include "CxxUtils/make_unique.h" + +// LArG4 includes +#include "LArG4Code/VolumeUtils.h" + +// Local includes +#include "LArG4H62004SD.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Tool constructor + //--------------------------------------------------------------------------- + H62004SimpleSDTool::H62004SimpleSDTool(const std::string& type, + const std::string& name, + const IInterface* parent) + : SimpleSDTool(type, name, parent) + {} + + //--------------------------------------------------------------------------- + // Create one SD + //--------------------------------------------------------------------------- + std::unique_ptr<LArG4SimpleSD> + H62004SimpleSDTool::makeOneSD(const std::string& sdName, ILArCalculatorSvc* calc, + const std::vector<std::string>& volumes) const + { + ATH_MSG_VERBOSE( name() << " makeOneSD" ); + + // Parse the wildcard patterns for existing volume names + auto parsedVolumes = findLogicalVolumes(volumes, msg()); + + // Create the simple SD + auto sd = CxxUtils::make_unique<LArG4H62004SD> + (sdName, calc, m_timeBinType, m_timeBinWidth); + sd->setupHelpers(m_larEmID, m_larFcalID, m_larHecID, m_larMiniFcalID); + + // Assign the volumes to the SD + if( assignSD( sd.get(), parsedVolumes ).isFailure() ) { + throw GaudiException("Failed to assign sd: " + sdName, + name(), StatusCode::FAILURE); + } + return std::move(sd); + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/H62004SimpleSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004SimpleSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..b7b8e37a4d4ade8f48494f53e239b2347b1ac084 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/H62004SimpleSDTool.h @@ -0,0 +1,39 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4H6SD_H62004SIMPLESDTOOL_H +#define LARG4H6SD_H62004SIMPLESDTOOL_H + +// LAr G4 includes +#include "LArG4Code/SimpleSDTool.h" + +namespace LArG4 +{ + + /// @class H62004SimpleSDTool + /// @brief Tool base class for LAr H6 2004 simple SD tools. + /// + /// This tool overrides the SD creation from SimpleSDTool to create + /// the custom LArG4H62004SimpleSD objects. + /// + /// See LArG4::SimpleSDTool documentation for more details. + /// + /// @author Steve Farrell <Steven.Farrell@cern.ch> + /// + class H62004SimpleSDTool : public SimpleSDTool + { + public: + /// Constructor + H62004SimpleSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + protected: + /// Override helper method to create one SD + std::unique_ptr<LArG4SimpleSD> + makeOneSD(const std::string& name, ILArCalculatorSvc* calc, + const std::vector<std::string>& volumes) const; + }; + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCAL1H62004CalibCalculator.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCAL1H62004CalibCalculator.cc deleted file mode 100644 index 1b25bcd559c93e8c4e6e011de67a3584134eea9a..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCAL1H62004CalibCalculator.cc +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArFCAL1H62004CalibCalculator.h" -#include "LArG4FCAL/LArFCALCalibCalculatorBase.h" - -#include "LArG4Code/LArG4Identifier.h" - -#include "G4Step.hh" -#include "globals.hh" - -#include <algorithm> - -LArFCAL1H62004CalibCalculator* LArFCAL1H62004CalibCalculator::m_calculator = 0; - -LArFCAL1H62004CalibCalculator* LArFCAL1H62004CalibCalculator::GetCalculator() { - if (m_calculator == 0 ) - { - m_calculator = new LArFCAL1H62004CalibCalculator(); - } - return m_calculator; -} - -LArFCAL1H62004CalibCalculator::LArFCAL1H62004CalibCalculator() { - - m_deltaX = 7.5*CLHEP::mm; - m_deltaY = 7.5*CLHEP::mm*sin(60*CLHEP::deg); - - m_FCalSampling = 1; -} - -LArFCAL1H62004CalibCalculator::~LArFCAL1H62004CalibCalculator(){} diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCAL1H62004CalibCalculator.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCAL1H62004CalibCalculator.h deleted file mode 100644 index d9541bee9f8a58cf6e59bf806312d0107aa0e0a5..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCAL1H62004CalibCalculator.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LArFCAL1H62004CalibCalculator_H -#define LArFCAL1H62004CalibCalculator_H - -#include "LArFCALH62004CalibCalculatorBase.h" - -#include "globals.hh" - - -class LArFCAL1H62004CalibCalculator : public LArFCALH62004CalibCalculatorBase { - - public: - - static LArFCAL1H62004CalibCalculator* GetCalculator(); - - virtual ~LArFCAL1H62004CalibCalculator(); - - protected: - - LArFCAL1H62004CalibCalculator(); - private: - - static LArFCAL1H62004CalibCalculator* m_calculator; - -}; -#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCAL2H62004CalibCalculator.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCAL2H62004CalibCalculator.cc deleted file mode 100644 index 72bed248c47a378970527171ca1f493f9b9a1e18..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCAL2H62004CalibCalculator.cc +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArFCAL2H62004CalibCalculator.h" -#include "LArG4FCAL/LArFCALCalibCalculatorBase.h" - -#include "LArG4Code/LArG4Identifier.h" - -#include "G4Step.hh" -#include "globals.hh" - -#include <algorithm> - -LArFCAL2H62004CalibCalculator* LArFCAL2H62004CalibCalculator::m_calculator = 0; - -LArFCAL2H62004CalibCalculator* LArFCAL2H62004CalibCalculator::GetCalculator() { - if (m_calculator == 0 ) - { - m_calculator = new LArFCAL2H62004CalibCalculator(); - } - return m_calculator; -} - -LArFCAL2H62004CalibCalculator::LArFCAL2H62004CalibCalculator() { - - m_deltaX = 8.179*CLHEP::mm; - m_deltaY = 8.179*CLHEP::mm*sin(60*CLHEP::deg); - - m_FCalSampling = 2; -} - -LArFCAL2H62004CalibCalculator::~LArFCAL2H62004CalibCalculator(){} diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCAL2H62004CalibCalculator.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCAL2H62004CalibCalculator.h deleted file mode 100644 index 5e4341cba494318e4b1752ce20757c4aa1cb78a8..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCAL2H62004CalibCalculator.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LArFCAL2H62004CalibCalculator_H -#define LArFCAL2H62004CalibCalculator_H - -#include "LArFCALH62004CalibCalculatorBase.h" - -#include "globals.hh" - - -class LArFCAL2H62004CalibCalculator : public LArFCALH62004CalibCalculatorBase { - - public: - - static LArFCAL2H62004CalibCalculator* GetCalculator(); - - virtual ~LArFCAL2H62004CalibCalculator(); - - protected: - - LArFCAL2H62004CalibCalculator(); - private: - - static LArFCAL2H62004CalibCalculator* m_calculator; - - }; -#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCALH62004CalibCalculatorBase.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCALH62004CalibCalculatorBase.cc index 55117dbf2ab696f5f88bd044b9b776196ae37a9c..e045b0d7fd5bce8c45071b3546b677b6ea7e9e74 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCALH62004CalibCalculatorBase.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCALH62004CalibCalculatorBase.cc @@ -3,7 +3,7 @@ */ #include "LArFCALH62004CalibCalculatorBase.h" -#include "LArG4FCAL/LArFCALCalculatorBase.h" +//#include "LArG4FCAL/LArFCALCalculatorBase.h" #include "LArG4Code/LArG4Identifier.h" @@ -13,8 +13,10 @@ #include "PathResolver/PathResolver.h" #include "RDBAccessSvc/IRDBAccessSvc.h" #include "RDBAccessSvc/IRDBRecord.h" +#include "RDBAccessSvc/IRDBRecordset.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" +#include "LArReadoutGeometry/FCAL_ChannelMap.h" // Geant4 includes #include "G4LogicalVolume.hh" @@ -47,18 +49,18 @@ namespace CaloG4 { namespace { -inline -G4int etaToBin1 (G4double eta, G4double eta0) -{ - return static_cast<G4int> ((eta - eta0) * (1./0.1)); -} + inline + G4int etaToBin1 (G4double eta, G4double eta0) + { + return static_cast<G4int> ((eta - eta0) * (1./0.1)); + } -inline -G4int etaToBin2 (G4double eta, G4double eta0) -{ - return static_cast<G4int> ((eta - eta0) * (1./0.2)); -} + inline + G4int etaToBin2 (G4double eta, G4double eta0) + { + return static_cast<G4int> ((eta - eta0) * (1./0.2)); + } } @@ -66,256 +68,263 @@ G4int etaToBin2 (G4double eta, G4double eta0) // constructor // -LArFCALH62004CalibCalculatorBase::LArFCALH62004CalibCalculatorBase() - : m_deltaX(0), - m_deltaY(0), - m_FCalSampling(0), - m_identifier(LArG4Identifier()), - m_OOTcut(0), - m_time(0), - m_isInTime(0), - m_ChannelMap(nullptr) - { - - StoreGateSvc *detStore = StoreGate::pointer("DetectorStore"); - if (detStore->retrieve(m_ChannelMap)==StatusCode::FAILURE) { - - } - - ISvcLocator *svcLocator = Gaudi::svcLocator(); - IRDBAccessSvc* rdbAccess; - IGeoModelSvc * geoModel; - - if(svcLocator->service ("GeoModelSvc",geoModel) == StatusCode::FAILURE) - throw std::runtime_error("Error in FCALConstruction, cannot access GeoModelSvc"); - if(svcLocator->service ("RDBAccessSvc",rdbAccess) == StatusCode::FAILURE) - throw std::runtime_error("Error in FCALConstruction, cannot access RDBAccessSvc"); - DecodeVersionKey larVersionKey(geoModel, "LAr"); - - m_fcalMod = rdbAccess->getRecordset("FCalMod", larVersionKey.tag(),larVersionKey.node()); - if (m_fcalMod->size()==0) { - m_fcalMod=rdbAccess->getRecordset("FCalMod", "FCalMod-00"); - if (m_fcalMod->size()==0) { - throw std::runtime_error("Error getting FCAL Module parameters from database"); - } - } - double startZFCal1 = (*m_fcalMod)[0]->getDouble("STARTPOSITION"); //466.85 * cm; - double startZFCal3 = (*m_fcalMod)[2]->getDouble("STARTPOSITION"); //560.28 * cm; - double depthZFCal3 = (*m_fcalMod)[2]->getDouble("FULLMODULEDEPTH"); - double stopZFCal3 = startZFCal3 + depthZFCal3; - double halfDepth = (stopZFCal3 - startZFCal1)/2.; - m_Zshift = startZFCal1 + halfDepth; - +LArFCALH62004CalibCalculatorBase::LArFCALH62004CalibCalculatorBase(const std::string& name, ISvcLocator * pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_deltaX(0.0) + , m_deltaY(0.0) + , m_FCalSampling(0) + , m_ChannelMap(nullptr) + , m_fcalMod(nullptr) + , m_Zshift(0.0) +{ + declareProperty("deltaX" , m_deltaX); + declareProperty("deltaY" , m_deltaY); + declareProperty("FCalSampling" , m_FCalSampling); + //declareProperty("Zshift" , m_Zshift); +} +StatusCode LArFCALH62004CalibCalculatorBase::initialize() +{ + StoreGateSvc *detStore = StoreGate::pointer("DetectorStore"); + if (detStore->retrieve(m_ChannelMap)==StatusCode::FAILURE) { + + } + + ISvcLocator *svcLocator = Gaudi::svcLocator(); + IRDBAccessSvc* rdbAccess; + IGeoModelSvc * geoModel; + + if(svcLocator->service ("GeoModelSvc",geoModel) == StatusCode::FAILURE) + throw std::runtime_error("Error in FCALConstruction, cannot access GeoModelSvc"); + if(svcLocator->service ("RDBAccessSvc",rdbAccess) == StatusCode::FAILURE) + throw std::runtime_error("Error in FCALConstruction, cannot access RDBAccessSvc"); + DecodeVersionKey larVersionKey(geoModel, "LAr"); + + m_fcalMod = rdbAccess->getRecordset("FCalMod", larVersionKey.tag(),larVersionKey.node()); + if (m_fcalMod->size()==0) { + m_fcalMod=rdbAccess->getRecordset("FCalMod", "FCalMod-00"); + if (m_fcalMod->size()==0) { + throw std::runtime_error("Error getting FCAL Module parameters from database"); + } + } + double startZFCal1 = (*m_fcalMod)[0]->getDouble("STARTPOSITION"); //466.85 * cm; + double startZFCal3 = (*m_fcalMod)[2]->getDouble("STARTPOSITION"); //560.28 * cm; + double depthZFCal3 = (*m_fcalMod)[2]->getDouble("FULLMODULEDEPTH"); + double stopZFCal3 = startZFCal3 + depthZFCal3; + double halfDepth = (stopZFCal3 - startZFCal1)/2.; + m_Zshift = startZFCal1 + halfDepth; + + return StatusCode::SUCCESS; } LArFCALH62004CalibCalculatorBase::~LArFCALH62004CalibCalculatorBase() { } - - -G4bool LArFCALH62004CalibCalculatorBase::Process(const G4Step* a_step, - const eCalculatorProcessing a_process) { - // First, get the energy. - - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } - else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); - - // find the space point for this deposit - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - G4ThreeVector startPoint = pre_step_point->GetPosition(); - G4ThreeVector endPoint = post_step_point->GetPosition(); - G4ThreeVector p = (startPoint + endPoint) * 0.5; - - // S.M.: this does not work - there are some volumes inside the - // FCAL which have their own local coordinate system and - // just result in (~0,~0) local coordinates. I think they should - // be treated as absorbers ... so I take the original coordinates - // instead ... - - // P.S. We sould go to FCAL mother volume, and work there - - // S.M. // get LOCAL (u,v) coordinates! - // S.M. G4Navigator* theNavigator = - // S.M. G4TransportationManager::GetTransportationManager()-> - // S.M. GetNavigatorForTracking(); - // S.M. G4ThreeVector theLocalPoint = theNavigator-> - // S.M. GetGlobalToLocalTransform(). - // S.M. TransformPoint(p); - - // Find a transformation to a module coordinate system - G4TouchableHistory* theTouchable = - (G4TouchableHistory*) (pre_step_point->GetTouchable()); - - G4String volumeName = theTouchable->GetVolume()->GetName() ; - int modVol=theTouchable->GetHistoryDepth(); - // Assume Gap as a most often case - get it through copy number - if(volumeName[volumeName.size() - 3] == 'G') { - modVol -= 2; - } else if(volumeName[volumeName.size() - 8] == 'A') { // second most often volume - modVol -= 1; - } else if(volumeName[volumeName.size() - 11] == 'C') { - modVol -= 2; - } else if(volumeName[volumeName.size() - 3] == 'R') { - modVol -= 3; - } else { - std::cout<<"Unknown volume ?? "<< volumeName << std::endl; - } - const G4AffineTransform moduleTransform= theTouchable->GetHistory()->GetTransform(modVol); - G4ThreeVector theLocalPoint = moduleTransform.TransformPoint(p); - - - // we've shifted the endcap, we have to project the geometry to a - // different point). - G4double pointZ = p.z(); - - int etaIndex,phiIndex; - float x = theLocalPoint.x(),y=theLocalPoint.y(); - int sampling = m_FCalSampling; - bool ok = m_ChannelMap->getTileID(sampling, - x, - y, - etaIndex, - phiIndex); - - - G4ThreeVector pointShift(x, y, theLocalPoint.z() + m_Zshift); - // zSide is negative if z<0. - G4int zSide = 2; - if (pointZ < 0.) zSide = -zSide; - - m_identifier.clear(); - if (ok) { - // we have a active or non-active hit inside the FCal - G4int sampling = m_FCalSampling; - - - // Append the values to the empty identifier. - m_identifier << 4 // LArCalorimeter - << 3 // LArFCAL - << zSide // EndCap - << sampling // FCal Module # - << etaIndex - << phiIndex; - -// std::cout << "LArG4FCAL/LArFCALH62004CalibCalculatorBase: 4/3/" -// <<zSide<<"/" -// <<sampling<<"/" -// <<etaIndex<<"/" -// <<phiIndex<<": " -// << m_energies[0] << ", " -// << m_energies[1] << ", " -// << m_energies[2] << ", " -// << m_energies[3] -// << ", i=" << i -// << ", j=" << j -// << ", l.x=" << theLocalPoint.x() -// << ", l.y=" << theLocalPoint.y() -// << ", p.x=" << p.x() -// << ", p.y=" << p.y() -// << ", deltaX=" << m_deltaX -// << ", deltaY=" << m_deltaY -// << std::endl; + +G4bool LArFCALH62004CalibCalculatorBase::Process(const G4Step* a_step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const LArG4::eCalculatorProcessing a_process) const { + // First, get the energy. + + energies.clear(); + if ( a_process == LArG4::kEnergyAndID || a_process == LArG4::kOnlyEnergy ) + { + m_energyCalculator.Energies( a_step, energies ); + } + else + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); + + // find the space point for this deposit + G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); + G4StepPoint* post_step_point = a_step->GetPostStepPoint(); + G4ThreeVector startPoint = pre_step_point->GetPosition(); + G4ThreeVector endPoint = post_step_point->GetPosition(); + G4ThreeVector p = (startPoint + endPoint) * 0.5; + + // S.M.: this does not work - there are some volumes inside the + // FCAL which have their own local coordinate system and + // just result in (~0,~0) local coordinates. I think they should + // be treated as absorbers ... so I take the original coordinates + // instead ... + + // P.S. We sould go to FCAL mother volume, and work there + + // S.M. // get LOCAL (u,v) coordinates! + // S.M. G4Navigator* theNavigator = + // S.M. G4TransportationManager::GetTransportationManager()-> + // S.M. GetNavigatorForTracking(); + // S.M. G4ThreeVector theLocalPoint = theNavigator-> + // S.M. GetGlobalToLocalTransform(). + // S.M. TransformPoint(p); + + // Find a transformation to a module coordinate system + G4TouchableHistory* theTouchable = + (G4TouchableHistory*) (pre_step_point->GetTouchable()); + + G4String volumeName = theTouchable->GetVolume()->GetName() ; + int modVol=theTouchable->GetHistoryDepth(); + // Assume Gap as a most often case - get it through copy number + if(volumeName[volumeName.size() - 3] == 'G') { + modVol -= 2; + } else if(volumeName[volumeName.size() - 8] == 'A') { // second most often volume + modVol -= 1; + } else if(volumeName[volumeName.size() - 11] == 'C') { + modVol -= 2; + } else if(volumeName[volumeName.size() - 3] == 'R') { + modVol -= 3; + } else { + std::cout<<"Unknown volume ?? "<< volumeName << std::endl; + } + + const G4AffineTransform moduleTransform= theTouchable->GetHistory()->GetTransform(modVol); + G4ThreeVector theLocalPoint = moduleTransform.TransformPoint(p); + + + // we've shifted the endcap, we have to project the geometry to a + // different point). + G4double pointZ = p.z(); + + int etaIndex,phiIndex; + float x = theLocalPoint.x(),y=theLocalPoint.y(); + int sampling = m_FCalSampling; + bool ok = m_ChannelMap->getTileID(sampling, + x, + y, + etaIndex, + phiIndex); + + + G4ThreeVector pointShift(x, y, theLocalPoint.z() + m_Zshift); + // zSide is negative if z<0. + G4int zSide = 2; + if (pointZ < 0.) zSide = -zSide; + + identifier.clear(); + if (ok) { + // we have a active or non-active hit inside the FCal + G4int sampling = m_FCalSampling; + + + // Append the values to the empty identifier. + identifier << 4 // LArCalorimeter + << 3 // LArFCAL + << zSide // EndCap + << sampling // FCal Module # + << etaIndex + << phiIndex; + + // std::cout << "LArG4FCAL/LArFCALH62004CalibCalculatorBase: 4/3/" + // <<zSide<<"/" + // <<sampling<<"/" + // <<etaIndex<<"/" + // <<phiIndex<<": " + // << energies[0] << ", " + // << energies[1] << ", " + // << energies[2] << ", " + // << energies[3] + // << ", i=" << i + // << ", j=" << j + // << ", l.x=" << theLocalPoint.x() + // << ", l.y=" << theLocalPoint.y() + // << ", p.x=" << p.x() + // << ", p.y=" << p.y() + // << ", deltaX=" << m_deltaX + // << ", deltaY=" << m_deltaY + // << std::endl; + } + else { + // S.M.: we have a hit which fails the electrode identifier + // calculation. It's likely just a the border of the FCAL + // (outer or inner) and not really dead material ... Lacking a + // better method of assigning it to a correct cell I make a + // dead material identifier for it ... + + /* + int dubina=theTouchable->GetHistoryDepth(); + std::cout<<"----------------------"<<std::endl; + for( int kk=0; kk<=dubina; ++kk ) { + std::cout<<theTouchable->GetHistory()->GetVolume(kk)->GetName()<<" "<<theTouchable->GetHistory()->GetVolume(kk)->GetCopyNo()<<std::endl; } - else { - // S.M.: we have a hit which fails the electrode identifier - // calculation. It's likely just a the border of the FCAL - // (outer or inner) and not really dead material ... Lacking a - // better method of assigning it to a correct cell I make a - // dead material identifier for it ... - - /* - int dubina=theTouchable->GetHistoryDepth(); - std::cout<<"----------------------"<<std::endl; - for( int kk=0; kk<=dubina; ++kk ) { - std::cout<<theTouchable->GetHistory()->GetVolume(kk)->GetName()<<" "<<theTouchable->GetHistory()->GetVolume(kk)->GetCopyNo()<<std::endl; - } - */ - G4int sampling(3); // FCAL leakage - G4int type(1); // FCAL leakage - G4double eta = fabs( pointShift.pseudoRapidity() ); - G4double phi = pointShift.phi(); - G4double rho = theLocalPoint.perp(); - // since the outer edge of the FCal has a irregular shape we - // take the innermost position of the outermost tubes as min - // radius - this is about 3 cm from the outermost tube - // position ... - const G4double fcal_edge_approx = 415.0*CLHEP::mm; - G4int subdet; // LAr - if ( pointZ < 0. ) - subdet = -4; - else - subdet = 4; - if (phi < 0) phi += 2*M_PI; - G4int etaIndex; - G4int phiIndex; - G4int region; - if ( eta < 5 ) { - if(rho > fcal_edge_approx) { - type = 2; - sampling = m_FCalSampling; - region = 4; - etaIndex = 0; - phiIndex = G4int(phi*(32/M_PI)); - } else { - region = 0; - etaIndex = etaToBin1 (eta, 1.7); - phiIndex = G4int(phi*(32/M_PI)); - } - } - else if ( eta < 8 ) { - region = 1; - etaIndex = etaToBin2 (eta, 5.0); - phiIndex = G4int(phi*(32/M_PI)); - } - else { - region = 2; - etaIndex = 0; - phiIndex = 0; - } - - // Append the values to the empty identifier. - m_identifier << 10 // Calorimeter Dead Material - << subdet // LAr - << type - << sampling - << region - << etaIndex - << phiIndex; - /* - std::cout << "LArG4FCAL/LArFCALH62004CalibCalculatorBase: 10/4/" - <<type<<"/" - <<sampling<<"/" - <<region<<"/" - <<etaIndex<<"/" - <<phiIndex<<": " -// << m_energies[0] << ", " -// << m_energies[1] << ", " -// << m_energies[2] << ", " -// << m_energies[3] -// << ", i=" << i -// << ", j=" << j - << std::fixed - << ", l.r=" << rho - << ", l.x=" << theLocalPoint.x() - << ", l.y=" << theLocalPoint.y() - << ", l.z=" << theLocalPoint.z()<< std::endl; - - std::cout << ", p.x=" << p.x() - << ", p.y=" << p.y() - << ", p.z=" << p.z() - << ", l.zshift "<< theLocalPoint.z() + m_Zshift - << ", deltaX=" << m_deltaX - << ", deltaY=" << m_deltaY - << std::endl; - */ + */ + G4int sampling(3); // FCAL leakage + G4int type(1); // FCAL leakage + G4double eta = fabs( pointShift.pseudoRapidity() ); + G4double phi = pointShift.phi(); + G4double rho = theLocalPoint.perp(); + // since the outer edge of the FCal has a irregular shape we + // take the innermost position of the outermost tubes as min + // radius - this is about 3 cm from the outermost tube + // position ... + const G4double fcal_edge_approx = 415.0*CLHEP::mm; + G4int subdet; // LAr + if ( pointZ < 0. ) + subdet = -4; + else + subdet = 4; + if (phi < 0) phi += 2*M_PI; + G4int etaIndex; + G4int phiIndex; + G4int region; + if ( eta < 5 ) { + if(rho > fcal_edge_approx) { + type = 2; + sampling = m_FCalSampling; + region = 4; + etaIndex = 0; + phiIndex = G4int(phi*(32/M_PI)); + } else { + region = 0; + etaIndex = etaToBin1 (eta, 1.7); + phiIndex = G4int(phi*(32/M_PI)); } - - return true; + } + else if ( eta < 8 ) { + region = 1; + etaIndex = etaToBin2 (eta, 5.0); + phiIndex = G4int(phi*(32/M_PI)); + } + else { + region = 2; + etaIndex = 0; + phiIndex = 0; + } + + // Append the values to the empty identifier. + identifier << 10 // Calorimeter Dead Material + << subdet // LAr + << type + << sampling + << region + << etaIndex + << phiIndex; + /* + std::cout << "LArG4FCAL/LArFCALH62004CalibCalculatorBase: 10/4/" + <<type<<"/" + <<sampling<<"/" + <<region<<"/" + <<etaIndex<<"/" + <<phiIndex<<": " + // << energies[0] << ", " + // << energies[1] << ", " + // << energies[2] << ", " + // << energies[3] + // << ", i=" << i + // << ", j=" << j + << std::fixed + << ", l.r=" << rho + << ", l.x=" << theLocalPoint.x() + << ", l.y=" << theLocalPoint.y() + << ", l.z=" << theLocalPoint.z()<< std::endl; + + std::cout << ", p.x=" << p.x() + << ", p.y=" << p.y() + << ", p.z=" << p.z() + << ", l.zshift "<< theLocalPoint.z() + m_Zshift + << ", deltaX=" << m_deltaX + << ", deltaY=" << m_deltaY + << std::endl; + */ + } + + return true; } diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCALH62004CalibCalculatorBase.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCALH62004CalibCalculatorBase.h index adb1dc98b2eb50c2c226e80f0add3a174be89eb2..274e9802f1c4d0f188b3befd58cf48d1d4b29176 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCALH62004CalibCalculatorBase.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArFCALH62004CalibCalculatorBase.h @@ -5,71 +5,44 @@ #ifndef LArFCALH62004CalibCalculatorBase_H #define LArFCALH62004CalibCalculatorBase_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" - -#include "LArReadoutGeometry/FCAL_ChannelMap.h" -#include "RDBAccessSvc/IRDBRecordset.h" - -#include "LArG4Code/LArVCalculator.h" #include "CaloG4Sim/SimulationEnergies.h" - #include "globals.hh" #include <vector> + // Forward declaration for namespace CaloG4. class G4Step; +class FCAL_ChannelMap; +class IRDBRecordset; -class LArFCALH62004CalibCalculatorBase : public LArG4::VCalibrationCalculator { - - public: - LArFCALH62004CalibCalculatorBase(); - virtual ~LArFCALH62004CalibCalculatorBase(); - - virtual G4bool Process (const G4Step* step, - const LArG4::VCalibrationCalculator::eCalculatorProcessing p = LArG4::VCalibrationCalculator::kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } +class LArFCALH62004CalibCalculatorBase : public LArCalibCalculatorSvcImp { +public: + LArFCALH62004CalibCalculatorBase(const std::string& name, ISvcLocator * pSvcLocator); + virtual StatusCode initialize() override final; + virtual ~LArFCALH62004CalibCalculatorBase(); - virtual G4float OOTcut() const { return m_OOTcut; } + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const LArG4::eCalculatorProcessing p = LArG4::kEnergyAndID) const override final; - virtual G4double time() const { return m_time; } - virtual const std::vector<G4double>& energies() const { return m_energies; } - virtual G4bool isInTime() const { return m_isInTime; } - virtual G4bool isOutOfTime() const { return ( ! m_isInTime ); } - ///////////////////////////////////////////// +protected: - virtual G4double GetdeltaX(){return m_deltaX;} - virtual G4double GetdeltaY(){return m_deltaY;} + G4double m_deltaX; + G4double m_deltaY; - protected: - - G4double m_deltaX; - G4double m_deltaY; - - G4int m_FCalSampling; - - private: - - // The values calculated by Process() - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; + G4int m_FCalSampling; +private: // Energy calculator - CaloG4::SimulationEnergies m_energyCalculator; - - G4float m_OOTcut; - - // The results of the Process calculation: - G4double m_time; - G4bool m_isInTime; + CaloG4::SimulationEnergies m_energyCalculator; - FCAL_ChannelMap *m_ChannelMap; + FCAL_ChannelMap *m_ChannelMap; - const IRDBRecordset* m_fcalMod; - float m_Zshift; + const IRDBRecordset* m_fcalMod; + float m_Zshift; }; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004ActiveSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004ActiveSDTool.cc index 27ed180d1d8088b3af45880462642f38cbebf183..e331caeb2f2c72bf3c052e0b4ef2be6391907d2a 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004ActiveSDTool.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004ActiveSDTool.cc @@ -4,26 +4,30 @@ #include "LArG4H62004ActiveSDTool.h" -// For the SDs (including all their calculators) +// For the SDs #include "LArG4H62004CalibSD.h" -#include "LArG4EC/CalibrationCalculator.h" -#include "LArG4HEC/LocalCalibrationCalculator.h" -#include "LArFCAL1H62004CalibCalculator.h" -#include "LArFCAL2H62004CalibCalculator.h" -#include "LArG4H6COLDTCMod0CalibCalculator.h" - // For the hit collections #include "CxxUtils/make_unique.h" LArG4H62004ActiveSDTool::LArG4H62004ActiveSDTool(const std::string& type, const std::string& name, const IInterface *parent) : LArG4SDTool(type,name,parent) , m_HitColl("LArCalibrationHitActive") + , m_emepiwcalc("EMECPosInnerWheelCalibrationCalculator", name) + , m_heccalc("LocalCalibrationActiveCalculator", name) + , m_fcal1calc("LArFCAL1H62004CalibCalculator", name) + , m_fcal2calc("LArFCAL2H62004CalibCalculator", name) + , m_fcalcoldcalc("LArG4H6COLDTCMod0CalibCalculator", name) , m_emecSD(nullptr) , m_hecSD(nullptr) , m_fcal1SD(nullptr) , m_fcal2SD(nullptr) , m_fcalColdSD(nullptr) { + declareProperty("EMECPosIWCalibrationCalculator", m_emepiwcalc); + declareProperty("HECWheelActiveCalculator", m_heccalc); + declareProperty("FCAL1CalibCalculator", m_fcal1calc); + declareProperty("FCAL2CalibCalculator", m_fcal2calc); + declareProperty("FCALCOLDMod0CalibCalculator", m_fcalcoldcalc); declareProperty("EMECVolumes",m_emecVolumes); declareProperty("HECVolumes",m_hecVolumes); declareProperty("FCAL1Volumes",m_fcal1Volumes); @@ -32,14 +36,24 @@ LArG4H62004ActiveSDTool::LArG4H62004ActiveSDTool(const std::string& type, const declareInterface<ISensitiveDetector>(this); } +StatusCode LArG4H62004ActiveSDTool::initializeCalculators() +{ + ATH_CHECK(m_emepiwcalc.retrieve()); + ATH_CHECK(m_heccalc.retrieve()); + ATH_CHECK(m_fcal1calc.retrieve()); + ATH_CHECK(m_fcal2calc.retrieve()); + ATH_CHECK(m_fcalcoldcalc.retrieve()); + return StatusCode::SUCCESS; +} + StatusCode LArG4H62004ActiveSDTool::initializeSD() { // Lots of singleton calculators !!! - if (m_emecVolumes.size()>0) m_emecSD = new LArG4H62004CalibSD( "EMEC::InnerModule::Calibration::H6" , new LArG4::EC::CalibrationCalculator(LArWheelCalculator::InnerAbsorberWheel, 1) , m_doPID ); - if (m_hecVolumes.size()>0) m_hecSD = new LArG4H62004CalibSD( "HEC::Module::Depth::Slice::Local::Calibration::H6", new LArG4::HEC::LocalCalibrationCalculator(LArG4::HEC::kLocActive) , m_doPID ); - if (m_fcal1Volumes.size()>0) m_fcal1SD = new LArG4H62004CalibSD( "LAr::FCAL::Module1::Gap::Calibration::H6" , LArFCAL1H62004CalibCalculator::GetCalculator() , m_doPID ); - if (m_fcal2Volumes.size()>0) m_fcal2SD = new LArG4H62004CalibSD( "LAr::FCAL::Module2::Gap::Calibration::H6" , LArFCAL2H62004CalibCalculator::GetCalculator() , m_doPID ); - if (m_fcalColdVolumes.size()>0) m_fcalColdSD = new LArG4H62004CalibSD( "LAr::FCAL::ColdTC::Gap::Calibration::H6" , new LArG4H6COLDTCMod0CalibCalculator() , m_doPID ); + if (m_emecVolumes.size()>0) m_emecSD = new LArG4H62004CalibSD( "EMEC::InnerModule::Calibration::H6" , &*m_emepiwcalc , m_doPID ); + if (m_hecVolumes.size()>0) m_hecSD = new LArG4H62004CalibSD( "HEC::Module::Depth::Slice::Local::Calibration::H6", &*m_heccalc , m_doPID ); + if (m_fcal1Volumes.size()>0) m_fcal1SD = new LArG4H62004CalibSD( "LAr::FCAL::Module1::Gap::Calibration::H6" , &*m_fcal1calc , m_doPID ); + if (m_fcal2Volumes.size()>0) m_fcal2SD = new LArG4H62004CalibSD( "LAr::FCAL::Module2::Gap::Calibration::H6" , &*m_fcal2calc , m_doPID ); + if (m_fcalColdVolumes.size()>0) m_fcalColdSD = new LArG4H62004CalibSD( "LAr::FCAL::ColdTC::Gap::Calibration::H6" , &*m_fcalcoldcalc , m_doPID ); std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; if (m_emecVolumes.size()>0) configuration[m_emecSD] = &m_emecVolumes; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004ActiveSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004ActiveSDTool.h index cc0d265d11c57ffd3bac4b348b93cd0a6aa597cc..f278b7982bf952428ee0788e3185fb0cc63bb4b1 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004ActiveSDTool.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004ActiveSDTool.h @@ -11,15 +11,19 @@ #include "StoreGate/WriteHandle.h" #include "CaloSimEvent/CaloCalibrationHitContainer.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" class LArG4H62004CalibSD; +/// DEPRECATED AND WILL BE REMOVED. +/// Please see LArG4::H62004ActiveSDTool instead. +/// class LArG4H62004ActiveSDTool : public LArG4SDTool { public: // Constructor LArG4H62004ActiveSDTool(const std::string& type, const std::string& name, const IInterface *parent); - + // Destructor virtual ~LArG4H62004ActiveSDTool() {} @@ -30,8 +34,15 @@ class LArG4H62004ActiveSDTool : public LArG4SDTool StatusCode Gather() override final; private: + StatusCode initializeCalculators() override final; + // The actual hit container - here because the base class is for both calib and standard SD tools SG::WriteHandle<CaloCalibrationHitContainer> m_HitColl; + ServiceHandle<ILArCalibCalculatorSvc> m_emepiwcalc; + ServiceHandle<ILArCalibCalculatorSvc> m_heccalc; + ServiceHandle<ILArCalibCalculatorSvc> m_fcal1calc; + ServiceHandle<ILArCalibCalculatorSvc> m_fcal2calc; + ServiceHandle<ILArCalibCalculatorSvc> m_fcalcoldcalc; LArG4H62004CalibSD* m_emecSD; LArG4H62004CalibSD* m_hecSD; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004CalibSD.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004CalibSD.cc index 7d2215bb51e0443aefd777c565784d56525c695e..d7aac6723f199849dbc8535c24d8a73f5e47a615 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004CalibSD.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004CalibSD.cc @@ -3,11 +3,11 @@ */ #include "LArG4H62004CalibSD.h" -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" #undef DEBUG_SD -LArG4H62004CalibSD::LArG4H62004CalibSD(G4String a_name, LArG4::VCalibrationCalculator* calc,bool doPID): +LArG4H62004CalibSD::LArG4H62004CalibSD(G4String a_name, ILArCalibCalculatorSvc* calc,bool doPID): LArG4CalibSD(a_name,calc,doPID) { #ifdef DEBUG_SD @@ -20,8 +20,10 @@ G4bool LArG4H62004CalibSD::ProcessHits(G4Step* a_step,G4TouchableHistory* /*ROhi #ifdef DEBUG_SD std::cout << "my name: "<<this->GetName()<<", calc: "<<LArG4::m_calculator<<std::endl; #endif + LArG4Identifier ident; + std::vector<G4double> energies; // Convert the G4Step into identifier and energy. - G4bool valid = m_calculator->Process(a_step, LArG4::VCalibrationCalculator::kEnergyAndID); + G4bool valid = m_calculator->Process(a_step, ident, energies, LArG4::kEnergyAndID); // Check that hit was valid. (It might be invalid if, for example, // it occurred outside the sensitive region. If such a thing @@ -35,9 +37,6 @@ G4bool LArG4H62004CalibSD::ProcessHits(G4Step* a_step,G4TouchableHistory* /*ROhi return false; } - // Fetch the values from the calculator. - LArG4Identifier ident = m_calculator->identifier(); - std::vector<G4double> energies = m_calculator->energies(); // Changing the ident to comply with H6 dictionary if(ident[1] == 1) { // EMEC module ident[6] += 8; // change phi id @@ -64,13 +63,13 @@ G4bool LArG4H62004CalibSD::SpecialHit(G4Step* a_step, std::cout<<"LArG4H62004CalibSD::SpecialHit called, calling calculator..."<<std::endl; #endif // Convert the G4Step into an identifier. - G4bool valid = m_calculator->Process( a_step, LArG4::VCalibrationCalculator::kOnlyID ); + LArG4Identifier ident; + std::vector<double> energies; + G4bool valid = m_calculator->Process( a_step, ident, energies, LArG4::kOnlyID ); // If we can't calculate the identifier, something is wrong. if ( ! valid ) return false; - // Fetch the identifier from the calculator. - LArG4Identifier ident = m_calculator->identifier(); // Changing the ident to comply with H6 dictionary if(ident[1] == 1) { // EMEC module ident[6] += 8; // change phi id diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004CalibSD.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004CalibSD.h index c36f93e31d877657f879a9b9ba9d79dec583e573..7d0afa541d4740bd8be36736a6c51170910a7f78 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004CalibSD.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004CalibSD.h @@ -19,7 +19,7 @@ class G4TouchableHistory; class LArG4H62004CalibSD : public LArG4CalibSD { public: - LArG4H62004CalibSD(G4String name,LArG4::VCalibrationCalculator* calc,bool doPID=false); + LArG4H62004CalibSD(G4String name,ILArCalibCalculatorSvc* calc,bool doPID=false); virtual ~LArG4H62004CalibSD() {} // The required functions for all sensitive detectors: diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadCalibrationCalculator.cc index 4825f0505c30e43c39b9d4d48ecb9445880a3365..1f7d7c736327f9ce78949569622c114db29aa5a9 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadCalibrationCalculator.cc @@ -15,7 +15,7 @@ //#include <algo.h> -#include "LArG4Code/CalibrationDefaultCalculator.h" +//#include "LArG4Code/CalibrationDefaultCalculator.h" #undef DEBUG_DMXYZ @@ -31,7 +31,7 @@ static double yrot = 45.*CLHEP::degree; static Hep3Vector shift; static HepRotation m13,my3; -static const double zSamplings[10] = { +static const double zSamplings[10] = { 3691.*CLHEP::mm, // z-start of EMEC active part (3691. + 536.)*CLHEP::mm, // z-end of EMEC active part (4317. + 12.5)*CLHEP::mm, // z-start of HEC-1 active part @@ -52,11 +52,11 @@ static const double dHec22 = 2*234.*CLHEP::mm; // depth of fourth sampling in HE //static const double shiftTB = 7339*CLHEP::mm; // Z_TB -> Z_ATLAS static const double EMrouter = 698.6*CLHEP::mm; // Outer part of the EMEC inner wheel static const double HECrouter = 1159.0*CLHEP::mm; // Outer part of our HEC module -//static const double EMrinner = 301.4*CLHEP::mm; // Inner r of the EMEC -static const double HECrinner1 = 372.0*CLHEP::mm; // Inner part of the HEC -static const double HECrinner2 = 475.0*CLHEP::mm; // Inner part of the HEC -static const double FCALrinner = 71.8*CLHEP::mm; // Inner part of the FCAL -static const double FCALrouter = 450.*CLHEP::mm; // Outer part of the FCAL +//static const double EMrinner = 301.4*CLHEP::mm; // Inner r of the EMEC +static const double HECrinner1 = 372.0*CLHEP::mm; // Inner part of the HEC +static const double HECrinner2 = 475.0*CLHEP::mm; // Inner part of the HEC +static const double FCALrinner = 71.8*CLHEP::mm; // Inner part of the FCAL +static const double FCALrouter = 450.*CLHEP::mm; // Outer part of the FCAL static const double TBzStart = 11067.*CLHEP::mm; //static const double TBzEnd = 12500.*CLHEP::mm; static const double offset = 20.*CLHEP::mm; // safety offset while calculated edges of different zones @@ -80,11 +80,10 @@ int etaToBin2 (G4double eta, G4double eta0) } -LArG4H62004DeadCalibrationCalculator::LArG4H62004DeadCalibrationCalculator() +LArG4H62004DeadCalibrationCalculator::LArG4H62004DeadCalibrationCalculator(const std::string& name, ISvcLocator * pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) { // Make sure there are no uninitialized variables. - //m_identifier = LArG4Identifier(); - m_identifier.clear(); Hep3Vector sh(0., yshift, zshift); const Hep3Vector colX(cos(yrot),sin(yrot),0); @@ -96,25 +95,25 @@ LArG4H62004DeadCalibrationCalculator::LArG4H62004DeadCalibrationCalculator() const Hep3Vector colZZ(0,0,1); my3 = HepRotation(colXX, colYY, colZZ); - shift = my3*sh; + shift = my3*sh; } -LArG4H62004DeadCalibrationCalculator::~LArG4H62004DeadCalibrationCalculator() +LArG4H62004DeadCalibrationCalculator::~LArG4H62004DeadCalibrationCalculator() { } -G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) +G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const LArG4::eCalculatorProcessing a_process ) const { // Some hard-coded numbers. // Think how to put it more correctly !!!! // Still not finished !!!!!! - // Make first transformation to ATLAS, and then use the data from DB - - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) { + // Make first transformation to ATLAS, and then use the data from DB + energies.clear(); + if ( a_process == LArG4::kEnergyAndID || a_process == LArG4::kOnlyEnergy ) { /* CaloG4::SimulationEnergies::ClassifyResult_t category = m_energyCalculator->Classify( a_step ); @@ -127,18 +126,18 @@ G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, m_energies.push_back( category.energy[CaloG4::SimulationEnergies::kInvisible0] ); m_energies.push_back( category.energy[CaloG4::SimulationEnergies::kEscaped] ); */ - m_energyCalculator.Energies( a_step, m_energies ); + m_energyCalculator.Energies( a_step, energies ); } else { - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); } - if ( a_process == kEnergyAndID || a_process == kOnlyID ) { - // m_identifier = LArG4Identifier(); - m_identifier.clear(); + if ( a_process == LArG4::kEnergyAndID || a_process == LArG4::kOnlyID ) { + // identifier = LArG4Identifier(); + identifier.clear(); // Calculate the identifier. G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); G4TouchableHistory* theTouchable = (G4TouchableHistory*) (pre_step_point->GetTouchable()); - // Volume name + // Volume name G4String hitVolume = theTouchable->GetVolume(0)->GetName(); // if(hitVolume.contains("::") ) { // int last = hitVolume.last(':'); @@ -151,13 +150,13 @@ G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, G4ThreeVector tbPoint = pre_step_point->GetPosition(); G4ThreeVector gPoint; - // Move all points before calorimeter to one plane + // Move all points before calorimeter to one plane if(tbPoint.z() < TBzStart) { tbPoint -= G4ThreeVector(0.,0.,tbPoint.z()-TBzStart); } gPoint = m13*tbPoint + shift; - double gz = gPoint.z(); + double gz = gPoint.z(); type = INT_MIN; sampling = INT_MIN; @@ -182,12 +181,12 @@ G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, // First the type, sampling and region if( gz < zSamplings[zStartEMEC]) { // before the EMEC - type = 1; sampling = 1; - if(eta < 3.2) { - region = 6; + type = 1; sampling = 1; + if(eta < 3.2) { + region = 6; etaBin = etaToBin1 (eta, 1.3); } else { - region = 7; + region = 7; etaBin = etaToBin1 (eta, 3.2); } } else if( gz < zSamplings[zEndEMEC]) { // in EMEC @@ -208,13 +207,13 @@ G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, type = 2; sampling = 1; region = 1; etaBin = 0; }else if(eta<3.2) { - type = 1; sampling = 1; region = 6; + type = 1; sampling = 1; region = 6; etaBin = etaToBin1 (eta, 1.3); }else if(eta<5.0) { - type = 1; sampling = 1; region = 7; + type = 1; sampling = 1; region = 7; etaBin = etaToBin1 (eta, 3.2); }else if(eta < 8.0) { - type = 1; sampling = 3; region = 1; + type = 1; sampling = 3; region = 1; etaBin = etaToBin2 (eta, 5.0); }else{ type = 1; sampling = 3; region = 2; @@ -226,10 +225,10 @@ G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, type = 1; sampling = 2; region = 3; etaBin = etaToBin1 (eta, 1.5); }else if (eta<5.0) { // before FCAL - type = 1; sampling = 1; region = 7; + type = 1; sampling = 1; region = 7; etaBin = etaToBin1 (eta, 3.2); }else if (eta<8.0) { - type = 1; sampling = 3; region = 1; + type = 1; sampling = 3; region = 1; etaBin = etaToBin2 (eta, 5.0); }else{ type = 1; sampling = 3; region = 2; @@ -313,53 +312,53 @@ G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, type = 1; sampling = 3; region = 2; etaBin = 0; }else if(eta>=5.0){ - type = 1; sampling = 3; region = 1; + type = 1; sampling = 3; region = 1; etaBin = etaToBin2 (eta, 5.0); if(etaBin < 0) etaBin = 0; }else{ if(gz < zSamplings[zEndEMEC]){ // 4117 - type = 1; sampling = 1; region = 7; + type = 1; sampling = 1; region = 7; etaBin = etaToBin1 (eta, 3.2); if(etaBin < 0) etaBin = 0; }else if(gz < (zSamplings[zEndEMEC] + 280.5)){ // 4205 - type = 2; sampling = 0; region = 5; + type = 2; sampling = 0; region = 5; etaBin = etaToBin1 (eta, 3.0); if(etaBin < 0) etaBin = 0; }else{ // 4215 - type = 2; sampling = 1; region = 5; + type = 2; sampling = 1; region = 5; etaBin = etaToBin1 (eta, 3.0); if(etaBin < 0) etaBin = 0; } } - - + + // if(eta<3.2){ // crack emec-hec // // LeakageDet::ColdNose it's a small corner between HEC0 and FCAL1 -// type = 1; sampling = 1; region = 7; +// type = 1; sampling = 1; region = 7; // etaBin = 0; // }else if (eta<5.0) { // before FCAL // if(gz < zSamplings[zEndEMEC]){ // 4117 -// type = 1; sampling = 1; region = 7; +// type = 1; sampling = 1; region = 7; // etaBin = int((eta - 3.2)/0.1); // }else if(gz < zSamplings[zStartHEC1]){ // 4105 -// type = 2; sampling = 0; region = 5; +// type = 2; sampling = 0; region = 5; // etaBin = int((eta - 3.0)/0.1); // }else{ // 4215 -// type = 2; sampling = 1; region = 5; +// type = 2; sampling = 1; region = 5; // etaBin = int((eta - 3.0)/0.1); // } // }else if (eta<8.0) { -// type = 1; sampling = 3; region = 1; +// type = 1; sampling = 3; region = 1; // etaBin = int((eta - 5.0)/0.2); // }else{ // type = 1; sampling = 3; region = 2; // etaBin = 0; // } - - - - - } else if(gz > zSamplings[zEndFCAL3]) { //after the FCAL + + + + + } else if(gz > zSamplings[zEndFCAL3]) { //after the FCAL if(eta < 3.2) { }else if(eta < 5) { type = 1; sampling = 3; region = 0; @@ -371,7 +370,7 @@ G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, type = 1; sampling = 3; region = 2; etaBin = 0; } }else if(gr>FCALrouter - offset) { // FCAL - HEC crack - type = 2; region = 4; etaBin = 0; + type = 2; region = 4; etaBin = 0; if(gz < zSamplings[zEndHEC1]-dHec12) sampling = 0; else if(gz < zSamplings[zEndHEC1]) sampling = 1; else if(gz < zSamplings[zEndHEC2] - dHec22) sampling = 2; @@ -381,7 +380,7 @@ G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, } else if(gr> FCALrinner) { // between FCAL modules (and before/after fcal for safety) if( eta < 5.0) { if(gz < zSamplings[zStartFCAL1] + offset*2.0) { - type = 2; sampling = 1; region = 5; + type = 2; sampling = 1; region = 5; etaBin = etaToBin1 (eta, 3.0); if(etaBin < 0) etaBin = 0; // type = 1; sampling = 1; region = 7; // 4117 @@ -405,7 +404,7 @@ G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, // God knows what could be here if(eta<5.0){ if(gz < zSamplings[zStartFCAL1]+offset*2.0 ) { - type = 2; sampling = 1; region = 5; + type = 2; sampling = 1; region = 5; etaBin = etaToBin1 (eta, 3.0); if(etaBin < 0) etaBin = 0; // type = 1; sampling = 1; region = 7; // 4117 @@ -440,16 +439,16 @@ G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, << std::endl; #ifdef DEBUG_DMXYZ // std::cout<<"DMXYZ task: "<< a_process <<std::endl; -// std::cout<<"UNEXP LArG4H62004DeadCalibrationCalculator "<<std::string(m_identifier)<<std::endl; - +// std::cout<<"UNEXP LArG4H62004DeadCalibrationCalculator "<<std::string(identifier)<<std::endl; + char str[1024]; sprintf(str,"UNEXP LArG4H6SD/LArG4H62004DeadCalibrationCalculator_%d",(int)a_process); - LArG4::CalibrationDefaultCalculator::Print(str,m_identifier,a_step,m_energies); + LArG4::CalibrationDefaultCalculator::Print(str,identifier,a_step,energies); #endif } else{ if(phiBin == 64) phiBin = 63; - m_identifier << 10 // Calorimeter + identifier << 10 // Calorimeter << 4 // Sub-det << type << sampling @@ -458,25 +457,24 @@ G4bool LArG4H62004DeadCalibrationCalculator::Process( const G4Step* a_step, << phiBin; #ifdef DEBUG_DMXYZ // std::cout<<"DMXYZ task: "<< a_process <<std::endl; -// std::cout<<"DMXYZ LArG4H62004DeadCalibrationCalculator: "<<std::string(m_identifier)<<std::endl; +// std::cout<<"DMXYZ LArG4H62004DeadCalibrationCalculator: "<<std::string(identifier)<<std::endl; char str[1024]; sprintf(str,"DMXYZ LArG4H6SD/LArG4H62004DeadCalibrationCalculator_%d",(int)a_process); - LArG4::CalibrationDefaultCalculator::Print(str,m_identifier,a_step,m_energies); - -// LArG4::CalibrationDefaultCalculator::Print("DMXYZ LArG4H62004DeadCalibrationCalculator",m_identifier,a_step,m_energies); + LArG4::CalibrationDefaultCalculator::Print(str,identifier,a_step,energies); + +// LArG4::CalibrationDefaultCalculator::Print("DMXYZ LArG4H62004DeadCalibrationCalculator",identifier,a_step,energies); #endif } } else -// m_identifier = LArG4Identifier(); - m_identifier.clear(); +// identifier = LArG4Identifier(); + identifier.clear(); // Check for bad result. - if ( m_identifier == LArG4Identifier() ){ + if ( identifier == LArG4Identifier() ){ std::cout<<"LArG4H62004DeadCalibrationCalculator bad identifier, return false...."<<std::endl; return false; } return true; } - diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadCalibrationCalculator.h index dc27abcb9b3b0048c0a430663618cf468b98be81..a065e173420ffcf157035439b3f0b65188941494 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadCalibrationCalculator.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadCalibrationCalculator.h @@ -5,7 +5,7 @@ #ifndef LArG4H62004DeadCalibrationCalculator_H #define LArG4H62004DeadCalibrationCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" @@ -13,28 +13,20 @@ #include <vector> +class G4Step; -class LArG4H62004DeadCalibrationCalculator : public LArG4::VCalibrationCalculator { +class LArG4H62004DeadCalibrationCalculator : public LArCalibCalculatorSvcImp { public: - LArG4H62004DeadCalibrationCalculator(); + LArG4H62004DeadCalibrationCalculator(const std::string& name, ISvcLocator * pSvcLocator); virtual ~LArG4H62004DeadCalibrationCalculator(); - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const LArG4::eCalculatorProcessing p = LArG4::kEnergyAndID) const override final; private: - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; - // Energy calculator CaloG4::SimulationEnergies m_energyCalculator; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadSDTool.cc index 3af7ee7524cd5c6bb96173efac1aaa721caab4e4..0f956720b85acc1ea0469cbd62918fd24f18698b 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadSDTool.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadSDTool.cc @@ -8,10 +8,6 @@ #include "CxxUtils/make_unique.h" -// The calculators that I need... -#include "LArG4HEC/LArHECCalibrationWheelCalculator.h" -#include "LArG4H62004DeadCalibrationCalculator.h" - // For escaped energy #include "CaloG4Sim/EscapedEnergyRegistry.h" #include "LArG4Code/EscapedEnergyProcessing.h" @@ -19,19 +15,27 @@ LArG4H62004DeadSDTool::LArG4H62004DeadSDTool(const std::string& type, const std::string& name, const IInterface *parent) : LArG4SDTool(type,name,parent) , m_HitColl("LArCalibrationHitDeadMaterial") + , m_calculator("LArG4H62004DeadCalibrationCalculator", name) , m_deadSD(nullptr) , m_uninstSD(nullptr) { declareProperty("doEscapedEnergy",m_do_eep=false); + declareProperty("Calculator", m_calculator); declareInterface<ISensitiveDetector>(this); } +StatusCode LArG4H62004DeadSDTool::initializeCalculators() +{ + ATH_CHECK(m_calculator.retrieve()); + return StatusCode::SUCCESS; +} + StatusCode LArG4H62004DeadSDTool::initializeSD() { // Lots of singleton calculators !!! - m_deadSD = new LArG4H62004CalibSD( "LArDead::Dead::H6" , new LArG4H62004DeadCalibrationCalculator() , m_doPID); + m_deadSD = new LArG4H62004CalibSD( "LArDead::Dead::H6" , &*m_calculator, m_doPID); // Take care of the default material - if (m_do_eep) m_uninstSD = new LArG4H62004CalibSD( "Default::Dead::Uninstrumented::Calibration::H6" , new LArG4H62004DeadCalibrationCalculator() , m_doPID ); + if (m_do_eep) m_uninstSD = new LArG4H62004CalibSD( "Default::Dead::Uninstrumented::Calibration::H6" , &*m_calculator, m_doPID ); std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; configuration[m_deadSD] = &m_volumeNames; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadSDTool.h index 3ff3b5c4bf173dcca36a4fedd14939edbee87cf0..4aba4280119b9a5f565c28e293a0a8e0f69c0f1a 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadSDTool.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004DeadSDTool.h @@ -11,15 +11,19 @@ #include "StoreGate/WriteHandle.h" #include "CaloSimEvent/CaloCalibrationHitContainer.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" class LArG4H62004CalibSD; +/// DEPRECATED AND WILL BE REMOVED. +/// Please see LArG4::H62004DeadSDTool instead. +/// class LArG4H62004DeadSDTool : public LArG4SDTool { public: // Constructor LArG4H62004DeadSDTool(const std::string& type, const std::string& name, const IInterface *parent); - + // Destructor virtual ~LArG4H62004DeadSDTool() {} @@ -32,14 +36,18 @@ class LArG4H62004DeadSDTool : public LArG4SDTool /** Beginning of an athena event. This is where collection initialization should happen. If we are using a WriteHandle, then this could be empty. */ // StatusCode SetupEvent() override final; - + private: + StatusCode initializeCalculators() override final; + // Do we add the escaped energy processing? This is only in "mode 1" (Tile+LAr), not in "DeadLAr" mode bool m_do_eep; // The actual hit container - here because the base class is for both calib and standard SD tools SG::WriteHandle<CaloCalibrationHitContainer> m_HitColl; + ServiceHandle<ILArCalibCalculatorSvc> m_calculator; + // The volumes per SD, and the corresponding SDs LArG4H62004CalibSD* m_deadSD; LArG4H62004CalibSD* m_uninstSD; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004EMECSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004EMECSDTool.cc index 6ee7358ef5dfe870d37417ef551cf2caca93b9ae..d69b82e2e2c23de81cd4df2aef783868387bbd7b 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004EMECSDTool.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004EMECSDTool.cc @@ -7,21 +7,27 @@ #include "LArG4Code/LArG4Hit.h" -#include "LArG4EC/EnergyCalculator.h" - #include "CxxUtils/make_unique.h" LArG4H62004EMECSDTool::LArG4H62004EMECSDTool(const std::string& type, const std::string& name, const IInterface *parent) : LArG4SDTool(type,name,parent) , m_HitColl("LArHitEMEC") + , m_calculator("EMECPosInnerWheel_ECOR_GADJCalculator", name) , m_emecSD(nullptr) { declareInterface<ISensitiveDetector>(this); + declareProperty("Calculator", m_calculator); +} + +StatusCode LArG4H62004EMECSDTool::initializeCalculators() +{ + ATH_CHECK(m_calculator.retrieve()); + return StatusCode::SUCCESS; } StatusCode LArG4H62004EMECSDTool::initializeSD() { - m_emecSD = new LArG4H62004SD( "LAr::EMEC::InnerModule::H6" , new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberModule,LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ) , m_timeBinType , m_timeBinWidth ); + m_emecSD = new LArG4H62004SD( "LAr::EMEC::InnerModule::H6" , &*m_calculator , m_timeBinType , m_timeBinWidth ); std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; configuration[m_emecSD] = &m_volumeNames; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004EMECSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004EMECSDTool.h index 4e4687136818d7504153d41efe27cc7cfe1f8e3f..d9984a0607fec2f392e54986a32d60e0fce558cb 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004EMECSDTool.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004EMECSDTool.h @@ -6,6 +6,8 @@ #define LARG4H62004EMECSDTOOL_H #include "LArG4Code/LArG4SDTool.h" +#include "LArG4Code/ILArCalculatorSvc.h" + #include <string> #include <vector> @@ -14,12 +16,15 @@ class LArG4SimpleSD; +/// DEPRECATED AND WILL BE REMOVED. +/// Please see LArG4::H62004EMECSDTool instead. +/// class LArG4H62004EMECSDTool : public LArG4SDTool { - public: +public: // Constructor LArG4H62004EMECSDTool(const std::string& type, const std::string& name, const IInterface *parent); - + // Destructor virtual ~LArG4H62004EMECSDTool() {} @@ -28,14 +33,17 @@ class LArG4H62004EMECSDTool : public LArG4SDTool // Calls down to all the SDs to get them to pack their hits into a central collection StatusCode Gather() override final; - + /** Beginning of an athena event. This is where collection initialization should happen. - If we are using a WriteHandle, then this could be empty. */ -// StatusCode SetupEvent() override final; + If we are using a WriteHandle, then this could be empty. */ + // StatusCode SetupEvent() override final; + +private: + StatusCode initializeCalculators() override final; - private: // The actual hit container - here because the base class is for both calib and standard SD tools SG::WriteHandle<LArHitContainer> m_HitColl; + ServiceHandle<ILArCalculatorSvc> m_calculator; LArG4SimpleSD* m_emecSD; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004FCALSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004FCALSDTool.cc index dc1df99757ea9c7361f140b9c21b004e97c138e5..acfe76ba13fc272c7b2f50658c2dd643e412e3e0 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004FCALSDTool.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004FCALSDTool.cc @@ -5,32 +5,40 @@ #include "LArG4H62004FCALSDTool.h" #include "LArG4H62004SD.h" -#include "LArG4FCAL/LArFCAL1Calculator.h" -#include "LArG4FCAL/LArFCAL2Calculator.h" -#include "LArG4H6COLDTCMod0Calculator.h" - #include "CxxUtils/make_unique.h" LArG4H62004FCALSDTool::LArG4H62004FCALSDTool(const std::string& type, const std::string& name, const IInterface *parent) : LArG4SDTool(type,name,parent) , m_HitColl("LArHitFCAL") + , m_fcal1calc("FCAL1Calculator", name) + , m_fcal2calc("FCAL2Calculator", name) + , m_fcalcoldcalc("FCALColdCalculator", name) , m_fcal1SD(nullptr) , m_fcal2SD(nullptr) , m_fcalColdSD(nullptr) { + declareProperty("FCAL1Calculator", m_fcal1calc); + declareProperty("FCAL2Calculator", m_fcal2calc); + declareProperty("FCALColdCalculator", m_fcalcoldcalc); declareProperty( "FCAL1Volumes" , m_fcal1Volumes ); declareProperty( "FCAL2Volumes" , m_fcal2Volumes ); declareProperty( "FCALColdVolumes" , m_fcalColdVolumes ); declareInterface<ISensitiveDetector>(this); } +StatusCode LArG4H62004FCALSDTool::initializeCalculators() +{ + ATH_CHECK(m_fcal1calc.retrieve()); + ATH_CHECK(m_fcal2calc.retrieve()); + ATH_CHECK(m_fcalcoldcalc.retrieve()); + return StatusCode::SUCCESS; +} + StatusCode LArG4H62004FCALSDTool::initializeSD() { - m_fcal1SD = new LArG4H62004SD( "LAr::FCAL::Module1::Gap::H6" , LArFCAL1Calculator::GetInstance() , m_timeBinType , m_timeBinWidth ); - m_fcal2SD = new LArG4H62004SD( "LAr::FCAL::Module2::Gap::H6" , LArFCAL2Calculator::GetInstance() , m_timeBinType , m_timeBinWidth ); - LArG4H6COLDTCMod0Calculator* aCalc = LArG4H6COLDTCMod0Calculator::GetInstance(); - aCalc->SetOutOfTimeCut(10000.); - m_fcalColdSD = new LArG4H62004SD( "LAr::FCAL::ColdTC::H6" , aCalc , m_timeBinType , m_timeBinWidth ); + m_fcal1SD = new LArG4H62004SD( "LAr::FCAL::Module1::Gap::H6" , &*m_fcal1calc , m_timeBinType , m_timeBinWidth ); + m_fcal2SD = new LArG4H62004SD( "LAr::FCAL::Module2::Gap::H6" , &*m_fcal2calc , m_timeBinType , m_timeBinWidth ); + m_fcalColdSD = new LArG4H62004SD( "LAr::FCAL::ColdTC::H6" , &*m_fcalcoldcalc , m_timeBinType , m_timeBinWidth ); std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; configuration[m_fcal1SD] = &m_fcal1Volumes; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004FCALSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004FCALSDTool.h index c86ff7da379868d99e95ce90e0a61736d299c39e..274a2ff0bfedfee7cce430dbcf3e11cd8a6c54e8 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004FCALSDTool.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004FCALSDTool.h @@ -11,15 +11,19 @@ #include "StoreGate/WriteHandle.h" #include "LArSimEvent/LArHitContainer.h" +#include "LArG4Code/ILArCalculatorSvc.h" class LArG4SimpleSD; +/// DEPRECATED AND WILL BE REMOVED. +/// Please see LArG4::H62004FCALSDTool instead. +/// class LArG4H62004FCALSDTool : public LArG4SDTool { public: // Constructor LArG4H62004FCALSDTool(const std::string& type, const std::string& name, const IInterface *parent); - + // Destructor virtual ~LArG4H62004FCALSDTool() {} @@ -30,9 +34,14 @@ class LArG4H62004FCALSDTool : public LArG4SDTool StatusCode Gather() override final; private: + StatusCode initializeCalculators() override final; + // The actual hit container - here because the base class is for both calib and standard SD tools SG::WriteHandle<LArHitContainer> m_HitColl; + ServiceHandle<ILArCalculatorSvc> m_fcal1calc; + ServiceHandle<ILArCalculatorSvc> m_fcal2calc; + ServiceHandle<ILArCalculatorSvc> m_fcalcoldcalc; // Sensitive detectors and their corresponding volumes LArG4SimpleSD* m_fcal1SD; LArG4SimpleSD* m_fcal2SD; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004HECSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004HECSDTool.cc index a9dc20e0b04f4cacf9a1716cdc16d09a6dc36279..1ba8dc151160cb0cb4b795fd6280cba778349804 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004HECSDTool.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004HECSDTool.cc @@ -7,24 +7,27 @@ #include "LArG4Code/LArG4Hit.h" -#include "LArG4HEC/LArHECLocalCalculator.h" - #include "CxxUtils/make_unique.h" LArG4H62004HECSDTool::LArG4H62004HECSDTool(const std::string& type, const std::string& name, const IInterface *parent) : LArG4SDTool(type,name,parent) , m_HitColl("LArHitHEC") + , m_calculator("LArH62004HECLocalCalculator", name) , m_wheelSD(nullptr) { declareInterface<ISensitiveDetector>(this); + declareProperty("Calculator", m_calculator); +} + +StatusCode LArG4H62004HECSDTool::initializeCalculators() +{ + ATH_CHECK(m_calculator.retrieve()); + return StatusCode::SUCCESS; } StatusCode LArG4H62004HECSDTool::initializeSD() { - LArHECLocalCalculator* aCalc = LArHECLocalCalculator::GetCalculator(); - aCalc->SetOutOfTimeCut(10000.); - aCalc->SetX(true); - m_wheelSD = new LArG4H62004SD( "LAr::HEC::Module::Depth::Slice::Local::H6" , aCalc , m_timeBinType , m_timeBinWidth ); + m_wheelSD = new LArG4H62004SD( "LAr::HEC::Module::Depth::Slice::Local::H6" , &*m_calculator , m_timeBinType , m_timeBinWidth ); std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; configuration[m_wheelSD] = &m_volumeNames; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004HECSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004HECSDTool.h index 05770d5685312c03b0b95cb8be755919b083e390..d1b0d7be1f756eed120b84560336d86538e1eb49 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004HECSDTool.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004HECSDTool.h @@ -11,18 +11,24 @@ #include "StoreGate/WriteHandle.h" #include "LArSimEvent/LArHitContainer.h" +#include "LArG4Code/ILArCalculatorSvc.h" class LArG4SimpleSD; +/// DEPRECATED AND WILL BE REMOVED. +/// Please see LArG4::H62004HECSDTool instead. +/// class LArG4H62004HECSDTool : public LArG4SDTool { public: // Constructor LArG4H62004HECSDTool(const std::string& type, const std::string& name, const IInterface *parent); - + // Destructor virtual ~LArG4H62004HECSDTool() {} + virtual StatusCode initializeCalculators() override final; + // Method in which all the SDs are created and assigned to the relevant volumes StatusCode initializeSD() override final; @@ -32,7 +38,7 @@ class LArG4H62004HECSDTool : public LArG4SDTool private: // The actual hit container - here because the base class is for both calib and standard SD tools SG::WriteHandle<LArHitContainer> m_HitColl; - + ServiceHandle<ILArCalculatorSvc> m_calculator; LArG4SimpleSD* m_wheelSD; }; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004InactiveSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004InactiveSDTool.cc index c067a6aee88d8393ed849eb96f456cf02c9d6c49..7adee5eaccd352e4b47b2eb20febefc4356ed0c5 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004InactiveSDTool.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004InactiveSDTool.cc @@ -8,15 +8,13 @@ #include "CxxUtils/make_unique.h" -// All the calculators that I need -#include "LArG4EC/CalibrationCalculator.h" -#include "LArG4HEC/LocalCalibrationCalculator.h" -#include "LArFCAL1H62004CalibCalculator.h" -#include "LArFCAL2H62004CalibCalculator.h" - LArG4H62004InactiveSDTool::LArG4H62004InactiveSDTool(const std::string& type, const std::string& name, const IInterface *parent) : LArG4SDTool(type,name,parent) , m_HitColl("LArCalibrationHitInactive") + , m_emepiwcalc("EMECPosInnerWheelCalibrationCalculator", name) + , m_heccalc("LocalCalibrationInactiveCalculator", name) + , m_fcal1calc("LArFCAL1H62004CalibCalculator", name) + , m_fcal2calc("LArFCAL2H62004CalibCalculator", name) , m_emecSD(nullptr) , m_hecSD(nullptr) , m_fcal1SD(nullptr) @@ -26,16 +24,29 @@ LArG4H62004InactiveSDTool::LArG4H62004InactiveSDTool(const std::string& type, co declareProperty("HECVolumes",m_hecVolumes); declareProperty("FCAL1Volumes",m_fcal1Volumes); declareProperty("FCAL2Volumes",m_fcal2Volumes); + declareProperty("EMECPosIWCalibrationCalculator", m_emepiwcalc); + declareProperty("HECWheelInactiveCalculator", m_heccalc); + declareProperty("FCAL1CalibCalculator", m_fcal1calc); + declareProperty("FCAL2CalibCalculator", m_fcal2calc); declareInterface<ISensitiveDetector>(this); } +StatusCode LArG4H62004InactiveSDTool::initializeCalculators() +{ + ATH_CHECK(m_emepiwcalc.retrieve()); + ATH_CHECK(m_heccalc.retrieve()); + ATH_CHECK(m_fcal1calc.retrieve()); + ATH_CHECK(m_fcal2calc.retrieve()); + return StatusCode::SUCCESS; +} + StatusCode LArG4H62004InactiveSDTool::initializeSD() { // Setup calculator and collection - if (m_emecVolumes.size()>0) m_emecSD = new LArG4H62004CalibSD( "LAr::EMEC::InnerModule::Inactive::H6" , new LArG4::EC::CalibrationCalculator(LArWheelCalculator::InnerAbsorberWheel,1) , m_doPID ); - if (m_hecVolumes.size()>0) m_hecSD = new LArG4H62004CalibSD( "LAr::HEC::Local::Inactive::H6" , new LArG4::HEC::LocalCalibrationCalculator(LArG4::HEC::kLocInactive) , m_doPID ); - if (m_fcal1Volumes.size()>0) m_fcal1SD = new LArG4H62004CalibSD( "LAr::FCAL::Inactive1::H6" , LArFCAL1H62004CalibCalculator::GetCalculator() , m_doPID ); - if (m_fcal2Volumes.size()>0) m_fcal2SD = new LArG4H62004CalibSD( "LAr::FCAL::Inactive2::H6" , LArFCAL2H62004CalibCalculator::GetCalculator() , m_doPID ); + if (m_emecVolumes.size()>0) m_emecSD = new LArG4H62004CalibSD( "LAr::EMEC::InnerModule::Inactive::H6" , &*m_emepiwcalc , m_doPID ); + if (m_hecVolumes.size()>0) m_hecSD = new LArG4H62004CalibSD( "LAr::HEC::Local::Inactive::H6" , &*m_heccalc , m_doPID ); + if (m_fcal1Volumes.size()>0) m_fcal1SD = new LArG4H62004CalibSD( "LAr::FCAL::Inactive1::H6" , &*m_fcal1calc , m_doPID ); + if (m_fcal2Volumes.size()>0) m_fcal2SD = new LArG4H62004CalibSD( "LAr::FCAL::Inactive2::H6" , &*m_fcal2calc , m_doPID ); std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; if (m_emecVolumes.size()>0) configuration[m_emecSD] = &m_emecVolumes; @@ -43,7 +54,7 @@ StatusCode LArG4H62004InactiveSDTool::initializeSD() if (m_fcal1Volumes.size()>0) configuration[m_fcal1SD] = &m_fcal1Volumes; if (m_fcal2Volumes.size()>0) configuration[m_fcal2SD] = &m_fcal2Volumes; setupAllSDs(configuration); - + // make sure they have the identifiers they need if (m_emecVolumes.size()>0) setupHelpers(m_emecSD); if (m_hecVolumes.size()>0) setupHelpers(m_hecSD); diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004InactiveSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004InactiveSDTool.h index 786b1bee895ee06af0553fcec0157b8cac3af394..9984c4d6d8d189caf5064352d6dd0830230e1dce 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004InactiveSDTool.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004InactiveSDTool.h @@ -11,18 +11,24 @@ #include "StoreGate/WriteHandle.h" #include "CaloSimEvent/CaloCalibrationHitContainer.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" class LArG4CalibSD; +/// DEPRECATED AND WILL BE REMOVED. +/// Please see LArG4::H62004InactiveSDTool instead. +/// class LArG4H62004InactiveSDTool : public LArG4SDTool { public: // Constructor LArG4H62004InactiveSDTool(const std::string& type, const std::string& name, const IInterface *parent); - + // Destructor virtual ~LArG4H62004InactiveSDTool() {} + virtual StatusCode initializeCalculators() override final; + // Method in which all the SDs are created and assigned to the relevant volumes StatusCode initializeSD() override final; @@ -33,6 +39,11 @@ class LArG4H62004InactiveSDTool : public LArG4SDTool // The actual hit container - here because the base class is for both calib and standard SD tools SG::WriteHandle<CaloCalibrationHitContainer> m_HitColl; + ServiceHandle<ILArCalibCalculatorSvc>m_emepiwcalc; + ServiceHandle<ILArCalibCalculatorSvc>m_heccalc; + ServiceHandle<ILArCalibCalculatorSvc>m_fcal1calc; + ServiceHandle<ILArCalibCalculatorSvc>m_fcal2calc; + // The list of volumes and the corresponding SDs LArG4CalibSD* m_emecSD; LArG4CalibSD* m_hecSD; @@ -45,7 +56,7 @@ class LArG4H62004InactiveSDTool : public LArG4SDTool /// Am I running with particle ID calibration hits? //bool m_particleId; - + }; #endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004SD.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004SD.cc index 15ce89774988987bd5111f4ef6dc2e6175a12df8..0959901878e68059adfa6af76935bff6c36d1c70 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004SD.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004SD.cc @@ -4,7 +4,7 @@ #include "LArG4H62004SD.h" -#include "LArG4Code/LArVCalculator.h" +#include "LArG4Code/ILArCalculatorSvc.h" #include "G4Step.hh" #include "G4ios.hh" @@ -13,7 +13,7 @@ #undef DEBUG_ME -LArG4H62004SD::LArG4H62004SD(G4String a_name, LArVCalculator* calc, const std::string& type, const float width) +LArG4H62004SD::LArG4H62004SD(G4String a_name, ILArCalculatorSvc* calc, const std::string& type, const float width) : LArG4SimpleSD(a_name,calc,type,width) { @@ -42,7 +42,8 @@ G4bool LArG4H62004SD::ProcessHits(G4Step* a_step,G4TouchableHistory* /*ROhist*/) if (edep == 0.) return false; // Convert the G4Step into (eta,phi,sampling). - G4bool valid = m_calculator->Process(a_step); + std::vector<LArHitData> hdata; + G4bool valid = m_calculator->Process(a_step, hdata); // Check that hit was valid. (It might be invalid if, for example, // it occurred outside the sensitive region. If such a thing @@ -58,15 +59,15 @@ G4bool LArG4H62004SD::ProcessHits(G4Step* a_step,G4TouchableHistory* /*ROhist*/) // A calculator can determine that a given energy deposit results // in more than one hit in the simulation. FOr each such hit... bool result = true; - for(int ihit=0;ihit<m_calculator->getNumHits();ihit++) + for(auto larhit : hdata) { - LArG4Identifier ident = m_calculator->identifier(ihit); + LArG4Identifier ident = larhit.id; if(ident[0] == 10) { // dead hit, where to put it ? // probably skip in the regular container continue; } - G4double time = m_calculator->time(ihit); - G4double energy = m_calculator->energy(ihit); + G4double time = larhit.time; + G4double energy = larhit.energy; // Changing the ident to comply with H6 dictionary if(ident[1] == 1) { // EMEC module ident[6] += 20; // change phi id @@ -80,11 +81,10 @@ G4bool LArG4H62004SD::ProcessHits(G4Step* a_step,G4TouchableHistory* /*ROhist*/) if(ident[3]==1 && ident[5] > 2) ident[5]=2; } } - + result = result && SimpleHit( ident, time, energy ); - + }// for each hit return by the calculator. return result; } - diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004SD.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004SD.h index d9a16eaddc28c261fe74964d60c1eef04686d155..2f497465aa4dbf99265bac1236349be0531450ca 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004SD.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H62004SD.h @@ -9,7 +9,7 @@ #include "LArG4Code/LArG4SimpleSD.h" // Forward declarations. -class LArVCalculator; +class ILArCalculatorSvc; class G4Step; class G4TouchableHistory; @@ -17,7 +17,7 @@ class G4TouchableHistory; class LArG4H62004SD : public LArG4SimpleSD { public: - LArG4H62004SD(G4String name, LArVCalculator* calc, const std::string& type, const float width); + LArG4H62004SD(G4String name, ILArCalculatorSvc* calc, const std::string& type, const float width); virtual ~LArG4H62004SD() {} // The required functions for all sensitive detectors: diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6BeamSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6BeamSDTool.cc index 7594d5e54c5aab6679cc56013bd1f89ef964400b..1fc6a31c4f614ce479c2ccd5d12a41f05f7e38d4 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6BeamSDTool.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6BeamSDTool.cc @@ -16,6 +16,8 @@ LArG4H6BeamSDTool::LArG4H6BeamSDTool(const std::string& type, const std::string& G4VSensitiveDetector* LArG4H6BeamSDTool::makeSD() { ATH_MSG_DEBUG( "Initializing SD" ); + //FIXME better to use a configurable property here? + // be smart, and take only last part of the name G4String colname = G4String(name()).strip(G4String::both,':'); if ( colname.contains(':') ) diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6BeamSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6BeamSDTool.h index b4738cab69d47bed35ac32ced95e94f3bf7b0184..3d54cc1a30dedfc825a772a251995d25ceff75d5 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6BeamSDTool.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6BeamSDTool.h @@ -12,7 +12,7 @@ class LArG4H6BeamSDTool : public SensitiveDetectorBase public: LArG4H6BeamSDTool(const std::string& type, const std::string& name, const IInterface *parent); virtual ~LArG4H6BeamSDTool() {} - + G4VSensitiveDetector* makeSD() override final; }; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0Calculator.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0Calculator.cc index f3e9665c98d9e9d2b6f3c10aa4f1e0fa8c988ac5..7ae9c3e520830f7bbf36a2b6a2e1fb2642d4cbb0 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0Calculator.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0Calculator.cc @@ -7,20 +7,15 @@ // ATLAS LAr includes #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVG4DetectorParameters.h" - // Geant4 includes +#include "G4NavigationHistory.hh" #include "G4LogicalVolume.hh" #include "G4VPhysicalVolume.hh" #include "G4ThreeVector.hh" #include "G4StepPoint.hh" #include "G4Step.hh" #include "globals.hh" - -#include "G4TransportationManager.hh" -#include "G4Navigator.hh" -#include "G4ios.hh" #include "AthenaKernel/Units.h" #include <cstdlib> @@ -34,86 +29,79 @@ namespace Units = Athena::Units; -LArG4H6COLDTCMod0Calculator* LArG4H6COLDTCMod0Calculator::m_instance = 0; -LArG4H6COLDTCMod0Calculator* LArG4H6COLDTCMod0Calculator::GetInstance() { - if (m_instance == 0) { - m_instance = new LArG4H6COLDTCMod0Calculator(); - } - return m_instance; -} - - // constructor -LArG4H6COLDTCMod0Calculator::LArG4H6COLDTCMod0Calculator() - : m_OOTcut(0) - , m_identifier() +LArG4H6COLDTCMod0Calculator::LArG4H6COLDTCMod0Calculator(const std::string& name, ISvcLocator* pSvcLocator) + : LArCalculatorSvcImp(name, pSvcLocator) , m_FCalSampling(3) - , m_phiModuleStart(90.*CLHEP::deg) - , m_phiModuleEnd(180.*CLHEP::deg) - , m_fullModuleDepth(3.5*8*CLHEP::cm) - , m_fullActiveDepth(0.2*CLHEP::cm) - , m_innerActiveRadius(8.6*CLHEP::cm) - , m_outerActiveRadius(45.05*CLHEP::cm) - , m_areaActive(95.994*CLHEP::cm2) + , m_phiModuleStart(90.*Units::deg) + , m_phiModuleEnd(180.*Units::deg) + , m_fullModuleDepth(3.5*8*Units::cm) + , m_fullActiveDepth(0.2*Units::cm) + , m_innerActiveRadius(8.6*Units::cm) + , m_outerActiveRadius(45.05*Units::cm) + , m_areaActive(95.994*Units::cm2) { - // explicitely do the same stuff as in LArFCALMod0CalculatorBase here + declareProperty("FCalSampling" , m_FCalSampling); + declareProperty("phiModuleStart" , m_phiModuleStart); + declareProperty("phiModuleEnd" , m_phiModuleEnd); + declareProperty("fullModuleDepth" , m_fullModuleDepth); + declareProperty("fullActiveDepth" , m_fullActiveDepth); + declareProperty("innerActiveRadius" , m_innerActiveRadius); + declareProperty("outerActiveRadius" , m_outerActiveRadius); + declareProperty("areaActive" , m_areaActive); +} +StatusCode LArG4H6COLDTCMod0Calculator::initialize() +{ // get channel map - LArG4H6COLDTCMod0ChannelMap theMap(m_innerActiveRadius, - m_outerActiveRadius, - m_areaActive, - m_phiModuleStart, - m_phiModuleEnd, - 8); - m_channelMap = theMap; - - m_time = 0.; - m_energy = 0.; - m_isInTime = false; - + m_channelMap = LArG4H6COLDTCMod0ChannelMap(m_innerActiveRadius, + m_outerActiveRadius, + m_areaActive, + m_phiModuleStart, + m_phiModuleEnd, + 8); + + return StatusCode::SUCCESS; } // hit processing -G4bool LArG4H6COLDTCMod0Calculator::Process(const G4Step* a_step) +G4bool LArG4H6COLDTCMod0Calculator::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) const { - + hdata.clear(); + LArHitData larhit; // Given a G4Step, determine the cell identifier. - + // 29-Mar-2002 WGS: this method now returns a boolean. If it's // true, the hit is valid; if it's false, there was some problem // with the hit and it should be ignored. // First, get the energy. - m_energy = a_step->GetTotalEnergyDeposit(); + larhit.energy = a_step->GetTotalEnergyDeposit(); // Find out how long it took the energy to get here. G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - G4double timeOfFlight = (pre_step_point->GetGlobalTime() + + G4double timeOfFlight = (pre_step_point->GetGlobalTime() + post_step_point->GetGlobalTime()) * 0.5; G4ThreeVector startPoint = pre_step_point->GetPosition(); G4ThreeVector endPoint = post_step_point->GetPosition(); G4ThreeVector p = (startPoint + endPoint) * 0.5; - + // Determine if the hit was in-time. - m_time = timeOfFlight/Units::ns - p.mag()/Units::c_light/Units::ns; - if (m_time > m_OOTcut) - m_isInTime = false; - else - m_isInTime = true; - + larhit.time = timeOfFlight/Units::ns - p.mag()/Units::c_light/Units::ns; + // get local coordinates - /* - G4Navigator* theNavigator = + /* + G4Navigator* theNavigator = G4TransportationManager::GetTransportationManager()-> GetNavigatorForTracking(); - + G4ThreeVector theLocalPoint = theNavigator-> GetGlobalToLocalTransform(). TransformPoint(p); */ G4ThreeVector theLocalPoint = pre_step_point->GetTouchable()->GetHistory()->GetTopTransform().TransformPoint(p); - + ///////////////////////////////////// // // For the cold tailcatcher: @@ -125,13 +113,13 @@ G4bool LArG4H6COLDTCMod0Calculator::Process(const G4Step* a_step) // 8 radial bins (range [0,7]) (consult with Seligman on coordinate // system transformation!) // - ///////////////////////////////////// + ///////////////////////////////////// // Strip the name of the volume: G4String hitVolume = pre_step_point->GetTouchable()->GetVolume(0)->GetName(); if(hitVolume.contains("::") ) { int last = hitVolume.last(':'); hitVolume.remove(0,last+1); - } + } int volnum = 0; if( hitVolume == "Gap") { volnum = pre_step_point->GetTouchable()->GetVolume(0)->GetCopyNo()-1; @@ -152,7 +140,7 @@ G4bool LArG4H6COLDTCMod0Calculator::Process(const G4Step* a_step) } else { etaIndex = int(etaIndex/4) + 8; } -// std::cout<<" etaIndex: "<<etaIndex<<" phiIndex: "<<phiIndex<<std::endl; +// std::cout<<" etaIndex: "<<etaIndex<<" phiIndex: "<<phiIndex<<std::endl; // zSide is negative if z<0. G4int zSide = p.z() < 0 ? -2 : 2; G4int sampling = m_FCalSampling; @@ -161,40 +149,32 @@ G4bool LArG4H6COLDTCMod0Calculator::Process(const G4Step* a_step) // // Cold TailCatcher: // - // sampling = 3 // fake FCal3 + // sampling = 3 // fake FCal3 // etaIndex = (radial bin #) // phiIndex = (azimuthal bin #) // ///////////////////////////////////////////////// - m_identifier.clear(); + larhit.id.clear(); if((etaIndex > 7 && phiIndex > 7) || (etaIndex <=7 && phiIndex <= 7)) { - std::cout<<"LArCOLDTCMod0Calculator::Process: Bad identifier !!!"<<std::endl; + std::cout<<"LArCOLDTCMod0Calculator::Process: Bad identifier !!!"<<std::endl; return false; } else { // Append the values to the empty identifier. // if(hitVolume == "Active") { - m_identifier << 4 // LArCalorimeter (same for cold TC) - << 3 // LArFCAL (same for cold TC) - << zSide // EndCap (same for cold TC) - << sampling // FCal Module # (3 for cold TC) - << etaIndex // (see above) - << phiIndex; // (see above) + larhit.id << 4 // LArCalorimeter (same for cold TC) + << 3 // LArFCAL (same for cold TC) + << zSide // EndCap (same for cold TC) + << sampling // FCal Module # (3 for cold TC) + << etaIndex // (see above) + << phiIndex; // (see above) // } else { // DeadM id. -// m_identifier << 10 -// << ; +// larhit.id << 10 +// << ; // } - + hdata.push_back(larhit); return true; } } - -G4bool LArG4H6COLDTCMod0Calculator::Process(const G4Step*, std::vector<LArHitData>&) -{ - std::cout << "Not implemented!" << std::endl; - throw; - return false; -} - diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0Calculator.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0Calculator.h index 888d5875d6306460be5a76a88aa01bcb259c4a25..8d57dfcb63c91bffc5376f572e630bf7c099edac 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0Calculator.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0Calculator.h @@ -12,89 +12,50 @@ #define LArG4H6COLDTCMod0Calculator_H #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVCalculator.h" -#include "LArG4Code/LArVG4DetectorParameters.h" - - -#include "G4TransportationManager.hh" -#include "G4Navigator.hh" -#include "G4ios.hh" +#include "LArG4Code/LArCalculatorSvcImp.h" #include "globals.hh" #include "LArG4H6COLDTCMod0ChannelMap.h" -#include <stdexcept> +//#include <stdexcept> -class LArG4H6COLDTCMod0Calculator: public LArVCalculator +class LArG4H6COLDTCMod0Calculator : public LArCalculatorSvcImp { public: - static LArG4H6COLDTCMod0Calculator* GetInstance(); - + LArG4H6COLDTCMod0Calculator(const std::string& name, ISvcLocator* pSvcLocator); + virtual StatusCode initialize() override final; // destructor virtual ~LArG4H6COLDTCMod0Calculator() { }; // - virtual G4float OOTcut() const { return m_OOTcut; } - virtual void SetOutOfTimeCut(G4double c) { m_OOTcut = c; } - - virtual G4bool Process(const G4Step*); - virtual G4bool Process(const G4Step*, std::vector<LArHitData>&); - virtual const LArG4Identifier& identifier() const {return m_identifier;} - virtual const LArG4Identifier& identifier(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_identifier; - } + virtual G4float OOTcut() const override final { return m_OOTcut; } + // virtual void SetOutOfTimeCut(G4double c) { m_OOTcut = c; } //FIXME public, but not part of interface - virtual G4double time() const {return m_time;} - virtual G4double time(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_time; - } - virtual G4double energy() const {return m_energy;} - virtual G4double energy(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_energy; - } - virtual G4bool isInTime() const {return m_isInTime;} - virtual G4bool isInTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_isInTime; - } - virtual G4bool isOutOfTime() const { return ( ! m_isInTime );} - virtual G4bool isOutOfTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return ( ! m_isInTime ); - } - - // access module parameters ---> bulk absorber = Cu - virtual G4double GetModulePhiStart() const - { return m_phiModuleStart; } - virtual G4double GetModulePhiEnd() const - { return m_phiModuleEnd; } + virtual G4bool Process(const G4Step*, std::vector<LArHitData>&) const override final; - // access active medium ---> readout gap = LAr - virtual G4double GetActiveDepth() const - { return m_fullActiveDepth; } - virtual G4double GetActiveInnerRadius() const - { return m_innerActiveRadius; } - virtual G4double GetActiveOuterRadius() const - { return m_outerActiveRadius; } + virtual G4bool isInTime(G4double hitTime) const override final + { + return !(hitTime > m_OOTcut); + } -protected: + // // access module parameters ---> bulk absorber = Cu + // virtual G4double GetModulePhiStart() const //FIXME public, but not part of interface + // { return m_phiModuleStart; } + // virtual G4double GetModulePhiEnd() const //FIXME public, but not part of interface + // { return m_phiModuleEnd; } - LArG4H6COLDTCMod0Calculator(); + // // access active medium ---> readout gap = LAr + // virtual G4double GetActiveDepth() const //FIXME public, but not part of interface + // { return m_fullActiveDepth; } + // virtual G4double GetActiveInnerRadius() const //FIXME public, but not part of interface + // { return m_innerActiveRadius; } + // virtual G4double GetActiveOuterRadius() const //FIXME public, but not part of interface + // { return m_outerActiveRadius; } private: - static LArG4H6COLDTCMod0Calculator* m_instance; // private datamember handling the hit - G4float m_OOTcut; - - G4double m_time; - G4double m_energy; - G4bool m_isInTime; - LArG4Identifier m_identifier; G4int m_FCalSampling; // geometry of ColdTC: overall diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0CalibCalculator.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0CalibCalculator.cc index 5e3eb15ea85b07eaff3d3663000e1fc986c102ae..636c6142a8ccd6fe7d8b416b9a903ca85c60ce57 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0CalibCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0CalibCalculator.cc @@ -3,48 +3,55 @@ */ #include "LArG4H6COLDTCMod0CalibCalculator.h" - +#include "LArG4Code/ILArCalculatorSvc.h" #include "G4Step.hh" -LArG4H6COLDTCMod0CalibCalculator::LArG4H6COLDTCMod0CalibCalculator() { - - // Initialize the geometry calculator. - m_Calculator = LArG4H6COLDTCMod0Calculator::GetInstance(); +LArG4H6COLDTCMod0CalibCalculator::LArG4H6COLDTCMod0CalibCalculator(const std::string& name, ISvcLocator* pSvcLocator) +: LArCalibCalculatorSvcImp(name, pSvcLocator) +, m_Calculator("LArG4H6COLDTCMod0Calculator", name) +{ + declareProperty("Calculator", m_Calculator); +} +StatusCode LArG4H6COLDTCMod0CalibCalculator::initialize() +{ + // Initialize the geometry calculator. + ATH_CHECK(m_Calculator.retrieve()); + return StatusCode::SUCCESS; } - -LArG4H6COLDTCMod0CalibCalculator::~LArG4H6COLDTCMod0CalibCalculator(){} + +LArG4H6COLDTCMod0CalibCalculator::~LArG4H6COLDTCMod0CalibCalculator(){} -G4bool LArG4H6COLDTCMod0CalibCalculator::Process( const G4Step* a_step, const eCalculatorProcessing a_process ) +G4bool LArG4H6COLDTCMod0CalibCalculator::Process( const G4Step* a_step, LArG4Identifier & identifier, + std::vector<G4double> & energies, const LArG4::eCalculatorProcessing a_process ) const { - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } - else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); - - - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - m_identifier = LArG4Identifier(); - // Calculate the identifier. - if(m_Calculator->Process(a_step)) m_identifier = m_Calculator->identifier(0); - else m_identifier = LArG4Identifier(); - } - else - m_identifier = LArG4Identifier(); - - - // Check for bad result. - if ( m_identifier == LArG4Identifier() ) { - std::cout<<"LArG4H6COLDTCMod0CalibCalculator::Process return false !!!"<<std::endl; - return false; - } - - return true; + energies.clear(); + if ( a_process == LArG4::kEnergyAndID || a_process == LArG4::kOnlyEnergy ) + { + m_energyCalculator.Energies( a_step, energies ); + } + else + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); + + + identifier = LArG4Identifier(); + if ( a_process == LArG4::kEnergyAndID || a_process == LArG4::kOnlyID ) + { + // Calculate the identifier. + std::vector<LArHitData> hdata; + if(m_Calculator->Process(a_step, hdata)) + { + if(hdata.size()>0) identifier = hdata[0].id; + } + } + + // Check for bad result. + if ( identifier == LArG4Identifier() ) { + std::cout<<"LArG4H6COLDTCMod0CalibCalculator::Process return false !!!"<<std::endl; + return false; + } + + return true; } - diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0CalibCalculator.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0CalibCalculator.h index 09cf150273128a763623775f2260c6722ea07cdf..c28873c8b9967456505066355d63e916d4c4a2e9 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0CalibCalculator.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0CalibCalculator.h @@ -2,42 +2,35 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LArG4H6COLDTCMod0CalibCalculator_H -#define LArG4H6COLDTCMod0CalibCalculator_H +#ifndef LARG4H6SD_LArG4H6COLDTCMod0CalibCalculator_H +#define LARG4H6SD_LArG4H6COLDTCMod0CalibCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" -#include "LArG4H6COLDTCMod0Calculator.h" - +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" - #include "globals.hh" - #include <vector> -class LArG4H6COLDTCMod0CalibCalculator : public LArG4::VCalibrationCalculator { +class ILArCalculatorSvc; +class G4Step; -public: +class LArG4H6COLDTCMod0CalibCalculator : public LArCalibCalculatorSvcImp { - LArG4H6COLDTCMod0CalibCalculator(); - virtual ~LArG4H6COLDTCMod0CalibCalculator(); +public: - virtual G4bool Process(const G4Step*, const eCalculatorProcessing p = kEnergyAndID); - virtual const LArG4Identifier& identifier() const {return m_identifier;} - virtual const LArG4Identifier& identifier(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_identifier; - } - virtual const std::vector<G4double>& energies() const { return m_energies; } + LArG4H6COLDTCMod0CalibCalculator(const std::string& name, ISvcLocator* pSvcLocator); + virtual StatusCode initialize() override final; + virtual ~LArG4H6COLDTCMod0CalibCalculator(); - private: - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; + virtual G4bool Process(const G4Step*, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const LArG4::eCalculatorProcessing p = LArG4::kEnergyAndID) const override final; - LArG4H6COLDTCMod0Calculator* m_Calculator; +private: + ServiceHandle<ILArCalculatorSvc> m_Calculator; //LArG4H6COLDTCMod0Calculator - CaloG4::SimulationEnergies m_energyCalculator; + CaloG4::SimulationEnergies m_energyCalculator; }; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0ChannelMap.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0ChannelMap.cc index 3723eea85213444dd2fbd62861f3e3254692b85e..3e54c7db3c7684a4251464c52411c88f122f5d1f 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0ChannelMap.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0ChannelMap.cc @@ -13,15 +13,15 @@ #undef DEBUG_ME LArG4H6COLDTCMod0ChannelMap::LArG4H6COLDTCMod0ChannelMap() -: m_phiMax(0), m_phiMin(0), - m_nPhiBins(0) { } + : m_phiMax(0), m_phiMin(0), + m_nPhiBins(0) { } LArG4H6COLDTCMod0ChannelMap::LArG4H6COLDTCMod0ChannelMap(G4double rMin, - G4double rMax, - G4double area, - G4double phiMin, - G4double phiMax, - G4int nPhis) + G4double rMax, + G4double area, + G4double phiMin, + G4double phiMax, + G4int nPhis) : m_phiMax(phiMax) , m_phiMin(phiMin) , m_nPhiBins(nPhis) @@ -35,22 +35,22 @@ LArG4H6COLDTCMod0ChannelMap::LArG4H6COLDTCMod0ChannelMap(G4double rMin, std::cout<<phiMax<<"/"<<phiMin<<"/"<<nPhis<<"/"<<m_nPhiBins<<std::endl; #endif // calculate radial bins - G4double r = deltaPhi > 0 + G4double r = deltaPhi > 0 ? rMin : rMax; const G4double delta = 2 * area / deltaPhi; for ( ; r < rMax ; r = sqrt( delta + r * r ) ) { -// std::cout<<r<<std::endl; + // std::cout<<r<<std::endl; m_rBins.push_back(r); } -// std::cout<<rMax<<std::endl; + // std::cout<<rMax<<std::endl; m_rBins.push_back(rMax); } LArG4H6COLDTCMod0ChannelMap::~LArG4H6COLDTCMod0ChannelMap() { } -G4int LArG4H6COLDTCMod0ChannelMap::getRBin(const G4ThreeVector& aPoint) +G4int LArG4H6COLDTCMod0ChannelMap::getRBin(const G4ThreeVector& aPoint) const { size_t index = 0; @@ -67,17 +67,17 @@ G4int LArG4H6COLDTCMod0ChannelMap::getRBin(const G4ThreeVector& aPoint) : -1; } -G4int LArG4H6COLDTCMod0ChannelMap::getPhiBin(const G4ThreeVector& aPoint) +G4int LArG4H6COLDTCMod0ChannelMap::getPhiBin(const G4ThreeVector& aPoint) const { - if ( aPoint.phi() < m_phiMax ) + if ( aPoint.phi() < m_phiMax ) { G4int index = static_cast<int> (floor((aPoint.phi()-m_phiMin)*m_nPhiBins/(m_phiMax-m_phiMin))); #ifdef DEBUG_ME std::cout<<"LArG4H6COLDTCMod0ChannelMap::getPhiBin: "<<aPoint.phi()<<" / "<<index<<std::endl; #endif return index >= 0 - ? index - : -1; + ? index + : -1; } else { diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0ChannelMap.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0ChannelMap.h index 0e161fa1d5981dd06fef9e6214d9b260e8251a4c..8fa08fa7c17f175f739c8d7e8f117a84ef7c9477 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0ChannelMap.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6COLDTCMod0ChannelMap.h @@ -18,10 +18,10 @@ class LArG4H6COLDTCMod0ChannelMap G4double phiMin, G4double phiMax, G4int nPhis); ~LArG4H6COLDTCMod0ChannelMap(); - G4int getRBin(const G4ThreeVector& aPoint); + G4int getRBin(const G4ThreeVector& aPoint) const; G4int getNoRBins() const { return m_rBins.size(); } const std::vector<G4double>& getRBinning() { return m_rBins; } - G4int getPhiBin(const G4ThreeVector& aPoint); + G4int getPhiBin(const G4ThreeVector& aPoint) const; G4int getNoPhiBins() const { return m_nPhiBins; } private: diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCCalculator.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCCalculator.cc index 4c6d30cdf6f52a2681334e3125a2512db03b3261..2deaf5f9dac6dc67e3fe52e3793c370da92b1357 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCCalculator.cc @@ -4,7 +4,7 @@ #include "LArG4H6WarmTCCalculator.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVG4DetectorParameters.h" +// #include "LArG4Code/LArVG4DetectorParameters.h" #include "G4ThreeVector.hh" #include "G4StepPoint.hh" @@ -16,145 +16,122 @@ #include "AthenaKernel/Units.h" #include "globals.hh" -// 03-Jan-2002 WGS: For 'copysign'. -// #include "LArG4Code/ansi-compliance.h" #include <cmath> namespace Units = Athena::Units; -LArG4H6WarmTCCalculator::LArG4H6WarmTCCalculator(WTCComp icomp) - :m_identifier(),m_addr(0),m_time(0),m_energy(0),m_isInTime(false) +LArG4H6WarmTCCalculator::LArG4H6WarmTCCalculator(const std::string& name, ISvcLocator* pSvcLocator) + : LArCalculatorSvcImp(name, pSvcLocator) + //, m_addr(0) { - // Constructor initializes the geometry. - - m_OOTcut = LArVG4DetectorParameters::GetInstance()->GetValue("LArExpHallOutOfTimeCut"); - - switch(icomp) { - case WTC_X: { m_isX = true; m_isABS = false; break;} - case WTC_Y: { m_isX = false; m_isABS = false; break;} - case WTC_ABS: { m_isX = false; m_isABS = true; break;} - } + declareProperty("isX", m_isX); + declareProperty("isABS", m_isABS); } - -G4bool LArG4H6WarmTCCalculator::Process(const G4Step* a_step) +G4bool LArG4H6WarmTCCalculator::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) const { - - // First, get the energy. - m_energy = a_step->GetTotalEnergyDeposit(); + hdata.clear(); + LArHitData larhit; + larhit.energy = a_step->GetTotalEnergyDeposit(); // Find out how long it took the energy to get here. G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - G4double timeOfFlight = (pre_step_point->GetGlobalTime() + + G4double timeOfFlight = (pre_step_point->GetGlobalTime() + post_step_point->GetGlobalTime()) * 0.5; G4ThreeVector startPoint = pre_step_point->GetPosition(); G4ThreeVector endPoint = post_step_point->GetPosition(); G4ThreeVector p = (startPoint + endPoint) * 0.5; -// G4cout<<"LArG4H6WarmTCCalculator::Global point: "<<p.x()<<" "<<p.y()<<" "<<p.z()<<std::endl; - - //m_time = timeOfFlight/ns - p.mag()/c_light/ns; - m_time = timeOfFlight/Units::ns; - if (m_time > m_OOTcut) - m_isInTime = false; - else - m_isInTime = true; - -// Get local coordinates of the step, independently of how it was positioned in World + // G4cout<<"LArG4H6WarmTCCalculator::Global point: "<<p.x()<<" "<<p.y()<<" "<<p.z()<<std::endl; + //larhit.time = timeOfFlight/ns - p.mag()/c_light/ns; + larhit.time = timeOfFlight/Units::ns; + + // Get local coordinates of the step, independently of how it was positioned in World const G4AffineTransform transformation = - pre_step_point->GetTouchable()->GetHistory()->GetTopTransform(); + pre_step_point->GetTouchable()->GetHistory()->GetTopTransform(); G4ThreeVector startPointinLocal = transformation.TransformPoint(startPoint); G4ThreeVector endPointinLocal = transformation.TransformPoint (endPoint); G4ThreeVector pinLocal =(startPointinLocal+endPointinLocal)*0.5; // -// G4cout<<"LArG4H6WarmTCCalculator::Local point: "<<pinLocal.x()<<" "<<pinLocal.y()<<" "<<pinLocal.z()<<std::endl; + // G4cout<<"LArG4H6WarmTCCalculator::Local point: "<<pinLocal.x()<<" "<<pinLocal.y()<<" "<<pinLocal.z()<<std::endl; G4int zSide; G4int sampling; G4int region; - G4int etaBin; - G4int phiBin; - - zSide = 4; - if( p.z()<0.) zSide =-4; - region = 0; + G4int etaBin; + G4int phiBin; + + zSide = 4; + if( p.z()<0.) zSide =-4; + region = 0; // We can extract our position from the copy number of depth and module // First have touchable // G4TouchableHistory* theTouchable = (G4TouchableHistory*) (pre_step_point->GetTouchable()); - // Volume name + // Volume name G4String hitVolume = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName(); // And copy number G4int copyModule = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetCopyNo(); G4int gran; -// Sampling Identifier + // Sampling Identifier if(m_isABS) { sampling = copyModule; gran = 1; } else { - switch(copyModule) { - case 1: { - gran = 1; - if(m_isX) sampling = copyModule; else sampling = copyModule + 1; - break; - } - case 2: case 3: { - gran = 2; - if(m_isX) sampling = 2*copyModule; else sampling = 2*copyModule - 1; - break; - } - default: { sampling = -1; gran = 0; break; } - } + switch(copyModule) { + case 1: { + gran = 1; + if(m_isX) sampling = copyModule; else sampling = copyModule + 1; + break; + } + case 2: case 3: { + gran = 2; + if(m_isX) sampling = 2*copyModule; else sampling = 2*copyModule - 1; + break; + } + default: { sampling = -1; gran = 0; break; } + } } - -//#include "LArG4TBEndcap/LArTBEndcapWTC.icc" + //#include "LArG4TBEndcap/LArTBEndcapWTC.icc" // This should go int Db: double WTC_sci_x = 190.0*CLHEP::mm; double WTC_sci_y = 1160.0*CLHEP::mm; double x_x = 6 * WTC_sci_x / 2; - double x_y = WTC_sci_y / 2; - + double x_y = WTC_sci_y / 2; + if(m_isX) { - etaBin = int((x_y - pinLocal.y()) / (5*gran*WTC_sci_x)); - phiBin = int((x_x - pinLocal.x()) / (gran*WTC_sci_x)); + etaBin = int((x_y - pinLocal.y()) / (5*gran*WTC_sci_x)); + phiBin = int((x_x - pinLocal.x()) / (gran*WTC_sci_x)); } else { - phiBin = int((x_y - pinLocal.y()) / (5*gran*WTC_sci_x)); - etaBin = int((x_x - pinLocal.x()) / (gran*WTC_sci_x)); + phiBin = int((x_y - pinLocal.y()) / (5*gran*WTC_sci_x)); + etaBin = int((x_x - pinLocal.x()) / (gran*WTC_sci_x)); } region = 0; - - /* - if(!m_isABS) { + + /* + if(!m_isABS) { std::cout<<"LArG4H6WarmTCCalculator: "<<hitVolume<<" "<<copyModule<<" : "<<pinLocal.x()<<" "<<pinLocal.y()<<std::endl; std::cout <<"zSide = "<<zSide<<" , sampling = "<<sampling<<" , region="<<region << - " , phiBin="<<phiBin<< " , etaBin="<<etaBin <<std::endl; + " , phiBin="<<phiBin<< " , etaBin="<<etaBin <<std::endl; std::cout<<m_energy<<" "<<m_time<<std::endl; std::cout<<m_isInTime<<" "<<m_isX<<" "<<m_isABS<<" "<<this<<std::endl; - } + } */ - - m_identifier.clear(); - m_identifier << 10 // LArCalorimeter - << zSide - << 1 - << sampling - << region - << etaBin - << phiBin; - - m_addr = 100*sampling+10*etaBin+phiBin; - if(m_isABS) m_addr *= -1; - return true; -} -G4bool LArG4H6WarmTCCalculator::Process(const G4Step*, std::vector<LArHitData>&) -{ - std::cout << "Not implemented!" << std::endl; - throw; + larhit.id.clear(); + larhit.id << 10 // LArCalorimeter + << zSide + << 1 + << sampling + << region + << etaBin + << phiBin; + hdata.push_back(larhit); + // m_addr = 100*sampling+10*etaBin+phiBin; + // if(m_isABS) m_addr *= -1; + return true; } - - diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCCalculator.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCCalculator.h index 3d80efc006bd7b19fac97af1e9ac825ff0b926a8..2bf4393f41121ec71b19421eeea50e264091fb80 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCCalculator.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCCalculator.h @@ -5,73 +5,33 @@ #ifndef __LArG4H6WarmTCCalculator_H__ #define __LArG4H6WarmTCCalculator_H__ -#include "globals.hh" -#include "G4ThreeVector.hh" -#include "LArG4Code/LArVCalculator.h" +#include "LArG4Code/LArCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVG4DetectorParameters.h" -#include <stdexcept> -enum WTCComp { - WTC_X, // X - coordinate scintilator - WTC_Y, // Y - coordinate scintilator - WTC_ABS // Absorbers -}; // Forward declarations. class G4Step; -class LArG4H6WarmTCCalculator : public LArVCalculator { +class LArG4H6WarmTCCalculator : public LArCalculatorSvcImp +{ public: - LArG4H6WarmTCCalculator(WTCComp icomp = WTC_ABS); - - + LArG4H6WarmTCCalculator(const std::string& name, ISvcLocator* pSvcLocator); + virtual ~LArG4H6WarmTCCalculator() {}; ///////////////////////////////////////////// - // The interface for LArVCalculator. + // The interface for ILArCalculatorSvc. - virtual G4float OOTcut() const { return m_OOTcut; } - virtual void SetOutOfTimeCut(G4double c) { m_OOTcut = c; } + virtual G4float OOTcut() const override final { return m_OOTcut; } - virtual G4bool Process(const G4Step* a_step); - virtual G4bool Process(const G4Step*, std::vector<LArHitData>&); - G4int address() const { return m_addr;} - virtual const LArG4Identifier& identifier(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_identifier; - } + virtual G4bool Process(const G4Step*, std::vector<LArHitData>&) const override final; - virtual G4double time(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_time; - } - virtual G4double energy(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_energy; - }; - virtual G4bool isInTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_isInTime; + virtual G4bool isInTime(G4double hitTime) const override final + { + return !(hitTime > m_OOTcut); } - virtual G4bool isOutOfTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return ( ! m_isInTime ); - } - bool isX() const { return m_isX; } - bool isABS() const { return m_isABS; } - private: - - float m_OOTcut; - LArG4Identifier m_identifier; - int m_addr; - - double m_time; - double m_energy; - bool m_isInTime; bool m_isX; bool m_isABS; - }; #endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCSDTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCSDTool.cc index cb10ad39219f0969e02e6a3df2195f7913d29b7e..0ec3b1e361ec53c0b79e92b45f6b55af731feaa3 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCSDTool.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCSDTool.cc @@ -15,8 +15,9 @@ LArG4H6WarmTCSDTool::LArG4H6WarmTCSDTool(const std::string& type, const std::str G4VSensitiveDetector* LArG4H6WarmTCSDTool::makeSD() { - ATH_MSG_DEBUG( "Initializing SD" ); - + ATH_MSG_DEBUG( "Initializing SD" ); + //FIXME use configurable properties here + // be smart, and take only last part of the name G4String colname = ""; if(name().find("::Abs")!=std::string::npos){ diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCSDTool.h index fbd0cb27778a121e44ce4898518c1060480e8325..a2c5dc7dcb0726f3c841106cc34cefe7f40e9b6c 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCSDTool.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4H6WarmTCSDTool.h @@ -12,7 +12,7 @@ class LArG4H6WarmTCSDTool : public SensitiveDetectorBase public: LArG4H6WarmTCSDTool(const std::string& type, const std::string& name, const IInterface *parent); ~LArG4H6WarmTCSDTool() {} - + G4VSensitiveDetector* makeSD() override final; // Calls down to all the SDs to get them to pack their hits into a central collection diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4TBECBeamChCalculator.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4TBECBeamChCalculator.cc index f446ec65b249a765f719ef23258c91384a095ee1..a30ac65cb4851e6d14200c02c509db442f8744c4 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4TBECBeamChCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4TBECBeamChCalculator.cc @@ -13,36 +13,36 @@ LArG4TBECBeamChCalculator::LArG4TBECBeamChCalculator(void) { - m_number = -1; - m_x = 0.; - m_y = 0.; - G4cout << "LArG4TBECBeamChCalculator ready" << G4endl; + m_number = -1; + m_x = 0.; + m_y = 0.; + G4cout << "LArG4TBECBeamChCalculator ready" << G4endl; } G4bool LArG4TBECBeamChCalculator::Process(const G4Step* step) { - G4StepPoint* pre_step_point = step->GetPreStepPoint(); - G4StepPoint* post_step_point = step->GetPostStepPoint(); - - G4ThreeVector startPoint = pre_step_point->GetPosition(); - G4ThreeVector endPoint = post_step_point->GetPosition(); - G4ThreeVector p = (startPoint + endPoint) * 0.5; - - G4VPhysicalVolume *prev = pre_step_point->GetPhysicalVolume(); - G4String volume = prev->GetName(); - const char *name = volume.c_str(); - - m_number = int(name[strlen(name) - 1]) - 0x30; - m_x = p.getX(); - m_y = p.getY(); - if(fabs(m_x) > 50.*CLHEP::mm || fabs(m_y) > 50.*CLHEP::mm){ - G4cout << "BeamCh(" << m_number - << ") hit is out of 100x100 region" << G4endl; - return false; - } - -// G4cout << "Identifier(" << m_number << ") -> (" -// << m_x << ", " << m_y << ")" << G4endl; - - return true; + G4StepPoint* pre_step_point = step->GetPreStepPoint(); + G4StepPoint* post_step_point = step->GetPostStepPoint(); + + G4ThreeVector startPoint = pre_step_point->GetPosition(); + G4ThreeVector endPoint = post_step_point->GetPosition(); + G4ThreeVector p = (startPoint + endPoint) * 0.5; + + G4VPhysicalVolume *prev = pre_step_point->GetPhysicalVolume(); + G4String volume = prev->GetName(); + const char *name = volume.c_str(); + + m_number = int(name[strlen(name) - 1]) - 0x30; + m_x = p.getX(); + m_y = p.getY(); + if(fabs(m_x) > 50.*CLHEP::mm || fabs(m_y) > 50.*CLHEP::mm){ + G4cout << "BeamCh(" << m_number + << ") hit is out of 100x100 region" << G4endl; + return false; + } + + //G4cout << "Identifier(" << m_number << ") -> (" + // << m_x << ", " << m_y << ")" << G4endl; + + return true; } diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4TBECBeamChSDTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4TBECBeamChSDTool.h index 556f4c9071f90ca8f9eb1262ed513ea00170e85f..551855284d331465956591fcc115bdc170a234f1 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4TBECBeamChSDTool.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArG4TBECBeamChSDTool.h @@ -14,7 +14,7 @@ class LArG4TBECBeamChSDTool : public SensitiveDetectorBase public: LArG4TBECBeamChSDTool(const std::string& type, const std::string& name, const IInterface *parent); ~LArG4TBECBeamChSDTool() {} - + G4VSensitiveDetector* makeSD() override final; }; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.cc index 50f2c4a4b085165a32dd0c1692e95f0ac5ac8b05..36b860e945eb6f49c8877687866f09aee3f09e0b 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.cc @@ -11,62 +11,34 @@ #include <iomanip> -int LArGeoH62004EventAction::m_evnum=0; - -LArGeoH62004EventAction::LArGeoH62004EventAction(const std::string& type, const std::string& name, const IInterface* parent) - : UserActionBase(type,name,parent) - , m_largeoTB2004Options (nullptr) - , m_ev("TBEventInfo") +namespace G4UA { - ATH_MSG_DEBUG ("LArGeoH62004EventAction::LArGeoH62004EventAction constructor"); -} - -StatusCode LArGeoH62004EventAction::initialize(){ - - StatusCode status = detStore()->retrieve(m_largeoTB2004Options, "LArGeoTB2004Options"); - if(status.isFailure()) { - ATH_MSG_WARNING ( "\tCan't access LArGeoTB2004Options, using default values" ); - m_largeoTB2004Options = 0; + int LArGeoH62004EventAction::m_evnum=0; + + LArGeoH62004EventAction::LArGeoH62004EventAction(const Config& config) + : m_ev("TBEventInfo") + , m_xpos(config.cryoXposition) + , m_ypos(config.yTable) + { + //ATH_MSG_DEBUG ("LArGeoH62004EventAction::LArGeoH62004EventAction constructor"); } - - return StatusCode::SUCCESS; -} - -void LArGeoH62004EventAction::EndOfEvent(const G4Event * /*theEvent*/) -{ - ATH_MSG_DEBUG ("LArGeoH62004EventAction::EndOfEventAction"); - StatusCode status; + void LArGeoH62004EventAction::endOfEvent(const G4Event * /*theEvent*/) + { - //float beamm = PG::ParticleManager::GetInstance()->getEnergy(0); - float beamm = 0.; - //float ypos = PG::KinematicManager::GetManager()->getValue(PG::kTargetY); - float ypos,xpos; - if(m_largeoTB2004Options) { - ypos = m_largeoTB2004Options->TableYPosition(); - xpos = m_largeoTB2004Options->CryoXPosition(); - } else { - xpos = ypos = 0.; - } - //int pdg = PG::ParticleManager::GetInstance()->getPDG(0); - int pdg = 0; - int evtype = 1; // Physics !!!! - - ATH_MSG_DEBUG ( "TBEventInfo: "<<m_evnum<<"/"<<pdg<<"/"<<evtype<<"/"<<0<<"/"<<beamm<<"/"<<""<<"/"<<xpos<<"/"<<0<<"/"<<ypos); + //ATH_MSG_DEBUG ("LArGeoH62004EventAction::EndOfEventAction"); - m_ev = CxxUtils::make_unique<TBEventInfo>(++m_evnum,pdg,evtype,0,beamm,"",xpos,0,ypos); - return; -} + //float beamm = PG::ParticleManager::GetInstance()->getEnergy(0); + float beamm = 0.; + //float ypos = PG::KinematicManager::GetManager()->getValue(PG::kTargetY); + //int pdg = PG::ParticleManager::GetInstance()->getPDG(0); + int pdg = 0; + int evtype = 1; // Physics !!!! + //ATH_MSG_DEBUG ( "TBEventInfo: "<<m_evnum<<"/"<<pdg<<"/"<<evtype<<"/"<<0<<"/"<<beamm<<"/"<<""<<"/"<<m_xpos<<"/"<<0<<"/"<<m_ypos); -StatusCode LArGeoH62004EventAction::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); + m_ev = CxxUtils::make_unique<TBEventInfo>(++m_evnum,pdg,evtype,0,beamm,"",m_xpos,0,m_ypos); + return; } - return StatusCode::SUCCESS; -} + +} // namespace G4UA diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.h index e0f8277cb88c848168bd9482121e96e49d168f1d..7c17d496461306cb26d37926895e3d194e13a1b9 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.h @@ -2,11 +2,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LArGeoH62004EventAction_h -#define LArGeoH62004EventAction_h 1 - -#include "G4AtlasTools/UserActionBase.h" +#ifndef LARG4H6SD_LArGeoH62004EventAction_h +#define LARG4H6SD_LArGeoH62004EventAction_h 1 +#include "G4AtlasInterfaces/IEndEventAction.h" // For the output write handle #include "StoreGate/WriteHandle.h" #include "TBEvent/TBEventInfo.h" @@ -14,20 +13,30 @@ class LArGeoTB2004Options; -class LArGeoH62004EventAction final: public UserActionBase +namespace G4UA { + /// @brief NEEDS DOCUMENTATION + class LArGeoH62004EventAction final: public IEndEventAction + { public: - LArGeoH62004EventAction(const std::string& type, const std::string& name, const IInterface* parent); + struct Config + { + float yTable=0.0; + float cryoXposition=0.0; + }; + + LArGeoH62004EventAction(const Config& config); - virtual void EndOfEvent(const G4Event* theEvent) override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - virtual StatusCode initialize() override; + virtual void endOfEvent(const G4Event*) override; private: static int m_evnum; - const LArGeoTB2004Options *m_largeoTB2004Options; SG::WriteHandle<TBEventInfo> m_ev; -}; + float m_xpos; + float m_ypos; + }; // class LArGeoH62004EventAction + +} // namespace G4UA -#endif +#endif \ No newline at end of file diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..9fe7ff9e0d57f8a338798b42606ac30c6e684297 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.cc @@ -0,0 +1,66 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CxxUtils/make_unique.h" +#include "LArGeoH62004EventActionTool.h" + +#include "LArG4RunControl/LArGeoTB2004Options.h" + +namespace G4UA +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + LArGeoH62004EventActionTool::LArGeoH62004EventActionTool(const std::string& type, + const std::string& name, + const IInterface* parent) + : ActionToolBase<LArGeoH62004EventAction>(type, name, parent) + { + declareProperty("yTable", m_config.yTable); + declareProperty("CryoXPosition", m_config.cryoXposition); + //declareProperty("PrintStep", m_config.printstep); + } + + + StatusCode LArGeoH62004EventActionTool::initialize() + { + //FIXME Old-style configuration - to be removed + const LArGeoTB2004Options *largeoTB2004Options; + if(detStore()->retrieve(largeoTB2004Options, "LArGeoTB2004Options").isFailure()) + { + ATH_MSG_WARNING ( "Can't access LArGeoTB2004Options, using default values" ); + } + m_config.yTable = largeoTB2004Options->TableYPosition(); + m_config.cryoXposition = largeoTB2004Options->CryoXPosition(); + + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the action on request + //--------------------------------------------------------------------------- + std::unique_ptr<LArGeoH62004EventAction> + LArGeoH62004EventActionTool::makeAction() + { + ATH_MSG_DEBUG("makeAction"); + auto action = CxxUtils::make_unique<LArGeoH62004EventAction>(m_config); + return std::move(action); + } + + //--------------------------------------------------------------------------- + // Query interface + //--------------------------------------------------------------------------- + StatusCode LArGeoH62004EventActionTool::queryInterface(const InterfaceID& riid, void** ppvIf) + { + if(riid == IEndEventActionTool::interfaceID()) { + *ppvIf = (IEndEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + + return ActionToolBase<LArGeoH62004EventAction>::queryInterface(riid, ppvIf); + } + +} diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.h new file mode 100644 index 0000000000000000000000000000000000000000..5c0975965fe1fb7d1a924d138ca2b9faea9cc7ec --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.h @@ -0,0 +1,62 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4H6SD_LARGEOH62004EVENTACTIONTOOL_H +#define LARG4H6SD_LARGEOH62004EVENTACTIONTOOL_H + +// System includes +#include <string> + +// Infrastructure includes +#include "G4AtlasInterfaces/IEndEventActionTool.h" +#include "G4AtlasTools/ActionToolBase.h" + +// Local includes +#include "LArGeoH62004EventAction.h" + +namespace G4UA +{ + + /// @class LArGeoH62004EventActionTool + /// @brief Tool which manages the LArGeoH62004EventAction action. + /// + /// Create the LArGeoH62004EventAction for each worker thread + /// + /// @author Andrea Di Simone + /// + class LArGeoH62004EventActionTool : public ActionToolBase<LArGeoH62004EventAction>, + public IEndEventActionTool + { + + public: + + /// Standard constructor + LArGeoH62004EventActionTool(const std::string& type, const std::string& name, + const IInterface* parent); + + /// Framework intialize method + StatusCode initialize() override final; + + /// Retrieve the event action interface + virtual IEndEventAction* getEndEventAction() override final + { return static_cast<IEndEventAction*>( getAction() ); } + + /// Query interface for gaudi + virtual StatusCode + queryInterface(const InterfaceID& riid, void** ppvInterface) override; + + protected: + + /// Create action for this thread + virtual std::unique_ptr<LArGeoH62004EventAction> makeAction() override final; + + private: + /// Configuration parameters + LArGeoH62004EventAction::Config m_config; + + }; // class LArGeoH62004EventActionTool + +} // namespace G4UA + +#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.cc index 8fd2f3f5ddc0a13a50505e1e0fa86ea002e2b1c4..cbbc9c3365d6dd28cd6dcee88f7688b3b457ebf7 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.cc @@ -3,7 +3,7 @@ */ #include "LArGeoH62004SteppingAction.h" -#include "LArG4Code/LArVCalculator.h" +#include "LArG4Code/ILArCalculatorSvc.h" #include "LArG4Code/LArG4SimpleSD.h" #include "LArG4Code/LArG4Identifier.h" #include "G4Track.hh" @@ -15,176 +15,136 @@ #include "G4TrackStatus.hh" #include "G4StepPoint.hh" -#include "LArG4RunControl/LArGeoTB2004Options.h" - #include "boost/io/ios_state.hpp" #include <iomanip> -LArGeoH62004SteppingAction::LArGeoH62004SteppingAction(const std::string& type, const std::string& name, const IInterface* parent) - : UserActionBase(type,name,parent), - m_largeoTB2004Options (nullptr), - m_ownOptions(false), - m_yTable(0) +namespace G4UA { + LArGeoH62004SteppingAction::LArGeoH62004SteppingAction(const Config& config) + : m_yTable(config.yTable) + , m_checkprim(config.checkprim) + , m_printstep(config.printstep) + { -} + } -StatusCode LArGeoH62004SteppingAction::initialize(){ + void LArGeoH62004SteppingAction::processStep(const G4Step * theStep) + { + + // ADS: why are these static? + + static G4int h_num,kk; + static G4int trackid; + static G4ThreeVector xyz; + static G4String vname; + static G4Track* theTrack; + static G4String thePrePVname; + static G4StepPoint* tacka; + // static ILArCalculatorSvc *whcalc; + static double z; + + // Check the primary track + if(m_checkprim) { + // std::cout <<"LArGeoH62004SteppingAction::LArGeoH62004SteppingAction checking primary track "<<std::endl; + + tacka=theStep->GetPostStepPoint(); + xyz = tacka->GetPosition(); + z=xyz.z(); + theTrack = theStep->GetTrack(); + trackid = theTrack->GetTrackID(); + if(trackid > 1 || z > 9460. || z < 8005. ) return; // not a scint. region + if( z < 9325. && z > 8015 ) return; // BPC&MWPC region + // if(trackid > 10 ) return; + // std::cout<<"LArGeoH62004SteppingAction: "<<trackid<<", part: "<<theTrack->GetDefinition()->GetPDGEncoding()<<" : "<<xyz.x()<<" "<<xyz.y()<<" "<<xyz.z()<<std::endl; + if( z <= 8015.) { // Veto scint. 8 + if( xyz.x()*xyz.x() + (xyz.y() - m_yTable)*(xyz.y() - m_yTable) > 900. ) { + std::cout<<"Primary track in veto scint. H !!!!"<<std::endl; + std::cout<<"LArGeoH62004SteppingAction: "<<trackid<<", part: "<<theTrack->GetDefinition()->GetPDGEncoding()<<" : "<<xyz.x()<<" "<<xyz.y()<<" - "<<m_yTable<<" "<<z<<std::endl; + G4Exception("LArGeoH62004SteppingAction","CheckPrim",EventMustBeAborted,"Primary track in veto scintillator"); + } + } + if( z >= 9450. || ( z >= 9325. && z <= 9335.)) { // Scint. 6,7 + if(fabs(xyz.x()) > 35. || fabs(xyz.y() - m_yTable) > 35.) { + std::cout<<"Primary track outside S2,3 !!!!"<<std::endl; + std::cout<<"LArGeoH62004SteppingAction: "<<trackid<<", part: "<<theTrack->GetDefinition()->GetPDGEncoding()<<" : "<<xyz.x()<<" "<<xyz.y()<<" - "<<m_yTable<<" "<<z<<std::endl; + G4Exception("LArGeoH62004SteppingAction","CheckPrim",EventMustBeAborted,"Primary track outside beam scintillators"); + } + } - StatusCode status = detStore()->retrieve(m_largeoTB2004Options, "LArGeoTB2004Options"); - if(status.isFailure()) { - ATH_MSG_WARNING ( "\tCan't access LArGeoTB2004Options, using default values" ); - m_largeoTB2004Options = new LArGeoTB2004Options(); - m_ownOptions = true; - } + } - m_yTable = m_largeoTB2004Options->TableYPosition(); - return StatusCode::SUCCESS; -} + // Printing for geantino scan -LArGeoH62004SteppingAction::~LArGeoH62004SteppingAction() -{ - if (m_ownOptions) - delete m_largeoTB2004Options; -} - - -void LArGeoH62004SteppingAction::Step(const G4Step * theStep) -{ - - // ADS: why are these static? - - static G4int h_num,kk; - static G4int trackid; - static G4ThreeVector xyz; - static G4String vname; - static G4Track* theTrack; - static G4String thePrePVname; - static G4StepPoint* tacka; -// static LArVCalculator *whcalc; - static double z; - - // Check the primary track - if(m_largeoTB2004Options->isCheckprim()) { - // std::cout <<"LArGeoH62004SteppingAction::LArGeoH62004SteppingAction checking primary track "<<std::endl; - - tacka=theStep->GetPostStepPoint(); - xyz = tacka->GetPosition(); - z=xyz.z(); - theTrack = theStep->GetTrack(); - trackid = theTrack->GetTrackID(); - if(trackid > 1 || z > 9460. || z < 8005. ) return; // not a scint. region - if( z < 9325. && z > 8015 ) return; // BPC&MWPC region - // if(trackid > 10 ) return; - // std::cout<<"LArGeoH62004SteppingAction: "<<trackid<<", part: "<<theTrack->GetDefinition()->GetPDGEncoding()<<" : "<<xyz.x()<<" "<<xyz.y()<<" "<<xyz.z()<<std::endl; - if( z <= 8015.) { // Veto scint. 8 - if( xyz.x()*xyz.x() + (xyz.y() - m_yTable)*(xyz.y() - m_yTable) > 900. ) { - std::cout<<"Primary track in veto scint. H !!!!"<<std::endl; - std::cout<<"LArGeoH62004SteppingAction: "<<trackid<<", part: "<<theTrack->GetDefinition()->GetPDGEncoding()<<" : "<<xyz.x()<<" "<<xyz.y()<<" - "<<m_yTable<<" "<<z<<std::endl; - G4Exception("LArGeoH62004SteppingAction","CheckPrim",EventMustBeAborted,"Primary track in veto scintillator"); - } - } - if( z >= 9450. || ( z >= 9325. && z <= 9335.)) { // Scint. 6,7 - if(fabs(xyz.x()) > 35. || fabs(xyz.y() - m_yTable) > 35.) { - std::cout<<"Primary track outside S2,3 !!!!"<<std::endl; - std::cout<<"LArGeoH62004SteppingAction: "<<trackid<<", part: "<<theTrack->GetDefinition()->GetPDGEncoding()<<" : "<<xyz.x()<<" "<<xyz.y()<<" - "<<m_yTable<<" "<<z<<std::endl; - G4Exception("LArGeoH62004SteppingAction","CheckPrim",EventMustBeAborted,"Primary track outside beam scintillators"); - } - } - - } - - - - // Printing for geantino scan - - if(m_largeoTB2004Options->isPrintstep()) { - boost::io::ios_base_all_saver coutsave (std::cout); - std::cout <<"LArGeoH62004SteppingAction::LArGeoH62004SteppingAction printing "<<std::endl; - - tacka=theStep->GetPreStepPoint(); - G4StepPoint* tackab=theStep->GetPostStepPoint(); - G4TouchableHistory* theTouchable = - (G4TouchableHistory*) (tacka->GetTouchable()); - xyz = tacka->GetPosition(); - - std::cout<<"----------------------------------------------------"<<std::endl; - std::cout<<std::fixed<<std::setprecision(3)<<"Step: X= "<<std::setw(10)<<xyz.x()<<" Y= "<<std::setw(10)<<xyz.y()<<" Z= "<<std::setw(10)<<xyz.z()<<std::endl; - G4ThreeVector localPoint = theStep->GetPreStepPoint()->GetTouchable()->GetHistory()->GetTopTransform().TransformPoint(xyz); - - G4cout<<"Local: X= "<<localPoint.x()<<" Y= "<<localPoint.y()<< - " Z= "<<localPoint.z()<<G4endl; - vname = tacka->GetPhysicalVolume()->GetName(); - G4cout<<"Name: "<<vname<< " Copy n.: "<<tacka->GetPhysicalVolume()->GetCopyNo()<<G4endl; - G4cout<<"Material: "<<tacka->GetPhysicalVolume()->GetLogicalVolume()->GetMaterial()->GetName()<<G4endl; - std::cout<<"-------------------"<<std::endl; - G4ThreeVector xyzb = tackab->GetPosition(); - - std::cout<<"Post Step: X= "<<xyzb.x()<<" Y= "<<xyzb.y()<<" Z= "<<xyzb.z()<<std::endl; - G4ThreeVector localPointb = theStep->GetPreStepPoint()->GetTouchable()->GetHistory()->GetTopTransform().TransformPoint(xyzb); - std::cout<<"Post Local: X= "<<localPointb.x()<<" Y= "<<localPointb.y()<< - " Z= "<<localPointb.z()<<std::endl; - vname = tackab->GetPhysicalVolume()->GetName(); - std::cout<<"Post Name: "<<vname<< " Copy n.: "<<tackab->GetPhysicalVolume()->GetCopyNo()<<std::endl; - std::cout<<"Material: "<<tackab->GetPhysicalVolume()->GetLogicalVolume()->GetMaterial()->GetName()<<std::endl; - std::cout<<"-------------------"<<std::endl; - std::cout<<"Step length: "<<theStep->GetStepLength()<<std::endl; - G4cout<<"Energy dep.: "<<theStep->GetTotalEnergyDeposit()<<G4endl; - - - LArG4SimpleSD* lsd = 0; - if((!strncmp(vname,"LArMgr::LAr::EMEC",17)) || (!strncmp(vname,"LArMgr::LAr::HEC::Module",24)) ) { - lsd=(LArG4SimpleSD*)tacka->GetPhysicalVolume()->GetLogicalVolume()->GetSensitiveDetector(); - } - if(lsd) { -// This is all just for verbose print out -- it doesn't seem to make a lot of sense to me... -// This is also the only case I can find of the requirement of the "GetCalculator" functionality... -// so I'm skipping it for now as part of this migration. -// std::cout<<"LArG4SimpleSD: "<<lsd->GetName()<<std::endl; -// whcalc = lsd->GetCalculator(); -// if(whcalc){ -// if(whcalc->Process(theStep) ){ -// LArG4Identifier id = whcalc->identifier(); -// if(!strncmp(vname,"LArMgr::LAr::FCAL",17)) -// std::cout<<" Stepping sampling: "<<id[3]<<" etaBin: "<<id[4]<<" phiBin: "<<id[5]<<std::endl; -// else -// std::cout<<" Stepping sampling: "<<id[3]<<" reg.: "<<id[4]<<" etaBin: "<<id[5]<<" phiBin: "<<id[6]<<std::endl; -// } -// } -// std::cout<<"-------------------"<<std::endl; - } - - - G4int dubina=theTouchable->GetHistoryDepth(); - for( kk=0; kk<=dubina; kk++ ) - { - h_num=theTouchable->GetVolume(kk)->GetCopyNo(); - vname=theTouchable->GetVolume(kk)->GetName(); - G4cout<<vname<<" "<<h_num<<G4endl; - } - - G4cout<<"----------------------------------------------------"<<G4endl; - } - - return; -} + if(m_printstep) { + boost::io::ios_base_all_saver coutsave (std::cout); + std::cout <<"LArGeoH62004SteppingAction::LArGeoH62004SteppingAction printing "<<std::endl; + tacka=theStep->GetPreStepPoint(); + G4StepPoint* tackab=theStep->GetPostStepPoint(); + G4TouchableHistory* theTouchable = + (G4TouchableHistory*) (tacka->GetTouchable()); + xyz = tacka->GetPosition(); + std::cout<<"----------------------------------------------------"<<std::endl; + std::cout<<std::fixed<<std::setprecision(3)<<"Step: X= "<<std::setw(10)<<xyz.x()<<" Y= "<<std::setw(10)<<xyz.y()<<" Z= "<<std::setw(10)<<xyz.z()<<std::endl; + G4ThreeVector localPoint = theStep->GetPreStepPoint()->GetTouchable()->GetHistory()->GetTopTransform().TransformPoint(xyz); -StatusCode LArGeoH62004SteppingAction::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} + G4cout<<"Local: X= "<<localPoint.x()<<" Y= "<<localPoint.y()<< + " Z= "<<localPoint.z()<<G4endl; + vname = tacka->GetPhysicalVolume()->GetName(); + G4cout<<"Name: "<<vname<< " Copy n.: "<<tacka->GetPhysicalVolume()->GetCopyNo()<<G4endl; + G4cout<<"Material: "<<tacka->GetPhysicalVolume()->GetLogicalVolume()->GetMaterial()->GetName()<<G4endl; + std::cout<<"-------------------"<<std::endl; + G4ThreeVector xyzb = tackab->GetPosition(); + + std::cout<<"Post Step: X= "<<xyzb.x()<<" Y= "<<xyzb.y()<<" Z= "<<xyzb.z()<<std::endl; + G4ThreeVector localPointb = theStep->GetPreStepPoint()->GetTouchable()->GetHistory()->GetTopTransform().TransformPoint(xyzb); + std::cout<<"Post Local: X= "<<localPointb.x()<<" Y= "<<localPointb.y()<< + " Z= "<<localPointb.z()<<std::endl; + vname = tackab->GetPhysicalVolume()->GetName(); + std::cout<<"Post Name: "<<vname<< " Copy n.: "<<tackab->GetPhysicalVolume()->GetCopyNo()<<std::endl; + std::cout<<"Material: "<<tackab->GetPhysicalVolume()->GetLogicalVolume()->GetMaterial()->GetName()<<std::endl; + std::cout<<"-------------------"<<std::endl; + std::cout<<"Step length: "<<theStep->GetStepLength()<<std::endl; + G4cout<<"Energy dep.: "<<theStep->GetTotalEnergyDeposit()<<G4endl; + LArG4SimpleSD* lsd = 0; + if((!strncmp(vname,"LArMgr::LAr::EMEC",17)) || (!strncmp(vname,"LArMgr::LAr::HEC::Module",24)) ) { + lsd=(LArG4SimpleSD*)tacka->GetPhysicalVolume()->GetLogicalVolume()->GetSensitiveDetector(); + } + if(lsd) { + // This is all just for verbose print out -- it doesn't seem to make a lot of sense to me... + // This is also the only case I can find of the requirement of the "GetCalculator" functionality... + // so I'm skipping it for now as part of this migration. + // std::cout<<"LArG4SimpleSD: "<<lsd->GetName()<<std::endl; + // whcalc = lsd->GetCalculator(); + // if(whcalc){ + // if(whcalc->Process(theStep) ){ + // LArG4Identifier id = whcalc->identifier(); + // if(!strncmp(vname,"LArMgr::LAr::FCAL",17)) + // std::cout<<" Stepping sampling: "<<id[3]<<" etaBin: "<<id[4]<<" phiBin: "<<id[5]<<std::endl; + // else + // std::cout<<" Stepping sampling: "<<id[3]<<" reg.: "<<id[4]<<" etaBin: "<<id[5]<<" phiBin: "<<id[6]<<std::endl; + // } + // } + // std::cout<<"-------------------"<<std::endl; + } + + G4int dubina=theTouchable->GetHistoryDepth(); + for( kk=0; kk<=dubina; kk++ ) + { + h_num=theTouchable->GetVolume(kk)->GetCopyNo(); + vname=theTouchable->GetVolume(kk)->GetName(); + G4cout<<vname<<" "<<h_num<<G4endl; + } + G4cout<<"----------------------------------------------------"<<G4endl; + } + + return; + } +} // namespace G4UA diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.h index 5711dfd44b1d7b959e6825680dbbd71b690cb1fe..8e005a171430414dc7eaa43fa2deace667052d79 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.h @@ -6,33 +6,35 @@ // EMEC/HEC/FCAL TB stepping action, // do not stopping the particle in leakage det. !!!! //===================================== -#ifndef LArGeoH62004SteppingAction_h -#define LArGeoH62004SteppingAction_h 1 +#ifndef LARG4H6SD_LArGeoH62004SteppingAction_h +#define LARG4H6SD_LArGeoH62004SteppingAction_h 1 -#include "G4AtlasTools/UserActionBase.h" -#include <string> -#include <vector> +#include "G4AtlasInterfaces/ISteppingAction.h" -class LArGeoTB2004Options; - -class LArGeoH62004SteppingAction final: public UserActionBase +namespace G4UA { + /// @brief NEEDS DOCUMENTATION + class LArGeoH62004SteppingAction final: public ISteppingAction + { public: - LArGeoH62004SteppingAction(const std::string& type, const std::string& name, const IInterface* parent); - void ClearVector(){ m_tracks.clear(); } - ~LArGeoH62004SteppingAction(); - public: - virtual void Step(const G4Step* theStep) override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - virtual StatusCode initialize() override; + struct Config + { + float yTable=0.0; + bool checkprim=false; + bool printstep=false; + }; + + LArGeoH62004SteppingAction(const Config& config); + virtual void processStep(const G4Step*) override; private: - std::vector<int> m_tracks; - const LArGeoTB2004Options *m_largeoTB2004Options; - bool m_ownOptions; float m_yTable; -}; + bool m_checkprim; + bool m_printstep; + }; // class LArGeoH62004SteppingAction + +} // namespace G4UA -#endif +#endif \ No newline at end of file diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..3ddbb926a938af367b3852c012a73c86b0a99258 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.cc @@ -0,0 +1,66 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CxxUtils/make_unique.h" +#include "LArGeoH62004SteppingActionTool.h" + +#include "LArG4RunControl/LArGeoTB2004Options.h" + +namespace G4UA +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + LArGeoH62004SteppingActionTool::LArGeoH62004SteppingActionTool(const std::string& type, + const std::string& name, + const IInterface* parent) + : ActionToolBase<LArGeoH62004SteppingAction>(type, name, parent) + { + declareProperty("yTable", m_config.yTable); + declareProperty("CheckPrim", m_config.checkprim); + declareProperty("PrintStep", m_config.printstep); + } + + + StatusCode LArGeoH62004SteppingActionTool::initialize() + { + //FIXME Old-style configuration - to be removed + const LArGeoTB2004Options *largeoTB2004Options; + if(detStore()->retrieve(largeoTB2004Options, "LArGeoTB2004Options").isFailure()) + { + ATH_MSG_WARNING ( "Can't access LArGeoTB2004Options, using default values" ); + } + m_config.yTable = largeoTB2004Options->TableYPosition(); + m_config.checkprim = largeoTB2004Options->isCheckprim(); + m_config.printstep = largeoTB2004Options->isPrintstep(); + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the action on request + //--------------------------------------------------------------------------- + std::unique_ptr<LArGeoH62004SteppingAction> + LArGeoH62004SteppingActionTool::makeAction() + { + ATH_MSG_DEBUG("makeAction"); + auto action = CxxUtils::make_unique<LArGeoH62004SteppingAction>(m_config); + return std::move(action); + } + + //--------------------------------------------------------------------------- + // Query interface + //--------------------------------------------------------------------------- + StatusCode LArGeoH62004SteppingActionTool::queryInterface(const InterfaceID& riid, void** ppvIf) + { + if(riid == ISteppingActionTool::interfaceID()) { + *ppvIf = (ISteppingActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + + return ActionToolBase<LArGeoH62004SteppingAction>::queryInterface(riid, ppvIf); + } + +} diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.h new file mode 100644 index 0000000000000000000000000000000000000000..98bcd59f7670e25a9f06f2acac5b3a03aae28fb2 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.h @@ -0,0 +1,62 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4H6SD_LARGEOH62004STEPPINGACTIONTOOL_H +#define LARG4H6SD_LARGEOH62004STEPPINGACTIONTOOL_H + +// System includes +#include <string> + +// Infrastructure includes +#include "G4AtlasInterfaces/ISteppingActionTool.h" +#include "G4AtlasTools/ActionToolBase.h" + +// Local includes +#include "LArGeoH62004SteppingAction.h" + +namespace G4UA +{ + + /// @class LArGeoH62004SteppingActionTool + /// @brief Tool which manages the LArGeoH62004SteppingAction action. + /// + /// Create the LArGeoH62004SteppingAction for each worker thread + /// + /// @author Andrea Di Simone + /// + class LArGeoH62004SteppingActionTool : public ActionToolBase<LArGeoH62004SteppingAction>, + public ISteppingActionTool + { + + public: + + /// Standard constructor + LArGeoH62004SteppingActionTool(const std::string& type, const std::string& name, + const IInterface* parent); + + /// Framework intialize method + StatusCode initialize() override final; + + /// Retrieve the stepping action interface + virtual ISteppingAction* getSteppingAction() override final + { return static_cast<ISteppingAction*>( getAction() ); } + + /// Query interface for gaudi + virtual StatusCode + queryInterface(const InterfaceID& riid, void** ppvInterface) override; + + protected: + + /// Create action for this thread + virtual std::unique_ptr<LArGeoH62004SteppingAction> makeAction() override final; + + private: + /// Configuration parameters + LArGeoH62004SteppingAction::Config m_config; + + }; // class LArGeoH62004SteppingActionTool + +} // namespace G4UA + +#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.cc index a19a914e01c9b4300dbbc8545fd5c99e194bc202..fefec3a820af4b45294e75ca71802fdd567c6f82 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.cc @@ -17,156 +17,148 @@ #include "SimHelpers/ServiceAccessor.h" #include "G4Step.hh" #include "G4TouchableHistory.hh" -#include "GaudiKernel/MsgStream.h" +#include "AthenaKernel/errorcheck.h" -// ADS why not class members? -static bool has_cryo, has_em, has_hec, has_fcal; - -void RadLenNtuple::BeginOfEvent(const G4Event* /*anEvent*/) +namespace G4UA { - has_cryo = has_em = has_hec = has_fcal = false; -// m_tot_x = m_cryo_x = m_em_x = m_hec_x = m_fcal_x = 0.; -// m_tot_ni = m_cryo_ni = m_em_ni = m_hec_ni = m_fcal_ni = 0.; -// m_fcal_y = m_em_y = m_hec_y = m_cryo_y = 0.; -} + // ADS why not class members? + static bool has_cryo, has_em, has_hec, has_fcal; -void RadLenNtuple::EndOfEvent(const G4Event* /*anEvent*/) -{ + void RadLenNtuple::beginOfEvent(const G4Event* /*anEvent*/) + { + has_cryo = has_em = has_hec = has_fcal = false; + // m_tot_x = m_cryo_x = m_em_x = m_hec_x = m_fcal_x = 0.; + // m_tot_ni = m_cryo_ni = m_em_ni = m_hec_ni = m_fcal_ni = 0.; + // m_fcal_y = m_em_y = m_hec_y = m_cryo_y = 0.; + } - m_xcoord = -10000.; + void RadLenNtuple::endOfEvent(const G4Event* /*anEvent*/) + { - if (m_mcEvtColl.isValid()) { - McEventCollection::const_iterator iEvt = m_mcEvtColl->begin(); - HepMC::GenEvent::particle_const_iterator p = (*iEvt)->particles_begin(); - m_xcoord = (*p)->production_vertex()->point3d().x(); - } + m_xcoord = -10000.; + + if (m_mcEvtColl.isValid()) { + McEventCollection::const_iterator iEvt = m_mcEvtColl->begin(); + HepMC::GenEvent::particle_const_iterator p = (*iEvt)->particles_begin(); + m_xcoord = (*p)->production_vertex()->point3d().x(); + } - ntupleSvc()->writeRecord("/NTUPLES/FILE1/RadLenNtuple/radlen"); + ntupleSvc()->writeRecord("/NTUPLES/FILE1/RadLenNtuple/radlen"); -} + } -StatusCode RadLenNtuple::initialize(){ + StatusCode RadLenNtuple::initialize(){ - NTupleFilePtr file1(ntupleSvc(), "/NTUPLES/FILE1"); + NTupleFilePtr file1(ntupleSvc(), "/NTUPLES/FILE1"); - SmartDataPtr<NTuple::Directory> - ntdir(ntupleSvc(),"/NTUPLES/FILE1/RadLenNtuple"); - if ( !ntdir ) - { - // otherwise create the directory - ntdir = ntupleSvc()->createDirectory(file1,"RadLenNtuple"); - } - if ( ! ntdir ) - { - ATH_MSG_ERROR ( " failed to get ntuple directory" ); - } + SmartDataPtr<NTuple::Directory> + ntdir(ntupleSvc(),"/NTUPLES/FILE1/RadLenNtuple"); + if ( !ntdir ) + { + // otherwise create the directory + ntdir = ntupleSvc()->createDirectory(file1,"RadLenNtuple"); + } + if ( ! ntdir ) + { + std::cout << "RadLenNtuple ERROR failed to get ntuple directory" << std::endl; + } - NTuplePtr nt(ntupleSvc(), "/NTUPLES/FILE1/RadLenNtuple/radlen"); + NTuplePtr nt(ntupleSvc(), "/NTUPLES/FILE1/RadLenNtuple/radlen"); - if ( !nt ) { // Check if already booked + if ( !nt ) { // Check if already booked - nt = ntupleSvc()->book (ntdir.ptr(), "radlen",CLID_ColumnWiseTuple, "Some Description"); - if ( nt ) { + nt = ntupleSvc()->book (ntdir.ptr(), "radlen",CLID_ColumnWiseTuple, "Some Description"); + if ( nt ) { - ATH_MSG_DEBUG ( "booked ntuple " ); + if(m_verboseLevel>4) { std::cout << "booked ntuple " << std::endl; } - // WARNING!! Force limit to 50k tracks + // WARNING!! Force limit to 50k tracks - CHECK( nt->addItem ("tot_x", m_tot_x) ); - CHECK( nt->addItem ("tot_ni", m_tot_ni) ); - CHECK( nt->addItem ("cryo_x", m_cryo_x) ); - CHECK( nt->addItem ("cryo_ni", m_cryo_ni) ); - CHECK( nt->addItem ("em_x", m_em_x) ); - CHECK( nt->addItem ("em_ni", m_em_ni) ); - CHECK( nt->addItem ("hec_x", m_hec_x) ); - CHECK( nt->addItem ("hec_ni", m_hec_ni) ); - CHECK( nt->addItem ("fcal_x", m_fcal_x) ); - CHECK( nt->addItem ("fcal_ni", m_fcal_ni) ); - CHECK( nt->addItem ("cryo_y", m_cryo_y) ); - CHECK( nt->addItem ("em_y", m_em_y) ); - CHECK( nt->addItem ("hec_y", m_hec_y) ); - CHECK( nt->addItem ("fcal_y", m_fcal_y) ); - CHECK( nt->addItem ("coord_x", m_xcoord) ); + CHECK( nt->addItem ("tot_x", m_tot_x) ); + CHECK( nt->addItem ("tot_ni", m_tot_ni) ); + CHECK( nt->addItem ("cryo_x", m_cryo_x) ); + CHECK( nt->addItem ("cryo_ni", m_cryo_ni) ); + CHECK( nt->addItem ("em_x", m_em_x) ); + CHECK( nt->addItem ("em_ni", m_em_ni) ); + CHECK( nt->addItem ("hec_x", m_hec_x) ); + CHECK( nt->addItem ("hec_ni", m_hec_ni) ); + CHECK( nt->addItem ("fcal_x", m_fcal_x) ); + CHECK( nt->addItem ("fcal_ni", m_fcal_ni) ); + CHECK( nt->addItem ("cryo_y", m_cryo_y) ); + CHECK( nt->addItem ("em_y", m_em_y) ); + CHECK( nt->addItem ("hec_y", m_hec_y) ); + CHECK( nt->addItem ("fcal_y", m_fcal_y) ); + CHECK( nt->addItem ("coord_x", m_xcoord) ); - } else { // did not manage to book the N tuple.... + } else { // did not manage to book the N tuple.... - ATH_MSG_ERROR ("Could not book ntuple!! "); + std::cout << "RadLenNtuple ERROR Could not book ntuple!! " << std::endl; + } } - } - return StatusCode::SUCCESS; -} + return StatusCode::SUCCESS; + } -void RadLenNtuple::Step(const G4Step* aStep) -{ + void RadLenNtuple::processStep(const G4Step* aStep) + { - G4StepPoint *preStep=aStep->GetPreStepPoint(); - G4TouchableHistory* touchHist = (G4TouchableHistory*)aStep->GetPreStepPoint()->GetTouchable(); - G4LogicalVolume *lv=touchHist->GetVolume()->GetLogicalVolume(); - std::string volName=lv->GetName(); - G4Material *mat=lv->GetMaterial(); - double intl=mat->GetNuclearInterLength(); - double stepl=aStep->GetStepLength(); - double thickstep=stepl/intl; - double radl=mat->GetRadlen(); - double radstep=100 * stepl/radl; - std::string::size_type npos; - m_tot_x += thickstep; - m_tot_ni += radstep; - if(!has_cryo) { + G4StepPoint *preStep=aStep->GetPreStepPoint(); + G4TouchableHistory* touchHist = (G4TouchableHistory*)aStep->GetPreStepPoint()->GetTouchable(); + G4LogicalVolume *lv=touchHist->GetVolume()->GetLogicalVolume(); + std::string volName=lv->GetName(); + G4Material *mat=lv->GetMaterial(); + double intl=mat->GetNuclearInterLength(); + double stepl=aStep->GetStepLength(); + double thickstep=stepl/intl; + double radl=mat->GetRadlen(); + double radstep=100 * stepl/radl; + std::string::size_type npos; + m_tot_x += thickstep; + m_tot_ni += radstep; + if(!has_cryo) { m_cryo_x += thickstep; m_cryo_ni += radstep; npos=volName.find("Cryostat"); if(npos< volName.size()){ - has_cryo = true; - m_cryo_y = preStep->GetPosition().y(); - ATH_MSG_DEBUG (" Has cryo: "<<static_cast<float>(m_cryo_y)); + has_cryo = true; + m_cryo_y = preStep->GetPosition().y(); + if(m_verboseLevel>4) { std::cout <<"RadLenNtuple DEBUG Has cryo: "<<static_cast<float>(m_cryo_y) << std::endl; } } - } - if(!has_em) { + } + if(!has_em) { m_em_x += thickstep; m_em_ni += radstep; npos=volName.find("EMEC"); if(npos< volName.size()){ - has_em = true; - m_em_y = preStep->GetPosition().y(); - ATH_MSG_DEBUG(" Has EMEC: "<<static_cast<float>(m_em_y)); + has_em = true; + m_em_y = preStep->GetPosition().y(); + if(m_verboseLevel>4) { std::cout << "RadLenNtuple DEBUG Has EMEC: "<<static_cast<float>(m_em_y) << std::endl; } } - } - if(!has_hec) { + } + if(!has_hec) { m_hec_x += thickstep; m_hec_ni += radstep; npos=volName.find("HEC"); if(npos< volName.size()){ - has_hec = true; - m_hec_y = preStep->GetPosition().y(); - ATH_MSG_DEBUG (" Has HEC: "<<static_cast<float>(m_hec_y)); + has_hec = true; + m_hec_y = preStep->GetPosition().y(); + if(m_verboseLevel>4) { std::cout <<"RadLenNtuple DEBUG Has HEC: "<<static_cast<float>(m_hec_y) << std::endl; } } - } - if(!has_fcal) { + } + if(!has_fcal) { m_fcal_x += thickstep; m_fcal_ni += radstep; npos=volName.find("FCAL"); if(npos< volName.size()){ - has_fcal = true; - m_fcal_y = preStep->GetPosition().y(); - ATH_MSG_DEBUG (" Has FCAL: "<<static_cast<float>(m_fcal_y)); + has_fcal = true; + m_fcal_y = preStep->GetPosition().y(); + if(m_verboseLevel>4) { std::cout <<"RadLenNtuple DEBUG Has FCAL: "<<static_cast<float>(m_fcal_y) << std::endl; } } - } -} - -StatusCode RadLenNtuple::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); + } } - return StatusCode::SUCCESS; + } diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.h b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.h index e6c0ea25907cd974b29113c12e461b90afa25f89..80714119e13b7260c3338e8563c5e52f3ec89ac5 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.h @@ -2,10 +2,13 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef RadLenNtuple_H -#define RadLenNtuple_H +#ifndef LARG4H6SD_RadLenNtuple_H +#define LARG4H6SD_RadLenNtuple_H + +#include "G4AtlasInterfaces/ISteppingAction.h" +#include "G4AtlasInterfaces/IBeginEventAction.h" +#include "G4AtlasInterfaces/IEndEventAction.h" -#include "G4AtlasTools/UserActionBase.h" #include <string> #include "GaudiKernel/NTuple.h" #include <vector> @@ -14,39 +17,50 @@ #include "StoreGate/ReadHandle.h" #include "GeneratorObjects/McEventCollection.h" -class RadLenNtuple final: public UserActionBase { -public: - RadLenNtuple(const std::string& type, const std::string& name, const IInterface* parent):UserActionBase(type,name,parent),m_mcEvtColl("GEN_EVENT") {} - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfEvent(const G4Event*) override; - virtual void Step(const G4Step*) override; +namespace G4UA +{ + /// @brief NEEDS DOCUMENTATION + class RadLenNtuple final: public ISteppingAction, public IBeginEventAction, public IEndEventAction { + + public: + + struct Config + { + std::string mcEventCollName="GEN_EVENT"; + int verboseLevel=3; + }; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - virtual StatusCode initialize() override; + RadLenNtuple(const Config& config): m_mcEvtColl(config.mcEventCollName), m_verboseLevel(config.verboseLevel) {} + virtual void beginOfEvent(const G4Event*) override; + virtual void endOfEvent(const G4Event*) override; + virtual void processStep(const G4Step*) override; + virtual StatusCode initialize(); -private: - NTuple::Item<float> m_tot_x; - NTuple::Item<float> m_tot_ni; - NTuple::Item<float> m_cryo_x; - NTuple::Item<float> m_cryo_ni; - NTuple::Item<float> m_em_x; - NTuple::Item<float> m_em_ni; - NTuple::Item<float> m_hec_x; - NTuple::Item<float> m_hec_ni; - NTuple::Item<float> m_fcal_x; - NTuple::Item<float> m_fcal_ni; - NTuple::Item<float> m_fcal_y; - NTuple::Item<float> m_em_y; - NTuple::Item<float> m_hec_y; - NTuple::Item<float> m_cryo_y; - NTuple::Item<float> m_xcoord; + private: + + NTuple::Item<float> m_tot_x; + NTuple::Item<float> m_tot_ni; + NTuple::Item<float> m_cryo_x; + NTuple::Item<float> m_cryo_ni; + NTuple::Item<float> m_em_x; + NTuple::Item<float> m_em_ni; + NTuple::Item<float> m_hec_x; + NTuple::Item<float> m_hec_ni; + NTuple::Item<float> m_fcal_x; + NTuple::Item<float> m_fcal_ni; + NTuple::Item<float> m_fcal_y; + NTuple::Item<float> m_em_y; + NTuple::Item<float> m_hec_y; + NTuple::Item<float> m_cryo_y; + NTuple::Item<float> m_xcoord; // Data access SG::ReadHandle<McEventCollection> m_mcEvtColl; + int m_verboseLevel; -}; - + }; +} #endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..8351d956d8cef315536884d803d5d50c87d05b24 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.cc @@ -0,0 +1,70 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CxxUtils/make_unique.h" +#include "RadLenNtupleTool.h" + +namespace G4UA +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + RadLenNtupleTool::RadLenNtupleTool(const std::string& type, + const std::string& name, + const IInterface* parent) + : ActionToolBase<RadLenNtuple>(type, name, parent) + { + declareProperty("McEventCollName", m_config.mcEventCollName); + } + + StatusCode RadLenNtupleTool::initialize() + { + if(msgLvl(MSG::VERBOSE)) { m_config.verboseLevel = 10; } + else if(msgLvl(MSG::DEBUG)) { m_config.verboseLevel = 5; } + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the action on request + //--------------------------------------------------------------------------- + std::unique_ptr<RadLenNtuple> + RadLenNtupleTool::makeAction() + { + ATH_MSG_DEBUG("makeAction"); + auto action = CxxUtils::make_unique<RadLenNtuple>(m_config); + if(action->initialize().isFailure()) + { + ATH_MSG_WARNING("Failed to set up RadLenNtuple properly!"); + } + return std::move(action); + } + + //--------------------------------------------------------------------------- + // Query interface + //--------------------------------------------------------------------------- + StatusCode RadLenNtupleTool::queryInterface(const InterfaceID& riid, void** ppvIf) + { + if(riid == ISteppingActionTool::interfaceID()) { + *ppvIf = (ISteppingActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + + if(riid == IEndEventActionTool::interfaceID()) { + *ppvIf = (IEndEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + + if(riid == IBeginEventActionTool::interfaceID()) { + *ppvIf = (IBeginEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + + return ActionToolBase<RadLenNtuple>::queryInterface(riid, ppvIf); + } + +} diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.h new file mode 100644 index 0000000000000000000000000000000000000000..c5a7dba58b33cc5dcecd31f6d90004998e56d113 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.h @@ -0,0 +1,73 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4H6SD_RADLENNTUPLETOOL_H +#define LARG4H6SD_RADLENNTUPLETOOL_H + +// System includes +#include <string> + +// Infrastructure includes +#include "G4AtlasInterfaces/ISteppingActionTool.h" +#include "G4AtlasInterfaces/IEndEventActionTool.h" +#include "G4AtlasInterfaces/IBeginEventActionTool.h" +#include "G4AtlasTools/ActionToolBase.h" + +// Local includes +#include "RadLenNtuple.h" + +namespace G4UA +{ + /// @class RadLenNtupleTool + /// @brief Tool which manages the RadLenNtuple action. + /// + /// Create the RadLenNtuple for each worker thread + /// + /// @author Andrea Di Simone + /// + class RadLenNtupleTool : public ActionToolBase<RadLenNtuple>, + public IBeginEventActionTool, + public IEndEventActionTool, + public ISteppingActionTool + { + + public: + + /// Standard constructor + RadLenNtupleTool(const std::string& type, const std::string& name, + const IInterface* parent); + + /// Framework methods + StatusCode initialize() override final; + + /// Retrieve the begin-event action interface + virtual IBeginEventAction* getBeginEventAction() override final + { return static_cast<IBeginEventAction*>( getAction() ); } + + /// Retrieve the end-event action interface + virtual IEndEventAction* getEndEventAction() override final + { return static_cast<IEndEventAction*>( getAction() ); } + + /// Retrieve the stepping action interface + virtual ISteppingAction* getSteppingAction() override final + { return static_cast<ISteppingAction*>( getAction() ); } + + /// Query interface for gaudi + virtual StatusCode + queryInterface(const InterfaceID& riid, void** ppvInterface) override; + + protected: + + /// Create action for this thread + virtual std::unique_ptr<RadLenNtuple> makeAction() override final; + + private: + /// Configuration parameters + RadLenNtuple::Config m_config; + + }; // class RadLenNtupleTool + +} // namespace G4UA + +#endif diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/TBECBackOuterBarretteTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/TBECBackOuterBarretteTool.cc index b46f1f64cc1bfebce15f894ec7bc2cd8de55808c..1e8f7d0cec7557e490f51f342b3e8f61517eed24 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/TBECBackOuterBarretteTool.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/TBECBackOuterBarretteTool.cc @@ -5,8 +5,6 @@ #include "TBECBackOuterBarretteTool.h" #include "LArG4Code/LArG4SimpleSD.h" -#include "LArG4EC/EnergyCalculator.h" - #include "CxxUtils/make_unique.h" TBECBackOuterBarretteTool::TBECBackOuterBarretteTool(const std::string& type, const std::string& name, const IInterface *parent) @@ -18,6 +16,13 @@ TBECBackOuterBarretteTool::TBECBackOuterBarretteTool(const std::string& type, co , m_HitColl_gap_se("LArHitEMEC_gap_se") , m_HitColl_chcoll("LArHitEMEC_chcoll") , m_HitColl_ropt("LArHitEMEC_ropt") + , m_emecbobgadjcalc("EMECPosBOBWheel_ECOR_GADJCalculator", name) + , m_emecbobgadjoldcalc("EMECPosBOBWheel_ECOR_GADJ_OLDCalculator", name) + , m_emecbobgadjecalc("EMECPosBOBWheel_ECOR_GADJ_ECalculator", name) + , m_emecbobgadjscalc("EMECPosBOBWheel_ECOR_GADJ_SCalculator", name) + , m_emecbobgadjsecalc("EMECPosBOBWheel_ECOR_GADJ_SECalculator", name) + , m_emecbobchclcalc("EMECPosBOBWheel_ECOR_CHCLCalculator", name) + , m_emecbobcalc("EMECPosBOBWheelCalculator", name) , m_gapadjSD(nullptr) , m_gapoldSD(nullptr) , m_gap_eSD(nullptr) @@ -27,18 +32,44 @@ TBECBackOuterBarretteTool::TBECBackOuterBarretteTool(const std::string& type, co , m_roptSD(nullptr) { declareInterface<ISensitiveDetector>(this); + declareProperty("EMECPosBOBWheel_ECOR_GADJCalculator", m_emecbobgadjcalc); + declareProperty("EMECPosBOBWheel_ECOR_GADJ_OLDCalculator", m_emecbobgadjoldcalc); + declareProperty("EMECPosBOBWheel_ECOR_GADJ_ECalculator", m_emecbobgadjecalc); + declareProperty("EMECPosBOBWheel_ECOR_GADJ_SCalculator", m_emecbobgadjscalc); + declareProperty("EMECPosBOBWheel_ECOR_GADJ_SECalculator", m_emecbobgadjsecalc); + declareProperty("EMECPosBOBWheel_ECOR_CHCLCalculator", m_emecbobchclcalc); + declareProperty("EMECPosBOBWheelCalculator", m_emecbobcalc); } +StatusCode TBECBackOuterBarretteTool::initializeCalculators() +{ + ATH_CHECK(m_emecbobgadjcalc.retrieve()); + ATH_CHECK(m_emecbobgadjoldcalc.retrieve()); + ATH_CHECK(m_emecbobgadjecalc.retrieve()); + ATH_CHECK(m_emecbobgadjscalc.retrieve()); + ATH_CHECK(m_emecbobgadjsecalc.retrieve()); + ATH_CHECK(m_emecbobchclcalc.retrieve()); + ATH_CHECK(m_emecbobcalc.retrieve()); + + return StatusCode::SUCCESS; +} StatusCode TBECBackOuterBarretteTool::initializeSD() { - m_gapadjSD = new LArG4SimpleSD( "LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_gapadj" , new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ) , m_timeBinType , m_timeBinWidth ); - m_gapoldSD = new LArG4SimpleSD("LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_gapold", new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ_OLD) , m_timeBinType , m_timeBinWidth); - m_gap_eSD = new LArG4SimpleSD("LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_gap_e", new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ_E) , m_timeBinType , m_timeBinWidth); - m_gap_sSD = new LArG4SimpleSD("LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_gap_s", new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ_S) , m_timeBinType , m_timeBinWidth); - m_gap_seSD = new LArG4SimpleSD("LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_gap_se", new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ_SE) , m_timeBinType , m_timeBinWidth); - m_chcollSD = new LArG4SimpleSD("LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_chcoll", new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_CHCL) , m_timeBinType , m_timeBinWidth); - m_roptSD = new LArG4SimpleSD("LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_ropt", new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT) , m_timeBinType , m_timeBinWidth); + // Multi-threading not yet supported + if(m_gapadjSD) { + ATH_MSG_ERROR("TBECBackOuterBarretteTool::initializeSD - SDs already exist. " << + "Are you running an MT job? Not yet supported!"); + return StatusCode::FAILURE; + } + + m_gapadjSD = new LArG4SimpleSD( "LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_gapadj" , &*m_emecbobgadjcalc, m_timeBinType , m_timeBinWidth ); + m_gapoldSD = new LArG4SimpleSD("LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_gapold", &*m_emecbobgadjoldcalc, m_timeBinType , m_timeBinWidth); + m_gap_eSD = new LArG4SimpleSD("LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_gap_e", &*m_emecbobgadjecalc, m_timeBinType , m_timeBinWidth); + m_gap_sSD = new LArG4SimpleSD("LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_gap_s", &*m_emecbobgadjscalc, m_timeBinType , m_timeBinWidth); + m_gap_seSD = new LArG4SimpleSD("LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_gap_se", &*m_emecbobgadjsecalc, m_timeBinType , m_timeBinWidth); + m_chcollSD = new LArG4SimpleSD("LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_chcoll", &*m_emecbobchclcalc, m_timeBinType , m_timeBinWidth); + m_roptSD = new LArG4SimpleSD("LAr::EMEC::BackOuterBarrette::Module::Phidiv::SDout_ropt", &*m_emecbobcalc, m_timeBinType , m_timeBinWidth); std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; configuration[m_gapadjSD] = &m_volumeNames; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/TBECBackOuterBarretteTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/TBECBackOuterBarretteTool.h index 672c75fdd2204555d709dbf0b5105efde99b06fc..9f9ce0467ae3d8fb3846c9e05c1329536867b6da 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/TBECBackOuterBarretteTool.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/TBECBackOuterBarretteTool.h @@ -11,18 +11,26 @@ #include "StoreGate/WriteHandle.h" #include "LArSimEvent/LArHitContainer.h" +#include "LArG4Code/ILArCalculatorSvc.h" class LArG4SimpleSD; +/// @class TBECBackOuterBarretteTool +/// +/// This implementation has issues in multi-threading and so cannot +/// be used in an MT job. Migration discussion ongoing in ATLASSIM-2606. +/// class TBECBackOuterBarretteTool : public LArG4SDTool { public: // Constructor TBECBackOuterBarretteTool(const std::string& type, const std::string& name, const IInterface *parent); - + // Destructor virtual ~TBECBackOuterBarretteTool() {} + virtual StatusCode initializeCalculators() override final; + // Method in which all the SDs are created and assigned to the relevant volumes StatusCode initializeSD() override final; @@ -32,7 +40,7 @@ class TBECBackOuterBarretteTool : public LArG4SDTool /** Beginning of an athena event. This is where collection initialization should happen. If we are using a WriteHandle, then this could be empty. */ // StatusCode SetupEvent() override final; - + private: // The actual hit container - here because the base class is for both calib and standard SD tools SG::WriteHandle<LArHitContainer> m_HitColl_gapadj; @@ -43,6 +51,14 @@ class TBECBackOuterBarretteTool : public LArG4SDTool SG::WriteHandle<LArHitContainer> m_HitColl_chcoll; SG::WriteHandle<LArHitContainer> m_HitColl_ropt; + ServiceHandle<ILArCalculatorSvc> m_emecbobgadjcalc;// LArG4::EMEC_ECOR_GADJ + ServiceHandle<ILArCalculatorSvc> m_emecbobgadjoldcalc;// LArG4::EMEC_ECOR_GADJ_OLD + ServiceHandle<ILArCalculatorSvc> m_emecbobgadjecalc;// LArG4::EMEC_ECOR_GADJ_E + ServiceHandle<ILArCalculatorSvc> m_emecbobgadjscalc;// LArG4::EMEC_ECOR_GADJ_S + ServiceHandle<ILArCalculatorSvc> m_emecbobgadjsecalc;// LArG4::EMEC_ECOR_GADJ_SE + ServiceHandle<ILArCalculatorSvc> m_emecbobchclcalc;// LArG4::EMEC_ECOR_CHCL + ServiceHandle<ILArCalculatorSvc> m_emecbobcalc;// LArG4::EMEC_ECOR_ROPT + // List of volumes for each SD and the corresponding SDs LArG4SimpleSD* m_gapadjSD; LArG4SimpleSD* m_gapoldSD; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/TBECInnerModuleTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/TBECInnerModuleTool.cc index a89048c053ecffe1f125c12fa535d4a5dc23bfd0..f2d18e84ef33fe6e504d4acd7246b79105b8d44a 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/TBECInnerModuleTool.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/TBECInnerModuleTool.cc @@ -5,8 +5,6 @@ #include "TBECInnerModuleTool.h" #include "LArG4Code/LArG4SimpleSD.h" -#include "LArG4EC/EnergyCalculator.h" - #include "CxxUtils/make_unique.h" TBECInnerModuleTool::TBECInnerModuleTool(const std::string& type, const std::string& name, const IInterface *parent) @@ -18,6 +16,13 @@ TBECInnerModuleTool::TBECInnerModuleTool(const std::string& type, const std::str , m_HitColl_gap_se("LArHitEMEC_gap_se") , m_HitColl_chcoll("LArHitEMEC_chcoll") , m_HitColl_ropt("LArHitEMEC_ropt") + , m_emecinnergadjcalc("EMECPosInnerWheel_ECOR_GADJCalculator", name) + , m_emecinnergadjoldcalc("EMECPosInnerWheel_ECOR_GADJ_OLDCalculator", name) + , m_emecinnergadjecalc("EMECPosInnerWheel_ECOR_GADJ_ECalculator", name) + , m_emecinnergadjscalc("EMECPosInnerWheel_ECOR_GADJ_SCalculator", name) + , m_emecinnergadjsecalc("EMECPosInnerWheel_ECOR_GADJ_SECalculator", name) + , m_emecinnerchclcalc("EMECPosInnerWheel_ECOR_CHCLCalculator", name) + , m_emecinnercalc("EMECPosInnerWheelCalculator", name) , m_gapadjSD(nullptr) , m_gapoldSD(nullptr) , m_gap_eSD(nullptr) @@ -27,18 +32,43 @@ TBECInnerModuleTool::TBECInnerModuleTool(const std::string& type, const std::str , m_roptSD(nullptr) { declareInterface<ISensitiveDetector>(this); + declareProperty("EMECPosInnerWheel_ECOR_GADJCalculator", m_emecinnergadjcalc); + declareProperty("EMECPosInnerWheel_ECOR_GADJ_OLDCalculator", m_emecinnergadjoldcalc); + declareProperty("EMECPosInnerWheel_ECOR_GADJ_ECalculator", m_emecinnergadjecalc); + declareProperty("EMECPosInnerWheel_ECOR_GADJ_SCalculator", m_emecinnergadjscalc); + declareProperty("EMECPosInnerWheel_ECOR_GADJ_SECalculator", m_emecinnergadjsecalc); + declareProperty("EMECPosInnerWheel_ECOR_CHCLCalculator", m_emecinnerchclcalc); + declareProperty("EMECPosInnerWheelCalculator", m_emecinnercalc); } +StatusCode TBECInnerModuleTool::initializeCalculators() +{ + ATH_CHECK(m_emecinnergadjcalc.retrieve()); + ATH_CHECK(m_emecinnergadjoldcalc.retrieve()); + ATH_CHECK(m_emecinnergadjecalc.retrieve()); + ATH_CHECK(m_emecinnergadjscalc.retrieve()); + ATH_CHECK(m_emecinnergadjsecalc.retrieve()); + ATH_CHECK(m_emecinnerchclcalc.retrieve()); + ATH_CHECK(m_emecinnercalc.retrieve()); + return StatusCode::SUCCESS; +} StatusCode TBECInnerModuleTool::initializeSD() { - m_gapadjSD = new LArG4SimpleSD( "LAr::EMEC::InnerModule::SDin_gapadj" , new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ) , m_timeBinType , m_timeBinWidth ); - m_gapoldSD = new LArG4SimpleSD("LAr::EMEC::InnerModule::SDin_gapold", new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ_OLD) , m_timeBinType , m_timeBinWidth); - m_gap_eSD = new LArG4SimpleSD("LAr::EMEC::InnerModule::SDin_gap_e", new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ_E) , m_timeBinType , m_timeBinWidth); - m_gap_sSD = new LArG4SimpleSD("LAr::EMEC::InnerModule::SDin_gap_s", new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ_S) , m_timeBinType , m_timeBinWidth); - m_gap_seSD = new LArG4SimpleSD("LAr::EMEC::InnerModule::SDin_gap_se", new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ_SE) , m_timeBinType , m_timeBinWidth); - m_chcollSD = new LArG4SimpleSD("LAr::EMEC::InnerModule::SDin_chcoll", new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_CHCL) , m_timeBinType , m_timeBinWidth); - m_roptSD = new LArG4SimpleSD("LAr::EMEC::InnerModule::SDin_ropt", new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT) , m_timeBinType , m_timeBinWidth); + // Multi-threading not yet supported + if(m_gapadjSD) { + ATH_MSG_ERROR("TBECInnerModuleTool::initializeSD - SDs already exist. " << + "Are you running an MT job? Not yet supported!"); + return StatusCode::FAILURE; + } + + m_gapadjSD = new LArG4SimpleSD( "LAr::EMEC::InnerModule::SDin_gapadj" , &*m_emecinnergadjcalc, m_timeBinType , m_timeBinWidth ); + m_gapoldSD = new LArG4SimpleSD("LAr::EMEC::InnerModule::SDin_gapold", &*m_emecinnergadjoldcalc, m_timeBinType , m_timeBinWidth); + m_gap_eSD = new LArG4SimpleSD("LAr::EMEC::InnerModule::SDin_gap_e", &*m_emecinnergadjecalc, m_timeBinType , m_timeBinWidth); + m_gap_sSD = new LArG4SimpleSD("LAr::EMEC::InnerModule::SDin_gap_s", &*m_emecinnergadjscalc, m_timeBinType , m_timeBinWidth); + m_gap_seSD = new LArG4SimpleSD("LAr::EMEC::InnerModule::SDin_gap_se", &*m_emecinnergadjsecalc, m_timeBinType , m_timeBinWidth); + m_chcollSD = new LArG4SimpleSD("LAr::EMEC::InnerModule::SDin_chcoll", &*m_emecinnerchclcalc, m_timeBinType , m_timeBinWidth); + m_roptSD = new LArG4SimpleSD("LAr::EMEC::InnerModule::SDin_ropt", &*m_emecinnercalc, m_timeBinType , m_timeBinWidth); std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; configuration[m_gapadjSD] = &m_volumeNames; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/TBECInnerModuleTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/TBECInnerModuleTool.h index 06150bb25f4adfda22cb44d5308878f535cdf4a5..000a9b149ba3d811604f48f407f89067ec8e744e 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/TBECInnerModuleTool.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/TBECInnerModuleTool.h @@ -11,18 +11,26 @@ #include "StoreGate/WriteHandle.h" #include "LArSimEvent/LArHitContainer.h" +#include "LArG4Code/ILArCalculatorSvc.h" class LArG4SimpleSD; +/// @class TBECInnerModuleTool +/// +/// This implementation has issues in multi-threading and so cannot +/// be used in an MT job. Migration discussion ongoing in ATLASSIM-2606. +/// class TBECInnerModuleTool : public LArG4SDTool { public: // Constructor TBECInnerModuleTool(const std::string& type, const std::string& name, const IInterface *parent); - + // Destructor virtual ~TBECInnerModuleTool() {} + virtual StatusCode initializeCalculators() override final; + // Method in which all the SDs are created and assigned to the relevant volumes StatusCode initializeSD() override final; @@ -32,7 +40,7 @@ class TBECInnerModuleTool : public LArG4SDTool /** Beginning of an athena event. This is where collection initialization should happen. If we are using a WriteHandle, then this could be empty. */ // StatusCode SetupEvent() override final; - + private: // The actual hit container - here because the base class is for both calib and standard SD tools SG::WriteHandle<LArHitContainer> m_HitColl_gapadj; @@ -43,6 +51,14 @@ class TBECInnerModuleTool : public LArG4SDTool SG::WriteHandle<LArHitContainer> m_HitColl_chcoll; SG::WriteHandle<LArHitContainer> m_HitColl_ropt; + ServiceHandle<ILArCalculatorSvc> m_emecinnergadjcalc;// LArG4::EMEC_ECOR_GADJ + ServiceHandle<ILArCalculatorSvc> m_emecinnergadjoldcalc;// LArG4::EMEC_ECOR_GADJ_OLD + ServiceHandle<ILArCalculatorSvc> m_emecinnergadjecalc;// LArG4::EMEC_ECOR_GADJ_E + ServiceHandle<ILArCalculatorSvc> m_emecinnergadjscalc;// LArG4::EMEC_ECOR_GADJ_S + ServiceHandle<ILArCalculatorSvc> m_emecinnergadjsecalc;// LArG4::EMEC_ECOR_GADJ_SE + ServiceHandle<ILArCalculatorSvc> m_emecinnerchclcalc;// LArG4::EMEC_ECOR_CHCL + ServiceHandle<ILArCalculatorSvc> m_emecinnercalc;// LArG4::EMEC_ECOR_ROPT + // List of volumes for each SD and the corresponding SDs LArG4SimpleSD* m_gapadjSD; LArG4SimpleSD* m_gapoldSD; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/TBECOuterModuleTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/TBECOuterModuleTool.cc index b28faeba4a13e886368619109ba0e275c9c2e0e0..584da048fef920fbb58e772f09c576923484553a 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/TBECOuterModuleTool.cc +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/TBECOuterModuleTool.cc @@ -5,8 +5,6 @@ #include "TBECOuterModuleTool.h" #include "LArG4Code/LArG4SimpleSD.h" -#include "LArG4EC/EnergyCalculator.h" - #include "CxxUtils/make_unique.h" TBECOuterModuleTool::TBECOuterModuleTool(const std::string& type, const std::string& name, const IInterface *parent) @@ -18,6 +16,13 @@ TBECOuterModuleTool::TBECOuterModuleTool(const std::string& type, const std::str , m_HitColl_gap_se("LArHitEMEC_gap_se") , m_HitColl_chcoll("LArHitEMEC_chcoll") , m_HitColl_ropt("LArHitEMEC_ropt") + , m_emecoutergadjcalc("EMECPosOuterWheel_ECOR_GADJCalculator", name) + , m_emecoutergadjoldcalc("EMECPosOuterWheel_ECOR_GADJ_OLDCalculator", name) + , m_emecoutergadjecalc("EMECPosOuterWheel_ECOR_GADJ_ECalculator", name) + , m_emecoutergadjscalc("EMECPosOuterWheel_ECOR_GADJ_SCalculator", name) + , m_emecoutergadjsecalc("EMECPosOuterWheel_ECOR_GADJ_SECalculator", name) + , m_emecouterchclcalc("EMECPosOuterWheel_ECOR_CHCLCalculator", name) + , m_emecoutercalc("EMECPosOuterWheelCalculator", name) , m_gapadjSD(nullptr) , m_gapoldSD(nullptr) , m_gap_eSD(nullptr) @@ -27,18 +32,44 @@ TBECOuterModuleTool::TBECOuterModuleTool(const std::string& type, const std::str , m_roptSD(nullptr) { declareInterface<ISensitiveDetector>(this); + declareProperty("EMECPosOuterWheel_ECOR_GADJCalculator", m_emecoutergadjcalc); + declareProperty("EMECPosOuterWheel_ECOR_GADJ_OLDCalculator", m_emecoutergadjoldcalc); + declareProperty("EMECPosOuterWheel_ECOR_GADJ_ECalculator", m_emecoutergadjecalc); + declareProperty("EMECPosOuterWheel_ECOR_GADJ_SCalculator", m_emecoutergadjscalc); + declareProperty("EMECPosOuterWheel_ECOR_GADJ_SECalculator", m_emecoutergadjsecalc); + declareProperty("EMECPosOuterWheel_ECOR_CHCLCalculator", m_emecouterchclcalc); + declareProperty("EMECPosOuterWheelCalculator", m_emecoutercalc); } +StatusCode TBECOuterModuleTool::initializeCalculators() +{ + ATH_CHECK(m_emecoutergadjcalc.retrieve()); + ATH_CHECK(m_emecoutergadjoldcalc.retrieve()); + ATH_CHECK(m_emecoutergadjecalc.retrieve()); + ATH_CHECK(m_emecoutergadjscalc.retrieve()); + ATH_CHECK(m_emecoutergadjsecalc.retrieve()); + ATH_CHECK(m_emecouterchclcalc.retrieve()); + ATH_CHECK(m_emecoutercalc.retrieve()); + + return StatusCode::SUCCESS; +} StatusCode TBECOuterModuleTool::initializeSD() { - m_gapadjSD = new LArG4SimpleSD( "LAr::EMEC::OuterModule::SDout_gapadj" , new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ) , m_timeBinType , m_timeBinWidth ); - m_gapoldSD = new LArG4SimpleSD("LAr::EMEC::OuterModule::SDout_gapold", new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ_OLD) , m_timeBinType , m_timeBinWidth); - m_gap_eSD = new LArG4SimpleSD("LAr::EMEC::OuterModule::SDout_gap_e", new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ_E) , m_timeBinType , m_timeBinWidth); - m_gap_sSD = new LArG4SimpleSD("LAr::EMEC::OuterModule::SDout_gap_s", new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ_S) , m_timeBinType , m_timeBinWidth); - m_gap_seSD = new LArG4SimpleSD("LAr::EMEC::OuterModule::SDout_gap_se", new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_GADJ_SE) , m_timeBinType , m_timeBinWidth); - m_chcollSD = new LArG4SimpleSD("LAr::EMEC::OuterModule::SDout_chcoll", new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_CHCL) , m_timeBinType , m_timeBinWidth); - m_roptSD = new LArG4SimpleSD("LAr::EMEC::OuterModule::SDout_ropt", new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberModule, LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT) , m_timeBinType , m_timeBinWidth); + // Multi-threading not yet supported + if(m_gapadjSD) { + ATH_MSG_ERROR("TBECOuterModuleTool::initializeSD - SDs already exist. " << + "Are you running an MT job? Not yet supported!"); + return StatusCode::FAILURE; + } + + m_gapadjSD = new LArG4SimpleSD( "LAr::EMEC::OuterModule::SDout_gapadj" , &*m_emecoutergadjcalc, m_timeBinType , m_timeBinWidth ); + m_gapoldSD = new LArG4SimpleSD("LAr::EMEC::OuterModule::SDout_gapold", &*m_emecoutergadjoldcalc, m_timeBinType , m_timeBinWidth); + m_gap_eSD = new LArG4SimpleSD("LAr::EMEC::OuterModule::SDout_gap_e", &*m_emecoutergadjecalc, m_timeBinType , m_timeBinWidth); + m_gap_sSD = new LArG4SimpleSD("LAr::EMEC::OuterModule::SDout_gap_s", &*m_emecoutergadjscalc, m_timeBinType , m_timeBinWidth); + m_gap_seSD = new LArG4SimpleSD("LAr::EMEC::OuterModule::SDout_gap_se", &*m_emecoutergadjsecalc, m_timeBinType , m_timeBinWidth); + m_chcollSD = new LArG4SimpleSD("LAr::EMEC::OuterModule::SDout_chcoll", &*m_emecouterchclcalc, m_timeBinType , m_timeBinWidth); + m_roptSD = new LArG4SimpleSD("LAr::EMEC::OuterModule::SDout_ropt", &*m_emecoutercalc, m_timeBinType , m_timeBinWidth); std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; configuration[m_gapadjSD] = &m_volumeNames; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/TBECOuterModuleTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/TBECOuterModuleTool.h index 43255220916c72588fb4031bc85f89a7b457c1a0..464b8427d235aee4e10a66c73055aed42ad656a8 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/TBECOuterModuleTool.h +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/TBECOuterModuleTool.h @@ -11,18 +11,26 @@ #include "StoreGate/WriteHandle.h" #include "LArSimEvent/LArHitContainer.h" +#include "LArG4Code/ILArCalculatorSvc.h" class LArG4SimpleSD; +/// @class TBECOuterModuleTool +/// +/// This implementation has issues in multi-threading and so cannot +/// be used in an MT job. Migration discussion ongoing in ATLASSIM-2606. +/// class TBECOuterModuleTool : public LArG4SDTool { public: // Constructor TBECOuterModuleTool(const std::string& type, const std::string& name, const IInterface *parent); - + // Destructor virtual ~TBECOuterModuleTool() {} + StatusCode initializeCalculators() override final; + // Method in which all the SDs are created and assigned to the relevant volumes StatusCode initializeSD() override final; @@ -39,6 +47,14 @@ class TBECOuterModuleTool : public LArG4SDTool SG::WriteHandle<LArHitContainer> m_HitColl_chcoll; SG::WriteHandle<LArHitContainer> m_HitColl_ropt; + ServiceHandle<ILArCalculatorSvc> m_emecoutergadjcalc;// LArG4::EMEC_ECOR_GADJ + ServiceHandle<ILArCalculatorSvc> m_emecoutergadjoldcalc;// LArG4::EMEC_ECOR_GADJ_OLD + ServiceHandle<ILArCalculatorSvc> m_emecoutergadjecalc;// LArG4::EMEC_ECOR_GADJ_E + ServiceHandle<ILArCalculatorSvc> m_emecoutergadjscalc;// LArG4::EMEC_ECOR_GADJ_S + ServiceHandle<ILArCalculatorSvc> m_emecoutergadjsecalc;// LArG4::EMEC_ECOR_GADJ_SE + ServiceHandle<ILArCalculatorSvc> m_emecouterchclcalc;// LArG4::EMEC_ECOR_CHCL + ServiceHandle<ILArCalculatorSvc> m_emecoutercalc;// LArG4::EMEC_ECOR_ROPT + // List of volumes for each SD and the corresponding SDs LArG4SimpleSD* m_gapadjSD; LArG4SimpleSD* m_gapoldSD; diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/components/LArG4H6SDTools_entries.cxx b/LArCalorimeter/LArG4/LArG4H6SD/src/components/LArG4H6SDTools_entries.cxx index b01d4a892675c8a51884668877fab8c8fc0c91d8..f7a11c6c88f10e5f422eca0341f0596f2f1376c9 100644 --- a/LArCalorimeter/LArG4/LArG4H6SD/src/components/LArG4H6SDTools_entries.cxx +++ b/LArCalorimeter/LArG4/LArG4H6SD/src/components/LArG4H6SDTools_entries.cxx @@ -2,9 +2,18 @@ #include "../LArTBH6TriggerTimeTool.h" #include "../LArTBH6BeamInfo.h" -#include "../LArGeoH62004EventAction.h" -#include "../LArGeoH62004SteppingAction.h" -#include "../RadLenNtuple.h" +#include "../LArGeoH62004EventActionTool.h" +#include "../LArGeoH62004SteppingActionTool.h" +#include "../RadLenNtupleTool.h" + +// New SDs +#include "../H62004EMECSDTool.h" +#include "../H62004FCALSDTool.h" +#include "../H62004HECSDTool.h" +#include "../H62004ActiveSDTool.h" +#include "../H62004DeadSDTool.h" +#include "../H62004InactiveSDTool.h" + // SDs #include "../LArG4H62004ActiveSDTool.h" #include "../LArG4H62004DeadSDTool.h" @@ -19,13 +28,28 @@ #include "../TBECInnerModuleTool.h" #include "../TBECOuterModuleTool.h" +// Calculator Services +#include "../LArFCALH62004CalibCalculatorBase.h" +#include "../LArG4H6COLDTCMod0Calculator.h" +#include "../LArG4H6WarmTCCalculator.h" +#include "../LArG4H62004DeadCalibrationCalculator.h" +#include "../LArG4H6COLDTCMod0CalibCalculator.h" + + // UA tools DECLARE_TOOL_FACTORY( LArTBH6TriggerTimeTool ) -DECLARE_TOOL_FACTORY( LArGeoH62004EventAction ) -DECLARE_TOOL_FACTORY( LArGeoH62004SteppingAction ) -DECLARE_TOOL_FACTORY( RadLenNtuple ) +DECLARE_TOOL_FACTORY( G4UA::LArGeoH62004EventActionTool ) +DECLARE_TOOL_FACTORY( G4UA::LArGeoH62004SteppingActionTool ) +DECLARE_TOOL_FACTORY( G4UA::RadLenNtupleTool ) // SD tools +DECLARE_TOOL_FACTORY( LArG4::H62004EMECSDTool ) +DECLARE_TOOL_FACTORY( LArG4::H62004FCALSDTool ) +DECLARE_TOOL_FACTORY( LArG4::H62004HECSDTool ) +DECLARE_TOOL_FACTORY( LArG4::H62004ActiveSDTool ) +DECLARE_TOOL_FACTORY( LArG4::H62004DeadSDTool ) +DECLARE_TOOL_FACTORY( LArG4::H62004InactiveSDTool ) + DECLARE_TOOL_FACTORY( LArG4H62004ActiveSDTool ) DECLARE_TOOL_FACTORY( LArG4H62004DeadSDTool ) DECLARE_TOOL_FACTORY( LArG4H62004EMECSDTool ) @@ -41,23 +65,10 @@ DECLARE_TOOL_FACTORY( TBECOuterModuleTool ) DECLARE_ALGORITHM_FACTORY(LArTBH6BeamInfo) -DECLARE_FACTORY_ENTRIES(LArG4TBH6Tools) { - DECLARE_ALGORITHM(LArTBH6BeamInfo) - DECLARE_TOOL( LArTBH6TriggerTimeTool ) - DECLARE_TOOL( LArGeoH62004EventAction ) - DECLARE_TOOL( LArGeoH62004SteppingAction ) - DECLARE_TOOL( RadLenNtuple ) - DECLARE_TOOL( LArG4H62004ActiveSDTool ) - DECLARE_TOOL( LArG4H62004DeadSDTool ) - DECLARE_TOOL( LArG4H62004EMECSDTool ) - DECLARE_TOOL( LArG4H62004FCALSDTool ) - DECLARE_TOOL( LArG4H62004HECSDTool ) - DECLARE_TOOL( LArG4H62004InactiveSDTool ) - DECLARE_TOOL( LArG4H6BeamSDTool ) - DECLARE_TOOL( LArG4H6WarmTCSDTool ) - DECLARE_TOOL( LArG4TBECBeamChSDTool ) - DECLARE_TOOL( TBECBackOuterBarretteTool ) - DECLARE_TOOL( TBECInnerModuleTool ) - DECLARE_TOOL( TBECOuterModuleTool ) -} +//Calculators +DECLARE_SERVICE_FACTORY(LArFCALH62004CalibCalculatorBase) +DECLARE_SERVICE_FACTORY(LArG4H6COLDTCMod0Calculator) +DECLARE_SERVICE_FACTORY(LArG4H6WarmTCCalculator) +DECLARE_SERVICE_FACTORY(LArG4H62004DeadCalibrationCalculator) +DECLARE_SERVICE_FACTORY(LArG4H6COLDTCMod0CalibCalculator) diff --git a/LArCalorimeter/LArG4/LArG4H8SD/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4H8SD/CMakeLists.txt index 6e4e8141433eb271371b1f1ec0f591c31d51432c..5bead0dd6b7e3137ec06c5e1116d01dfb0f9f755 100644 --- a/LArCalorimeter/LArG4/LArG4H8SD/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4H8SD/CMakeLists.txt @@ -9,9 +9,10 @@ atlas_subdir( LArG4H8SD ) atlas_depends_on_subdirs( PRIVATE Calorimeter/CaloG4Sim Calorimeter/CaloSimEvent + Control/AthenaKernel Control/CxxUtils Control/StoreGate - LArCalorimeter/LArG4/LArG4Barrel + GaudiKernel LArCalorimeter/LArG4/LArG4Code ) # External dependencies: @@ -20,11 +21,12 @@ find_package( Geant4 ) find_package( XercesC ) # Component(s) in the package: -atlas_add_library( LArG4H8SD +atlas_add_component( LArG4H8SD src/*.cc + src/components/*.cxx PUBLIC_HEADERS LArG4H8SD PRIVATE_INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES CaloG4SimLib StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloSimEvent CxxUtils LArG4Barrel LArG4Code ) + PRIVATE_LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel CaloSimEvent CxxUtils GaudiKernel LArG4Code ) diff --git a/LArCalorimeter/LArG4/LArG4H8SD/cmt/requirements b/LArCalorimeter/LArG4/LArG4H8SD/cmt/requirements old mode 100755 new mode 100644 index 2ace648e1afaace4055f5c0d1338eaf9e13f7221..7481e66d0fad9a0fcd1372e4bf1768a24431eae9 --- a/LArCalorimeter/LArG4/LArG4H8SD/cmt/requirements +++ b/LArCalorimeter/LArG4/LArG4H8SD/cmt/requirements @@ -5,8 +5,9 @@ author Guillaume Unal use AtlasPolicy AtlasPolicy-* # Build the library (and export the headers) -library LArG4H8SD *.cc -apply_pattern linked_library +library LArG4H8SD *.cc components/*.cxx +apply_pattern component_library +apply_pattern declare_python_modules files="*.py" #======================================================= private @@ -16,8 +17,8 @@ private # only used in the stand-alone version of this application. macro_append LArG4H8SD_cppflags " -DLARG4NOROOT -O -Wno-unused" +use GaudiInterface GaudiInterface-* External use LArG4Code LArG4Code-* LArCalorimeter/LArG4 -use LArG4Barrel LArG4Barrel-* LArCalorimeter/LArG4 use CaloG4Sim CaloG4Sim-* Calorimeter diff --git a/LArCalorimeter/LArG4/LArG4H8SD/python/LArG4H8SDConfig.py b/LArCalorimeter/LArG4/LArG4H8SD/python/LArG4H8SDConfig.py index 01304f0abbb6ada0940c332e054e8fcb486c5a23..b64047919cec406c1c5e9b9b3c19ffe99220c7bd 100644 --- a/LArCalorimeter/LArG4/LArG4H8SD/python/LArG4H8SDConfig.py +++ b/LArCalorimeter/LArG4/LArG4H8SD/python/LArG4H8SDConfig.py @@ -3,12 +3,46 @@ from AthenaCommon import CfgMgr def getLArH8CalibSensitiveDetector(name="LArH8CalibSensitiveDetector", **kwargs): - kwargs.setdefault("BarrelCryDeadVolumes",["LArMgr::LAr::TBBarrel::Cryostat::*"]) - kwargs.setdefault("BarrelPreInactiveVolumes",["LArMgr::LAr::Barrel::Presampler::Prep*","LArMgr::LAr::Barrel::Presampler::Anode*","LArMgr::LAr::Barrel::Presampler::Cathode*"]) - kwargs.setdefault("BarrelPreDeadVolumes",["LArMgr::LAr::Barrel::Presampler","LArMgr::LAr::Barrel::Presampler::Sector","LArMgr::LAr::Barrel::Presampler::MotherBoard","LArMgr::LAr::Barrel::Presampler::ProtectionShell","LArMgr::LAr::Barrel::Presampler::MotherBoard","LArMgr::LAr::Barrel::Presampler::Connectics","LArMgr::LAr::Barrel::Presampler::Rail","LArMgr::LAr::Barrel::Presampler::ProtectionPlate"]) - kwargs.setdefault("BarrelPreCalibVolumes",m_bpCalibVolumes={"TBBarrel::Presampler::Module::Calibration"}); - kwargs.setdefault("BarrelInVolumes",["LArMgr::LAr::EMB::*Abs::*","LArMgr::LAr::EMB::Electrode::*"]) - kwargs.setdefault("BarrelDeadVolumes",["LArMgr::LAr::EMB::ECAM","LArMgr::LAr::EMB::TELF","LArMgr::LAr::EMB::TELFB","LArMgr::LAr::EMB::MOAC","LArMgr::LAr::EMB::CAAC","LArMgr::LAr::EMB::SUMB","LArMgr::LAr::EMB::GTENF","LArMgr::LAr::EMB::GTENB","LArMgr::LAr::EMB::FrontBack::Electrode","LArMgr::LAr::EMB::FrontBack::G10","LArMgr::LAr::EMB::FrontBack::Steel","LArMgr::LAr::EMB::FrontBack::Absorber2","LArMgr::LAr::EMB::FrontBack::Absorber"]) + kwargs.setdefault("BarrelCryDeadVolumes", + ["LArMgr::LAr::TBBarrel::Cryostat::*"]) + kwargs.setdefault("BarrelPreInactiveVolumes", + ["LArMgr::LAr::Barrel::Presampler::Prep*", + "LArMgr::LAr::Barrel::Presampler::Anode*", + "LArMgr::LAr::Barrel::Presampler::Cathode*"]) + kwargs.setdefault("BarrelPreDeadVolumes", + ["LArMgr::LAr::Barrel::Presampler", + "LArMgr::LAr::Barrel::Presampler::Sector", + "LArMgr::LAr::Barrel::Presampler::MotherBoard", + "LArMgr::LAr::Barrel::Presampler::ProtectionShell", + "LArMgr::LAr::Barrel::Presampler::MotherBoard", + "LArMgr::LAr::Barrel::Presampler::Connectics", + "LArMgr::LAr::Barrel::Presampler::Rail", + "LArMgr::LAr::Barrel::Presampler::ProtectionPlate"]) + kwargs.setdefault("BarrelPreCalibVolumes", + ["TBBarrel::Presampler::Module::Calibration"]); + kwargs.setdefault("BarrelInVolumes", + ["LArMgr::LAr::EMB::*Abs::*", + "LArMgr::LAr::EMB::Electrode::*"]) + kwargs.setdefault("BarrelDeadVolumes", + ["LArMgr::LAr::EMB::ECAM", + "LArMgr::LAr::EMB::TELF", + "LArMgr::LAr::EMB::TELFB", + "LArMgr::LAr::EMB::MOAC", + "LArMgr::LAr::EMB::CAAC", + "LArMgr::LAr::EMB::SUMB", + "LArMgr::LAr::EMB::GTENF", + "LArMgr::LAr::EMB::GTENB", + "LArMgr::LAr::EMB::FrontBack::Electrode", + "LArMgr::LAr::EMB::FrontBack::G10", + "LArMgr::LAr::EMB::FrontBack::Steel", + "LArMgr::LAr::EMB::FrontBack::Absorber2", + "LArMgr::LAr::EMB::FrontBack::Absorber"]) # No effect currently kwargs.setdefault("OutputCollectionNames", ["LArHitH8"]) - return CfgMgr.LArG4H8CalibSDTool(name, **kwargs) + return CfgMgr.LArG4__H8CalibSDTool(name, **kwargs) + +def getLArTBCryostatCalibrationCalculator(name="LArTBCryostatCalibrationCalculator", **kwargs): + return CfgMgr.LArTBCryostatCalibrationCalculator(name, kwargs) + +def getH8CalibrationDefaultCalculator(name="H8CalibrationDefaultCalculator", **kwargs): + return CfgMgr.H8CalibrationDefaultCalculator(name, **kwargs) diff --git a/LArCalorimeter/LArG4/LArG4H8SD/python/LArG4H8SDConfigDb.py b/LArCalorimeter/LArG4/LArG4H8SD/python/LArG4H8SDConfigDb.py index 5f7a8c4ebad337e99283484ce2183b354a2ee8f7..8ded81fbe337b1f9f9f9d40fd4d7850515d55a1e 100644 --- a/LArCalorimeter/LArG4/LArG4H8SD/python/LArG4H8SDConfigDb.py +++ b/LArCalorimeter/LArG4/LArG4H8SD/python/LArG4H8SDConfigDb.py @@ -1,4 +1,7 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -from AthenaCommon.CfgGetter import addTool +from AthenaCommon.CfgGetter import addTool, addService addTool("LArG4H8SD.LArG4H8SDConfig.getLArH8CalibSensitiveDetector","LArH8CalibSensitiveDetector") + +addService("LArG4H8SD.LArG4H8SDConfig.getLArTBCryostatCalibrationCalculator", "LArTBCryostatCalibrationCalculator") +addService("LArG4H8SD.LArG4H8SDConfig.getH8CalibrationDefaultCalculator", "H8CalibrationDefaultCalculator") diff --git a/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibSDTool.cc b/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..19664e06660bb98d378bcda21bc02db3d1ec395b --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibSDTool.cc @@ -0,0 +1,109 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "H8CalibSDTool.h" + +// LArG4 includes +#include "LArG4Code/SDWrapper.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" +//#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/EscapedEnergyProcessing.h" +//#include "LArG4Code/CalibrationDefaultCalculator.h" + +//#include "CaloG4Sim/VEscapedEnergyProcessing.h" +#include "CaloG4Sim/EscapedEnergyRegistry.h" + +// #include "LArG4Barrel/PresamplerCalibrationCalculator.h" +// #include "LArG4Barrel/LArBarrelCalibrationCalculator.h" + +// // Local includes +// #include "LArTBCryostatCalibrationCalculator.h" +// #include "H8CalibrationDefaultCalculator.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + H8CalibSDTool::H8CalibSDTool(const std::string& type, const std::string& name, + const IInterface* parent) + : CalibSDTool(type, name, parent) + , m_hitCollName("LArH8CalibrationHits") + , m_tbbarcrycalc("LArTBCryostatCalibrationCalculator", name) // FIXME LArTBCryostatCalibrationCalculator() + , m_barpscalc("BarrelPresamplerCalibrationCalculator", name) + , m_barcalc("BarrelCalibrationCalculator", name) + , m_h8defaultcalc("H8CalibrationDefaultCalculator", name) // FIXME H8CalibrationDefaultCalculator() + { + declareProperty("LArTBCryostatCalibrationCalculator", m_tbbarcrycalc); + declareProperty("BarrelPresamplerCalibrationCalculator", m_barpscalc); + declareProperty("BarrelCalibrationCalculator", m_barcalc); + declareProperty("H8CalibrationDefaultCalculator", m_h8defaultcalc); + declareProperty("BarrelCryDeadVolumes", m_barCryVolumes); + declareProperty("BarrelPreInactiveVolumes", m_bpInVolumes); + declareProperty("BarrelPreDeadVolumes", m_bpDeadVolumes); + declareProperty("BarrelPreCalibVolumes", m_bpCalibVolumes); + declareProperty("BarrelInVolumes", m_barInVolumes); + declareProperty("BarrelDeadVolumes", m_barDeadVolumes); + } + +StatusCode H8CalibSDTool::initializeCalculators() +{ + ATH_CHECK(m_tbbarcrycalc.retrieve()); + ATH_CHECK(m_barpscalc.retrieve()); + ATH_CHECK(m_barcalc.retrieve()); + ATH_CHECK(m_h8defaultcalc.retrieve()); + return StatusCode::SUCCESS; +} + + //--------------------------------------------------------------------------- + // Create SD wrapper for current thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* H8CalibSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new CalibSDWrapper("H8CalibSDWrapper", m_hitCollName); + + // Create the SDs. + // Lots of singleton calculators !!! + + sdWrapper->addSD( + makeOneSD("LAr::TBBarrelCryostat::Dead", &*m_tbbarcrycalc, m_barCryVolumes) + ); + + sdWrapper->addSD( + makeOneSD("LAr::TBBarrel::Presampler::Inactive", &*m_barpscalc, m_bpInVolumes) + ); + + sdWrapper->addSD( + makeOneSD("LAr::TBBarrel::Presampler::Dead", &*m_barpscalc, m_bpDeadVolumes) + ); + + // Why is this one commented out? + // sdWrapper->addSD( + // makeOneSD("LAr::TBBarrel::Presampler::Module::Calibration", &*m_barpscalc, m_bpModVolumes) + // ); + + sdWrapper->addSD( + makeOneSD("LAr::TBBarrel::Inactive", &*m_barcalc, m_barInVolumes) + ); + + sdWrapper->addSD( + makeOneSD("LAr::TBBarrel::Dead", &*m_barcalc, m_barDeadVolumes) + ); + + std::vector<std::string> emptyStringVec; + auto uninstSD = + makeOneSD("Default::Dead::Uninstrumented::Calibration::Region", &*m_h8defaultcalc, emptyStringVec); + // WARNING: This probably isn't thread safe! + CaloG4::VEscapedEnergyProcessing* eep = + new EscapedEnergyProcessing( uninstSD.get() ); + auto registry = CaloG4::EscapedEnergyRegistry::GetInstance(); + registry->AddAndAdoptProcessing("LAr::", eep); + sdWrapper->addSD( std::move(uninstSD) ); + + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibSDTool.h b/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..3d6a14d4cf88c348a43130dcbc3dd77c59d0f0d7 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibSDTool.h @@ -0,0 +1,62 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4H8SD_H8CALIBSDTOOL_H +#define LARG4H8SD_H8CALIBSDTOOL_H + +// STL includes +#include <string> +#include <vector> + +// LArG4 includes +#include "LArG4Code/CalibSDTool.h" + +class ILArCalibCalculatorSvc; +namespace LArG4 +{ + + /// @class H8CalibSDTool + /// @brief Sensitive detector tool which handles calib SDs for the H8 + /// testbeam setup (?). + /// + /// Based on the LArG4H8CalibSDTool implementation. + /// + class H8CalibSDTool : public CalibSDTool + { + + public: + + /// Constructor + H8CalibSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + + ServiceHandle<ILArCalibCalculatorSvc> m_tbbarcrycalc; + ServiceHandle<ILArCalibCalculatorSvc> m_barpscalc; + ServiceHandle<ILArCalibCalculatorSvc> m_barcalc; + ServiceHandle<ILArCalibCalculatorSvc> m_h8defaultcalc; + + /// @name SD volumes + /// @{ + std::vector<std::string> m_barCryVolumes; + std::vector<std::string> m_bpInVolumes; + std::vector<std::string> m_bpDeadVolumes; + std::vector<std::string> m_bpCalibVolumes; + std::vector<std::string> m_barInVolumes; + std::vector<std::string> m_barDeadVolumes; + /// @} + + }; // class H8CalibSDTool + +} + +#endif diff --git a/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibrationDefaultCalculator.cc b/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibrationDefaultCalculator.cc old mode 100755 new mode 100644 index e90f8049dd8cf2a1e1143d9d342cfff60dfa8591..7662c8a25d4007c52287bc4a93a3d1e98ec76a2e --- a/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibrationDefaultCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibrationDefaultCalculator.cc @@ -40,222 +40,230 @@ #include <algorithm> #include <set> - H8CalibrationDefaultCalculator::H8CalibrationDefaultCalculator() - { - // to check identifiers - m_geometry = LArG4::Barrel::Geometry::GetInstance(); - } +H8CalibrationDefaultCalculator::H8CalibrationDefaultCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + // , m_geometry("LArBarrelGeometry", name) +{ +} +// StatusCode H8CalibrationDefaultCalculator::initialize() +// { +// // to check identifiers +// m_geometry = LArG4::Barrel::Geometry::GetInstance(); +// return StatusCode::SUCCESS; +// } - H8CalibrationDefaultCalculator::~H8CalibrationDefaultCalculator() - { - } +H8CalibrationDefaultCalculator::~H8CalibrationDefaultCalculator() +{ +} - G4bool H8CalibrationDefaultCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) - { - // Use the calculators to determine the energies and the - // identifier associated with this G4Step. Note that the - // default is to process both the energy and the ID. - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } - else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); +G4bool H8CalibrationDefaultCalculator::Process( const G4Step* a_step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const LArG4::eCalculatorProcessing a_process ) const +{ + // Use the calculators to determine the energies and the + // identifier associated with this G4Step. Note that the + // default is to process both the energy and the ID. + energies.clear(); + if ( a_process == LArG4::kEnergyAndID || a_process == LArG4::kOnlyEnergy ) + { + m_energyCalculator.Energies( a_step, energies ); + } + else + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); - m_identifier.clear(); - G4String volName = ""; - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - G4VPhysicalVolume* vol = pre_step_point->GetPhysicalVolume(); - volName = vol->GetName(); + identifier.clear(); + G4String volName = ""; + if ( a_process == LArG4::kEnergyAndID || a_process == LArG4::kOnlyID ) + { - G4int detector = 10; // calorimeter "dead" materials + G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); + G4VPhysicalVolume* vol = pre_step_point->GetPhysicalVolume(); + volName = vol->GetName(); - // Initialize identifier variables with (invalid) default - // values (INT_MIN is defined in <climits>). - G4int subdet = 4; // LAr -//GU 26-Sep-05, type=3 does not work with offline calodm identifier -// G4int type = 3; // test beam specific - G4int type = 1; - G4int sampling = INT_MIN; - G4int region = 0; - G4int etaBin = 0; - G4int phiBin = 0; + G4int detector = 10; // calorimeter "dead" materials - G4double x_table=5733.*CLHEP::mm; //FIXME + // Initialize identifier variables with (invalid) default + // values (INT_MIN is defined in <climits>). + G4int subdet = 4; // LAr + //GU 26-Sep-05, type=3 does not work with offline calodm identifier + // G4int type = 3; // test beam specific + G4int type = 1; + G4int sampling = INT_MIN; + G4int region = 0; + G4int etaBin = 0; + G4int phiBin = 0; - G4ThreeVector startPoint = pre_step_point->GetPosition(); + G4double x_table=5733.*CLHEP::mm; //FIXME + + G4ThreeVector startPoint = pre_step_point->GetPosition(); -// directly in world volume, use x position to decide before/after calorimeters - if (volName=="CTB::CTB") { - if (startPoint.x() < x_table) sampling=0; - else - { -//GU 26-Sep-05, to work for leakage after the calorimeter + // directly in world volume, use x position to decide before/after calorimeters + if (volName=="CTB::CTB") { + if (startPoint.x() < x_table) sampling=0; + else + { + //GU 26-Sep-05, to work for leakage after the calorimeter sampling=3; subdet=5; - } -// find detector envelop in which we are - } else { - const G4NavigationHistory* g4navigation = pre_step_point->GetTouchable()->GetHistory(); - G4int ndep = g4navigation->GetDepth(); - for (G4int ii=0;ii<=ndep;ii++) { - G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); - G4String vName = v1->GetName(); -//GU 10dec04 change in envelopes for tracker in ctb setup : IDET=mother envelope - if ( vName=="IDET::IDET") { - sampling=0; - break; - } - if ( vName=="CALO::CALO") { -// compute local radius in CALO::CALO frame (<=> atlas frame for calorimeter) - const G4AffineTransform transformation = g4navigation->GetTransform(ii); - G4ThreeVector startPointinLocal = transformation.TransformPoint(startPoint); - double rloc = sqrt(startPointinLocal.x()*startPointinLocal.x() + - startPointinLocal.y()*startPointinLocal.y()); - double etaloc = fabs(startPointinLocal.pseudoRapidity()); - double philoc = startPointinLocal.phi()+M_PI/16.; - if (philoc<0. ) { philoc+= 2.*M_PI; } - //static double rend_lar = 1960.; - const static double rbeg_lar = 1500.; - const static double rend_tile = 3835.; - const static double rps= 0.5*(1410.+1447.); - if (rloc<rbeg_lar) { - sampling=1; - if (rloc<rps) region=2; - else region=3; - } - else if (rloc<rend_tile) { - sampling=2; - region=0; - } - else { - subdet=5; - sampling=3; - region=0; - } - if (sampling==2 && etaloc>1.0) { - region=2; - etaBin = (int) ((etaloc-1.0)/0.1); - if (etaBin>4) etaBin=4; - } else { - etaBin = (int) (etaloc/0.1); - if (sampling==2 && etaBin>10) etaBin=10; - if (sampling==1 && etaBin>14) etaBin=14; - if (sampling==3 && etaBin>16) etaBin=16; - } - phiBin = (int) (philoc*32./M_PI); - if (phiBin>63) phiBin=63; - break; - } - if ( vName=="MUON::MUON") { - subdet=5; - sampling=3; - break; - } } - } - if (sampling==INT_MIN) { - -//G0 10 dec04 to recover anciliary detectors - G4ThreeVector startPoint = pre_step_point->GetPosition(); - if (startPoint.x() < x_table) sampling=0; - else - { - sampling=3; - subdet=5; - } - } - -#ifdef DEBUG_HITS - double rr=sqrt(startPoint.y()*startPoint.y()+startPoint.z()*startPoint.z()); - double rloc=0.; + // find detector envelop in which we are + } else { const G4NavigationHistory* g4navigation = pre_step_point->GetTouchable()->GetHistory(); G4int ndep = g4navigation->GetDepth(); for (G4int ii=0;ii<=ndep;ii++) { G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); G4String vName = v1->GetName(); + //GU 10dec04 change in envelopes for tracker in ctb setup : IDET=mother envelope + if ( vName=="IDET::IDET") { + sampling=0; + break; + } if ( vName=="CALO::CALO") { -// compute local radius in CALO::CALO frame (<=> atlas frame for calorimeter) + // compute local radius in CALO::CALO frame (<=> atlas frame for calorimeter) const G4AffineTransform transformation = g4navigation->GetTransform(ii); G4ThreeVector startPointinLocal = transformation.TransformPoint(startPoint); - rloc = sqrt(startPointinLocal.x()*startPointinLocal.x() + - startPointinLocal.y()*startPointinLocal.y()); + double rloc = sqrt(startPointinLocal.x()*startPointinLocal.x() + + startPointinLocal.y()*startPointinLocal.y()); + double etaloc = fabs(startPointinLocal.pseudoRapidity()); + double philoc = startPointinLocal.phi()+M_PI/16.; + if (philoc<0. ) { philoc+= 2.*M_PI; } + //static double rend_lar = 1960.; + const static double rbeg_lar = 1500.; + const static double rend_tile = 3835.; + const static double rps= 0.5*(1410.+1447.); + if (rloc<rbeg_lar) { + sampling=1; + if (rloc<rps) region=2; + else region=3; + } + else if (rloc<rend_tile) { + sampling=2; + region=0; + } + else { + subdet=5; + sampling=3; + region=0; + } + if (sampling==2 && etaloc>1.0) { + region=2; + etaBin = (int) ((etaloc-1.0)/0.1); + if (etaBin>4) etaBin=4; + } else { + etaBin = (int) (etaloc/0.1); + if (sampling==2 && etaBin>10) etaBin=10; + if (sampling==1 && etaBin>14) etaBin=14; + if (sampling==3 && etaBin>16) etaBin=16; + } + phiBin = (int) (philoc*32./M_PI); + if (phiBin>63) phiBin=63; + break; + } + if ( vName=="MUON::MUON") { + subdet=5; + sampling=3; break; } } + } + if (sampling==INT_MIN) { + + //G0 10 dec04 to recover anciliary detectors + G4ThreeVector startPoint = pre_step_point->GetPosition(); + if (startPoint.x() < x_table) sampling=0; + else + { + sampling=3; + subdet=5; + } + } + +#ifdef DEBUG_HITS + double rr=sqrt(startPoint.y()*startPoint.y()+startPoint.z()*startPoint.z()); + double rloc=0.; + const G4NavigationHistory* g4navigation = pre_step_point->GetTouchable()->GetHistory(); + G4int ndep = g4navigation->GetDepth(); + for (G4int ii=0;ii<=ndep;ii++) { + G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); + G4String vName = v1->GetName(); + if ( vName=="CALO::CALO") { + // compute local radius in CALO::CALO frame (<=> atlas frame for calorimeter) + const G4AffineTransform transformation = g4navigation->GetTransform(ii); + G4ThreeVector startPointinLocal = transformation.TransformPoint(startPoint); + rloc = sqrt(startPointinLocal.x()*startPointinLocal.x() + + startPointinLocal.y()*startPointinLocal.y()); + break; + } + } - if (subdet==4 && type==1 && sampling==0) - std::cout << "H8HitPos D4T1S0 " << startPoint.x() << " " << rr << " " << rloc << std::endl; - if (subdet==4 && type==1 && sampling==1 && region==0) - std::cout << "H8HitPos D4T1S1R0 " << startPoint.x() << " " << rr << " " << rloc << std::endl; - if (subdet==4 && type==1 && sampling==1 && region==1) - std::cout << "H8HitPos D4T1S1R1 " << startPoint.x() << " " << rr << " " << rloc << std::endl; - if (subdet==4 && type==1 && sampling==1 && region==2) - std::cout << "H8HitPos D4T1S1R2 " << startPoint.x() << " " << rr << " " << rloc << std::endl; - if (subdet==4 && type==1 && sampling==1 && region==3) - std::cout << "H8HitPos D4T1S1R3 " << startPoint.x() << " " << rr << " " << rloc << std::endl; - if (subdet==4 && type==1 && sampling==1 && region>3) - std::cout << "H8HitPos D4T1S1R4 " << startPoint.x() << " " << rr << " " << rloc << std::endl; - if (subdet==4 && type==1 && sampling==2 && region==0) - std::cout << "H8HitPos D4T1S2R0 " << startPoint.x() << " " << rr << " " << rloc << std::endl; - if (subdet==4 && type==1 && sampling==2 && region==1) - std::cout << "H8HitPos D4T1S2R1 " << startPoint.x() << " " << rr << " " << rloc << std::endl; - if (subdet==4 && type==1 && sampling==2 && region==2) - std::cout << "H8HitPos D4T1S2R2 " << startPoint.x() << " " << rr << " " << rloc << std::endl; - if (subdet==4 && type==1 && sampling==2 && region>=3) - std::cout << "H8HitPos D4T1S2R3 " << startPoint.x() << " " << rr << " " << rloc << std::endl; - if (subdet==4 && type==1 && sampling==3 ) - std::cout << "H8HitPos D4T1S3 " << startPoint.x() << " " << rr << " " << rloc << std::endl; - if (subdet==4 && type==2 ) - std::cout << "H8HitPos D4T2 " << startPoint.x() << " " << rr << " " << rloc << std::endl; - if (subdet==5) - std::cout << "H8HitPos D5 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==4 && type==1 && sampling==0) + std::cout << "H8HitPos D4T1S0 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==4 && type==1 && sampling==1 && region==0) + std::cout << "H8HitPos D4T1S1R0 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==4 && type==1 && sampling==1 && region==1) + std::cout << "H8HitPos D4T1S1R1 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==4 && type==1 && sampling==1 && region==2) + std::cout << "H8HitPos D4T1S1R2 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==4 && type==1 && sampling==1 && region==3) + std::cout << "H8HitPos D4T1S1R3 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==4 && type==1 && sampling==1 && region>3) + std::cout << "H8HitPos D4T1S1R4 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==4 && type==1 && sampling==2 && region==0) + std::cout << "H8HitPos D4T1S2R0 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==4 && type==1 && sampling==2 && region==1) + std::cout << "H8HitPos D4T1S2R1 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==4 && type==1 && sampling==2 && region==2) + std::cout << "H8HitPos D4T1S2R2 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==4 && type==1 && sampling==2 && region>=3) + std::cout << "H8HitPos D4T1S2R3 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==4 && type==1 && sampling==3 ) + std::cout << "H8HitPos D4T1S3 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==4 && type==2 ) + std::cout << "H8HitPos D4T2 " << startPoint.x() << " " << rr << " " << rloc << std::endl; + if (subdet==5) + std::cout << "H8HitPos D5 " << startPoint.x() << " " << rr << " " << rloc << std::endl; #endif - // Create the LArG4Identifier. - m_identifier << detector - << subdet - << type - << sampling - << region - << etaBin - << phiBin; -// if (subdet==4) { -// if (!m_geometry->CheckDMIdentifier(type,sampling,region,etaBin,phiBin)) -// { -// std::cout << "H8CalibrationDefaultCalculator: invalid DM identifier " -// << std::string(m_identifier) << std::endl; -// } -// } + // Create the LArG4Identifier. + identifier << detector + << subdet + << type + << sampling + << region + << etaBin + << phiBin; + // if (subdet==4) { + // if (!m_geometry->CheckDMIdentifier(type,sampling,region,etaBin,phiBin)) + // { + // std::cout << "H8CalibrationDefaultCalculator: invalid DM identifier " + // << std::string(identifier) << std::endl; + // } + // } + + } - } - #ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); - std::cout << "H8CalibrationDefaultCalculator::Process" - << " volName " << volName - << " ID=" << std::string(m_identifier) - << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + G4double energy = accumulate(energies.begin(),energies.end(),0.); + std::cout << "H8CalibrationDefaultCalculator::Process" + << " volName " << volName + << " ID=" << std::string(identifier) + << " energy=" << energy + << " energies=(" << energies[0] + << "," << energies[1] + << "," << energies[2] + << "," << energies[3] << ")" + << std::endl; #endif - // Check for bad result. - if ( m_identifier == LArG4Identifier() ) - return false; + // Check for bad result. + if ( identifier == LArG4Identifier() ) + return false; - return true; - } + return true; +} diff --git a/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibrationDefaultCalculator.h b/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibrationDefaultCalculator.h old mode 100755 new mode 100644 index 6f2cf53922a3367a503195dbd5e47c7fd446f834..6d87be8a733bd54228bd9da587513be1f7a6a343 --- a/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibrationDefaultCalculator.h +++ b/LArCalorimeter/LArG4/LArG4H8SD/src/H8CalibrationDefaultCalculator.h @@ -18,11 +18,11 @@ #ifndef LArG4H8SD_H8CalibrationDefaultCalculator_H #define LArG4H8SD_H8CalibrationDefaultCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" -#include "LArG4Barrel/LArBarrelGeometry.h" +// #include "LArG4Barrel/LArBarrelGeometry.h" #include "globals.hh" @@ -31,44 +31,36 @@ // Forward declaractions: class G4Step; - class H8CalibrationDefaultCalculator : public LArG4::VCalibrationCalculator { - public: - - H8CalibrationDefaultCalculator(); - virtual ~H8CalibrationDefaultCalculator(); - - // The Process method returns a boolean value. If it's true, the - // hit can be used by Geant4; if it's false, there's something wrong - // with the energy deposit and it should be ignored. - - // For calibration work, most of the time we want the calculator - // to determine both the energy and the identifier. However, - // sometimes we want it calculate only the identifier (for escaped - // energy), or only the energy (no known application yet, but you - // can never tell). Use the enum to control any special - // processing. - - virtual G4bool Process (const G4Step*, - const eCalculatorProcessing = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } - - private: - - // The results of the calculation. - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; - - // The usual calibration energy calculator. - CaloG4::SimulationEnergies m_energyCalculator; - - LArG4::Barrel::Geometry* m_geometry; - - }; +class H8CalibrationDefaultCalculator : public LArCalibCalculatorSvcImp +{ +public: + + H8CalibrationDefaultCalculator(const std::string& name, ISvcLocator *pSvcLocator); + // virtual StatusCode initialize() override final; + virtual ~H8CalibrationDefaultCalculator(); + + // The Process method returns a boolean value. If it's true, the + // hit can be used by Geant4; if it's false, there's something wrong + // with the energy deposit and it should be ignored. + + // For calibration work, most of the time we want the calculator + // to determine both the energy and the identifier. However, + // sometimes we want it calculate only the identifier (for escaped + // energy), or only the energy (no known application yet, but you + // can never tell). Use the enum to control any special + // processing. + + virtual G4bool Process (const G4Step*, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const LArG4::eCalculatorProcessing = LArG4::kEnergyAndID) const override final; + +private: + + // The usual calibration energy calculator. + CaloG4::SimulationEnergies m_energyCalculator; + + // LArG4::Barrel::Geometry* m_geometry; + +}; #endif // LArG4TB_H8CalibrationDefaultCalculator_H diff --git a/LArCalorimeter/LArG4/LArG4H8SD/src/LArG4H8CalibSDTool.cc b/LArCalorimeter/LArG4/LArG4H8SD/src/LArG4H8CalibSDTool.cc old mode 100755 new mode 100644 index 4c605e3960fe74dc1654882baffe0009c17bed2b..d09f215cd8c576c1530aa79556064386e7b464aa --- a/LArCalorimeter/LArG4/LArG4H8SD/src/LArG4H8CalibSDTool.cc +++ b/LArCalorimeter/LArG4/LArG4H8SD/src/LArG4H8CalibSDTool.cc @@ -4,104 +4,109 @@ #include "LArG4H8CalibSDTool.h" -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" #include "LArG4Code/LArG4CalibSD.h" #include "LArG4Code/EscapedEnergyProcessing.h" -#include "LArG4Code/CalibrationDefaultCalculator.h" -#include "CaloG4Sim/VEscapedEnergyProcessing.h" +// #include "LArG4Code/CalibrationDefaultCalculator.h" +// #include "CaloG4Sim/VEscapedEnergyProcessing.h" #include "CaloG4Sim/EscapedEnergyRegistry.h" -#include "LArG4Barrel/PresamplerCalibrationCalculator.h" -#include "LArG4Barrel/LArBarrelCalibrationCalculator.h" +// #include "LArG4Barrel/PresamplerCalibrationCalculator.h" +// #include "LArG4Barrel/LArBarrelCalibrationCalculator.h" -#include "LArTBCryostatCalibrationCalculator.h" -#include "H8CalibrationDefaultCalculator.h" +// #include "LArTBCryostatCalibrationCalculator.h" +// #include "H8CalibrationDefaultCalculator.h" -#include "CaloG4Sim/CalibrationDefaultProcessing.h" +// #include "CaloG4Sim/CalibrationDefaultProcessing.h" #include "CxxUtils/make_unique.h" LArG4H8CalibSDTool::LArG4H8CalibSDTool(const std::string& type, const std::string& name, const IInterface *parent) : LArG4SDTool(type,name,parent) , m_HitColl("LArH8CalibrationHits") + , m_tbbarcrycalc("LArTBCryostatCalibrationCalculator", name) // FIXME LArTBCryostatCalibrationCalculator() + , m_barpscalc("BarrelPresamplerCalibrationCalculator", name) + , m_barcalc("BarrelCalibrationCalculator", name) + , m_h8defaultcalc("H8CalibrationDefaultCalculator", name) // FIXME H8CalibrationDefaultCalculator() , m_barCrySD (nullptr) , m_bpInSD (nullptr) , m_bpDeadSD (nullptr) - //, m_bpModSD (nullptr) + //, m_bpModSD (nullptr) , m_barInSD (nullptr) , m_barDeadSD (nullptr) , m_uninstSD (nullptr) { - declareProperty("BarrelCryDeadVolumes",m_barCryVolumes); - declareProperty("BarrelPreInactiveVolumes",m_bpInVolumes); - declareProperty("BarrelPreDeadVolumes",m_bpDeadVolumes); - declareProperty("BarrelPreCalibVolumes",m_bpCalibVolumes); - declareProperty("BarrelInVolumes",m_barInVolumes); - declareProperty("BarrelDeadVolumes",m_barDeadVolumes); + declareProperty("LArTBCryostatCalibrationCalculator", m_tbbarcrycalc); + declareProperty("BarrelPresamplerCalibrationCalculator", m_barpscalc); + declareProperty("BarrelCalibrationCalculator", m_barcalc); + declareProperty("H8CalibrationDefaultCalculator", m_h8defaultcalc); + declareProperty("BarrelCryDeadVolumes",m_barCryVolumes); + declareProperty("BarrelPreInactiveVolumes",m_bpInVolumes); + declareProperty("BarrelPreDeadVolumes",m_bpDeadVolumes); + declareProperty("BarrelPreCalibVolumes",m_bpCalibVolumes); + declareProperty("BarrelInVolumes",m_barInVolumes); + declareProperty("BarrelDeadVolumes",m_barDeadVolumes); +} + +StatusCode LArG4H8CalibSDTool::initializeCalculators() +{ + ATH_CHECK(m_tbbarcrycalc.retrieve()); + ATH_CHECK(m_barpscalc.retrieve()); + ATH_CHECK(m_barcalc.retrieve()); + ATH_CHECK(m_h8defaultcalc.retrieve()); + return StatusCode::SUCCESS; } StatusCode LArG4H8CalibSDTool::initializeSD() { - m_barCrySD = new LArG4CalibSD( "LAr::TBBarrelCryostat::Dead" , new LArTBCryostatCalibrationCalculator() ); - m_bpInSD = new LArG4CalibSD( "LAr::TBBarrel::Presampler::Inactive" , new LArG4::BarrelPresampler::CalibrationCalculator() ); - m_bpDeadSD = new LArG4CalibSD( "LAr::TBBarrel::Presampler::Dead" , new LArG4::BarrelPresampler::CalibrationCalculator() ); -// m_bpModSD = new LArG4CalibSD( "LAr::TBBarrel::Presampler::Module::Calibration" , new LArG4::BarrelPresampler::CalibrationCalculator() ); - m_barInSD = new LArG4CalibSD( "LAr::TBBarrel::Inactive" , new LArG4::Barrel::CalibrationCalculator() ); - m_barDeadSD = new LArG4CalibSD( "LAr::TBBarrel::Dead" , new LArG4::Barrel::CalibrationCalculator() ); - - m_uninstSD = new LArG4CalibSD( "Default::Dead::Uninstrumented::Calibration::Region" , new H8CalibrationDefaultCalculator() ); - - std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; - configuration[m_barCrySD] = &m_barCryVolumes; - configuration[m_bpInSD] = &m_bpInVolumes; - configuration[m_bpDeadSD] = &m_bpDeadVolumes; -// configuration[m_bpModSD] = &m_bpModVolumes; - configuration[m_barInSD] = &m_barInVolumes; - configuration[m_barDeadSD] = &m_barDeadVolumes; - configuration[m_uninstSD] = new std::vector<std::string>; // No volumes for this guy - setupAllSDs(configuration); - - setupHelpers(m_barCrySD); - setupHelpers(m_bpInSD); - setupHelpers(m_bpDeadSD); -// setupHelpers(m_bpModSD); - setupHelpers(m_barInSD); - setupHelpers(m_barDeadSD); - setupHelpers(m_uninstSD); - - ATH_MSG_DEBUG( " **** Call LArG4H8CalibSD::initializeProcessing() " ); - - // ADS not needed with new user actions. -// ATH_MSG_INFO("CalibrationDefaultProcessing"); -// CaloG4::CalibrationDefaultProcessing * cdp = new CaloG4::CalibrationDefaultProcessing(); // Registers itself -// ATH_MSG_INFO("setting default SD"); -// cdp->SetDefaultSD(m_uninstSD); - - // Initialize the escaped energy processing for LAr volumes. - CaloG4::VEscapedEnergyProcessing* eep = new EscapedEnergyProcessing(m_uninstSD); - CaloG4::EscapedEnergyRegistry* registry = CaloG4::EscapedEnergyRegistry::GetInstance(); - registry->AddAndAdoptProcessing( "LAr::", eep ); - - return StatusCode::SUCCESS; + m_barCrySD = new LArG4CalibSD( "LAr::TBBarrelCryostat::Dead" , &*m_tbbarcrycalc ); + m_bpInSD = new LArG4CalibSD( "LAr::TBBarrel::Presampler::Inactive" , &*m_barpscalc ); + m_bpDeadSD = new LArG4CalibSD( "LAr::TBBarrel::Presampler::Dead" , &*m_barpscalc ); + // m_bpModSD = new LArG4CalibSD( "LAr::TBBarrel::Presampler::Module::Calibration" , &*m_barpscalc ); + m_barInSD = new LArG4CalibSD( "LAr::TBBarrel::Inactive" , &*m_barcalc ); + m_barDeadSD = new LArG4CalibSD( "LAr::TBBarrel::Dead" , &*m_barcalc ); + m_uninstSD = new LArG4CalibSD( "Default::Dead::Uninstrumented::Calibration::Region" , &*m_h8defaultcalc ); + + std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; + configuration[m_barCrySD] = &m_barCryVolumes; + configuration[m_bpInSD] = &m_bpInVolumes; + configuration[m_bpDeadSD] = &m_bpDeadVolumes; + // configuration[m_bpModSD] = &m_bpModVolumes; + configuration[m_barInSD] = &m_barInVolumes; + configuration[m_barDeadSD] = &m_barDeadVolumes; + configuration[m_uninstSD] = new std::vector<std::string>; // No volumes for this guy + setupAllSDs(configuration); + + setupHelpers(m_barCrySD); + setupHelpers(m_bpInSD); + setupHelpers(m_bpDeadSD); + // setupHelpers(m_bpModSD); + setupHelpers(m_barInSD); + setupHelpers(m_barDeadSD); + setupHelpers(m_uninstSD); + + ATH_MSG_DEBUG( " **** Call LArG4H8CalibSD::initializeProcessing() " ); + + // Initialize the escaped energy processing for LAr volumes. + CaloG4::VEscapedEnergyProcessing* eep = new EscapedEnergyProcessing(m_uninstSD); + CaloG4::EscapedEnergyRegistry* registry = CaloG4::EscapedEnergyRegistry::GetInstance(); + registry->AddAndAdoptProcessing( "LAr::", eep ); + + return StatusCode::SUCCESS; } StatusCode LArG4H8CalibSDTool::Gather() { - // In this case, *unlike* other SDs, the *tool* owns the collection -#ifdef ATHENAHIVE - // Temporary fix for Hive until isValid is fixed - m_HitColl = CxxUtils::make_unique<CaloCalibrationHitContainer>(m_HitColl.name()); -#else - if (!m_HitColl.isValid()) m_HitColl = CxxUtils::make_unique<CaloCalibrationHitContainer>(m_HitColl.name()); -#endif - m_barCrySD ->EndOfAthenaEvent( &*m_HitColl ); - m_bpInSD ->EndOfAthenaEvent( &*m_HitColl ); - m_bpDeadSD ->EndOfAthenaEvent( &*m_HitColl ); -// m_bpModSD ->EndOfAthenaEvent( &*m_HitColl ); - m_barInSD ->EndOfAthenaEvent( &*m_HitColl ); - m_barDeadSD ->EndOfAthenaEvent( &*m_HitColl ); - m_uninstSD ->EndOfAthenaEvent( &*m_HitColl ); - return StatusCode::SUCCESS; + // In this case, *unlike* other SDs, the *tool* owns the collection + if (!m_HitColl.isValid()) m_HitColl = CxxUtils::make_unique<CaloCalibrationHitContainer>(m_HitColl.name()); + m_barCrySD ->EndOfAthenaEvent( &*m_HitColl ); + m_bpInSD ->EndOfAthenaEvent( &*m_HitColl ); + m_bpDeadSD ->EndOfAthenaEvent( &*m_HitColl ); + // m_bpModSD ->EndOfAthenaEvent( &*m_HitColl ); + m_barInSD ->EndOfAthenaEvent( &*m_HitColl ); + m_barDeadSD ->EndOfAthenaEvent( &*m_HitColl ); + m_uninstSD ->EndOfAthenaEvent( &*m_HitColl ); + return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArG4/LArG4H8SD/src/LArG4H8CalibSDTool.h b/LArCalorimeter/LArG4/LArG4H8SD/src/LArG4H8CalibSDTool.h old mode 100755 new mode 100644 index a748e30c0aacd52f28266b1794b3cd7d24b08766..3bd034c25d1902a0779aca77631e7a7f79d04ec1 --- a/LArCalorimeter/LArG4/LArG4H8SD/src/LArG4H8CalibSDTool.h +++ b/LArCalorimeter/LArG4/LArG4H8SD/src/LArG4H8CalibSDTool.h @@ -15,19 +15,22 @@ #include <string> class LArG4CalibSD; +class ILArCalibCalculatorSvc; class LArG4H8CalibSDTool : public LArG4SDTool { public: LArG4H8CalibSDTool(const std::string& type, const std::string& name, const IInterface *parent); ~LArG4H8CalibSDTool() {} - + StatusCode initializeSD() override final; // Calls down to all the SDs to get them to pack their hits into a central collection StatusCode Gather() override final; - + private: + StatusCode initializeCalculators() override final; + // The actual hit container - here because the base class is for both calib and standard SD tools SG::WriteHandle<CaloCalibrationHitContainer> m_HitColl; @@ -39,6 +42,11 @@ private: std::vector<std::string> m_barInVolumes; std::vector<std::string> m_barDeadVolumes; + ServiceHandle<ILArCalibCalculatorSvc> m_tbbarcrycalc; + ServiceHandle<ILArCalibCalculatorSvc> m_barpscalc; + ServiceHandle<ILArCalibCalculatorSvc> m_barcalc; + ServiceHandle<ILArCalibCalculatorSvc> m_h8defaultcalc; + // The actual SD pointers LArG4CalibSD* m_barCrySD; LArG4CalibSD* m_bpInSD; diff --git a/LArCalorimeter/LArG4/LArG4H8SD/src/LArTBCryostatCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4H8SD/src/LArTBCryostatCalibrationCalculator.cc old mode 100755 new mode 100644 index 5b59ffc3f78423b87f5cac5317f09310975a3d2a..725a0f4f5351f33336e50976e037728b11082206 --- a/LArCalorimeter/LArG4/LArG4H8SD/src/LArTBCryostatCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4H8SD/src/LArTBCryostatCalibrationCalculator.cc @@ -14,7 +14,6 @@ #include "LArTBCryostatCalibrationCalculator.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/VCalibrationCalculator.h" #include "G4Step.hh" #include "G4StepPoint.hh" @@ -31,144 +30,149 @@ #include <algorithm> #include <cmath> -LArTBCryostatCalibrationCalculator::LArTBCryostatCalibrationCalculator() +LArTBCryostatCalibrationCalculator::LArTBCryostatCalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + // , m_geometry(nullptr) { -// improvement would be to fetch this from database (for accordion) - m_radiusPS = 0.5*(1385.+1447.)*CLHEP::mm; - m_rminAcc = 1500.24*CLHEP::mm; - m_rmaxAcc = 1960.00*CLHEP::mm; - - m_geometry = LArG4::Barrel::Geometry::GetInstance(); - + // improvement would be to fetch this from database (for accordion) + m_radiusPS = 0.5*(1385.+1447.)*CLHEP::mm; + m_rminAcc = 1500.24*CLHEP::mm; + m_rmaxAcc = 1960.00*CLHEP::mm; } +// StatusCode LArTBCryostatCalibrationCalculator::initialize() +// { +// m_geometry = LArG4::Barrel::Geometry::GetInstance(); +// return StatusCode::SUCCESS; +// } + -LArTBCryostatCalibrationCalculator::~LArTBCryostatCalibrationCalculator() +LArTBCryostatCalibrationCalculator::~LArTBCryostatCalibrationCalculator() { } -G4bool LArTBCryostatCalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) +G4bool LArTBCryostatCalibrationCalculator::Process( const G4Step* a_step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const LArG4::eCalculatorProcessing a_process ) const { -// Use the calculators to determine the energies and the -// identifier associated with this G4Step. Note that the -// default is to process both the energy and the ID. - - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } - else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); + // Use the calculators to determine the energies and the + // identifier associated with this G4Step. Note that the + // default is to process both the energy and the ID. - m_identifier.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { + if ( a_process == LArG4::kEnergyAndID || a_process == LArG4::kOnlyEnergy ) + { + m_energyCalculator.Energies( a_step, energies ); + } + else + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); - G4StepPoint *thisStepPoint = a_step->GetPreStepPoint(); - const G4NavigationHistory* g4navigation = thisStepPoint->GetTouchable()->GetHistory(); - G4int ndep = g4navigation->GetDepth(); - G4int ind=-1; + identifier.clear(); + if ( a_process == LArG4::kEnergyAndID || a_process == LArG4::kOnlyID ) + { - // Now navigate through the volumes hierarchy + G4StepPoint *thisStepPoint = a_step->GetPreStepPoint(); + const G4NavigationHistory* g4navigation = thisStepPoint->GetTouchable()->GetHistory(); + G4int ndep = g4navigation->GetDepth(); + G4int ind=-1; - for (G4int ii=0;ii<=ndep;ii++) { - G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); - if ( (v1->GetName()).find("LAr::TBBarrel::Cryostat::Envelope") != std::string::npos ) { - ind = ii; - break; - } - } + // Now navigate through the volumes hierarchy - if (ind < 0) - { - std::cout << "LArTBCryostatCalibrationCalculator: Not in Cryostat !!!! " << std::endl; - std::cout << " ndep " << ndep << std::endl; for (G4int ii=0;ii<=ndep;ii++) { - G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); - std::cout << " volname " << v1->GetName() << std::endl; + G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); + if ( (v1->GetName()).find("LAr::TBBarrel::Cryostat::Envelope") != std::string::npos ) { + ind = ii; + break; + } } - return false; - } - G4StepPoint *thisStepBackPoint = a_step->GetPostStepPoint(); - G4ThreeVector startPoint = thisStepPoint->GetPosition(); - G4ThreeVector endPoint = thisStepBackPoint->GetPosition(); - const G4AffineTransform transformation = g4navigation->GetTransform(ind); - G4ThreeVector startPointinLocal = transformation.TransformPoint(startPoint); - G4ThreeVector endPointinLocal = transformation.TransformPoint(startPoint); - G4ThreeVector midinLocal = (startPointinLocal+endPointinLocal)*0.5; - G4double xZpos = midinLocal.x(); - G4double yZpos = midinLocal.y(); - //G4double zZpos = midinLocal.z(); + if (ind < 0) + { + std::cout << "LArTBCryostatCalibrationCalculator: Not in Cryostat !!!! " << std::endl; + std::cout << " ndep " << ndep << std::endl; + for (G4int ii=0;ii<=ndep;ii++) { + G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); + std::cout << " volname " << v1->GetName() << std::endl; + } + return false; + } + + G4StepPoint *thisStepBackPoint = a_step->GetPostStepPoint(); + G4ThreeVector startPoint = thisStepPoint->GetPosition(); + G4ThreeVector endPoint = thisStepBackPoint->GetPosition(); + const G4AffineTransform transformation = g4navigation->GetTransform(ind); + G4ThreeVector startPointinLocal = transformation.TransformPoint(startPoint); + G4ThreeVector endPointinLocal = transformation.TransformPoint(startPoint); + G4ThreeVector midinLocal = (startPointinLocal+endPointinLocal)*0.5; + G4double xZpos = midinLocal.x(); + G4double yZpos = midinLocal.y(); + //G4double zZpos = midinLocal.z(); #ifdef DEBUG_HITS - std::cout << " LArTBCryostatCalibrationCalculator x,y,z " << - startPoint.x() << " " << startPoint.y() << " " << startPoint.z() << std::endl; - std::cout << " LArTBCryostatCalibrationCalculator x,y,z local mid" << xZpos << - " " << yZpos << " " << zZpos << std::endl; + std::cout << " LArTBCryostatCalibrationCalculator x,y,z " << + startPoint.x() << " " << startPoint.y() << " " << startPoint.z() << std::endl; + std::cout << " LArTBCryostatCalibrationCalculator x,y,z local mid" << xZpos << + " " << yZpos << " " << zZpos << std::endl; #endif - G4double etaZpos = midinLocal.pseudoRapidity(); - G4double phiZpos = midinLocal.phi(); - if(phiZpos<0.) phiZpos = phiZpos + 2.*M_PI; - G4double radius2Zpos = xZpos*xZpos + yZpos*yZpos; - G4double radiusZpos = sqrt(radius2Zpos); - - G4int zSide = 1; - G4int numDeadPhiBins = 64; - G4double DM1EtaWidth = 0.1 ; - G4double DM1PhiWidth = 2.*M_PI / numDeadPhiBins ; - G4int etaBin = (G4int) ( std::fabs(etaZpos) / DM1EtaWidth ) ; - G4int phiBin = (G4int) (phiZpos/ DM1PhiWidth ); - if (phiBin>63) phiBin=63; - G4int sampling; - G4int region; - G4int type=1; - - if (radiusZpos < m_radiusPS) - { -// before PSactive - sampling=1; - G4VPhysicalVolume* vol = thisStepPoint->GetPhysicalVolume(); - G4String volName = vol->GetName(); - if (volName.find("LAr::TBBarrel::Cryostat::WarmTube") != std::string::npos) region=0; - else if (volName.find("LAr::TBBarrel::Cryostat::ColdTube") != std::string::npos ) region=1; - else region=2; - if (etaBin>14) etaBin=14; - } - else if (radiusZpos < m_rminAcc) - { -// between PS and Accordion - sampling=1; - region=3; - if (etaBin>14) etaBin=14; - } - else if (radiusZpos < m_rmaxAcc) - { -// we will use this for the leakage on the side of the test beam module... - sampling=2; - if (fabs(etaZpos)<1.0) { - region=0; - etaBin=0; - } else { - region=2; - etaBin=0; - } - } - else - { -// between LAr and Tile - sampling=2; - region=0; - if (std::fabs(etaZpos) > 1.0) { - region=2; - etaBin = (G4int) ( std::fabs(etaZpos-1.0) / DM1EtaWidth ) ; - if (etaBin>4) etaBin=4; - } - } - - m_identifier << 10 // LArCalorimeter + G4double etaZpos = midinLocal.pseudoRapidity(); + G4double phiZpos = midinLocal.phi(); + if(phiZpos<0.) phiZpos = phiZpos + 2.*M_PI; + G4double radius2Zpos = xZpos*xZpos + yZpos*yZpos; + G4double radiusZpos = sqrt(radius2Zpos); + + G4int zSide = 1; + G4int numDeadPhiBins = 64; + G4double DM1EtaWidth = 0.1 ; + G4double DM1PhiWidth = 2.*M_PI / numDeadPhiBins ; + G4int etaBin = (G4int) ( std::fabs(etaZpos) / DM1EtaWidth ) ; + G4int phiBin = (G4int) (phiZpos/ DM1PhiWidth ); + if (phiBin>63) phiBin=63; + G4int sampling; + G4int region; + G4int type=1; + + if (radiusZpos < m_radiusPS) + { + // before PSactive + sampling=1; + G4VPhysicalVolume* vol = thisStepPoint->GetPhysicalVolume(); + G4String volName = vol->GetName(); + if (volName.find("LAr::TBBarrel::Cryostat::WarmTube") != std::string::npos) region=0; + else if (volName.find("LAr::TBBarrel::Cryostat::ColdTube") != std::string::npos ) region=1; + else region=2; + if (etaBin>14) etaBin=14; + } + else if (radiusZpos < m_rminAcc) + { + // between PS and Accordion + sampling=1; + region=3; + if (etaBin>14) etaBin=14; + } + else if (radiusZpos < m_rmaxAcc) + { + // we will use this for the leakage on the side of the test beam module... + sampling=2; + if (fabs(etaZpos)<1.0) { + region=0; + etaBin=0; + } else { + region=2; + etaBin=0; + } + } + else + { + // between LAr and Tile + sampling=2; + region=0; + if (std::fabs(etaZpos) > 1.0) { + region=2; + etaBin = (G4int) ( std::fabs(etaZpos-1.0) / DM1EtaWidth ) ; + if (etaBin>4) etaBin=4; + } + } + + identifier << 10 // LArCalorimeter << zSide * 4 // LArBarrel << type << sampling @@ -176,27 +180,26 @@ G4bool LArTBCryostatCalibrationCalculator::Process( const G4Step* a_step, << etaBin << phiBin; -// if (!m_geometry->CheckDMIdentifier(type,sampling,region,etaBin,phiBin)) -// { -// std::cout << " LArTBCryostatCalibrationCalculator: Invalid DM identifier " -// << std::string(m_identifier) << std::endl; -// } + // if (!m_geometry->CheckDMIdentifier(type,sampling,region,etaBin,phiBin)) + // { + // std::cout << " LArTBCryostatCalibrationCalculator: Invalid DM identifier " + // << std::string(identifier) << std::endl; + // } - } // calculate identifier - + } // calculate identifier + #ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); - std::cout << "LArTBBarrelCryostatCalibrationCalculator::Process" - << " ID=" << std::string(m_identifier) - << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; + G4double energy = accumulate(energies.begin(),energies.end(),0.); + std::cout << "LArTBBarrelCryostatCalibrationCalculator::Process" + << " ID=" << std::string(identifier) + << " energy=" << energy + << " energies=(" << energies[0] + << "," << energies[1] + << "," << energies[2] + << "," << energies[3] << ")" + << std::endl; #endif return true; } - diff --git a/LArCalorimeter/LArG4/LArG4H8SD/src/LArTBCryostatCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4H8SD/src/LArTBCryostatCalibrationCalculator.h old mode 100755 new mode 100644 index c2fbe9dd57e556d70db8f037f10fa830647aea5c..cd285b5a540a81ed2b609a1df1573e374657bbef --- a/LArCalorimeter/LArG4/LArG4H8SD/src/LArTBCryostatCalibrationCalculator.h +++ b/LArCalorimeter/LArG4/LArG4H8SD/src/LArTBCryostatCalibrationCalculator.h @@ -6,7 +6,7 @@ // 22 sep 2004 G.Unal // This class calculates the values needed for calibration hits in the -// simulation. +// simulation. // A "calculator" is used in much the same way as a hand-held // calculator might be. The user supplies a value and hits 'Enter' @@ -22,11 +22,11 @@ #ifndef LArG4H8SD_Cryostat_CalibrationCalculator_H #define LArG4H8SD_Cryostat_CalibrationCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" -#include "LArG4Barrel/LArBarrelGeometry.h" +// #include "LArG4Barrel/LArBarrelGeometry.h" #include "globals.hh" @@ -40,48 +40,39 @@ class G4Step; // like LArG4HECCalibrationCalculator). This class is contained in // the namespace LArG4::BarrelCryostat. -class LArTBCryostatCalibrationCalculator : public LArG4::VCalibrationCalculator +class LArTBCryostatCalibrationCalculator : public LArCalibCalculatorSvcImp { - public: - - LArTBCryostatCalibrationCalculator(); - virtual ~LArTBCryostatCalibrationCalculator(); - - // The Process method returns a boolean value. If it's true, the - // hit can be used by Geant4; if it's false, there's something wrong - // with the energy deposit and it should be ignored. - - // For calibration work, most of the time we want the calculator - // to determine both the energy and the identifier. However, - // sometimes we want it calculate only the identifier (for - // escaped energy), or only the energy (no known application - // yet, but you can never tell). Use the enum (defined in - // VCalibrationCalculator.h) to control any special processing. - - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } - - private: - - // The values calculated by Process(). - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; - - // Energy calculator - CaloG4::SimulationEnergies m_energyCalculator; - - LArG4::Barrel::Geometry* m_geometry; - - G4double m_radiusPS; - G4double m_rminAcc; - G4double m_rmaxAcc; +public: + + LArTBCryostatCalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator); + // virtual StatusCode initialize() override final; + virtual ~LArTBCryostatCalibrationCalculator(); + + // The Process method returns a boolean value. If it's true, the + // hit can be used by Geant4; if it's false, there's something wrong + // with the energy deposit and it should be ignored. + + // For calibration work, most of the time we want the calculator + // to determine both the energy and the identifier. However, + // sometimes we want it calculate only the identifier (for + // escaped energy), or only the energy (no known application + // yet, but you can never tell). Use the enum (defined in + // VCalibrationCalculator.h) to control any special processing. + + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const LArG4::eCalculatorProcessing p = LArG4::kEnergyAndID) const override final; + +private: + + // Energy calculator + CaloG4::SimulationEnergies m_energyCalculator; + + // LArG4::Barrel::Geometry* m_geometry; + + G4double m_radiusPS; + G4double m_rminAcc; + G4double m_rmaxAcc; }; diff --git a/LArCalorimeter/LArG4/LArG4H8SD/src/components/LArG4H8SD_entries.cxx b/LArCalorimeter/LArG4/LArG4H8SD/src/components/LArG4H8SD_entries.cxx index e8e84bc2a9c2483a3796fd4ee6b652acb3a3a52d..18e8f8f61512d940c3ce87a25cdd2d2cd6ba63b3 100644 --- a/LArCalorimeter/LArG4/LArG4H8SD/src/components/LArG4H8SD_entries.cxx +++ b/LArCalorimeter/LArG4/LArG4H8SD/src/components/LArG4H8SD_entries.cxx @@ -1,5 +1,13 @@ #include "GaudiKernel/DeclareFactoryEntries.h" #include "../LArG4H8CalibSDTool.h" +#include "../H8CalibSDTool.h" -DECLARE_TOOL_FACTORY( LArG4H8CalibSDTool ) \ No newline at end of file +#include "../LArTBCryostatCalibrationCalculator.h" +#include "../H8CalibrationDefaultCalculator.h" + +DECLARE_TOOL_FACTORY( LArG4::H8CalibSDTool ) +DECLARE_TOOL_FACTORY( LArG4H8CalibSDTool ) + +DECLARE_SERVICE_FACTORY(LArTBCryostatCalibrationCalculator) +DECLARE_SERVICE_FACTORY(H8CalibrationDefaultCalculator) diff --git a/LArCalorimeter/LArG4/LArG4HEC/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4HEC/CMakeLists.txt index 49126ca1c835c2eb01a70226df50971418c6da4b..713f43de41c05089b30387d59da09fb70d23da91 100644 --- a/LArCalorimeter/LArG4/LArG4HEC/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4HEC/CMakeLists.txt @@ -7,16 +7,16 @@ atlas_subdir( LArG4HEC ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Calorimeter/CaloG4Sim - LArCalorimeter/LArG4/LArG4Code LArCalorimeter/LArGeoModel/LArReadoutGeometry + Control/AthenaBaseComps PRIVATE Control/AthenaKernel Control/StoreGate Database/AthenaPOOL/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces GaudiKernel - LArCalorimeter/LArG4/LArG4RunControl + Calorimeter/CaloG4Sim + LArCalorimeter/LArG4/LArG4Code LArCalorimeter/LArGeoModel/LArHV ) # External dependencies: @@ -27,12 +27,14 @@ find_package( Geant4 ) find_package( XercesC ) # Component(s) in the package: -atlas_add_library( LArG4HEC +atlas_add_component( LArG4HEC src/*.cc + src/components/*.cxx PUBLIC_HEADERS LArG4HEC INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} LArG4Code LArReadoutGeometry CaloG4SimLib StoreGateLib SGtests + LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps LArG4Code LArReadoutGeometry CaloG4SimLib StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaKernel GaudiKernel LArG4RunControl LArHV ) +atlas_install_python_modules( python/*.py ) diff --git a/LArCalorimeter/LArG4/LArG4HEC/GNUmakefile b/LArCalorimeter/LArG4/LArG4HEC/GNUmakefile old mode 100755 new mode 100644 diff --git a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/CalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/CalibrationCalculator.h deleted file mode 100755 index 5265119af225c70da7f510c42cf7120b3b78e603..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/CalibrationCalculator.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArG4::HEC::CalibrationCalculator -// Prepared 13-Jan-2004 Bill Seligman - -// This class calculates the values needed for calibration hits in the -// simulation. - -// A "calculator" is used in much the same way as a hand-held -// calculator might be. The user supplies a value and hits 'Enter' -// (i.e., invokes the Process() method). Then they read off whatever -// values are of interest. - -#ifndef LArG4_HEC_CalibrationCalculator_H -#define LArG4_HEC_CalibrationCalculator_H - -#include "LArG4Code/VCalibrationCalculator.h" -#include "LArG4Code/LArG4Identifier.h" -#include "LArG4HEC/Geometry.h" -#include "CaloG4Sim/SimulationEnergies.h" - -#include "globals.hh" - -#include <vector> - -// Forward declaractions: -class G4Step; - -// Note the use of nested namespaces (mainly to prevent long names -// like LArG4HECCalibrationCalculator). This class is contained in -// the namespace LArG4::HEC. - -namespace LArG4 { - - namespace HEC { - - - class CalibrationCalculator : public VCalibrationCalculator { - public: - - CalibrationCalculator(const eGeometryType type = kActive); - virtual ~CalibrationCalculator(); - - // The Process method returns a boolean value. If it's true, the - // hit can be used by Geant4; if it's false, there's something wrong - // with the energy deposit and it should be ignored. - - // For calibration work, most of the time we want the calculator - // to determine both the energy and the identifier. However, - // sometimes we want it calculate only the identifier (for - // escaped energy), or only the energy (no known application - // yet, but you can never tell). Use the enum (defined in - // VCalibrationCalculator.h) to control any special processing. - - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } - - private: - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; - - // Geometry calculator - Geometry* m_geometryCalculator; - - // Geometry type - eGeometryType m_geometryType; - - // Energy calculator - CaloG4::SimulationEnergies m_energyCalculator; - - }; - - } // namespace HEC - -} // namespace LArG4 - -#endif // LArG4_HEC_CalibrationCalculator_H diff --git a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/Geometry.h b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/Geometry.h deleted file mode 100755 index 14f25c8165caf50a2dc93aa8bcf96593e33bc4b4..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/Geometry.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArG4::HEC::Geometry - -// This class contains the geometry calculations needed to calculate -// an identifier for a given G4Step. - -// 13-Jan-2004: Karapetian Gaiane wrote the geometry code, Bill -// Seligman structured into the LArG4 processing. - -// Note: This class is intended for use in calculating identifiers in -// both active and inactive regions of the detector. For calibration -// studies, it must work properly whether the energy is deposited in -// the liquid argon or the absorber. - -#ifndef LArG4_HEC_Geometry_H -#define LArG4_HEC_Geometry_H - -#include "G4ThreeVector.hh" -#include "globals.hh" - -// Forward declarations. -class LArG4Identifier; -class G4Step; - -// Note the use of nested namespaces (mainly to prevent long names -// like LArG4HECGeometry). This class is contained in the namespace -// LArG4::HEC. - -namespace LArG4 { - - namespace HEC { - - enum eGeometryType { kActive, kInactive, kDead }; - - class Geometry { - - public: - - // Standard implementation of a singleton pattern. - static Geometry* GetInstance(); - virtual ~Geometry(); - - // This is the "meat" of this class: calculate the identifier - // given a G4Step. - LArG4Identifier CalculateIdentifier( const G4Step* a_step, const eGeometryType type = kActive ); - - protected: - // Constructor is protected according to the singleton pattern. - Geometry(); - - private: - - // Nominal z-shift from base. (Note: someday, this will have to - // be replaced with a G4Transform3D or similar description that's - // suitable for re-alignment; for now, this will do.) - G4float m_zShift; - - }; - - } // namespace HEC - -} // namespace LArG4 - -#endif // LArG4_HEC_Geometry_H diff --git a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/HECGeometry.h b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/HECGeometry.h old mode 100755 new mode 100644 index dc8420a00e7e334846de57f85353ec8a1ab2291d..0b1bf4ecd805ed088471f8851b1de3a44aa35d24 --- a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/HECGeometry.h +++ b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/HECGeometry.h @@ -5,65 +5,64 @@ // This class contains the geometry calculations needed to calculate // an identifier for a given G4Step in the HEC. -// Jan-2008: (M.Fincke) To be used for new Module-Geometry +// Jan-2008: (M.Fincke) To be used for new Module-Geometry #ifndef LArG4_HEC_HECGeometry_H #define LArG4_HEC_HECGeometry_H +#include "LArG4HEC/IHECGeometry.h" +#include "AthenaBaseComps/AthService.h" + #include "LArReadoutGeometry/HECDetectorManager.h" -#include "LArReadoutGeometry/HECDetectorRegion.h" -#include "LArG4Code/LArVG4DetectorParameters.h" +//#include "LArReadoutGeometry/HECDetectorRegion.h" #include "globals.hh" // Forward declarations. class LArG4Identifier; class G4Step; -class MsgStream; +class G4LogicalVolume; +class G4VPhysicalVolume; namespace LArG4 { namespace HEC { - enum eHECGeometryType { kWheelActive, kWheelInactive, kWheelDead }; - - class HECGeometry { + class HECGeometry: public AthService, virtual public IHECGeometry { public: - // Standard implementation of a singleton pattern. - static HECGeometry* GetInstance(); + HECGeometry(const std::string& name, ISvcLocator * pSvcLocator); + StatusCode initialize() override final; virtual ~HECGeometry(){;} - LArG4Identifier CalculateIdentifier( const G4Step* a_step, const eHECGeometryType type = kWheelActive, int *subgap=NULL); + /** Query interface method to make athena happy */ + virtual StatusCode queryInterface(const InterfaceID&, void**) override final; - - protected: - HECGeometry(); + LArG4Identifier CalculateIdentifier( const G4Step* a_step, const eHECGeometryType type = kWheelActive, int *subgap=NULL) const override final; private: - static HECGeometry *m_instance; - + bool checkDaughters(const G4LogicalVolume *possibleParent, const G4VPhysicalVolume *thePhysicalVolume, int& level) const; + const HECDetectorManager *m_hecManager; - static bool m_depthHist; - static bool m_withMother; - static bool m_inMother; - - static int m_g4historyDepth; - static double s_depthSize[7]; - static double s_depthSum[7]; - static double s_minval[7][2][10]; - static double s_maxval[7][2][10]; - - static double s_firstAbsThickness[2]; - static double s_wheel1; - static double s_wheel2; - static double s_betweenWheels; - static double s_hecLength; - static double s_startHec2; - static double s_rOuter; - static double s_rInner1; - static double s_rInner2; + bool m_depthHist; + bool m_withMother; + + int m_g4historyDepth; + double m_depthSize[7]; + double m_depthSum[7]; + double m_minval[7][2][10]; + double m_maxval[7][2][10]; + + double m_firstAbsThickness[2]; + double m_wheel1; + double m_wheel2; + double m_betweenWheels; + double m_hecLength; + double m_startHec2; + double m_rOuter; + double m_rInner1; + double m_rInner2; }; diff --git a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/IHECGeometry.h b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/IHECGeometry.h new file mode 100644 index 0000000000000000000000000000000000000000..0ab868d71b535188dc285a6e86ab1a7046eeee57 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/IHECGeometry.h @@ -0,0 +1,46 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// IHECGeometry.h +// Common interface for Geometry Calculator classes + +#ifndef __LARG4HEC_IHECGEOMETRY_H__ +#define __LARG4HEC_IHECGEOMETRY_H__ + +#include "GaudiKernel/IService.h" + +//#include "globals.hh" + +//#include "LArG4Code/LArG4Identifier.h" + +#include <string> + +class G4Step; +class LArG4Identifier; + +namespace LArG4 +{ + namespace HEC + { + + enum eHECGeometryType { kWheelActive, kWheelInactive, kWheelDead }; + + class IHECGeometry : virtual public IService + { + public: + IHECGeometry() {} + virtual ~IHECGeometry() {} + + static const InterfaceID& interfaceID() { + static const InterfaceID IID_IHECGeometry("IHECGeometry",1,0); + return IID_IHECGeometry; + } + + virtual LArG4Identifier CalculateIdentifier( const G4Step* a_step, const eHECGeometryType type = kWheelActive, int *subgap=NULL) const = 0; + + }; + + } +} +#endif //__LARG4HEC_IHECGEOMETRY_H__ diff --git a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/ILocalGeometry.h b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/ILocalGeometry.h new file mode 100644 index 0000000000000000000000000000000000000000..8f5bdf8d674651cf0ce147a0fe64d75b36707235 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/ILocalGeometry.h @@ -0,0 +1,47 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ILocalGeometry.h + +#ifndef __LARG4HEC_ILOCALGEOMETRY_H__ +#define __LARG4HEC_ILOCALGEOMETRY_H__ + +#include "GaudiKernel/IService.h" +#include "CLHEP/Units/SystemOfUnits.h" + +//#include "globals.hh" + +//#include "LArG4Code/LArG4Identifier.h" + +#include <string> + +class G4Step; +class LArG4Identifier; + +namespace LArG4 +{ + namespace HEC + { + + enum eLocalGeometryType { kLocActive, kLocInactive, kLocDead }; + + class ILocalGeometry : virtual public IService + { + public: + ILocalGeometry() {} + virtual ~ILocalGeometry() {} + + static const InterfaceID& interfaceID() { + static const InterfaceID IID_ILocalGeometry("ILocalGeometry",1,0); + return IID_ILocalGeometry; + } + + virtual LArG4Identifier CalculateIdentifier( const G4Step* a_step, const eLocalGeometryType type = kLocActive, + int depthadd = 0, double deadzone = 4.*CLHEP::mm, double locyadd = 0.*CLHEP::mm) const = 0; + + }; + + } +} +#endif //__LARG4HEC_ILOCALGEOMETRY_H__ diff --git a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LArHECCalculator.h b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LArHECCalculator.h deleted file mode 100755 index 305a024ffdd37a2b3d471b4a91ac3d6fa4bd8369..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LArHECCalculator.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArHECCalculator - -// Revision history: - -// 31-May-2002 : Karapetian Gaiane - -// 13-Jan-2004 WGS: Now uses LArG4::HEC::Geometry for the Identifier calculations. - -#ifndef LARG4HEC_LARHECCALCULATOR_H -#define LARG4HEC_LARHECCALCULATOR_H - -#include "globals.hh" -#include "G4ThreeVector.hh" -#include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVCalculator.h" -#include "LArG4Code/LArVG4DetectorParameters.h" -#include <stdexcept> -// Forward declarations. -class G4Step; -namespace LArG4 { - namespace HEC { - class Geometry; - } -} - -class LArHECCalculator : public LArVCalculator { -public: - - // Accessor for pointer to the singleton. - static LArHECCalculator* GetCalculator(); - - // "zShift" is the z-distance (cm) that the EM endcap is shifted - // (due to cabling, etc.) - G4float zShift() const { return m_zShift; } - - ///////////////////////////////////////////// - // The interface for LArVCalculator. - - virtual G4float OOTcut() const { return m_OOTcut; } - - virtual G4bool Process(const G4Step* a_step){return Process(a_step, m_hdata);} - virtual G4bool Process(const G4Step* a_step, std::vector<LArHitData>& hdata); - - virtual const LArG4Identifier& identifier(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].id; - } - - virtual G4double time(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].time; - } - virtual G4double energy(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].energy; - }; - virtual G4bool isInTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_isInTime; - } - virtual G4bool isOutOfTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return ( ! m_isInTime ); - } - - ///////////////////////////////////////////// - - G4bool GetDoChargeCollection() const { return m_chargeCollection; } - void SetDoChargeCollection(G4bool f) { m_chargeCollection = f; } - -protected: - // The constructor is protected according to the singleton design - // pattern. - LArHECCalculator(); - -private: - static LArHECCalculator* m_instance; - - G4float m_zShift; - G4float m_OOTcut; -// LArG4Identifier m_identifier; - -// G4double m_time; -// G4double m_energy; - std::vector<LArHitData> m_hdata; - - G4bool m_isInTime; - - // Class for calculating the identifier. - LArG4::HEC::Geometry* m_geometry; - - // Flag to determine if we invoke charge-collection processing. - G4bool m_chargeCollection; -}; - -#endif // not LARG4HEC_LARHECCALCULATOR_H diff --git a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LArHECCalibrationWheelCalculator.h b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LArHECCalibrationWheelCalculator.h deleted file mode 100755 index 17169b9ba4e8a99cb87cd50911b36c0c522bc4be..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LArHECCalibrationWheelCalculator.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// Jan-2008: (M.Fincke) To be used for new Module-Geometry - -#ifndef LArG4_HEC_LArHECCalibrationWheelCalculator_H -#define LArG4_HEC_LArHECCalibrationWheelCalculator_H - -#include "LArG4Code/VCalibrationCalculator.h" -#include "LArG4Code/LArG4Identifier.h" -#include "LArG4HEC/HECGeometry.h" -#include "CaloG4Sim/SimulationEnergies.h" - -#include "globals.hh" - -#include <vector> - -// Forward declaractions: -class G4Step; - -namespace LArG4 { - - namespace HEC { - - - class LArHECCalibrationWheelCalculator : public VCalibrationCalculator { - public: - - LArHECCalibrationWheelCalculator(const eHECGeometryType type = kWheelActive); - virtual ~LArHECCalibrationWheelCalculator(); - - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - virtual const std::vector<G4double>& energies() const { return m_energies; } - - private: - LArG4Identifier m_identifier; - - std::vector<G4double> m_energies; - - HECGeometry* m_geometryCalculator; - - eHECGeometryType m_geometryType; - - CaloG4::SimulationEnergies m_energyCalculator; - - }; - - } // namespace HEC - -} // namespace LArG4 - -#endif // LArG4_HEC_LArHECCalibrationWheelCalculator_H diff --git a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LArHECLocalCalculator.h b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LArHECLocalCalculator.h deleted file mode 100755 index 49ca9743c5ca1458104d42c535b39b9f09b19f8d..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LArHECLocalCalculator.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArG4HECLocalCalculator.hh - -// Revision history: - -// 17-Feb-2006 : Pavol Strizenec - -#ifndef __LArG4HECLocalCalculator_H__ -#define __LArG4HECLocalCalculator_H__ - -//#include "globals.hh" -//#include "G4ThreeVector.hh" -#include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVCalculator.h" -#include "LArG4Code/LArVG4DetectorParameters.h" -#include <stdexcept> -#include "CLHEP/Units/SystemOfUnits.h" - - -// Forward declarations. -class G4Step; -class LocalGeometry; -class IMessageSvc; -class LArG4BirksLaw; - -namespace LArG4 { - namespace HEC { - class LocalGeometry; - } -} - - -class LArHECLocalCalculator : public LArVCalculator { -public: - - // Accessor for pointer to the singleton. - static LArHECLocalCalculator* GetCalculator(); - - - ///////////////////////////////////////////// - // The interface for LArVCalculator. - - virtual G4float OOTcut() const { return m_OOTcut; } - virtual void SetOutOfTimeCut(G4double c) { m_OOTcut = c; } - - virtual G4bool Process(const G4Step* a_step){ return Process(a_step,0, 4.*CLHEP::mm, m_hdata);} - virtual G4bool Process(const G4Step* a_step, std::vector<LArHitData>& hdata){ return Process(a_step,0, 4.*CLHEP::mm, hdata);} - virtual G4bool Process(const G4Step* a_step, int depthadd, double deadzone, std::vector<LArHitData>& hdata); - - virtual const LArG4Identifier& identifier(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].id; - } - - virtual G4double time(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].time; - } - virtual G4double energy(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].energy; - }; - virtual G4bool isInTime() const { return m_isInTime; } - virtual G4bool isInTime(int i) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_isInTime; - } - virtual G4bool isOutOfTime() const { return ( ! m_isInTime ); } - virtual G4bool isOutOfTime(int i) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return ( ! m_isInTime ); - } - G4bool isX() const { return m_isX; } - void SetX(bool x); - -protected: - // The constructor is protected according to the singleton design - // pattern. - LArHECLocalCalculator(); - ~LArHECLocalCalculator(); - -private: - static LArHECLocalCalculator* m_instance; - - LArG4::HEC::LocalGeometry *m_Geometry; - - IMessageSvc *m_msgSvc; - -// LArG4Identifier m_identifier; - -// G4double m_time; -// G4double m_energy; - std::vector<LArHitData> m_hdata; - - G4float m_OOTcut; - G4bool m_isInTime; - - LArG4BirksLaw *m_birksLaw; - static G4bool m_isX; - - LArHECLocalCalculator (const LArHECLocalCalculator&); - LArHECLocalCalculator operator= (const LArHECLocalCalculator&); -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LArHECWheelCalculator.h b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LArHECWheelCalculator.h deleted file mode 100755 index 97ca932773c918d091a7b1ed84e62d993d9967ec..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LArHECWheelCalculator.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArHECWheelCalculator.hh - -// Revision history: - -// Jan-2008: (M.Fincke) To be used for new Module-Geometry - -#ifndef __LArG4HECWheelCalculator_H__ -#define __LArG4HECWheelCalculator_H__ - -#include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVCalculator.h" -#include "LArG4Code/LArVG4DetectorParameters.h" -#include <stdexcept> - -// Forward declarations. - -class G4Step; -class HECGeometry; -class IMessageSvc; -class LArG4BirksLaw; -class HECDetectorManager; - -namespace LArG4 { - namespace HEC { - class HECGeometry; - } -} - - -class LArHECWheelCalculator : public LArVCalculator { -public: - - // Accessor for pointer to the singleton. - static LArHECWheelCalculator* GetCalculator(); - - - ///////////////////////////////////////////// - // The interface for LArVCalculator. - - virtual G4float OOTcut() const { return m_OOTcut; } - virtual void SetOutOfTimeCut(G4double c) { m_OOTcut = c; } - - virtual G4bool Process(const G4Step* a_step){ return Process(a_step, m_hdata);} - virtual G4bool Process(const G4Step* a_step, std::vector<LArHitData>& hdata); - - virtual const LArG4Identifier& identifier(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].id; - } - - virtual G4double time(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].time; - } - virtual G4double energy(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].energy; - }; - virtual G4bool isInTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_isInTime; - } - virtual G4bool isOutOfTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return ( ! m_isInTime ); - } - - ~LArHECWheelCalculator(); - -protected: - // The constructor is protected according to the singleton design - // pattern. - LArHECWheelCalculator(); - -private: - static LArHECWheelCalculator* m_instance; - - LArG4::HEC::HECGeometry *m_Geometry; - const HECDetectorManager *m_DetectorManager; - - IMessageSvc *m_msgSvc; - -// LArG4Identifier m_identifier; - -// G4double m_time; -// G4double m_energy; - std::vector<LArHitData> m_hdata; - - G4float m_OOTcut; - G4bool m_isInTime; - LArG4BirksLaw *m_birksLaw; - - LArHECWheelCalculator (const LArHECWheelCalculator&); - LArHECWheelCalculator& operator= (const LArHECWheelCalculator&); -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LocalCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LocalCalibrationCalculator.h deleted file mode 100755 index f04162633f63c6f00438ad95644f838c02f1b03b..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LocalCalibrationCalculator.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LArG4_HEC_LocalCalibrationCalculator_H -#define LArG4_HEC_LocalCalibrationCalculator_H - -#include "LArG4Code/VCalibrationCalculator.h" -#include "LArG4Code/LArG4Identifier.h" -#include "LArG4HEC/LocalGeometry.h" -#include "CaloG4Sim/SimulationEnergies.h" - -#include "globals.hh" - -#include <vector> - -// Forward declaractions: -class G4Step; - -namespace LArG4 { - - namespace HEC { - - - class LocalCalibrationCalculator : public VCalibrationCalculator { - public: - - LocalCalibrationCalculator(const eLocalGeometryType type = kLocActive); - virtual ~LocalCalibrationCalculator(); - - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - virtual const std::vector<G4double>& energies() const { return m_energies; } - - private: - LArG4Identifier m_identifier; - - std::vector<G4double> m_energies; - - LocalGeometry* m_geometryCalculator; - - eLocalGeometryType m_geometryType; - - CaloG4::SimulationEnergies m_energyCalculator; - - }; - - } // namespace HEC - -} // namespace LArG4 - -#endif // LArG4_HEC_LocalCalibrationCalculator_H diff --git a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LocalGeometry.h b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LocalGeometry.h old mode 100755 new mode 100644 index 7a4287178724d93d96ce008e5ec18fcde27e45e6..f8d9dbcba7aadcdddc52502db5c08bd65b120e4c --- a/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LocalGeometry.h +++ b/LArCalorimeter/LArG4/LArG4HEC/LArG4HEC/LocalGeometry.h @@ -17,44 +17,51 @@ #ifndef LArG4_HEC_LocalGeometry_H #define LArG4_HEC_LocalGeometry_H -#include "LArG4Code/LArVG4DetectorParameters.h" -#include "globals.hh" -#include "CLHEP/Units/SystemOfUnits.h" +#include "LArG4HEC/ILocalGeometry.h" +#include "AthenaBaseComps/AthService.h" +#include "GeoModelInterfaces/IGeoModelSvc.h" +#include "RDBAccessSvc/IRDBAccessSvc.h" +//#include "globals.hh" // Forward declarations. class LArG4Identifier; class G4Step; -class MsgStream; +// class IGeoModelSvc; +// class IRDBAccessSvc; namespace LArG4 { namespace HEC { - enum eLocalGeometryType { kLocActive, kLocInactive, kLocDead }; - - class LocalGeometry { + class LocalGeometry: public AthService, virtual public ILocalGeometry { public: - // Standard implementation of a singleton pattern. - static LocalGeometry* GetInstance(); + LocalGeometry(const std::string& name, ISvcLocator * pSvcLocator); + StatusCode initialize() override final; virtual ~LocalGeometry(){;} - LArG4Identifier CalculateIdentifier( const G4Step* a_step, const eLocalGeometryType type = kLocActive , int depthadd = 0, double deadzone = 4.*CLHEP::mm, double locyadd = 0.*CLHEP::mm); + /** Query interface method to make athena happy */ + virtual StatusCode queryInterface(const InterfaceID&, void**) override final; - bool isX() const { return m_isX; } - void SetX(G4bool x) { m_isX = x; } + LArG4Identifier CalculateIdentifier( const G4Step* a_step, const eLocalGeometryType type = kLocActive, + int depthadd = 0, double deadzone = 4.*CLHEP::mm, double locyadd = 0.*CLHEP::mm) const override final; - protected: - LocalGeometry(); + //bool isX() const { return m_isX; } //UNUSED + //void SetX(G4bool x) { m_isX = x; } private: - static LocalGeometry *m_instance; - - MsgStream *m_log; - - static bool m_isX; - + int binSearch(double ly, int depth, int reg) const; + int binSearchAll(double ly, int depth, bool regular=false) const; + double deadZone(double locx, double locy) const; + ServiceHandle<IGeoModelSvc> m_geoModel; + ServiceHandle<IRDBAccessSvc> m_AccessSvc; + + bool m_isX; + double m_depthSize[7] = {0.0}; + double m_firstAbsorber[7] = {0.0}; + double m_pads[7][15] = {}; // 15 is the number of bins in eta. + double m_betweenWheel = 0.0; }; } // namespace HEC diff --git a/LArCalorimeter/LArG4/LArG4HEC/cmt/requirements b/LArCalorimeter/LArG4/LArG4HEC/cmt/requirements index 92070d06997ed6d504c48da56d295d69faf127c1..f1487a9374f5ffc7321312e13aaaf9956aff59dd 100755 --- a/LArCalorimeter/LArG4/LArG4HEC/cmt/requirements +++ b/LArCalorimeter/LArG4/LArG4HEC/cmt/requirements @@ -10,27 +10,30 @@ author Mikhail Leltchouk <lelchuk@nevis.columbia.edu> # hadronic endcap calorimeter (HEC). use AtlasPolicy AtlasPolicy-* -use LArReadoutGeometry LArReadoutGeometry-* LArCalorimeter/LArGeoModel -use LArG4Code LArG4Code-* LArCalorimeter/LArG4 -use CaloG4Sim CaloG4Sim-* Calorimeter +use AthenaBaseComps AthenaBaseComps-* Control +use LArReadoutGeometry LArReadoutGeometry-* LArCalorimeter/LArGeoModel +use RDBAccessSvc RDBAccessSvc-* Database/AthenaPOOL +use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel -use Geant4 Geant4-* External use AtlasCLHEP AtlasCLHEP-* External # Build the library (and export the headers) -library LArG4HEC *.cc -apply_pattern installed_library +library LArG4HEC *.cc -s=components *.cxx +apply_pattern component_library +apply_pattern declare_python_modules files="*.py" #======================================================= private -macro_append LArG4HEC_cppflags " -O -Wno-unused" -macro_append LArG4HEC_cppflags " -g -O0" +#macro_append LArG4HEC_cppflags " -O -Wno-unused" +#macro_append LArG4HEC_cppflags " -g -O0" -use GaudiInterface GaudiInterface-* External +use GaudiInterface GaudiInterface-* External use AthenaKernel AthenaKernel-* Control use StoreGate StoreGate-* Control -use RDBAccessSvc RDBAccessSvc-* Database/AthenaPOOL -use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel -use LArG4RunControl LArG4RunControl-* LArCalorimeter/LArG4 +#use RDBAccessSvc RDBAccessSvc-* Database/AthenaPOOL +#use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel use LArHV LArHV-* LArCalorimeter/LArGeoModel +use LArG4Code LArG4Code-* LArCalorimeter/LArG4 +use CaloG4Sim CaloG4Sim-* Calorimeter +use Geant4 Geant4-* External diff --git a/LArCalorimeter/LArG4/LArG4HEC/python/HECGeometryType.py b/LArCalorimeter/LArG4/LArG4HEC/python/HECGeometryType.py new file mode 100644 index 0000000000000000000000000000000000000000..23eb3a88833a26bb1035b54b6c506789c63c49ea --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4HEC/python/HECGeometryType.py @@ -0,0 +1,5 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +kWheelActive=0 +kWheelInactive=1 +kWheelDead=2 diff --git a/LArCalorimeter/LArG4/LArG4HEC/python/LArG4HECConfig.py b/LArCalorimeter/LArG4/LArG4HEC/python/LArG4HECConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..803eab3382cf8ccfb2679e13b847faa62d5c944f --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4HEC/python/LArG4HECConfig.py @@ -0,0 +1,36 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon import CfgMgr +from LArG4HEC import HECGeometryType + +def getLArHECLocalCalculator(name="LArHECLocalCalculator", **kwargs): + return CfgMgr.LArHECLocalCalculator(name, **kwargs) + +def getLocalCalibrationCalculator(name="LocalCalibrationCalculator", **kwargs): + return CfgMgr.LArG4__HEC__LocalCalibrationCalculator(name, **kwargs) + +def getLocalHECGeometry(name="LocalHECGeometry", **kwargs): + return CfgMgr.LArG4__HEC__LocalGeometry(name, **kwargs) + + +def getHECWheelCalculator(name="HECWheelCalculator", **kwargs): + return CfgMgr.LArHECWheelCalculator(name, **kwargs) + +def getLArHECCalibrationWheelCalculator(name="LArHECCalibrationWheelCalculator", **kwargs): + return CfgMgr.LArG4__HEC__LArHECCalibrationWheelCalculator(name, **kwargs) + +def getHECCalibrationWheelActiveCalculator(name="HECCalibrationWheelActiveCalculator", **kwargs): + kwargs.setdefault("GeometryType", HECGeometryType.kWheelActive) + return getLArHECCalibrationWheelCalculator(name, **kwargs) + +def getHECCalibrationWheelInactiveCalculator(name="HECCalibrationWheelInactiveCalculator", **kwargs): + kwargs.setdefault("GeometryType", HECGeometryType.kWheelInactive) + return getLArHECCalibrationWheelCalculator(name, **kwargs) + +def getHECCalibrationWheelDeadCalculator(name="HECCalibrationWheelDeadCalculator", **kwargs): + kwargs.setdefault("GeometryType", HECGeometryType.kWheelDead) + return getLArHECCalibrationWheelCalculator(name, **kwargs) + +def getHECGeometry(name="HECGeometry", **kwargs): + return CfgMgr.LArG4__HEC__HECGeometry(name, **kwargs) + diff --git a/LArCalorimeter/LArG4/LArG4HEC/python/LArG4HECConfigDb.py b/LArCalorimeter/LArG4/LArG4HEC/python/LArG4HECConfigDb.py new file mode 100644 index 0000000000000000000000000000000000000000..4b91afbd062c744a13c63c3b3635aba70afeaab2 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4HEC/python/LArG4HECConfigDb.py @@ -0,0 +1,13 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.CfgGetter import addService + +addService("LArG4HEC.LArG4HECConfig.getLArHECLocalCalculator","LArHECLocalCalculator") +addService("LArG4HEC.LArG4HECConfig.getLocalCalibrationCalculator","LocalCalibrationCalculator") +addService("LArG4HEC.LArG4HECConfig.getLocalHECGeometry","LocalHECGeometry") + +addService("LArG4HEC.LArG4HECConfig.getHECWheelCalculator","HECWheelCalculator") +addService("LArG4HEC.LArG4HECConfig.getHECCalibrationWheelActiveCalculator","HECCalibrationWheelActiveCalculator") +addService("LArG4HEC.LArG4HECConfig.getHECCalibrationWheelInactiveCalculator","HECCalibrationWheelInactiveCalculator") +addService("LArG4HEC.LArG4HECConfig.getHECCalibrationWheelDeadCalculator","HECCalibrationWheelDeadCalculator") +addService("LArG4HEC.LArG4HECConfig.getHECGeometry","HECGeometry") diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/CalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4HEC/src/CalibrationCalculator.cc deleted file mode 100755 index e872dd3f5a091644f4ba1555fcb80561f72a6766..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4HEC/src/CalibrationCalculator.cc +++ /dev/null @@ -1,90 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArG4::HEC::CalibrationCalculator -// Prepared 13-Jan-2004 Bill Seligman - -// This class calculates the values needed for calibration hits in the -// simulation. - -#undef DEBUG_HITS - -#include "LArG4HEC/CalibrationCalculator.h" -#include "LArG4HEC/Geometry.h" - -#include "LArG4Code/LArG4Identifier.h" - -#include "G4Step.hh" -#include "globals.hh" - -#include <algorithm> - -namespace LArG4 { - - namespace HEC { - - CalibrationCalculator::CalibrationCalculator(const eGeometryType type) - { - // Initialize the geometry calculator. - m_geometryCalculator = Geometry::GetInstance(); - m_geometryType = type; - } - - - CalibrationCalculator::~CalibrationCalculator() - { - } - - - G4bool CalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) - { - // Use the calculators to determine the energies and the - // identifier associated with this G4Step. Note that the - // default is to process both the energy and the ID. - - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { -#ifdef DEBUG_HITS - std::cout << "LArG4::HEC::CalibrationCalculator::Process" - << " calling SimulationEnergies" << std::endl; -#endif - m_energyCalculator.Energies( a_step, m_energies ); - } - else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); - - - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. - m_identifier = m_geometryCalculator->CalculateIdentifier( a_step, m_geometryType ); - } - else - m_identifier = LArG4Identifier(); - - -#ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); - std::cout << "LArG4::HEC::CalibrationCalculator::Process" - << " ID=" << std::string(m_identifier) - << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" - << std::endl; -#endif - - // Check for bad result. - if ( m_identifier == LArG4Identifier() ) - return false; - - return true; - } - - } // namespace HEC - -} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/Geometry.cc b/LArCalorimeter/LArG4/LArG4HEC/src/Geometry.cc deleted file mode 100755 index 1f3fdb7c80cefcec5911eda17e6f3330e656162c..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4HEC/src/Geometry.cc +++ /dev/null @@ -1,396 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArG4::HEC::Geometry - -// This class contains the geometry calculations needed to calculate -// an identifier for a given G4Step. - -// 13-Jan-2004: Karapetian Gaiane wrote the geometry code, Bill -// Seligman structured into the LArG4 processing. - -#include "LArG4HEC/Geometry.h" - -#include "LArG4Code/LArG4Identifier.h" - -#include "G4ThreeVector.hh" -#include "G4StepPoint.hh" -#include "G4Step.hh" -#include "G4LogicalVolume.hh" -#include "G4LogicalVolumeStore.hh" -#include "G4TouchableHistory.hh" - - -#include "RDBAccessSvc/IRDBAccessSvc.h" -#include "RDBAccessSvc/IRDBRecord.h" -#include "RDBAccessSvc/IRDBRecordset.h" -#include "GeoModelInterfaces/IGeoModelSvc.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/Bootstrap.h" -#include "StoreGate/StoreGateSvc.h" -#include "globals.hh" -// 03-Jan-2002 WGS: For 'copysign'. -#include <cmath> -#include <stdexcept> -static G4double depthSize[7]; -static G4double firstAbsorber[7]; -static G4int gapNumber[7]; -static G4double moduleNumber; -static G4double zStart ; -static G4double betweenWheel; -static G4double moduleDeltaPhi; -static G4double samplingStartZ[4]; -static G4double samplingEndZ[4]; -static G4double moduleRinner1; -static G4double moduleRinner2; - -static const G4double deadZone = 4.*CLHEP::mm; - - -#undef DEBUG_HEC - -namespace LArG4 { - - namespace HEC { - - // Standard implementation of a singleton pattern. - - Geometry* Geometry::GetInstance() - { - static Geometry instance; - return &instance; - } - - - Geometry::Geometry() - { - - std::cout<<"LArG4::HEC::Geometry ERROR, should not be called !!!!"<<std::endl; - - StatusCode status; - // Access the GeoModelSvc: - ISvcLocator *svcLocator = Gaudi::svcLocator(); - IGeoModelSvc *geoModel; - status = svcLocator->service ("GeoModelSvc",geoModel); - if (status != StatusCode::SUCCESS) { - throw std::runtime_error ("Cannot locate GeoModelSvc!!"); - } - - // Access the geometry database: - IRDBAccessSvc *pAccessSvc; - status=svcLocator->service("RDBAccessSvc",pAccessSvc); - if (status != StatusCode::SUCCESS) { - throw std::runtime_error ("Cannot locate RDBAccessSvc!!"); - } - - // Obtain the geometry version information: - - std::string AtlasVersion = geoModel->atlasVersion(); - std::string LArVersion = geoModel->LAr_VersionOverride(); - - std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion; - std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr"; - - - const IRDBRecordset *hecLongitudinalBlock = pAccessSvc->getRecordset("HecLongitudinalBlock",detectorKey,detectorNode); - if (hecLongitudinalBlock->size()==0) { - throw std::runtime_error("Cannot find the HecLongitinalBlock Table"); - } - - const IRDBRecordset *hadronicEndcap = pAccessSvc->getRecordset("HadronicEndcap",detectorKey,detectorNode); - if (hadronicEndcap->size()==0) { - throw std::runtime_error("Cannot find the HadronicEndcap Table"); - } - - const IRDBRecordset *emecGeometry = pAccessSvc->getRecordset("EmecGeometry",detectorKey,detectorNode); - if (emecGeometry->size()==0) { - throw std::runtime_error("Cannot find the EmecGeometry Table"); - } - - - // Constructor initializes the geometry. - - - // Get the endcap shift from the detector parameters. - m_zShift = (*emecGeometry)[0]->getDouble("ZSHIFT")*CLHEP::cm; - - // Get HEC parameters from the detector parameters. - zStart = (*hadronicEndcap)[0]->getDouble("ZSTART")*CLHEP::cm; // 427.7.*cm - - betweenWheel = (*hadronicEndcap)[0]->getDouble("GAPWHL")*CLHEP::cm-0.001*CLHEP::cm; //40.5*CLHEP::mm - moduleNumber = (*hadronicEndcap)[0]->getInt("NSCT"); // 32 Modules - for (G4int indexloop=0; indexloop < 7; ++indexloop){ - - depthSize[indexloop] = (*hecLongitudinalBlock)[indexloop]->getDouble("BLDPTH")*CLHEP::cm; - firstAbsorber[indexloop]= (*hecLongitudinalBlock)[indexloop]->getDouble("PLATE0")*CLHEP::cm; - gapNumber[indexloop] = (int) (*hecLongitudinalBlock)[indexloop]->getDouble("BLMOD"); - } - samplingStartZ[0] = zStart; - samplingEndZ[0] = zStart+depthSize[0]; - samplingStartZ[1] = samplingEndZ[0]; - samplingEndZ[1] = samplingEndZ[0] +depthSize[1]+depthSize[2]; - samplingStartZ[2] = samplingEndZ[1] + betweenWheel; - samplingEndZ[2] = samplingEndZ[1] +depthSize[3]+depthSize[4]+ betweenWheel; - samplingStartZ[3] = samplingEndZ[2]; - samplingEndZ[3] = samplingEndZ[2] +depthSize[5]+depthSize[6]; - - moduleDeltaPhi = 2*M_PI/moduleNumber; //11.25*deg; - - moduleRinner1 = (*hecLongitudinalBlock)[0]->getDouble("BLRMN")*CLHEP::cm; - moduleRinner2 = (*hecLongitudinalBlock)[0]->getDouble("BLRMN")*CLHEP::cm; - } - - - Geometry::~Geometry() {;} - - - LArG4Identifier Geometry::CalculateIdentifier(const G4Step* a_step, const eGeometryType g_type) - { - // Given a G4Step, find the sampling, region, eta bin, and phi bin - // in the LAr HEC associated with that point. - - // Note that we don't do any range checking; it is assumed that p - // lies within the LAr endcap. But we do have debug checks via asserts. - - // The default result is a blank identifier. - LArG4Identifier result = LArG4Identifier(); - - // Find out how long it took the energy to get here. - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - G4ThreeVector startPoint = pre_step_point->GetPosition(); - G4ThreeVector endPoint = post_step_point->GetPosition(); - G4ThreeVector p = (startPoint + endPoint) * 0.5; - - // Adjust the input point for any endcap offset (the endcap - // geometry was designed to point at (0,0,0) in the detector; if - // we've shifted the endcap, we have to project the geometry to a - // different point). - G4double pointZ = p.z(); - - G4double pointZshift = pointZ - copysign(m_zShift,pointZ); - - G4ThreeVector pointShift(p.x(), - p.y(), - pointZshift); - - // Determine eta, phi, and z w.r.t. the shifted point. - G4double eta = fabs( pointShift.pseudoRapidity() ); - G4double phi = pointShift.phi(); - if (phi < 0) phi += 2*M_PI; - G4double absZ = fabs( pointZshift ); - -#ifdef DEBUG_HEC - G4cout<<" ***NEW STEP**** "<<G4endl; - G4cout<<"middle point="<< pointZ<<" , eta = "<<eta <<" , phi= "<<phi<<G4endl; - G4cout<<"start point hit Z="<<startPoint.z()<<" , eta = "<<startPoint.pseudoRapidity()<<" ,phi()= "<<startPoint.phi()<<G4endl; - - assert (eta > 1.375); -#endif - - // Determine the "type" of the LArHecSolid in which the hit took place. - - // Positive/negative wheel of HEC - - G4int zSide; - G4int sampling; - G4int sector; - G4int region; - G4int etaBin; - G4int phiBin; - G4int phiSector; - - zSide = 2; - if ( pointZ < 0. ) zSide = -2; - -#ifdef DEBUG_HEC_OLD_DIAGNOSTIC - - // The hitted volume's identier is possible to get by the name of his "mother" volume. - // G4cout <<" hitLogiVolume->GetNoDaughters= " <<hitLogiVolume->GetNoDaughters()<<G4endl; - // G4cout <<"+++++"<<hitLogiVolume->GetDaughter(1)->GetLogicalVolume()->GetMaterial()->GetName()<<G4endl; - // G4cout <<"+++++"<<hitLogiVolume->GetName()<<G4endl; - - G4String hitVolume=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetName(); - - G4int copyN=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetCopyNo(); - - // 16-Oct-2003 WGS: Due to a revision in Geant4, - // G4VPhysicalVolume::GetMother() no longer exists. If we want to - // find a mother volume, we have to do so in a more complex way: - - G4TouchableHistory* touchHist = - (G4TouchableHistory*) a_step->GetPreStepPoint()->GetTouchable(); - G4int volDepth = touchHist->GetHistoryDepth(); - - // If the volume depth is 0, then this is the mother volume of the - // simulation. (I know that's not likely, but let's be sure.) - // Otherwise, we want to go up one level in depth to get the mother - // volume. - - //if ( volDepth != 0 ) volDepth--; - //G4VPhysicalVolume *motherPhysical = touchHist->GetVolume(volDepth); - G4VPhysicalVolume *motherPhysical = touchHist->GetVolume(1); - - // G4String motherVolume=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetMother()->GetName(); - G4String motherVolume=motherPhysical->GetName(); - - G4String material=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetMaterial()->GetName(); - - // G4int copyN1=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetMother()->GetCopyNo(); - G4int copyN1=motherPhysical->GetCopyNo(); - - G4cout <<"+++++hitVolume="<<hitVolume<<" , his material="<<material<<", copyNumber="<<copyN<<", motherVolume="<<motherVolume <<", copy1="<< copyN1<< G4endl; - -#endif - - if(g_type != kDead) { // Calculate the active and inactive ID - // Sampling Identifier - if (absZ<samplingEndZ[0]) sampling = 0; - else if ((absZ>samplingStartZ[1]) && (absZ<samplingEndZ[1])) sampling = 1; - else if ((absZ>samplingStartZ[2]) && (absZ<samplingEndZ[2])) sampling = 2; - else if ((absZ>samplingStartZ[3]) && (absZ<samplingEndZ[3])) sampling = 3; - else { // Something wrong, it is a dead hit ? - // sampling = -1; - return CalculateIdentifier(a_step, kDead); - } - - // Region Identifier - if (eta<2.5) region = 0; - else region = 1; - - // Check if not in crack between modules - G4double alph = atan(pointShift.y()/pointShift.x()); - G4double dalpha = alph - int(alph/moduleDeltaPhi + copysign(0.5,alph))*moduleDeltaPhi; - G4double distance = sqrt(pointShift.x()*pointShift.x()+pointShift.y()*pointShift.y())*sin(dalpha); - if(fabs(distance) < deadZone) { - return CalculateIdentifier(a_step, kDead); - } - - // Sector Identifier and Phi_sector Identifier will be replaced - // by Phi Identifier - // Sector Identifier - sector = G4int(phi/moduleDeltaPhi); // phi/11.25*deg; - - // Phi_sector Identifier - phiSector=0; - if ( region == 0 ) { - if ((phi-float(sector)*moduleDeltaPhi) > (moduleDeltaPhi/2.)) phiSector=1; - } - - // Sector Identifier and Phi_sector Identifier will be replaced - // by Phi Identifier - if ( region == 1 ) phiBin=sector; - else phiBin=2*sector+phiSector; - - - // eta_Bin Identifier - etaBin = -1; - if ( region == 0 ) { - etaBin = G4int((eta-1.5)/0.1); - } else { - etaBin = G4int((eta-2.5)/0.2); - if ((sampling == 2) && (etaBin >2)) etaBin = 2; - } - -#ifdef DEBUG_HEC - std::cout<<"+++++ Active:"<<std::endl; - std::cout <<"zSide = "<<zSide<<" , sector = "<<sector<< - " , sampling = "<<sampling<<" , region="<<region << - " , phiBin="<<phiBin<< " , etaBin="<<etaBin <<std::endl; -#endif - - result << 4 // LArCalorimeter - << 2 // LArHEC - << zSide - << sampling - << region - << etaBin - << phiBin; - - } else { // Calculate dead ID - - G4int type = 0; - G4int subdet; - - if ( pointZshift < 0. ) subdet = -4; else subdet = 4; - - phiBin = G4int(phi/moduleDeltaPhi); - double r = sqrt(pointShift.x()*pointShift.x()+pointShift.y()*pointShift.y()); - if(absZ<samplingEndZ[0]) sampling = 0; - else if(absZ<samplingEndZ[1]) sampling = 1; - else if(absZ<samplingEndZ[2]) sampling = 2; - else sampling = 3; - - - if (absZ<samplingStartZ[0]+firstAbsorber[0]) { // in front of HEC - type = 1; - sampling = 2; - region = 3; - etaBin = G4int((eta-1.5)/0.1); - } else if((absZ < samplingEndZ[0] && r < moduleRinner1) || - (absZ < samplingEndZ[3] && r < moduleRinner2) ) { // HEC-FCAL crack - region = 4; - etaBin = 0; - } else if ( - ((absZ>samplingStartZ[0]+firstAbsorber[0]) && (absZ<samplingEndZ[1])) || - ((absZ>samplingStartZ[2]+firstAbsorber[3]) && (absZ<samplingEndZ[3])) - ) { // intermodule cracks - G4double alph = atan(pointShift.y()/pointShift.x()); - G4double dalpha = alph - int(alph/moduleDeltaPhi + copysign(0.5,alph))*moduleDeltaPhi; - G4double distance = sqrt(pointShift.x()*pointShift.x()+pointShift.y()*pointShift.y())*sin(dalpha); - if(fabs(distance) < deadZone) { - type = 2; - if (eta<2.5) { - region = 2; - etaBin = G4int((eta-1.5)/0.1); - } else { - region = 3; - etaBin = G4int((eta-2.5)/0.2); - } - } else { // something wrong - where it comes from? - default calculator hit - type = 1; - region = sampling = 0; - etaBin = G4int((eta-1.5)/0.1); - } - } else if ((absZ>samplingEndZ[1]) && (absZ<samplingStartZ[2]+firstAbsorber[3])) { // interwheel crack - type = 1; - region = 4; - sampling = 2; - etaBin = G4int((eta-1.5)/0.1); - } else { // HEC-Ext.B crack - type = 1; - if(eta < 1.7) { - sampling = 2; - region = 5; - etaBin = G4int((eta-1.0)/0.1); - } else { // Back of the HEC - sampling = 3; - region = 0; - etaBin = G4int((eta-1.7)/0.1); - } - } - -#ifdef DEBUG_HEC - std::cout<<"+++++ Dead:"<<std::endl; - G4cout <<"subdet = "<<subdet<<" , type = "<<type<< - " , sampling = "<<sampling<<" , region="<<region << - " , phi="<<phiBin<< " , etaBin="<<etaBin <<G4endl; -#endif - - result << 10 // Calorimeter - << subdet // +-4 - LAr dead material - << type - << sampling - << region - << etaBin - << phiBin; - - } - - return result; - } - - } // namespace HEC - -} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc b/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc old mode 100755 new mode 100644 index b9f6749828255cc691f21b685bd6a49282f9217c..05470c23749c90007aa7298ec5e1ee7102301771 --- a/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc @@ -17,7 +17,7 @@ #include "LArReadoutGeometry/HECLongBlock.h" #include "LArReadoutGeometry/HECDetectorManager.h" #include "LArReadoutGeometry/HECDetectorRegion.h" - + #include "RDBAccessSvc/IRDBAccessSvc.h" #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" @@ -33,6 +33,9 @@ #include <cmath> #include <stdexcept> +#include "G4PhysicalVolumeStore.hh" +#include "G4VPhysicalVolume.hh" +#include "G4TransportationManager.hh" namespace Units = Athena::Units; @@ -53,177 +56,191 @@ namespace LArG4 { namespace HEC { -bool HECGeometry::m_depthHist = false; -bool HECGeometry::m_withMother = false; -bool HECGeometry::m_inMother = false; -int HECGeometry::m_g4historyDepth = 0; -double HECGeometry::s_depthSize[7]; -double HECGeometry::s_depthSum[7]; -double HECGeometry::s_minval[7][2][10]; -double HECGeometry::s_maxval[7][2][10]; -double HECGeometry::s_firstAbsThickness[2]; -double HECGeometry::s_wheel1; -double HECGeometry::s_wheel2; -double HECGeometry::s_betweenWheels; -double HECGeometry::s_hecLength; -double HECGeometry::s_startHec2; -double HECGeometry::s_rOuter; -double HECGeometry::s_rInner1; -double HECGeometry::s_rInner2; - - -HECGeometry* HECGeometry::m_instance = 0; - - -HECGeometry* HECGeometry::GetInstance() -{ - if (m_instance == 0) m_instance = new HECGeometry(); - return m_instance; -} - - - HECGeometry::HECGeometry() { - - - MsgStream log(Athena::getMessageSvc(),"LArG4HEC::HECGeometry" ); - log << MSG::DEBUG << "HECGeometry - Constructor" << endmsg; - - m_hecManager=NULL; - - if (!m_hecManager){ - StoreGateSvc* detStore = StoreGate::pointer("DetectorStore"); - if (detStore->retrieve(m_hecManager)!=StatusCode::SUCCESS){ - throw std::runtime_error("HEC::HECGeometry Can't find HECDetectorManager!"); + HECGeometry::HECGeometry(const std::string& name, ISvcLocator * pSvcLocator) + : AthService(name, pSvcLocator) + , m_hecManager(nullptr) + , m_depthHist(false) + , m_withMother(false) + , m_g4historyDepth(0) + { + } - } + //============================================================================================ - // This is VERY clumsy, but at the moment the only way to get the eta boundaries - // for a given block from the ReadoutGeometry and at the same time have the - // eta identifier ready for any given depth. + StatusCode HECGeometry::initialize() + { - for (int iblock=0; iblock<7; iblock++) { - s_depthSum[iblock] = 0.; - s_depthSize[iblock] = 0.; - for (int ireg=0; ireg<2; ireg++) { - for (int etaseg=0; etaseg<10; etaseg++) { - s_minval[iblock][ireg][etaseg] = 0.; - s_maxval[iblock][ireg][etaseg] = 0.; + if (!m_hecManager) + { + StoreGateSvc *detStore = StoreGate::pointer("DetectorStore"); + ATH_CHECK(detStore->retrieve(m_hecManager)); + } + // This is VERY clumsy, but at the moment the only way to get the eta boundaries + // for a given block from the ReadoutGeometry and at the same time have the + // eta identifier ready for any given depth. + + for (int iblock=0; iblock<7; iblock++) { + m_depthSum[iblock] = 0.; + m_depthSize[iblock] = 0.; + for (int ireg=0; ireg<2; ireg++) { + for (int etaseg=0; etaseg<10; etaseg++) { + m_minval[iblock][ireg][etaseg] = 0.; + m_maxval[iblock][ireg][etaseg] = 0.; + } + } } - } - } - double depthsum_tally = 0.; - for (int depthIndex=0; depthIndex<7; depthIndex++) - { - s_depthSize[depthIndex] = m_hecManager->getBlock(depthIndex)->getDepth(); - depthsum_tally += s_depthSize[depthIndex]; - if (depthIndex==3) depthsum_tally += 40.5; // YIKES! hard-coded number...! - s_depthSum[depthIndex] = depthsum_tally ; - - const HECLongBlock *block = m_hecManager->getBlock(depthIndex); - - int isegInner = 0; - int isegOuter = block->getNumRadialSegments(); - int numBlk = block->getBlockNumber(); - - int nInReg = 4; - if (numBlk>1 && numBlk<6) { isegInner = 1; nInReg=3; } - if (numBlk>6)isegOuter=11; - else if (numBlk>4)isegOuter=12; - else if (numBlk>2)isegOuter=13; - - int ieta = nInReg; - int iregion = 1; - - for (int iseg=isegInner; iseg<isegOuter; iseg++) - { - ieta--; - if (ieta < 0) { iregion=0; ieta=9; } - - const HECRadialSegment *hecRad = block->getRadialSegment(iseg); - s_minval[depthIndex][iregion][ieta]= hecRad->getMinVal(); - s_maxval[depthIndex][iregion][ieta]= hecRad->getMaxVal(); - // This is a most terrible hack to correct numbers in the database...: - double rInner = m_hecManager->getBlock(depthIndex)->getInnerRadius(); - double s_rOuter = m_hecManager->getBlock(depthIndex)->getOuterRadius(); - if (hecRad->getMaxVal()==2027.) s_maxval[depthIndex][iregion][ieta]=s_rOuter; - if (hecRad->getMinVal()==375. && depthIndex==0) s_minval[depthIndex][iregion][ieta]=rInner; - else if (hecRad->getMinVal()==478 && depthIndex>0) s_minval[depthIndex][iregion][ieta]=rInner; - } + double depthsum_tally = 0.; + for (int depthIndex=0; depthIndex<7; depthIndex++) + { + m_depthSize[depthIndex] = m_hecManager->getBlock(depthIndex)->getDepth(); + depthsum_tally += m_depthSize[depthIndex]; + if (depthIndex==3) depthsum_tally += 40.5; // FIXME YIKES! hard-coded number...! + m_depthSum[depthIndex] = depthsum_tally ; + + const HECLongBlock *block = m_hecManager->getBlock(depthIndex); + + int isegInner = 0; + int isegOuter = block->getNumRadialSegments(); + int numBlk = block->getBlockNumber(); + + int nInReg = 4; + if (numBlk>1 && numBlk<6) { isegInner = 1; nInReg=3; } + if (numBlk>6)isegOuter=11; + else if (numBlk>4)isegOuter=12; + else if (numBlk>2)isegOuter=13; + + int ieta = nInReg; + int iregion = 1; + + for (int iseg=isegInner; iseg<isegOuter; iseg++) + { + ieta--; + if (ieta < 0) { iregion=0; ieta=9; } + + const HECRadialSegment *hecRad = block->getRadialSegment(iseg); + m_minval[depthIndex][iregion][ieta]= hecRad->getMinVal(); + m_maxval[depthIndex][iregion][ieta]= hecRad->getMaxVal(); + // This is a most terrible hack to correct numbers in the database...: + double rInner = m_hecManager->getBlock(depthIndex)->getInnerRadius(); + double rOuter = m_hecManager->getBlock(depthIndex)->getOuterRadius(); + if (hecRad->getMaxVal()==2027.) m_maxval[depthIndex][iregion][ieta]=rOuter; + if (hecRad->getMinVal()==375. && depthIndex==0) m_minval[depthIndex][iregion][ieta]=rInner; + else if (hecRad->getMinVal()==478 && depthIndex>0) m_minval[depthIndex][iregion][ieta]=rInner; + } + } + + + // And some essential numbers we'll need over and over again: + m_firstAbsThickness[0] = m_hecManager->getBlock(0)->getFrontPlateThickness() ; + m_firstAbsThickness[1] = m_hecManager->getBlock(3)->getFrontPlateThickness() ; + m_wheel1 = m_depthSize[0]+m_depthSize[1]+m_depthSize[2]; // 816.5; + m_wheel2 = m_depthSize[3]+m_depthSize[4]+m_depthSize[5]+m_depthSize[6]; // 961.0; + m_betweenWheels = 40.5; // FIXME HACK!! -- can't find this through LArReadoutGeometry... + m_startHec2 = m_wheel1 + m_betweenWheels + m_firstAbsThickness[1]; + m_hecLength = m_wheel1 + m_betweenWheels + m_wheel2; + m_rOuter = m_hecManager->getBlock(0)->getOuterRadius(); + m_rInner1 = m_hecManager->getBlock(0)->getInnerRadius(); + m_rInner2 = m_hecManager->getBlock(1)->getInnerRadius(); + + if (!m_depthHist) + { + const G4LogicalVolume * logicalWorld = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume(); + const G4VPhysicalVolume *thePhysicalVolume = G4PhysicalVolumeStore::GetInstance()->GetVolume("LArMgr::LAr::HEC::Mother",false); + int level=0; + if(this->checkDaughters(logicalWorld, thePhysicalVolume,level)) + { + m_g4historyDepth=level+1; + m_depthHist=true; + m_withMother=true; + ATH_MSG_INFO(" G4Depth of HEC::LiquidArgon " << m_g4historyDepth + << " The HEC Wheel is embedded in a HEC Mother"); + } + else + { + const G4VPhysicalVolume *thePhysicalVolume2 = G4PhysicalVolumeStore::GetInstance()->GetVolume("LArMgr::LAr::HEC::LiquidArgon",false); + int level2=0; + if(this->checkDaughters(logicalWorld, thePhysicalVolume2,level2)) + { + m_g4historyDepth=level2; + m_depthHist=true; + ATH_MSG_INFO(" G4Depth of HEC::LiquidArgon " << m_g4historyDepth); + m_withMother=false; + ATH_MSG_INFO("The HEC Wheel is independent (no Mother)"); + } + else + { + ATH_MSG_ERROR("Failed to find LArMgr::LAr::HEC::LiquidArgon!!"); + return StatusCode::FAILURE; + } + } + } + + return StatusCode::SUCCESS; } + //============================================================================================ - // And some essential numbers we'll need over and over again: - s_firstAbsThickness[0] = m_hecManager->getBlock(0)->getFrontPlateThickness() ; - s_firstAbsThickness[1] = m_hecManager->getBlock(3)->getFrontPlateThickness() ; - s_wheel1 = s_depthSize[0]+s_depthSize[1]+s_depthSize[2]; // 816.5; - s_wheel2 = s_depthSize[3]+s_depthSize[4]+s_depthSize[5]+s_depthSize[6]; // 961.0; - s_betweenWheels = 40.5; // HACK!! -- can't find this through LArReadoutGeometry... - s_startHec2 = s_wheel1 + s_betweenWheels + s_firstAbsThickness[1]; - s_hecLength = s_wheel1 + s_betweenWheels + s_wheel2; - s_rOuter = m_hecManager->getBlock(0)->getOuterRadius(); - s_rInner1 = m_hecManager->getBlock(0)->getInnerRadius(); - s_rInner2 = m_hecManager->getBlock(1)->getInnerRadius(); + StatusCode HECGeometry::queryInterface( const InterfaceID & riid, void** ppvInterface ) + { + if ( IHECGeometry::interfaceID().versionMatch(riid) ) { + *ppvInterface = dynamic_cast<IHECGeometry*>(this); + } else { + // Interface is not directly available : try out a base class + return AthService::queryInterface(riid, ppvInterface); + } + addRef(); + return StatusCode::SUCCESS; + } -} + //============================================================================================ + bool HECGeometry::checkDaughters(const G4LogicalVolume *possibleParent, const G4VPhysicalVolume *thePhysicalVolume, int& level) const + { + if (possibleParent->IsDaughter(thePhysicalVolume)) + { + ++level; + return true; + } + // Otherwise Loop over the daughters + const G4int nDaughters(possibleParent->GetNoDaughters()); + for(G4int daughter(0); daughter<nDaughters; ++daughter) + { + const G4VPhysicalVolume* daughterPhysVol = possibleParent->GetDaughter(daughter); + const G4LogicalVolume* daughterLogVol = daughterPhysVol->GetLogicalVolume(); + if (this->checkDaughters(daughterLogVol, thePhysicalVolume,level)) + { + ++level; + return true; + } + } + return false; + } -//============================================================================================ + //============================================================================================ - LArG4Identifier HECGeometry::CalculateIdentifier(const G4Step* a_step, - const eHECGeometryType g_type, - int *subgap) + LArG4Identifier HECGeometry::CalculateIdentifier(const G4Step* a_step, + const eHECGeometryType g_type, + int *subgap) const { - - if (!m_hecManager){ - StoreGateSvc* detStore = StoreGate::pointer("DetectorStore"); - if (detStore->retrieve(m_hecManager)!=StatusCode::SUCCESS){ - throw std::runtime_error("HEC::HECGeometry Can't find HECDetectorManager!"); - } - } if (!m_hecManager){ - throw std::runtime_error("HEC::HECGeometry Can't find HECDetectorManager!"); + throw std::runtime_error("HEC::HECGeometry Can't find HECDetectorManager!"); } - + // Get the pre-step point; Get global (atlas) and local (HEC mother) Positions G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - Point3D<double> globalPosition = pre_step_point->GetPosition(); + Point3D<double> globalPosition = pre_step_point->GetPosition(); G4TouchableHistory* theTouchable = (G4TouchableHistory*) (pre_step_point->GetTouchable()); G4String volumeName = theTouchable->GetVolume()->GetName() ; - // Do the following only once - to determine the G4 history-depth of the wheel coordinates + // Do the following only once - to determine the G4 history-depth of the wheel coordinates // We also want to know whether the Wheels are imbedded in a HEC Mother or whether // the Front and Rear Wheels have been placed (independently) directly into the - // Cryostat Liquid Argon - - int g4Depth = theTouchable->GetHistoryDepth(); - if (!m_depthHist) - { - MsgStream log(Athena::getMessageSvc(),"LArG4HEC::HECGeometry" ); - log << MSG::INFO << " This should be done once only: " ; - for (int myVol=g4Depth; myVol>0; myVol--) - { - if ((theTouchable->GetHistory()->GetVolume(myVol)->GetName())== "LArMgr::LAr::HEC::LiquidArgon") - { m_g4historyDepth=myVol; - m_depthHist=true; - log << MSG::INFO << " G4Depth of HEC::LiquidArgon " << m_g4historyDepth << endmsg; - if ((theTouchable->GetHistory()->GetVolume(m_g4historyDepth-1)->GetName())== "LArMgr::LAr::HEC::Mother") - {m_withMother=true; log << MSG::INFO << "The HEC Wheel is embedded in a HEC Mother" << endmsg; } - else {m_withMother=false; log << MSG::INFO << "The HEC Wheel is independent (no Mother)" << endmsg; } - break;} - else if ((theTouchable->GetHistory()->GetVolume(myVol)->GetName())== "LArMgr::LAr::HEC::Mother") - { m_g4historyDepth=myVol+1; - m_depthHist=true; - m_withMother=true; - log << MSG::INFO << " G4Depth of HEC::LiquidArgon " << m_g4historyDepth - << " The HEC Wheel is embedded in a HEC Mother" << endmsg; - break;} - } - } + // Cryostat Liquid Argon // Now we know that no matter how the HEC is nested (ie with or without overall Mother); // m_g4historyDepth is the G4 history depth of the HEC Wheel coordinates (ie: LAr::HEC::LiquidArgon) @@ -231,335 +248,334 @@ HECGeometry* HECGeometry::GetInstance() // Next we need to be able to handle things regardless whether the Wheels are // imbedded in a HEC Mother or whether they are placed independently into the cryostat: - m_inMother = false; - if (volumeName == "LArMgr::LAr::HEC::Mother") m_inMother = true; + bool inMother = false; + if (volumeName == "LArMgr::LAr::HEC::Mother") inMother = true; // This will give us the hit-position in the Wheel coordinates (ie in LAr::HEC::LiquidArgon): // But we have to be careful: We COULD be in a mother, in which case the wheel coord. is meaningless. G4AffineTransform wheelTransform; G4ThreeVector wheelPosition ; - if (!m_inMother){ - wheelTransform = pre_step_point->GetTouchable()->GetHistory()->GetTransform(m_g4historyDepth); - wheelPosition = wheelTransform.TransformPoint(pre_step_point->GetPosition()); + if (!inMother){ + wheelTransform = pre_step_point->GetTouchable()->GetHistory()->GetTransform(m_g4historyDepth); + wheelPosition = wheelTransform.TransformPoint(pre_step_point->GetPosition()); } // In case there IS a mother and the hit is actually IN this mother, we need those coordinates as well: G4AffineTransform motherTransform; G4ThreeVector motherPosition ; - if (m_inMother){ - motherTransform = pre_step_point->GetTouchable()->GetHistory()->GetTransform(m_g4historyDepth-1); - motherPosition = motherTransform.TransformPoint(pre_step_point->GetPosition()); + if (inMother){ + motherTransform = pre_step_point->GetTouchable()->GetHistory()->GetTransform(m_g4historyDepth-1); + motherPosition = motherTransform.TransformPoint(pre_step_point->GetPosition()); } - + // z-side sign int zSide = globalPosition.z()<0. ? -1:1; // ------- ACTIVE and INACTIVE volumes ----------------------- - // (They are all inside a Depth (and some DM, too)) + // (They are all inside a Depth (and some DM, too)) if ( volumeName.contains("LArMgr::LAr::HEC::Module::Depth") ) - - { - - int modVol = m_g4historyDepth+1 ; // geant depth of the HEC::Module - int depthVol= m_g4historyDepth+2 ; // geant depth of the HEC::Module::Depth - - int depthIndex = theTouchable->GetHistory()->GetVolume(depthVol)->GetCopyNo(); - int moduleIndex = theTouchable->GetHistory()->GetVolume(modVol)->GetCopyNo(); - - const G4AffineTransform moduleTransform= theTouchable->GetHistory()->GetTransform(modVol); - - G4ThreeVector modulePosition = moduleTransform.TransformPoint(pre_step_point->GetPosition()); + + { + + int modVol = m_g4historyDepth+1 ; // geant depth of the HEC::Module + int depthVol= m_g4historyDepth+2 ; // geant depth of the HEC::Module::Depth + + int depthIndex = theTouchable->GetHistory()->GetVolume(depthVol)->GetCopyNo(); + int moduleIndex = theTouchable->GetHistory()->GetVolume(modVol)->GetCopyNo(); + + const G4AffineTransform moduleTransform= theTouchable->GetHistory()->GetTransform(modVol); + + G4ThreeVector modulePosition = moduleTransform.TransformPoint(pre_step_point->GetPosition()); double moduleY = (sqrt)(modulePosition.y()/Units::mm*modulePosition.y()/Units::mm) ; - if (subgap) { - - int sliceVol= m_g4historyDepth+3 ; // geant depth of the slice - //int sliceIndex = theTouchable->GetHistory()->GetVolume(sliceVol)->GetCopyNo(); - - const G4AffineTransform sliceTransform=theTouchable->GetHistory()->GetTransform(sliceVol); - G4ThreeVector slicePosition = sliceTransform.TransformPoint(pre_step_point->GetPosition()); - G4VSolid *sliceSolid = theTouchable->GetHistory()->GetVolume(sliceVol)->GetLogicalVolume()->GetSolid(); - double sliceZ = slicePosition.z()/Units::mm ; - - G4Tubs *tubs = dynamic_cast<G4Tubs *> (sliceSolid); - if (tubs) { - double dz = tubs->GetDz()/Units::mm; - if (sliceZ > 0) { - if (fabs(sliceZ)>dz/2.0) { - (*subgap) = 0; - } - else { - dz=1; - (*subgap) = 1; - } - } - else { - if (fabs(sliceZ)>dz/2.0) { - (*subgap) = 3; - dz=3; - } - else { - (*subgap) = 2; - } - } - } - } - - - - // Get: sampling, region, eta and phi: - - //--- SAMPLING --- - // initialize value to something invalid, so we won't accidentally mis-assign something: - int sampling=-1; - sampling = (depthIndex==0 ? 0 : (depthIndex<3 ? 1 : (depthIndex<5 ? 2 : 3))); - - - //---REGION, ETA --- - int ieta = -1; - int iregion = ( moduleY>= s_maxval[depthIndex][1][0] ) ? 0 : 1 ; - for (int ie=0; ie<10; ie++) { - if ( moduleY > s_minval[depthIndex][iregion][ie] && - moduleY<= s_maxval[depthIndex][iregion][ie] ) - { - ieta = ie; - break; - } - } - - - // Take care of very outside eta identifiers of hits that can - // sometimes be a wee bit outside the boundaries - if (ieta<0){ - int ietaMin[7] = {3,2,2,2,2,3,3}; - int ietaMax[7] = {0,0,1,1,2,2,3}; - if (moduleY>=s_rOuter) ieta = ietaMax[depthIndex]; - else if ((depthIndex==0 && moduleY<s_rInner1 ) || - (depthIndex>0 && moduleY<s_rInner2 )) ieta = ietaMin[depthIndex]; - } - - - - //--- PHI --- - int iphi=-1; - if(iregion == 1) iphi = moduleIndex; - else - { - iphi = 2*moduleIndex; - if(zSide * modulePosition.x() > 0) iphi++; - } - - - //--- Assign identifier according the the volumes we are in: - - if ( g_type==kWheelActive || g_type==kWheelInactive ) - { - LArG4Identifier result = LArG4Identifier(); - - result << 4 // LAr - << 2 // HEC - << 2*zSide // z-side - << sampling // sampling - << iregion // region - << ieta // ieta - << iphi ; // iphi - - return result; - } - - else // (has to be dead) - { - int itype = 2; - if ( volumeName.contains("LArMgr::LAr::HEC::Module::Depth::FirstAbsorber") ) { - itype = 1; - sampling = 2; - iphi = moduleIndex; - if(iregion==1) { - ieta += 10; - } - iphi = 2*moduleIndex; - if(zSide * modulePosition.x() > 0) iphi++; - if(ieta<0) ieta = 0; - if(ieta>17) ieta = 17; - if(depthIndex < 3) iregion = 3; else iregion = 4; - } else { - if(iregion==0) { - iregion=2; iphi /= 2; - } else { iregion=3; }// diference in regions and phi for DM - } + if (subgap) { + + int sliceVol= m_g4historyDepth+3 ; // geant depth of the slice + //int sliceIndex = theTouchable->GetHistory()->GetVolume(sliceVol)->GetCopyNo(); + + const G4AffineTransform sliceTransform=theTouchable->GetHistory()->GetTransform(sliceVol); + G4ThreeVector slicePosition = sliceTransform.TransformPoint(pre_step_point->GetPosition()); + G4VSolid *sliceSolid = theTouchable->GetHistory()->GetVolume(sliceVol)->GetLogicalVolume()->GetSolid(); + double sliceZ = slicePosition.z()/Units::mm ; + + G4Tubs *tubs = dynamic_cast<G4Tubs *> (sliceSolid); + if (tubs) { + double dz = tubs->GetDz()/Units::mm; + if (sliceZ > 0) { + if (fabs(sliceZ)>dz/2.0) { + (*subgap) = 0; + } + else { + dz=1; + (*subgap) = 1; + } + } + else { + if (fabs(sliceZ)>dz/2.0) { + (*subgap) = 3; + dz=3; + } + else { + (*subgap) = 2; + } + } + } + } + + + + // Get: sampling, region, eta and phi: + + //--- SAMPLING --- + // initialize value to something invalid, so we won't accidentally mis-assign something: + int sampling=-1; + sampling = (depthIndex==0 ? 0 : (depthIndex<3 ? 1 : (depthIndex<5 ? 2 : 3))); + + + //---REGION, ETA --- + int ieta = -1; + int iregion = ( moduleY>= m_maxval[depthIndex][1][0] ) ? 0 : 1 ; + for (int ie=0; ie<10; ie++) { + if ( moduleY > m_minval[depthIndex][iregion][ie] && + moduleY<= m_maxval[depthIndex][iregion][ie] ) + { + ieta = ie; + break; + } + } + + + // Take care of very outside eta identifiers of hits that can + // sometimes be a wee bit outside the boundaries + if (ieta<0){ + int ietaMin[7] = {3,2,2,2,2,3,3}; + int ietaMax[7] = {0,0,1,1,2,2,3}; + if (moduleY>=m_rOuter) ieta = ietaMax[depthIndex]; + else if ((depthIndex==0 && moduleY<m_rInner1 ) || + (depthIndex>0 && moduleY<m_rInner2 )) ieta = ietaMin[depthIndex]; + } + + + + //--- PHI --- + int iphi=-1; + if(iregion == 1) iphi = moduleIndex; + else + { + iphi = 2*moduleIndex; + if(zSide * modulePosition.x() > 0) iphi++; + } + + + //--- Assign identifier according the the volumes we are in: + + if ( g_type==kWheelActive || g_type==kWheelInactive ) + { + LArG4Identifier result = LArG4Identifier(); + + result << 4 // LAr + << 2 // HEC + << 2*zSide // z-side + << sampling // sampling + << iregion // region + << ieta // ieta + << iphi ; // iphi + + return result; + } + + else // (has to be dead) + { + int itype = 2; + if ( volumeName.contains("LArMgr::LAr::HEC::Module::Depth::FirstAbsorber") ) { + itype = 1; + sampling = 2; + iphi = moduleIndex; + if(iregion==1) { + ieta += 10; + } + iphi = 2*moduleIndex; + if(zSide * modulePosition.x() > 0) iphi++; + if(ieta<0) ieta = 0; + if(ieta>17) ieta = 17; + if(depthIndex < 3) iregion = 3; else iregion = 4; + } else { + if(iregion==0) { + iregion=2; iphi /= 2; + } else { iregion=3; }// diference in regions and phi for DM + } #ifdef DEBUG_DEAD - std::cout<<"Dead phi: "<<globalPosition.getPhi() <<" index: " - <<iphi<<" eta: "<<globalPosition.getEta() <<" ieta: " - <<ieta<<" itype: "<<itype<<" iregion: "<<iregion<<std::endl; - std::cout<<"Name: "<<volumeName<<std::endl; + std::cout<<"Dead phi: "<<globalPosition.getPhi() <<" index: " + <<iphi<<" eta: "<<globalPosition.getEta() <<" ieta: " + <<ieta<<" itype: "<<itype<<" iregion: "<<iregion<<std::endl; + std::cout<<"Name: "<<volumeName<<std::endl; #endif - LArG4Identifier result = LArG4Identifier(); - result << 10 // Calo - << 4*zSide // LAr - << itype // DM type - << sampling // sampling - << iregion // region - << ieta // ieta - << iphi ; // iphi - - return result; - } - - } // End of if we are in a Depth - + LArG4Identifier result = LArG4Identifier(); + result << 10 // Calo + << 4*zSide // LAr + << itype // DM type + << sampling // sampling + << iregion // region + << ieta // ieta + << iphi ; // iphi + + return result; + } + + } // End of if we are in a Depth + //======================================================== //---------- All that's left are DEAD Volumes ------------------------------- else - { - - // If we are not in a Depth, we have to make use of either - // Wheel Coordinates (in case the Wheels are independent without a Mother) - // or Mother Coordinates (only in case there is a Mother and the hit is actually in it) - - - // For z, r and PHI , use either mother or wheel coordinates: - // For ETA: - // Get the ideal HEC eta for the inter-moduel crack: - // m_hecManager->getFocalToRef() = 4270 ...that's the start of the ideal HEC envelope - // (no database access to this: 4277 ...is the start of the actual ideal HEC - // in any case; this number is only used to get some ideal eta assignment. - // it is NOT geometry- or alignmnet-dependent! - double zed =0. ; - double radius =0. ; - double phi =0. ; - int hecCopy = -1; - double idealEta = -1.; - double idealZ = 0.; - - if (m_inMother) { - zed = motherPosition.z(); - radius = motherPosition.perp(); - phi = ( (zSide<0.) ? - ((motherPosition.getPhi() > 0.0) ? (M_PI-motherPosition.getPhi()) : (-M_PI-motherPosition.getPhi())) - : motherPosition.getPhi()); - idealZ = zed + 4277.; - idealEta = -log ( tan( atan(radius/idealZ) / 2.)); - } - else { - hecCopy= theTouchable->GetHistory()->GetVolume(m_g4historyDepth)->GetCopyNo(); - zed = wheelPosition.z(); - radius = wheelPosition.perp(); - phi = ( (zSide<0.) ? - ((wheelPosition.getPhi() > 0.0) ? (M_PI-wheelPosition.getPhi()) : (-M_PI-wheelPosition.getPhi())) - : wheelPosition.getPhi()); - // See whether we are in Front or Rear wheel: - zed = (hecCopy<1) ? (zed ) : (zed+s_wheel1+s_betweenWheels); - idealZ = zed + 4277.; - idealEta = -log ( tan( atan(radius/idealZ) / 2.)); - - } - - // --- PHI --- - // For phi need to consider opposite sense for the negative z-side (that's the same for mother/wheel): - phi = (phi<0) ? (phi+2.*M_PI) : phi; + { + + // If we are not in a Depth, we have to make use of either + // Wheel Coordinates (in case the Wheels are independent without a Mother) + // or Mother Coordinates (only in case there is a Mother and the hit is actually in it) + + + // For z, r and PHI , use either mother or wheel coordinates: + // For ETA: + // Get the ideal HEC eta for the inter-moduel crack: + // m_hecManager->getFocalToRef() = 4270 ...that's the start of the ideal HEC envelope + // (no database access to this: 4277 ...is the start of the actual ideal HEC + // in any case; this number is only used to get some ideal eta assignment. + // it is NOT geometry- or alignmnet-dependent! + double zed =0. ; + double radius =0. ; + double phi =0. ; + int hecCopy = -1; + double idealEta = -1.; + double idealZ = 0.; + + if (inMother) { + zed = motherPosition.z(); + radius = motherPosition.perp(); + phi = ( (zSide<0.) ? + ((motherPosition.getPhi() > 0.0) ? (M_PI-motherPosition.getPhi()) : (-M_PI-motherPosition.getPhi())) + : motherPosition.getPhi()); + idealZ = zed + 4277.; + idealEta = -log ( tan( atan(radius/idealZ) / 2.)); + } + else { + hecCopy= theTouchable->GetHistory()->GetVolume(m_g4historyDepth)->GetCopyNo(); + zed = wheelPosition.z(); + radius = wheelPosition.perp(); + phi = ( (zSide<0.) ? + ((wheelPosition.getPhi() > 0.0) ? (M_PI-wheelPosition.getPhi()) : (-M_PI-wheelPosition.getPhi())) + : wheelPosition.getPhi()); + // See whether we are in Front or Rear wheel: + zed = (hecCopy<1) ? (zed ) : (zed+m_wheel1+m_betweenWheels); + idealZ = zed + 4277.; + idealEta = -log ( tan( atan(radius/idealZ) / 2.)); + + } + + // --- PHI --- + // For phi need to consider opposite sense for the negative z-side (that's the same for mother/wheel): + phi = (phi<0) ? (phi+2.*M_PI) : phi; int iphi = int(phi*(32/M_PI)); #ifdef DEBUG_DEAD - std::cout<<"Dead global phi: "<<globalPosition.getPhi() - <<" mother phi: " << motherPosition.getPhi() - <<" wheel phi: " << wheelPosition.getPhi() - <<" phi: "<<phi<<" index: "<<iphi<<std::endl; + std::cout<<"Dead global phi: "<<globalPosition.getPhi() + <<" mother phi: " << motherPosition.getPhi() + <<" wheel phi: " << wheelPosition.getPhi() + <<" phi: "<<phi<<" index: "<<iphi<<std::endl; #endif - - - //=========================================================================== - // Now we have to be careful again, because zed is diffrent, depending - // on if we are inside a mother or not! - int type = -1; - int sampling= -1; - int region = -1; + //=========================================================================== + + // Now we have to be careful again, because zed is diffrent, depending + // on if we are inside a mother or not! + + int type = -1; + int sampling= -1; + int region = -1; int ieta = -1; - // --- TYPE, SAMPLING, REGION --- + // --- TYPE, SAMPLING, REGION --- + - //--- outside or behind HEC: - if ( radius >= s_rOuter ) { - if(idealEta < 1.7) { - ieta = int((idealEta - 1.0)/0.1); - type=1 ; sampling=2; region=5; - } - else { - ieta = int((idealEta - 1.7)/0.1); - type=1 ; sampling=3; region=0; - } + if ( radius >= m_rOuter ) { + if(idealEta < 1.7) { + ieta = int((idealEta - 1.0)/0.1); + type=1 ; sampling=2; region=5; + } + else { + ieta = int((idealEta - 1.7)/0.1); + type=1 ; sampling=3; region=0; + } + } + //--- behind HEC: + else if ( zed >= m_hecLength ) { + ieta = int((idealEta - 1.7)/0.1); + type=1 ; sampling=3; region=0; } - //--- behind HEC: - else if ( zed >= s_hecLength ) { - ieta = int((idealEta - 1.7)/0.1); - type=1 ; sampling=3; region=0; - } //--- in front of HEC: - else if ( zed <= s_firstAbsThickness[0] && radius >s_rInner1 ) { - ieta = int((idealEta - 1.5)/0.1); - type=1 ; sampling=2; region=3; - } + else if ( zed <= m_firstAbsThickness[0] && radius >m_rInner1 ) { + ieta = int((idealEta - 1.5)/0.1); + type=1 ; sampling=2; region=3; + } //--- in bewteen the two HECs: - else if ( zed >= s_wheel1 && zed <=s_startHec2 && radius<s_rOuter && radius >s_rInner2 ) { - ieta = int((idealEta - 1.5)/0.1); - type=1 ; sampling=2; region=4; - } + else if ( zed >= m_wheel1 && zed <=m_startHec2 && radius<m_rOuter && radius >m_rInner2 ) { + ieta = int((idealEta - 1.5)/0.1); + type=1 ; sampling=2; region=4; + } //--- inside the HEC or between HEC and FCAL: - else - { - type=2; - - int iDepth =-1; - for (int depthIndex=0; depthIndex<7; depthIndex++) { - if (zed <= s_depthSum[depthIndex]) { iDepth = depthIndex; break; } - } + else + { + type=2; + + int iDepth =-1; + for (int depthIndex=0; depthIndex<7; depthIndex++) { + if (zed <= m_depthSum[depthIndex]) { iDepth = depthIndex; break; } + } if(iDepth < 0) { // this should not happen (previous tests on zed should guarantee, but to make Coverity happy - iDepth = 6; + iDepth = 6; } - // for inner HEC region or HEC/FCAL region: - sampling = (iDepth==0 ? 0 : (iDepth<3 ? 1 : (iDepth<5 ? 2 : 3))); - iphi = int(32*phi/(2.*M_PI)); - region = (( radius>= s_maxval[iDepth][1][0] ) ? 2 : 3 ); - if (region==3) ieta = int((idealEta-2.5)/0.2) ; - else ieta = int((idealEta-1.5)/0.2) ; - if (iDepth>0 && radius <= s_rInner2 ) { region = 4 ; ieta=0; iphi = int(phi*(32/M_PI));} // between HEC and FCAL - else if (iDepth==0 && radius <= s_rInner1 ) { region = 4 ; ieta=0; iphi = int(phi*(32/M_PI));} // between HEC and FCAL + // for inner HEC region or HEC/FCAL region: + sampling = (iDepth==0 ? 0 : (iDepth<3 ? 1 : (iDepth<5 ? 2 : 3))); + iphi = int(32*phi/(2.*M_PI)); + region = (( radius>= m_maxval[iDepth][1][0] ) ? 2 : 3 ); + if (region==3) ieta = int((idealEta-2.5)/0.2) ; + else ieta = int((idealEta-1.5)/0.2) ; + if (iDepth>0 && radius <= m_rInner2 ) { region = 4 ; ieta=0; iphi = int(phi*(32/M_PI));} // between HEC and FCAL + else if (iDepth==0 && radius <= m_rInner1 ) { region = 4 ; ieta=0; iphi = int(phi*(32/M_PI));} // between HEC and FCAL - } + } - - if(ieta<0) ieta = 0; // stupid hack, until we solve everything + + if(ieta<0) ieta = 0; // FIXME stupid hack, until we solve everything if(iphi>63) iphi = 63; - - LArG4Identifier result = LArG4Identifier(); - result << 10 // Calo - << 4*zSide // LAr - << type // type - << sampling // sampling - << region // region - << ieta // ieta - << iphi ; // iphi - - return result; - - } - + + LArG4Identifier result = LArG4Identifier(); + result << 10 // Calo + << 4*zSide // LAr + << type // type + << sampling // sampling + << region // region + << ieta // ieta + << iphi ; // iphi + + return result; + + } + } // end calculateIdentifier } // namespace HEC } // namespace LArG4 - diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECCalculator.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECCalculator.cc deleted file mode 100755 index 54df916b2bcab2cfb02ae6cba5ce18ac33834cf3..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECCalculator.cc +++ /dev/null @@ -1,149 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// LArHECCalculator -// Revision history: - -// 31-May-2002 : Karapetian Gaiane - -// 13-Jan-2004 WGS: Now uses LArG4::HEC::Geometry for the Identifier calculations. - -#undef DEBUG_HITS - -#include "LArG4HEC/LArHECCalculator.h" -#include "LArG4HEC/Geometry.h" - -#include "LArG4Code/LArG4Identifier.h" - -#include "G4ThreeVector.hh" -#include "G4StepPoint.hh" -#include "G4Step.hh" - -#include "RDBAccessSvc/IRDBAccessSvc.h" -#include "RDBAccessSvc/IRDBRecord.h" -#include "RDBAccessSvc/IRDBRecordset.h" -#include "GeoModelInterfaces/IGeoModelSvc.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/Bootstrap.h" -#include "StoreGate/StoreGateSvc.h" -#include "AthenaKernel/Units.h" -// Standard implementation of a singleton pattern. - -namespace Units = Athena::Units; - -LArHECCalculator* LArHECCalculator::m_instance = 0; - -LArHECCalculator* LArHECCalculator::GetCalculator() -{ - if (m_instance == 0) - { - m_instance = new LArHECCalculator(); - } - return m_instance; -} - - -LArHECCalculator::LArHECCalculator() -{ - - - StatusCode status; - // Access the GeoModelSvc: - ISvcLocator *svcLocator = Gaudi::svcLocator(); - IGeoModelSvc *geoModel; - status = svcLocator->service ("GeoModelSvc",geoModel); - if (status != StatusCode::SUCCESS) { - throw std::runtime_error ("Cannot locate GeoModelSvc!!"); - } - - // Access the geometry database: - IRDBAccessSvc *pAccessSvc; - status=svcLocator->service("RDBAccessSvc",pAccessSvc); - if (status != StatusCode::SUCCESS) { - throw std::runtime_error ("Cannot locate RDBAccessSvc!!"); - } - - // Obtain the geometry version information: - - std::string AtlasVersion = geoModel->atlasVersion(); - std::string LArVersion = geoModel->LAr_VersionOverride(); - - std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion; - std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr"; - - - IRDBRecordset *emecGeometry = const_cast<IRDBRecordset*> (pAccessSvc->getRecordset("EmecGeometry",detectorKey, detectorNode)); - if (emecGeometry->size()==0) { - throw std::runtime_error("Cannot find the EmecGeometry Table"); - } - - // Constructor initializes the geometry. - - // Make sure we don't have any undefined values. - //m_identifier = LArG4Identifier(); - //m_time = 0.; - //m_energy = 0.; - m_isInTime = false; - - // Initialize the geometry calculator. - m_geometry = LArG4::HEC::Geometry::GetInstance(); - - // By default, assume no charge-collection. - m_chargeCollection = false; - - // Get the endcap shift and out-of-time cut from the detector - // description routine. - //get the endcap shift - m_zShift = (*emecGeometry)[0]->getDouble("ZSHIFT")*CLHEP::cm; - m_OOTcut = 2.5*CLHEP::ns; -} - -G4bool LArHECCalculator::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) -{ - // Given a G4Step, find the sampling, region, eta bin, and phi bin - // in the LAr HEC associated with that point. - - // Note that we don't do any range checking; it is assumed that p - // lies within the LAr endcap. But we do have debug checks via asserts. - - // 29-Mar-2002 WGS: this method now returns a boolean. If it's - // true, the hit is valid; if it's false, there was some problem - // with the hit and it should be ignored. - - // Make sure that vector is cleared - hdata.clear(); - // First, get the energy. - hdata[0].energy = a_step->GetTotalEnergyDeposit(); - - // Find out how long it took the energy to get here. - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); - G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - G4double timeOfFlight = (pre_step_point->GetGlobalTime() + - post_step_point->GetGlobalTime()) * 0.5; - G4ThreeVector startPoint = pre_step_point->GetPosition(); - G4ThreeVector endPoint = post_step_point->GetPosition(); - G4ThreeVector p = (startPoint + endPoint) * 0.5; - - hdata[0].time = timeOfFlight/Units::ns - p.mag()/Units::c_light/Units::ns; - if (hdata[0].time > m_OOTcut) - m_isInTime = false; - else - m_isInTime = true; - - // Calculate the identifier. - hdata[0].id = m_geometry->CalculateIdentifier( a_step ); - -#ifdef DEBUG_HITS - std::cout << "LArHECCalculator::Process " - << " ID=" << std::string(m_identifier) - << " energy=" << m_energy - << std::endl; -#endif - - // Check for any problems. - if ( hdata[0].id == LArG4Identifier() ) - return false; - - return true; -} diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECCalibrationWheelCalculator.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECCalibrationWheelCalculator.cc old mode 100755 new mode 100644 index b89e8a711d823015047dd3b15868d6c86f2ad968..8a3a014d79047f4847e870ee6fa6a2689ea32203 --- a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECCalibrationWheelCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECCalibrationWheelCalculator.cc @@ -2,12 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4HEC/LArHECCalibrationWheelCalculator.h" +#include "LArHECCalibrationWheelCalculator.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/Bootstrap.h" -#include "StoreGate/StoreGateSvc.h" -#include "AthenaKernel/getMessageSvc.h" +#include "LArG4HEC/IHECGeometry.h" #include "G4Step.hh" #include "G4TouchableHistory.hh" @@ -20,49 +17,66 @@ namespace LArG4 { namespace HEC { - LArHECCalibrationWheelCalculator::LArHECCalibrationWheelCalculator(const eHECGeometryType type) { - - StoreGateSvc* detStore; - ISvcLocator *svcLocator = Gaudi::svcLocator(); - StatusCode status = svcLocator->service("DetectorStore", detStore); - MsgStream log(Athena::getMessageSvc(),"LArHECWheelCalculator" ); - if(status != StatusCode::SUCCESS ) { - log << MSG::ERROR << "No DetStore available !!" << endmsg; - } + LArHECCalibrationWheelCalculator::LArHECCalibrationWheelCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_geometryCalculator("HECGeometry",name) //FIXME LArG4::HEC::HECGeometry + , m_geometryTypeProp(0) + , m_geometryType(kWheelActive) + { + declareProperty("GeometryCalculator",m_geometryCalculator); + declareProperty("GeometryType",m_geometryTypeProp); + m_geometryTypeProp.declareUpdateHandler(&LArHECCalibrationWheelCalculator::GeometryTypeUpdateHandler, this); + } - log << MSG::INFO << "Use the LArHECCalibrationWheelCalculator for the HEC" << endmsg; + void LArHECCalibrationWheelCalculator::GeometryTypeUpdateHandler(Property&) + { + switch(m_geometryTypeProp.value()) + { + case 0: m_geometryType = kWheelActive; break; + case 1: m_geometryType = kWheelInactive; break; + case 2: m_geometryType = kWheelDead; break; + default: + std::ostringstream merr; + merr << + "LArHECCalibrationWheelCalculator::GeometryTypeUpdateHandler FATAL: invalid eHECGeometryType specified " + << m_geometryTypeProp.value(); + std::cerr << merr.str() << std::endl; + throw GaudiException(merr.str(), "LArHECCalibrationWheelCalculator::GeometryTypeUpdateHandler", StatusCode::FAILURE); + } - // Initialize the geometry calculator. - m_geometryCalculator = HECGeometry::GetInstance(); - m_geometryType = type; } + StatusCode LArHECCalibrationWheelCalculator::initialize() { - LArHECCalibrationWheelCalculator::~LArHECCalibrationWheelCalculator() { + ATH_MSG_INFO("Use the LArHECCalibrationWheelCalculator for the HEC"); + ATH_CHECK(m_geometryCalculator.retrieve()); + return StatusCode::SUCCESS; } + LArHECCalibrationWheelCalculator::~LArHECCalibrationWheelCalculator() { + } - G4bool LArHECCalibrationWheelCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) { - - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } + G4bool LArHECCalibrationWheelCalculator::Process(const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process) const + { + if ( process == kEnergyAndID || process == kOnlyEnergy ) + { + m_energyCalculator.Energies( step, energies ); + } else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); - - - - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. - - m_identifier = m_geometryCalculator->CalculateIdentifier(a_step, m_geometryType ); - + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); + + + + if ( process == kEnergyAndID || process == kOnlyID ) + { + // Calculate the identifier. + + identifier = m_geometryCalculator->CalculateIdentifier(step, m_geometryType ); + // Check for bad result. - if ( m_identifier == LArG4Identifier() ) return false; + if ( identifier == LArG4Identifier() ) return false; return true; } diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECCalibrationWheelCalculator.h b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECCalibrationWheelCalculator.h new file mode 100644 index 0000000000000000000000000000000000000000..a9e5562d453f333b439b2b249051a66562665bf4 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECCalibrationWheelCalculator.h @@ -0,0 +1,52 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// Jan-2008: (M.Fincke) To be used for new Module-Geometry + +#ifndef LArG4_HEC_LArHECCalibrationWheelCalculator_H +#define LArG4_HEC_LArHECCalibrationWheelCalculator_H + +#include "LArG4HEC/IHECGeometry.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" +#include "LArG4Code/LArG4Identifier.h" +#include "CaloG4Sim/SimulationEnergies.h" + +#include "globals.hh" + +#include <vector> + +// Forward declaractions: +class G4Step; + +namespace LArG4 { + + namespace HEC { + + class LArHECCalibrationWheelCalculator : public LArCalibCalculatorSvcImp { + public: + + LArHECCalibrationWheelCalculator(const std::string& name, ISvcLocator *pSvcLocator); + void GeometryTypeUpdateHandler(Property&); + StatusCode initialize() override final; + virtual ~LArHECCalibrationWheelCalculator(); + + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process = kEnergyAndID) const override final; + private: + + ServiceHandle<IHECGeometry> m_geometryCalculator; + UnsignedShortProperty m_geometryTypeProp; + eHECGeometryType m_geometryType; + //std::string m_strgeometryType; + + CaloG4::SimulationEnergies m_energyCalculator; + + }; + + } // namespace HEC + +} // namespace LArG4 + +#endif // LArG4_HEC_LArHECCalibrationWheelCalculator_H diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECLocalCalculator.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECLocalCalculator.cc old mode 100755 new mode 100644 index 8959917666ca4fcdabd648d99fa7d717b3e05efc..5380a3ffd207d70d829432b3a3126b18f4b2c156 --- a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECLocalCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECLocalCalculator.cc @@ -2,13 +2,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4HEC/LArHECLocalCalculator.h" +#include "LArHECLocalCalculator.h" #include "LArG4HEC/LocalGeometry.h" -#include "LArG4RunControl/LArG4GlobalOptions.h" -#include "LArG4RunControl/LArG4HECOptions.h" - #include "G4ThreeVector.hh" #include "G4StepPoint.hh" #include "G4Step.hh" @@ -18,7 +15,6 @@ #include "G4TouchableHistory.hh" #include "LArG4Code/LArG4BirksLaw.h" -#include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/Bootstrap.h" #include "StoreGate/StoreGateSvc.h" #include "AthenaKernel/Units.h" @@ -30,78 +26,43 @@ namespace Units = Athena::Units; #undef DEBUG_HITS -// Standard implementation of a singleton pattern. -LArHECLocalCalculator* LArHECLocalCalculator::m_instance = 0; -G4bool LArHECLocalCalculator::m_isX = false; -LArHECLocalCalculator* LArHECLocalCalculator::GetCalculator() +LArHECLocalCalculator::LArHECLocalCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalculatorSvcImp(name, pSvcLocator) + , m_Geometry("LocalHECGeometry", name) + , m_birksLaw(nullptr) + , m_isX(false) { - if (m_instance == 0) - { - m_instance = new LArHECLocalCalculator(); - } - return m_instance; + declareProperty("GeometryCalculator", m_Geometry); + declareProperty("IsX", m_isX); } - -LArHECLocalCalculator::LArHECLocalCalculator() - ://m_identifier(),m_time(0),m_energy(0), - m_isInTime(false),m_birksLaw(NULL) +StatusCode LArHECLocalCalculator::initialize() { - StoreGateSvc* detStore; - LArG4GlobalOptions *globalOptions=NULL; - LArG4HECOptions *hecOptions=NULL; - ISvcLocator *svcLocator = Gaudi::svcLocator(); - StatusCode status = svcLocator->service("DetectorStore", detStore); - - if(status.isSuccess()){ - status = detStore->retrieve(globalOptions, "LArG4GlobalOptions"); - if(status.isFailure()){ - throw std::runtime_error("LArHECLocalCalculator: cannot retrieve LArG4GlobalOptions"); - } - status = detStore->retrieve(hecOptions, "LArG4HECOptions"); - if(status.isFailure()){ - // throw std::runtime_error("LArHECLocalCalculator: cannot retrieve LArG4HECOptions"); - } - } else { - throw std::runtime_error("LArHECLocalCalculator: cannot initialize StoreGate interface"); - } - status = svcLocator->service("MessageSvc", m_msgSvc); - if(status.isFailure()) m_msgSvc = 0; - if(m_msgSvc) { - MsgStream log(m_msgSvc,"LArHECLocalCalculator"); - log << MSG::INFO << "Constructing Calculator " << endmsg; - } - - m_OOTcut = globalOptions->OutOfTimeCut(); - - m_isX = false; - - m_Geometry = LArG4::HEC::LocalGeometry::GetInstance(); - m_Geometry->SetX(m_isX); - - if (hecOptions) { - if (hecOptions->HECBirksLaw()) { - const double Birks_LAr_density = 1.396; - const double Birks_k = hecOptions->HECBirksk(); - m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,Birks_k); - } - } -} + StoreGateSvc* detStore(nullptr); + ATH_CHECK(svcLocator->service("DetectorStore", detStore)); + ATH_MSG_DEBUG("Constructing LArHECLocalCalculator"); -LArHECLocalCalculator::~LArHECLocalCalculator() -{ - delete m_birksLaw; + ATH_CHECK(m_Geometry.retrieve()); + + if (m_BirksLaw) + { + const double Birks_LAr_density = 1.396; + m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,m_Birksk); + } + + return StatusCode::SUCCESS; } -void LArHECLocalCalculator::SetX(bool x){ - m_Geometry->SetX(x); - m_isX = x; +StatusCode LArHECLocalCalculator::finalize() +{ + if(m_birksLaw) delete m_birksLaw; + return StatusCode::SUCCESS; } -G4bool LArHECLocalCalculator::Process(const G4Step* a_step, int depthadd, double deadzone, std::vector<LArHitData>& hdata) +G4bool LArHECLocalCalculator::Process(const G4Step* a_step, int depthadd, double deadzone, std::vector<LArHitData>& hdata) const { // make sure vector is clear @@ -118,21 +79,16 @@ G4bool LArHECLocalCalculator::Process(const G4Step* a_step, int depthadd, double // Find out how long it took the energy to get here. G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - G4double timeOfFlight = (pre_step_point->GetGlobalTime() + + G4double timeOfFlight = (pre_step_point->GetGlobalTime() + post_step_point->GetGlobalTime()) * 0.5; G4ThreeVector startPoint = pre_step_point->GetPosition(); G4ThreeVector endPoint = post_step_point->GetPosition(); G4ThreeVector p = (startPoint + endPoint) * 0.5; - - hdata[0].time = timeOfFlight/Units::ns - p.mag()/Units::c_light/Units::ns; - if (hdata[0].time > m_OOTcut) - m_isInTime = false; - else - m_isInTime = true; + + hdata[0].time = (timeOfFlight - p.mag()/CLHEP::c_light)/Units::ns; // Calculate the identifier. hdata[0].id = m_Geometry->CalculateIdentifier( a_step, LArG4::HEC::kLocActive, depthadd, deadzone); // std::cout<<"LArHECLocalCalculator::Process "<<depthadd<<std::endl; return true; } - diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECLocalCalculator.h b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECLocalCalculator.h new file mode 100644 index 0000000000000000000000000000000000000000..3c754d9aed8aec18a76e51cfaff067dec5d3c154 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECLocalCalculator.h @@ -0,0 +1,64 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// LArG4HECLocalCalculator.hh + +// Revision history: + +// 17-Feb-2006 : Pavol Strizenec + +#ifndef __LArG4HECLocalCalculator_H__ +#define __LArG4HECLocalCalculator_H__ + +//#include "globals.hh" +//#include "G4ThreeVector.hh" +#include "LArG4Code/LArG4Identifier.h" +#include "LArG4Code/LArCalculatorSvcImp.h" +#include <stdexcept> +#include "CLHEP/Units/SystemOfUnits.h" + + +// Forward declarations. +class G4Step; +class LArG4BirksLaw; + +namespace LArG4 { + namespace HEC { + class ILocalGeometry; + } +} + +class LArHECLocalCalculator : virtual public LArCalculatorSvcImp { + +public: + + LArHECLocalCalculator(const std::string& name, ISvcLocator * pSvcLocator); + virtual StatusCode initialize() override final; + virtual StatusCode finalize() override final; + virtual ~LArHECLocalCalculator(){}; + + virtual G4float OOTcut() const override final { return m_OOTcut; } + + virtual G4bool Process(const G4Step* a_step, std::vector<LArHitData>& hdata) const override final { return this->Process(a_step,0, 4.*CLHEP::mm, hdata);} + virtual G4bool Process(const G4Step* a_step, int depthadd, double deadzone, std::vector<LArHitData>& hdata) const final; //FIXME not part of interface... + + // Check if the current hitTime is in-time + virtual G4bool isInTime(G4double hitTime) const override final + { + return !(hitTime > m_OOTcut); //FIXME should we be checking the absolute value of hitTime here? + } + + +private: + + ServiceHandle<LArG4::HEC::ILocalGeometry> m_Geometry; + + LArG4BirksLaw *m_birksLaw; + G4bool m_isX; + + LArHECLocalCalculator (const LArHECLocalCalculator&); + LArHECLocalCalculator operator= (const LArHECLocalCalculator&); +}; + +#endif diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECWheelCalculator.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECWheelCalculator.cc old mode 100755 new mode 100644 index 63efb0f4cc55d8c41b6da832fdcde62a96c0ef05..e23a5bcb6546e8888b4f1e8ac71a5fd2f1bd3932 --- a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECWheelCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECWheelCalculator.cc @@ -2,14 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4HEC/LArHECWheelCalculator.h" -#include "LArG4HEC/HECGeometry.h" +#include "LArHECWheelCalculator.h" +#include "LArG4HEC/IHECGeometry.h" -#include "LArG4RunControl/LArG4GlobalOptions.h" -#include "LArG4RunControl/LArG4HECOptions.h" -#include "LArG4RunControl/LArG4HECOptions.h" - - #include "LArReadoutGeometry/LArDetectorManager.h" #include "LArReadoutGeometry/HECDetectorManager.h" #include "LArReadoutGeometry/HECDetectorRegion.h" @@ -25,10 +20,8 @@ #include "G4AffineTransform.hh" #include "G4TouchableHistory.hh" #include "LArG4Code/LArG4BirksLaw.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/Bootstrap.h" #include "StoreGate/StoreGateSvc.h" -#include "AthenaKernel/getMessageSvc.h" +#include "StoreGate/StoreGate.h" #include "AthenaKernel/Units.h" #include "globals.hh" @@ -38,85 +31,55 @@ namespace Units = Athena::Units; #undef DEBUG_HITS -// Standard implementation of a singleton pattern. - -LArHECWheelCalculator* LArHECWheelCalculator::m_instance = 0; -LArHECWheelCalculator* LArHECWheelCalculator::GetCalculator() +LArHECWheelCalculator::LArHECWheelCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalculatorSvcImp(name, pSvcLocator) + , m_Geometry("HECGeometry",name) //FIXME LArG4::HEC::HECGeometry + , m_DetectorManager(nullptr) + , m_birksLaw(nullptr) + , m_doHV(false) { - if (m_instance == 0) - { - m_instance = new LArHECWheelCalculator(); - } - return m_instance; + declareProperty("GeometryCalculator",m_Geometry); + declareProperty("HECHVEnable",m_doHV); } -LArHECWheelCalculator::~LArHECWheelCalculator() { - delete m_birksLaw; +LArHECWheelCalculator::~LArHECWheelCalculator() +{ + if(m_birksLaw) delete m_birksLaw; } -LArHECWheelCalculator::LArHECWheelCalculator() - :m_msgSvc(0), - //m_identifier(),m_time(0),m_energy(0), - m_isInTime(false), m_birksLaw(NULL) +StatusCode LArHECWheelCalculator::initialize() { - StoreGateSvc* detStore; - LArG4GlobalOptions *globalOptions=NULL; - LArG4HECOptions *hecOptions=NULL; - - ISvcLocator *svcLocator = Gaudi::svcLocator(); - StatusCode status = svcLocator->service("DetectorStore", detStore); - - if(status.isSuccess()){ - status = detStore->retrieve(globalOptions, "LArG4GlobalOptions"); - if(status.isFailure()){ - throw std::runtime_error("LArHECWheelCalculator: cannot retrieve LArG4GlobalOptions"); - } - status = detStore->retrieve(hecOptions, "LArG4HECOptions"); - if(status.isFailure()){ - // throw std::runtime_error("LArHECWheelCalculator: cannot retrieve LArG4HECOptions"); - } - } else { - throw std::runtime_error("LArHECWheelCalculator: cannot initialize StoreGate interface"); - } - - MsgStream log(Athena::getMessageSvc(),"LArHECWheelCalculator" ); - log << MSG::INFO << "Use the LArHECWheelCalculator for the HEC" << endmsg; - - m_OOTcut = globalOptions->OutOfTimeCut(); - - m_Geometry = LArG4::HEC::HECGeometry::GetInstance(); - m_DetectorManager=NULL; - - if (hecOptions) { - if (hecOptions->HECBirksLaw()) { - const double Birks_LAr_density = 1.396; - const double Birks_k = hecOptions->HECBirksk(); - m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,Birks_k); - - if (hecOptions->HECHVEnable()) { - const LArDetectorManager *manager=NULL; - if (detStore->retrieve(manager)!=StatusCode::SUCCESS) { - throw std::runtime_error("Cannot locate HEC Manager"); - } - else { - m_DetectorManager=manager->getHecManager(); - } - } - } - } + ATH_MSG_DEBUG("Use the LArHECWheelCalculator for the HEC"); + + ATH_CHECK(m_Geometry.retrieve()); + + if (m_BirksLaw) + { + const double Birks_LAr_density = 1.396; + m_birksLaw = new LArG4BirksLaw(Birks_LAr_density,m_Birksk); + } + + if(m_doHV) + { + const LArDetectorManager *manager=nullptr; + StoreGateSvc *detStore = StoreGate::pointer("DetectorStore"); + ATH_CHECK(detStore->retrieve(manager)); + m_DetectorManager=manager->getHecManager(); + } + return StatusCode::SUCCESS; } -G4bool LArHECWheelCalculator::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) +G4bool LArHECWheelCalculator::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) const { // make sure hdata is reset hdata.resize(1); // First, get the energy. hdata[0].energy = a_step->GetTotalEnergyDeposit(); - + // apply BirksLaw if we want to: G4double stepLengthCm = a_step->GetStepLength() / Units::cm; @@ -125,16 +88,11 @@ G4bool LArHECWheelCalculator::Process(const G4Step* a_step, std::vector<LArHitDa // Find out how long it took the energy to get here. G4double timeOfFlight = 0.5* ( a_step->GetPreStepPoint()->GetGlobalTime() - + a_step->GetPostStepPoint()->GetGlobalTime() ); + + a_step->GetPostStepPoint()->GetGlobalTime() ); G4ThreeVector point = 0.5* ( a_step->GetPreStepPoint()->GetPosition() - + a_step->GetPostStepPoint()->GetPosition() ); - - hdata[0].time = timeOfFlight/Units::ns - point.mag()/Units::c_light/Units::ns; + + a_step->GetPostStepPoint()->GetPosition() ); - if (hdata[0].time > m_OOTcut) - m_isInTime = false; - else - m_isInTime = true; + hdata[0].time = (timeOfFlight - point.mag()/CLHEP::c_light)/Units::ns; // Calculate the identifier. int subgapIndex=0; @@ -148,7 +106,7 @@ G4bool LArHECWheelCalculator::Process(const G4Step* a_step, std::vector<LArHitDa int eta = hdata[0].id[5]; int phi = hdata[0].id[6]; - + if (m_DetectorManager) { const HECDetectorRegion *hecRegion=m_DetectorManager->getDetectorRegion(zSide<0? 0: 1, sampling, region); @@ -160,3 +118,7 @@ G4bool LArHECWheelCalculator::Process(const G4Step* a_step, std::vector<LArHitDa return true; } +StatusCode LArHECWheelCalculator::finalize() { + if(m_birksLaw) delete m_birksLaw; + return StatusCode::SUCCESS; +} diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LArHECWheelCalculator.h b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECWheelCalculator.h new file mode 100644 index 0000000000000000000000000000000000000000..9d017e3d9162aacc2ef8d1f0ef58204f3933bcc8 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LArHECWheelCalculator.h @@ -0,0 +1,64 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// LArHECWheelCalculator.hh + +// Revision history: + +// Jan-2008: (M.Fincke) To be used for new Module-Geometry + +#ifndef __LArG4HECWheelCalculator_H__ +#define __LArG4HECWheelCalculator_H__ + +#include "LArG4Code/LArG4Identifier.h" +#include "LArG4Code/LArCalculatorSvcImp.h" +#include <stdexcept> + +// Forward declarations. + +class G4Step; +class HECGeometry; +class LArG4BirksLaw; +class HECDetectorManager; + +namespace LArG4 { + namespace HEC { + class IHECGeometry; + } +} + + +class LArHECWheelCalculator : virtual public LArCalculatorSvcImp { +public: + + LArHECWheelCalculator(const std::string& name, ISvcLocator * pSvcLocator); + virtual StatusCode initialize() override final; + virtual StatusCode finalize() override final; + ~LArHECWheelCalculator(); + ///////////////////////////////////////////// + + virtual G4float OOTcut() const override final { return m_OOTcut; } + + virtual G4bool Process(const G4Step* a_step, std::vector<LArHitData>& hdata) const override final; + + // Check if the current hitTime is in-time + virtual G4bool isInTime(G4double hitTime) const override final + { + return !(hitTime > m_OOTcut); //FIXME should we be checking the absolute value of hitTime here? + } + + +private: + ServiceHandle<LArG4::HEC::IHECGeometry> m_Geometry; + const HECDetectorManager *m_DetectorManager; + + + LArG4BirksLaw *m_birksLaw; + bool m_doHV; + + LArHECWheelCalculator (const LArHECWheelCalculator&); + LArHECWheelCalculator& operator= (const LArHECWheelCalculator&); +}; + +#endif diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc old mode 100755 new mode 100644 index 3a4ac515624d03486dd1d8c8deb2d0f98b83dd97..fb867593ca756fa973ed1e7863c9a24fa31a76db --- a/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4HEC/LocalCalibrationCalculator.h" +#include "LocalCalibrationCalculator.h" #include "G4Step.hh" #include "G4TouchableHistory.hh" @@ -15,42 +15,83 @@ namespace LArG4 { namespace HEC { - LocalCalibrationCalculator::LocalCalibrationCalculator(const eLocalGeometryType type) { + LocalCalibrationCalculator::LocalCalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + , m_geometryCalculator("LocalHECGeometry",name) + , m_geometryType(kLocActive) + { + declareProperty("GeometryCalculator", m_geometryCalculator); + declareProperty("GeometryType",m_strgeometryType="ACTIVE"); + m_strgeometryType.declareUpdateHandler(&LocalCalibrationCalculator::GeometryTypeUpdateHandler, this); #ifdef DEBUG_HITS - std::cout << "LArG4::HEC::LocalCalibrationCalculator constructed" << std::endl; + std::cout << "LArG4::HEC::LocalCalibrationCalculator constructed" << std::endl; #endif - // Initialize the geometry calculator. - m_geometryCalculator = LocalGeometry::GetInstance(); - m_geometryType = type; + } + + void LocalCalibrationCalculator::GeometryTypeUpdateHandler(Property&) + { + std::string geoTypeString = m_strgeometryType.value(); + std::transform(geoTypeString.begin(), geoTypeString.end(),geoTypeString.begin(), ::toupper); + if(geoTypeString.find("DEAD") != std::string::npos) + { + m_geometryType=kLocDead; + } + else if (geoTypeString.find("INACTIVE") != std::string::npos) + { + m_geometryType=kLocInactive; + } + else if (geoTypeString.find("ACTIVE") != std::string::npos) + { + m_geometryType=kLocActive; + } + else + { + std::ostringstream merr; + merr << + "LArG4::HEC::LocalCalibrationCalculator::GeometryTypeUpdateHandler FATAL: invalid eHECGeometryType specified " + << geoTypeString; + std::cerr << merr.str() << std::endl; + throw GaudiException(merr.str(), "LArG4::HEC::LocalCalibrationCalculator::GeometryTypeUpdateHandler", StatusCode::FAILURE); + } + } + StatusCode LocalCalibrationCalculator::initialize() + { + // Initialize the geometry calculator. + ATH_CHECK(m_geometryCalculator.retrieve()); + + return StatusCode::SUCCESS; + } LocalCalibrationCalculator::~LocalCalibrationCalculator() { } - G4bool LocalCalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) { + G4bool LocalCalibrationCalculator::Process(const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process) const + { #ifdef DEBUG_HITS std::cout << "LArG4::HEC::LocalCalibrationCalculator::Process" << std::endl; #endif - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) + energies.clear(); + if ( process == kEnergyAndID || process == kOnlyEnergy ) { #ifdef DEBUG_HITS std::cout << " calling SimulationEnergies" << std::endl; #endif - m_energyCalculator.Energies( a_step, m_energies ); + m_energyCalculator.Energies( step, energies ); } else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); - if ( a_process == kEnergyAndID || a_process == kOnlyID ) + if ( process == kEnergyAndID || process == kOnlyID ) { // Calculate the identifier. - G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); + G4StepPoint* pre_step_point = step->GetPreStepPoint(); G4TouchableHistory* theTouchable = (G4TouchableHistory*) (pre_step_point->GetTouchable()); // Volume name G4String hitVolume = theTouchable->GetVolume(0)->GetName(); @@ -63,32 +104,32 @@ namespace LArG4 { } if(m_geometryType != kLocDead) { if(hitVolume=="Slice" ) { - m_identifier = m_geometryCalculator->CalculateIdentifier(a_step, kLocInactive, 0, 4.*CLHEP::mm); + identifier = m_geometryCalculator->CalculateIdentifier(step, kLocInactive, 0, 4.*CLHEP::mm); } else if(hitVolume=="Absorber" ) { - m_identifier = m_geometryCalculator->CalculateIdentifier(a_step, kLocInactive, 0, 2.*CLHEP::mm, 1.02*CLHEP::mm); + identifier = m_geometryCalculator->CalculateIdentifier(step, kLocInactive, 0, 2.*CLHEP::mm, 1.02*CLHEP::mm); } else if(hitVolume=="Electrode") { - m_identifier = m_geometryCalculator->CalculateIdentifier(a_step, kLocInactive, 1, 4.*CLHEP::mm); + identifier = m_geometryCalculator->CalculateIdentifier(step, kLocInactive, 1, 4.*CLHEP::mm); } else if(hitVolume=="Copper") { - m_identifier = m_geometryCalculator->CalculateIdentifier(a_step, kLocInactive, 2, 4.*CLHEP::mm); + identifier = m_geometryCalculator->CalculateIdentifier(step, kLocInactive, 2, 4.*CLHEP::mm); } else if(hitVolume=="TieRod"){ // We should call another functions for TieRods - m_identifier = m_geometryCalculator->CalculateIdentifier(a_step, kLocActive, -1); - } else m_identifier = LArG4Identifier(); - } else m_identifier = m_geometryCalculator->CalculateIdentifier(a_step, m_geometryType, 0, 4.*CLHEP::mm); + identifier = m_geometryCalculator->CalculateIdentifier(step, kLocActive, -1); + } else identifier = LArG4Identifier(); + } else identifier = m_geometryCalculator->CalculateIdentifier(step, m_geometryType, 0, 4.*CLHEP::mm); #ifdef DEBUG_HITS - G4double energy = accumulate(m_energies.begin(),m_energies.end(),0.); + G4double energy = accumulate(energies.begin(),energies.end(),0.); std::cout << "LArG4::HEC::LocalCalibrationCalculator::Process" - << " ID=" << std::string(m_identifier) + << " ID=" << std::string(identifier) << " energy=" << energy - << " energies=(" << m_energies[0] - << "," << m_energies[1] - << "," << m_energies[2] - << "," << m_energies[3] << ")" + << " energies=(" << energies[0] + << "," << energies[1] + << "," << energies[2] + << "," << energies[3] << ")" << std::endl; #endif // Check for bad result. - if ( m_identifier == LArG4Identifier() ) return false; + if ( identifier == LArG4Identifier() ) return false; return true; } diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.h new file mode 100644 index 0000000000000000000000000000000000000000..1985b52903abfd9369a4a38e497ab5606f093514 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.h @@ -0,0 +1,51 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LArG4_HEC_LocalCalibrationCalculator_H +#define LArG4_HEC_LocalCalibrationCalculator_H + +#include "LArG4Code/LArCalibCalculatorSvcImp.h" +#include "LArG4Code/LArG4Identifier.h" +#include "LArG4HEC/ILocalGeometry.h" +#include "CaloG4Sim/SimulationEnergies.h" + +#include "globals.hh" + +#include <vector> + +// Forward declaractions: +class G4Step; + +namespace LArG4 { + + namespace HEC { + + + class LocalCalibrationCalculator : public LArCalibCalculatorSvcImp { + public: + + LocalCalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocatorconst); + void GeometryTypeUpdateHandler(Property&); + StatusCode initialize() override final; + virtual ~LocalCalibrationCalculator(); + + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process = kEnergyAndID) const override final; + private: + + ServiceHandle<ILocalGeometry> m_geometryCalculator; + + eLocalGeometryType m_geometryType; + StringProperty m_strgeometryType; + + CaloG4::SimulationEnergies m_energyCalculator; + + }; + + } // namespace HEC + +} // namespace LArG4 + +#endif // LArG4_HEC_LocalCalibrationCalculator_H diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc old mode 100755 new mode 100644 index 3b071269fea8f463e6edb7adc32a3fd9e058565d..b194c69729afcc34581cd3d9c8fa94cdc73bfd36 --- a/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc @@ -6,7 +6,7 @@ #include "LArG4HEC/LocalGeometry.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4HEC/Geometry.h" +//#include "LArG4HEC/Geometry.h" #include "G4ThreeVector.hh" #include "G4StepPoint.hh" @@ -20,8 +20,6 @@ #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" #include "GeoModelInterfaces/IGeoModelSvc.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/Bootstrap.h" #include "StoreGate/StoreGateSvc.h" #include "AthenaKernel/Units.h" #include "globals.hh" @@ -35,176 +33,172 @@ namespace Units = Athena::Units; #undef DEBUG_HEC #undef DEBUG_HEC_OLD_DIAGNOSTIC -#define NUM_ETABIN 15 +//#define NUM_ETABIN 15 namespace LArG4 { namespace HEC { -static double pads[7][NUM_ETABIN]; - -static G4double depthSize[7]; -static G4double firstAbsorber[7]; -static G4double betweenWheel; - -LocalGeometry* LocalGeometry::m_instance = 0; -bool LocalGeometry::m_isX = false; - - -G4int binSearch(G4double ly, G4int depth, G4int reg) -{ - static G4int xl,xh; - static G4int ires; - - if(reg == 1) { xl = 0; xh = 4; - } else { xl = 4; xh = NUM_ETABIN-1; } - -// std::cout<<"binSearch::ly "<<ly<<" depth: "<<depth<<" reg: "<<reg<<std::endl; -// if(ly < pads[depth][xl] || ly > pads[depth][xh] ) return -1; - if(ly < pads[depth][xl]) return xl; - if(ly > pads[depth][xh] ) return xh-1; - while( xl < xh - 1 ) { - ires = xl + (xh - xl)/2; -// G4cout<<"xl: "<<xl<<" xh: "<<xh<<" ires: "<<ires<<" pads[depth][ires]: "<< pads[depth][ires]<<endl; - if (ly == pads[depth][ires]) return ires - 1; - if (ly < pads[depth][ires]) - xh = ires; - else - xl = ires; - } -// std::cout<<xl<<std::endl; - - return xl; -} - -G4int binSearchAll(G4double ly, G4int depth, bool regular=false) -{ - static G4int xl,xh; - static G4int ires; - - xl = 0; xh = NUM_ETABIN-1; - -// std::cout<<"binSearchAll::ly "<<ly<<" depth: "<<depth<<" regular: "<<regular<<std::endl; -// if(ly < pads[depth][xl] || ly > pads[depth][xh] ) return -1; - if(ly < pads[depth][xl]) return xl; - if(ly > pads[depth][xh] ) return xh-1; - while( xl < xh - 1 ) { - ires = xl + (xh - xl)/2; -// G4cout<<"xl: "<<xl<<" xh: "<<xh<<" ires: "<<ires<<" pads[depth][ires]: "<< pads[depth][ires]<<endl; - if (ly == pads[depth][ires]) return ires - 1; - if (ly < pads[depth][ires]) - xh = ires; - else - xl = ires; - } -// std::cout<<xl<<" "<<pads[depth][xl]<<" "<<pads[depth][xl+1]<<std::endl; - if(regular) { // we should recompute to 0.1 eta binning overall numbering - if(xl < 4) { - ires = xl; - xl *= 2; - if(ly > pads[depth][ires] + (pads[depth][ires+1]-pads[depth][ires])/2.) ++xl; - } else { - xl += 4; - } - } -// std::cout<<"After recomput.: "<<xl<<std::endl; - return xl; -} -double deadZone(double locx, double locy, double /*rot*/=0) -{ - double r = sqrt(locx*locx + locy*locy); - double alpha = atan(locx/locy); - double dalpha = 2*M_PI/64 - alpha; - return r*sin(dalpha); -} - - - // Standard implementation of a singleton pattern. - - LocalGeometry* LocalGeometry::GetInstance() + int LocalGeometry::binSearch(double ly, int depth, int reg) const { - static LocalGeometry instance; - return &instance; + int xl(4); + int xh(14); // = NUM_ETABIN-1 + if(reg == 1) + { + xl = 0; + xh = 4; + } + + // std::cout<<"binSearch::ly "<<ly<<" depth: "<<depth<<" reg: "<<reg<<std::endl; + // if(ly < m_pads[depth][xl] || ly > m_pads[depth][xh] ) return -1; + if(ly < m_pads[depth][xl]) return xl; + if(ly > m_pads[depth][xh] ) return xh-1; + while( xl < xh - 1 ) { + const int ires(xl + (xh - xl)/2); + // G4cout<<"xl: "<<xl<<" xh: "<<xh<<" ires: "<<ires<<" m_pads[depth][ires]: "<< m_pads[depth][ires]<<endl; + if (ly == m_pads[depth][ires]) return ires - 1; + if (ly < m_pads[depth][ires]) + xh = ires; + else + xl = ires; + } + // std::cout<<xl<<std::endl; + + return xl; } + int LocalGeometry::binSearchAll(double ly, int depth, bool regular) const + { + int xl(0); + int xh(14); // = NUM_ETABIN-1 + int ires(0); + + // std::cout<<"binSearchAll::ly "<<ly<<" depth: "<<depth<<" regular: "<<regular<<std::endl; + // if(ly < m_pads[depth][xl] || ly > m_pads[depth][xh] ) return -1; + if(ly < m_pads[depth][xl]) return xl; + if(ly > m_pads[depth][xh] ) return xh-1; + while( xl < xh - 1 ) { + ires = xl + (xh - xl)/2; + // G4cout<<"xl: "<<xl<<" xh: "<<xh<<" ires: "<<ires<<" m_pads[depth][ires]: "<< m_pads[depth][ires]<<endl; + if (ly == m_pads[depth][ires]) return ires - 1; + if (ly < m_pads[depth][ires]) + xh = ires; + else + xl = ires; + } + // std::cout<<xl<<" "<<m_pads[depth][xl]<<" "<<m_pads[depth][xl+1]<<std::endl; + if(regular) { // we should recompute to 0.1 eta binning overall numbering + if(xl < 4) { + ires = xl; + xl *= 2; + if(ly > m_pads[depth][ires] + (m_pads[depth][ires+1]-m_pads[depth][ires])/2.) ++xl; + } else { + xl += 4; + } + } + // std::cout<<"After recomput.: "<<xl<<std::endl; + return xl; + } - LocalGeometry::LocalGeometry() { + double LocalGeometry::deadZone(double locx, double locy) const + { + double r = sqrt(locx*locx + locy*locy); + double alpha = atan(locx/locy); + double dalpha = 2*M_PI/64 - alpha; + return r*sin(dalpha); + } -// std::cout<<"LArG4::HEC::LocalGeometry called !"<<std::endl; - StatusCode status; - // Access the GeoModelSvc: - ISvcLocator *svcLocator = Gaudi::svcLocator(); + LocalGeometry::LocalGeometry(const std::string& name, ISvcLocator * pSvcLocator) + : AthService(name, pSvcLocator) + , m_geoModel("GeoModelSvc", name) + , m_AccessSvc("RDBAccessSvc", name) + , m_isX(false) + { + declareProperty("GeoModelSvc",m_geoModel); + declareProperty("RDBAccessSvc", m_AccessSvc); + declareProperty("isX", m_isX); + } - IMessageSvc *msgSvc; - status = svcLocator->service("MessageSvc", msgSvc); - if(!status.isFailure()) m_log = new MsgStream(msgSvc,"HEC::LocalGeometry");; + StatusCode LocalGeometry::initialize() + { - IGeoModelSvc *geoModel; - status = svcLocator->service ("GeoModelSvc",geoModel); - if (status != StatusCode::SUCCESS) { - throw std::runtime_error ("Cannot locate GeoModelSvc!!"); - } + // Access the GeoModelSvc: + ATH_CHECK(m_geoModel.retrieve()); // Access the geometry database: - IRDBAccessSvc *pAccessSvc; - status=svcLocator->service("RDBAccessSvc",pAccessSvc); - if (status != StatusCode::SUCCESS) { - throw std::runtime_error ("Cannot locate RDBAccessSvc!!"); - } + ATH_CHECK(m_AccessSvc.retrieve()); // Obtain the geometry version information: - pAccessSvc->connect(); + m_AccessSvc->connect(); - std::string AtlasVersion = geoModel->atlasVersion(); - std::string LArVersion = geoModel->LAr_VersionOverride(); + std::string AtlasVersion = m_geoModel->atlasVersion(); + std::string LArVersion = m_geoModel->LAr_VersionOverride(); std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion; std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr"; - const IRDBRecordset *hecPad = pAccessSvc->getRecordset("HecPad",detectorKey, detectorNode); - if (hecPad->size()==0) { - hecPad = pAccessSvc->getRecordset("HecPad","HecPad-00", "HecPad"); - } - - if(m_log) { - *m_log << MSG::INFO << "Constructing local HEC geometry helper " << endmsg; - *m_log << MSG::DEBUG<< " detectorKey: "<<detectorKey<<" detectorNode: "<<detectorNode<<std::endl; - } - - - if (hecPad->size()==0) { throw std::runtime_error("Cannot find the HECPAD Table"); } - - const IRDBRecord *rowPad; - for(unsigned int i=0; i<hecPad->size(); ++i) { - rowPad = (*hecPad)[i]; - for(int j=0; j<NUM_ETABIN; ++j) { - pads[i][j] = rowPad->getDouble("ETA",j); - } - } - - const IRDBRecordset *hecLongitudinalBlock = pAccessSvc->getRecordset("HecLongitudinalBlock",detectorKey,detectorNode); - if (hecLongitudinalBlock->size()==0) { - throw std::runtime_error("Cannot find the HecLongitinalBlock Table"); - } - - const IRDBRecordset *hadronicEndcap = pAccessSvc->getRecordset("HadronicEndcap",detectorKey,detectorNode); - if (hadronicEndcap->size()==0) { - throw std::runtime_error("Cannot find the HadronicEndcap Table"); - } - for (int indexloop=0; indexloop < 7; ++indexloop){ + ATH_MSG_INFO("Constructing local HEC geometry helper "); + ATH_MSG_DEBUG(" detectorKey: "<<detectorKey<<" detectorNode: "<<detectorNode); + + const IRDBRecordset *hecPad = m_AccessSvc->getRecordset("HecPad",detectorKey, detectorNode); + if (hecPad->size()==0) + { + hecPad = m_AccessSvc->getRecordset("HecPad","HecPad-00", "HecPad"); + } + if (hecPad->size()==0) + { + ATH_MSG_ERROR("Cannot find the HECPAD Table"); + return StatusCode::FAILURE; + } + const IRDBRecord *rowPad(nullptr); + for(unsigned int i=0; i<hecPad->size(); ++i) + { + rowPad = (*hecPad)[i]; + for(int j=0; j<15; ++j) //NUM_ETABIN=15 + { + m_pads[i][j] = rowPad->getDouble("ETA",j); // FIXME Setting static global variables + } + } + + const IRDBRecordset *hecLongitudinalBlock = m_AccessSvc->getRecordset("HecLongitudinalBlock",detectorKey,detectorNode); + if (hecLongitudinalBlock->size()==0) + { + ATH_MSG_ERROR("Cannot find the HecLongitinalBlock Table"); + return StatusCode::FAILURE; + } + for (int indexloop=0; indexloop < 7; ++indexloop) + { + m_depthSize[indexloop] = (*hecLongitudinalBlock)[indexloop]->getDouble("BLDPTH")*Units::cm; + m_firstAbsorber[indexloop]= (*hecLongitudinalBlock)[indexloop]->getDouble("PLATE0")*Units::cm; + } + + const IRDBRecordset *hadronicEndcap = m_AccessSvc->getRecordset("HadronicEndcap",detectorKey,detectorNode); + if (hadronicEndcap->size()==0) + { + ATH_MSG_ERROR("Cannot find the HadronicEndcap Table"); + return StatusCode::FAILURE; + } + m_betweenWheel = (*hadronicEndcap)[0]->getDouble("GAPWHL")*Units::cm-0.001*Units::cm; //40.5*mm + + m_AccessSvc->shutdown(); + + return StatusCode::SUCCESS; + } - depthSize[indexloop] = (*hecLongitudinalBlock)[indexloop]->getDouble("BLDPTH")*CLHEP::cm; - firstAbsorber[indexloop]= (*hecLongitudinalBlock)[indexloop]->getDouble("PLATE0")*CLHEP::cm; + StatusCode LocalGeometry::queryInterface( const InterfaceID & riid, void** ppvInterface ) + { + if ( ILocalGeometry::interfaceID().versionMatch(riid) ) { + *ppvInterface = dynamic_cast<ILocalGeometry*>(this); + } else { + // Interface is not directly available : try out a base class + return AthService::queryInterface(riid, ppvInterface); } - betweenWheel = (*hadronicEndcap)[0]->getDouble("GAPWHL")*CLHEP::cm-0.001*CLHEP::cm; //40.5*mm - - - pAccessSvc->shutdown(); - + addRef(); + return StatusCode::SUCCESS; } - LArG4Identifier LocalGeometry::CalculateIdentifier(const G4Step* a_step, const eLocalGeometryType g_type, int depthadd, double deadzone, double locyadd) { + LArG4Identifier LocalGeometry::CalculateIdentifier(const G4Step* a_step, const eLocalGeometryType g_type, int depthadd, double deadzone, double locyadd) const { // Find out how long it took the energy to get here. G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); @@ -213,16 +207,16 @@ double deadZone(double locx, double locy, double /*rot*/=0) G4ThreeVector endPoint = post_step_point->GetPosition(); G4ThreeVector p = (startPoint + endPoint) * 0.5; - + // We can extract our position from the copy number of depth and module G4TouchableHistory* theTouchable = (G4TouchableHistory*) (pre_step_point->GetTouchable()); // Get local coordinates of the step, independently of how it was positioned in World G4AffineTransform transformation; if(depthadd >=0) { - transformation = pre_step_point->GetTouchable()->GetHistory()->GetTopTransform(); + transformation = pre_step_point->GetTouchable()->GetHistory()->GetTopTransform(); } else { - transformation = pre_step_point->GetTouchable()->GetHistory()->GetTransform(pre_step_point->GetTouchable()->GetHistoryDepth() + abs(depthadd)); + transformation = pre_step_point->GetTouchable()->GetHistory()->GetTransform(pre_step_point->GetTouchable()->GetHistoryDepth() + abs(depthadd)); } G4ThreeVector startPointinLocal = transformation.TransformPoint(startPoint); G4ThreeVector endPointinLocal = transformation.TransformPoint (endPoint); @@ -230,442 +224,442 @@ double deadZone(double locx, double locy, double /*rot*/=0) #ifdef DEBUG_HEC -// if(g_type == kLocDead) { - if(deadzone == 0.) { - // The hitted volume's identier is possible to get by the name of his "mother" volume. - // G4cout <<" hitLogiVolume->GetNoDaughters= " <<hitLogiVolume->GetNoDaughters()<<G4endl; - // G4cout <<"+++++"<<hitLogiVolume->GetDaughter(1)->GetLogicalVolume()->GetMaterial()->GetName()<<G4endl; - // G4cout <<"+++++"<<hitLogiVolume->GetName()<<G4endl; + // if(g_type == kLocDead) { + if(deadzone == 0.) { + // The hitted volume's identier is possible to get by the name of his "mother" volume. + // G4cout <<" hitLogiVolume->GetNoDaughters= " <<hitLogiVolume->GetNoDaughters()<<G4endl; + // G4cout <<"+++++"<<hitLogiVolume->GetDaughter(1)->GetLogicalVolume()->GetMaterial()->GetName()<<G4endl; + // G4cout <<"+++++"<<hitLogiVolume->GetName()<<G4endl; - G4String hitVolume=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetName(); + G4String hitVolume=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetName(); - G4int copyN=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetCopyNo(); + int copyN=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetCopyNo(); - // 16-Oct-2003 WGS: Due to a revision in Geant4, - // G4VPhysicalVolume::GetMother() no longer exists. If we want to - // find a mother volume, we have to do so in a more complex way: + // 16-Oct-2003 WGS: Due to a revision in Geant4, + // G4VPhysicalVolume::GetMother() no longer exists. If we want to + // find a mother volume, we have to do so in a more complex way: - G4TouchableHistory* touchHist = - (G4TouchableHistory*) a_step->GetPreStepPoint()->GetTouchable(); - G4int volDepth = touchHist->GetHistoryDepth(); + G4TouchableHistory* touchHist = + (G4TouchableHistory*) a_step->GetPreStepPoint()->GetTouchable(); + int volDepth = touchHist->GetHistoryDepth(); - // If the volume depth is 0, then this is the mother volume of the - // simulation. (I know that's not likely, but let's be sure.) - // Otherwise, we want to go up one level in depth to get the mother - // volume. + // If the volume depth is 0, then this is the mother volume of the + // simulation. (I know that's not likely, but let's be sure.) + // Otherwise, we want to go up one level in depth to get the mother + // volume. - //if ( volDepth != 0 ) volDepth--; - //G4VPhysicalVolume *motherPhysical = touchHist->GetVolume(volDepth); - G4VPhysicalVolume *motherPhysical = touchHist->GetVolume(1); + //if ( volDepth != 0 ) volDepth--; + //G4VPhysicalVolume *motherPhysical = touchHist->GetVolume(volDepth); + G4VPhysicalVolume *motherPhysical = touchHist->GetVolume(1); - // G4String motherVolume=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetMother()->GetName(); - G4String motherVolume=motherPhysical->GetName(); + // G4String motherVolume=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetMother()->GetName(); + G4String motherVolume=motherPhysical->GetName(); - G4String material=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetMaterial()->GetName(); + G4String material=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetMaterial()->GetName(); - // G4int copyN1=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetMother()->GetCopyNo(); - G4int copyN1=motherPhysical->GetCopyNo(); + // int copyN1=a_step->GetPreStepPoint()->GetPhysicalVolume()->GetMother()->GetCopyNo(); + int copyN1=motherPhysical->GetCopyNo(); - std::cout <<"HEC::LocalGeometry +++++hitVolume="<<hitVolume<<" , his material="<<material<<", copyNumber="<<copyN<<", motherVolume="<<motherVolume <<", copy1="<< copyN1<< std::endl; - std::cout <<"Coordinates: "<<p<<" Local coordinates: "<<pinLocal<<std::endl; - G4int copyDepth = theTouchable->GetVolume(1 + abs(depthadd))->GetCopyNo() - 100; - // As well as module - G4int copyModule = theTouchable->GetVolume(2 + abs(depthadd))->GetCopyNo(); - std::cout <<"g_type: "<<g_type<<" depthadd: "<<depthadd<<std::endl; - std::cout <<"copyModule = "<<copyModule<<" copyDepth = "<<copyDepth<<std::endl; + std::cout <<"HEC::LocalGeometry +++++hitVolume="<<hitVolume<<" , his material="<<material<<", copyNumber="<<copyN<<", motherVolume="<<motherVolume <<", copy1="<< copyN1<< std::endl; + std::cout <<"Coordinates: "<<p<<" Local coordinates: "<<pinLocal<<std::endl; + int copyDepth = theTouchable->GetVolume(1 + abs(depthadd))->GetCopyNo() - 100; + // As well as module + int copyModule = theTouchable->GetVolume(2 + abs(depthadd))->GetCopyNo(); + std::cout <<"g_type: "<<g_type<<" depthadd: "<<depthadd<<std::endl; + std::cout <<"copyModule = "<<copyModule<<" copyDepth = "<<copyDepth<<std::endl; } -#endif +#endif - G4int zSide; - G4int sampling = 0; - G4int region; - G4int etaBin = 0; - G4int phiBin; + int zSide; + int sampling = 0; + int region; + int etaBin = 0; + int phiBin; + + int copyModule; - G4int copyModule; - zSide = 2; - if( p.z()<0.) zSide =-2; + if( p.z()<0.) zSide =-2; if(g_type != kLocDead) { // Calculate the active or inactive ID - // Volume name - // G4String hitVolume = theTouchable->GetVolume(0)->GetName(); - // We need also copy number of depth - G4int copyDepth = theTouchable->GetVolume(1 + abs(depthadd))->GetCopyNo() - 100; - // As well as module - copyModule = theTouchable->GetVolume(2 + abs(depthadd))->GetCopyNo() - 1; - if(zSide<0) { - if(copyModule<16) copyModule = abs(copyModule - 15); else copyModule = 47 - copyModule; - } - - // Sampling Identifier - switch(copyDepth) { - case 0: { sampling = 0; break; } - case 1: case 2: { sampling = 1; break; } - case 3: case 4: { sampling = 2; break; } - case 5: case 6: { sampling = 3; break; } - default: { // Something wrong, should not be -// return CalculateIdentifier(a_step, kLocDead, depthadd); - assert(0<1); - break; } - } - - double locy, locx; - if(m_isX) { - locy = fabs(pinLocal.x()/Units::mm); - locx = pinLocal.y()/Units::mm; - } else { - locy = fabs(pinLocal.y()/Units::mm); - locx = pinLocal.x()/Units::mm; - } - // Add shift is needed (absorber) - locy += locyadd; - // Region Identifier - // This will be computed from local Y coordinate - if( locy < pads[copyDepth][4] ) region = 1; - else region = 0; - - // eta_Bin Identifier - // Needs a table of coordinates of pad boundaries - switch(region) { - case 1: { etaBin = 3 - binSearch(locy, copyDepth, region); break; } - case 0: { etaBin = 13 - binSearch(locy, copyDepth, region); break; } - default: { assert(0<1); break; } - } - - LArG4Identifier result = LArG4Identifier(); - - // Check, if we are not in dead zone - double distance = deadZone(fabs(locx),locy); - if(depthadd < 0 || distance < deadzone) { // we return the dead identifier -#ifdef DEBUG_HEC - std::cout<<" In active copyModule = "<< copyModule<<std::endl; + // Volume name + // G4String hitVolume = theTouchable->GetVolume(0)->GetName(); + // We need also copy number of depth + int copyDepth = theTouchable->GetVolume(1 + abs(depthadd))->GetCopyNo() - 100; + // As well as module + copyModule = theTouchable->GetVolume(2 + abs(depthadd))->GetCopyNo() - 1; + if(zSide<0) { + if(copyModule<16) copyModule = abs(copyModule - 15); else copyModule = 47 - copyModule; + } + + // Sampling Identifier + switch(copyDepth) { + case 0: { sampling = 0; break; } + case 1: case 2: { sampling = 1; break; } + case 3: case 4: { sampling = 2; break; } + case 5: case 6: { sampling = 3; break; } + default: { // Something wrong, should not be + // return CalculateIdentifier(a_step, kLocDead, depthadd); + assert(0<1); + break; } + } + + double locy, locx; + if(m_isX) { + locy = fabs(pinLocal.x()/Units::mm); + locx = pinLocal.y()/Units::mm; + } else { + locy = fabs(pinLocal.y()/Units::mm); + locx = pinLocal.x()/Units::mm; + } + // Add shift is needed (absorber) + locy += locyadd; + // Region Identifier + // This will be computed from local Y coordinate + if( locy < m_pads[copyDepth][4] ) region = 1; + else region = 0; + + // eta_Bin Identifier + // Needs a table of coordinates of pad boundaries + switch(region) { + case 1: { etaBin = 3 - binSearch(locy, copyDepth, region); break; } + case 0: { etaBin = 13 - binSearch(locy, copyDepth, region); break; } + default: { assert(0<1); break; } + } + + LArG4Identifier result = LArG4Identifier(); + + // Check, if we are not in dead zone + double distance = deadZone(fabs(locx),locy); + if(depthadd < 0 || distance < deadzone) { // we return the dead identifier +#ifdef DEBUG_HEC + std::cout<<" In active copyModule = "<< copyModule<<std::endl; #endif - if(zSide * locx < 0) phiBin = copyModule; - else { - if(copyModule == 31) phiBin = 0; else phiBin=copyModule+1; - } - if(region==1 && etaBin == 3 && (sampling == 1 || sampling == 2)) etaBin = 2; - result << 10 // DeadM - << 2*zSide // LAr - << 2 // DM type - << sampling - << region+2 - << etaBin - << phiBin; -#ifdef DEBUG_HEC - std::cout <<"HEC::LocalGeometry ++Dead in active zSide = "<<zSide<<" type = 2"<<" , sampling = "<<sampling - <<" , region="<<region+2 << " , phiBin="<<phiBin<< " , etaBin="<<etaBin <<std::endl; + if(zSide * locx < 0) phiBin = copyModule; + else { + if(copyModule == 31) phiBin = 0; else phiBin=copyModule+1; + } + if(region==1 && etaBin == 3 && (sampling == 1 || sampling == 2)) etaBin = 2; + result << 10 // DeadM + << 2*zSide // LAr + << 2 // DM type + << sampling + << region+2 + << etaBin + << phiBin; +#ifdef DEBUG_HEC + std::cout <<"HEC::LocalGeometry ++Dead in active zSide = "<<zSide<<" type = 2"<<" , sampling = "<<sampling + <<" , region="<<region+2 << " , phiBin="<<phiBin<< " , etaBin="<<etaBin <<std::endl; #endif - } else { // we return regular ID - - // Phi Identifier - if(region == 1) { phiBin = copyModule; - } else { - phiBin = 2*copyModule; - if(zSide * locx > 0) ++phiBin; - /* - if(m_isX) { - if(zSide * pinLocal.y() > 0) ++phiBin; - } else { - if(zSide * pinLocal.x() > 0) ++phiBin; - } - */ - } - if(region==1 && etaBin == 3 && (sampling == 1 || sampling == 2)) etaBin = 2; - if(region==0 && etaBin == 0 && sampling == 2) etaBin = 1; - if(region==0 && etaBin < 2 && sampling == 3) etaBin = 2; - result << 4 // LArCalorimeter - << 2 // LArHEC - << zSide - << sampling - << region - << etaBin - << phiBin; -#ifdef DEBUG_HEC - std::cout <<"HEC::LocalGeometry ++Active zSide = "<<zSide<<" , sampling = "<<sampling<<" , region="<<region << - " , phiBin="<<phiBin<< " , etaBin="<<etaBin <<std::endl; + } else { // we return regular ID + + // Phi Identifier + if(region == 1) { phiBin = copyModule; + } else { + phiBin = 2*copyModule; + if(zSide * locx > 0) ++phiBin; + /* + if(m_isX) { + if(zSide * pinLocal.y() > 0) ++phiBin; + } else { + if(zSide * pinLocal.x() > 0) ++phiBin; + } + */ + } + if(region==1 && etaBin == 3 && (sampling == 1 || sampling == 2)) etaBin = 2; + if(region==0 && etaBin == 0 && sampling == 2) etaBin = 1; + if(region==0 && etaBin < 2 && sampling == 3) etaBin = 2; + result << 4 // LArCalorimeter + << 2 // LArHEC + << zSide + << sampling + << region + << etaBin + << phiBin; +#ifdef DEBUG_HEC + std::cout <<"HEC::LocalGeometry ++Active zSide = "<<zSide<<" , sampling = "<<sampling<<" , region="<<region << + " , phiBin="<<phiBin<< " , etaBin="<<etaBin <<std::endl; #endif - } - - return result; + } + + return result; } else { // Calculate dead ID -// if(m_log) *m_log << MSG::DEBUG << "Local geometry DM Id " << endmsg; + // ATH_MSG_DEBUG("Local geometry DM Id "); - LArG4Identifier result = LArG4Identifier(); + LArG4Identifier result = LArG4Identifier(); - G4int type=1; - sampling=region=phiBin = 0; - etaBin = 25; + int type=1; + sampling=region=phiBin = 0; + etaBin = 25; // Copy number - G4int copyN = theTouchable->GetVolume(0)->GetCopyNo(); + int copyN = theTouchable->GetVolume(0)->GetCopyNo(); double locy, locx, locz, abslocz; - locz = pinLocal.z()/Units::mm; - abslocz = fabs(locz); + locz = pinLocal.z()/Units::mm; + abslocz = fabs(locz); if(m_isX) { - locy = fabs(pinLocal.x()/Units::mm); - locx = pinLocal.y()/Units::mm; - } else { - locy = fabs(pinLocal.y()/Units::mm); - locx = pinLocal.x()/Units::mm; - } - - if(copyN == 16969) { // Mother volume (should not be) - if(m_log) *m_log << MSG::WARNING << "Wrong Local geometry DM volume: HEC mother, default ID used" <<endmsg; - G4double phi = p.phi(); - if (phi < 0) phi += 2*M_PI; - phiBin = int(phi*(32/(2*M_PI))); - G4double eta = fabs( p.pseudoRapidity() ); - etaBin = int(eta/0.1); - } else if (copyN <= 32) { // HEC::Module -// double locz = fabs(pinLocal.z()/Units::mm); -// double locy = fabs(pinLocal.y()/Units::mm); - if(zSide<0) { - if(copyN-1<16) copyModule = abs(copyN - 1 - 15); else copyModule = 47 - (copyN - 1); - } else { - copyModule = copyN -1; - } - phiBin = 2*copyModule; - if(zSide * locx > 0) ++phiBin; - /* - if(m_isX) { - if(zSide * pinLocal.y() > 0) ++phiBin; - } else { - if(zSide * pinLocal.x() > 0) ++phiBin; - } - */ + locy = fabs(pinLocal.x()/Units::mm); + locx = pinLocal.y()/Units::mm; + } else { + locy = fabs(pinLocal.y()/Units::mm); + locx = pinLocal.x()/Units::mm; + } + + if(copyN == 16969) { // Mother volume (should not be) + ATH_MSG_WARNING("Wrong Local geometry DM volume: HEC mother, default ID used"); + double phi = p.phi(); + if (phi < 0) phi += 2*M_PI; + phiBin = int(phi*(32/(2*M_PI))); + double eta = fabs( p.pseudoRapidity() ); + etaBin = int(eta/0.1); + } else if (copyN <= 32) { // HEC::Module + // double locz = fabs(pinLocal.z()/Units::mm); + // double locy = fabs(pinLocal.y()/Units::mm); + if(zSide<0) { + if(copyN-1<16) copyModule = abs(copyN - 1 - 15); else copyModule = 47 - (copyN - 1); + } else { + copyModule = copyN -1; + } + phiBin = 2*copyModule; + if(zSide * locx > 0) ++phiBin; + /* + if(m_isX) { + if(zSide * pinLocal.y() > 0) ++phiBin; + } else { + if(zSide * pinLocal.x() > 0) ++phiBin; + } + */ #ifdef DEBUG_HEC_OLD_DIAGNOSTIC - std::cout<<"HEC::LocalGeometry Module locy: "<<locy<<" locz: "<<locz<<std::endl; + std::cout<<"HEC::LocalGeometry Module locy: "<<locy<<" locz: "<<locz<<std::endl; #endif - if(abslocz < firstAbsorber[0]) { // in front of HEC + if(abslocz < m_firstAbsorber[0]) { // in front of HEC #ifdef DEBUG_HEC_OLD_DIAGNOSTIC - std::cout<<"In front of HEC"<<std::endl; + std::cout<<"In front of HEC"<<std::endl; #endif - type = 1; - sampling = 2; - region = 3; -// etaBin = 13 - binSearchAll(locy, 0); - etaBin = 16 - binSearchAll(locy, 0, true); - if( etaBin < 0 ) etaBin = 0; - } else if(abslocz > depthSize[0] + depthSize[1] + depthSize[2] && abslocz < depthSize[0] + depthSize[1] + depthSize[2] + betweenWheel + firstAbsorber[3]) { // interwheel gap + type = 1; + sampling = 2; + region = 3; + // etaBin = 13 - binSearchAll(locy, 0); + etaBin = 16 - binSearchAll(locy, 0, true); + if( etaBin < 0 ) etaBin = 0; + } else if(abslocz > m_depthSize[0] + m_depthSize[1] + m_depthSize[2] && abslocz < m_depthSize[0] + m_depthSize[1] + m_depthSize[2] + m_betweenWheel + m_firstAbsorber[3]) { // interwheel gap #ifdef DEBUG_HEC_OLD_DIAGNOSTIC - std::cout<<"interwheel gap"<<std::endl; + std::cout<<"interwheel gap"<<std::endl; #endif - type = 1; - sampling = 2; - region = 4; -// etaBin = 13 - binSearchAll(locy, 0); - etaBin = 16 - binSearchAll(locy, 3, true); - } else { -// sampling = localSampling(pinLocal.z()/Units::mm); - double distance = deadZone(fabs(pinLocal.x()/Units::mm),locy); - if(distance > deadzone) { // We should return the inactive Id !!!! + type = 1; + sampling = 2; + region = 4; + // etaBin = 13 - binSearchAll(locy, 0); + etaBin = 16 - binSearchAll(locy, 3, true); + } else { + // sampling = localSampling(pinLocal.z()/Units::mm); + double distance = deadZone(fabs(pinLocal.x()/Units::mm),locy); + if(distance > deadzone) { // We should return the inactive Id !!!! #ifdef DEBUG_HEC_OLD_DIAGNOSTIC - std::cout<<"inactive Id"<<std::endl; + std::cout<<"inactive Id"<<std::endl; #endif - int depthNum; - if(abslocz < depthSize[0]) { - sampling = 0; depthNum=0; - } else if(abslocz < depthSize[0] + depthSize[1] + depthSize[2]) { - sampling = 1; - if(abslocz < depthSize[0] + depthSize[1]) depthNum = 1; else depthNum = 2; - } else if(abslocz < depthSize[0] + depthSize[1] - + depthSize[2] + betweenWheel + depthSize[3] + depthSize[4] ) { - sampling = 2; - if(abslocz < depthSize[0] + depthSize[1] - + depthSize[2] + betweenWheel + depthSize[3]) depthNum = 3; else depthNum = 4; - } else { - sampling = 3; - if(abslocz < depthSize[0] + depthSize[1] - + depthSize[2] + betweenWheel + depthSize[3] + depthSize[4] + depthSize[5]) - depthNum = 5; - else - depthNum = 6; - } - if( locy < pads[depthNum][4] ) region = 1; else region = 0; - switch(region) { - case 1: { etaBin = 3 - binSearch(locy, depthNum, region); phiBin /= 2; break; } - case 0: { etaBin = 13 - binSearch(locy, depthNum, region); break; } - default: { assert(0<1); break; } - } -#ifdef DEBUG_HEC - std::cout <<"HEC::LocalGeometry zSide = "<<zSide<<" , sampling = "<<sampling<<" , region="<<region << - " , phiBin="<<phiBin<< " , etaBin="<<etaBin <<std::endl; + int depthNum; + if(abslocz < m_depthSize[0]) { + sampling = 0; depthNum=0; + } else if(abslocz < m_depthSize[0] + m_depthSize[1] + m_depthSize[2]) { + sampling = 1; + if(abslocz < m_depthSize[0] + m_depthSize[1]) depthNum = 1; else depthNum = 2; + } else if(abslocz < m_depthSize[0] + m_depthSize[1] + + m_depthSize[2] + m_betweenWheel + m_depthSize[3] + m_depthSize[4] ) { + sampling = 2; + if(abslocz < m_depthSize[0] + m_depthSize[1] + + m_depthSize[2] + m_betweenWheel + m_depthSize[3]) depthNum = 3; else depthNum = 4; + } else { + sampling = 3; + if(abslocz < m_depthSize[0] + m_depthSize[1] + + m_depthSize[2] + m_betweenWheel + m_depthSize[3] + m_depthSize[4] + m_depthSize[5]) + depthNum = 5; + else + depthNum = 6; + } + if( locy < m_pads[depthNum][4] ) region = 1; else region = 0; + switch(region) { + case 1: { etaBin = 3 - binSearch(locy, depthNum, region); phiBin /= 2; break; } + case 0: { etaBin = 13 - binSearch(locy, depthNum, region); break; } + default: { assert(0<1); break; } + } +#ifdef DEBUG_HEC + std::cout <<"HEC::LocalGeometry zSide = "<<zSide<<" , sampling = "<<sampling<<" , region="<<region << + " , phiBin="<<phiBin<< " , etaBin="<<etaBin <<std::endl; #endif - if(region==1 && etaBin == 3 && (sampling == 1 || sampling == 2)) etaBin = 2; - if(region==0 && etaBin == 0 && sampling == 2) etaBin = 1; - if(region==0 && etaBin < 2 && sampling == 3) etaBin = 2; - result << 4 // LArCalorimeter - << 2 // LArHEC - << zSide - << sampling - << region - << etaBin - << phiBin; - return result; - } // intermodule cracks otherwise + if(region==1 && etaBin == 3 && (sampling == 1 || sampling == 2)) etaBin = 2; + if(region==0 && etaBin == 0 && sampling == 2) etaBin = 1; + if(region==0 && etaBin < 2 && sampling == 3) etaBin = 2; + result << 4 // LArCalorimeter + << 2 // LArHEC + << zSide + << sampling + << region + << etaBin + << phiBin; + return result; + } // intermodule cracks otherwise #ifdef DEBUG_HEC_OLD_DIAGNOSTIC - std::cout<<"intermodule crack"<<std::endl; + std::cout<<"intermodule crack"<<std::endl; #endif - if(zSide<0) { - if(copyN-1<16) copyModule = abs(copyN - 1 - 15); else copyModule = 47 - (copyN - 1); - } else { - copyModule = copyN - 1; - } - if(zSide * locx < 0) phiBin = copyModule; - else { - if(copyModule == 31) phiBin = 0; else phiBin=copyModule+1; - } - type = 2; - int depthNum; - if(abslocz < depthSize[0]) { - sampling = 0; depthNum=0; - } else if(abslocz < depthSize[0] + depthSize[1] + depthSize[2]) { - sampling = 1; - if(abslocz < depthSize[0] + depthSize[1]) depthNum = 1; else depthNum = 2; - } else if(abslocz < depthSize[0] + depthSize[1] + depthSize[2] + betweenWheel + depthSize[3] + depthSize[4] ) { - sampling = 2; - if(abslocz < depthSize[0] + depthSize[1] + depthSize[2] + betweenWheel + depthSize[3]) depthNum = 3; else depthNum = 4; - } else { - sampling = 3; - if(abslocz < depthSize[0] + depthSize[1] + depthSize[2] + betweenWheel + depthSize[3] + depthSize[4] + depthSize[5]) - depthNum = 5; - else - depthNum = 6; - } - if( locy < pads[depthNum][4] ) region = 3; else region = 2; + if(zSide<0) { + if(copyN-1<16) copyModule = abs(copyN - 1 - 15); else copyModule = 47 - (copyN - 1); + } else { + copyModule = copyN - 1; + } + if(zSide * locx < 0) phiBin = copyModule; + else { + if(copyModule == 31) phiBin = 0; else phiBin=copyModule+1; + } + type = 2; + int depthNum; + if(abslocz < m_depthSize[0]) { + sampling = 0; depthNum=0; + } else if(abslocz < m_depthSize[0] + m_depthSize[1] + m_depthSize[2]) { + sampling = 1; + if(abslocz < m_depthSize[0] + m_depthSize[1]) depthNum = 1; else depthNum = 2; + } else if(abslocz < m_depthSize[0] + m_depthSize[1] + m_depthSize[2] + m_betweenWheel + m_depthSize[3] + m_depthSize[4] ) { + sampling = 2; + if(abslocz < m_depthSize[0] + m_depthSize[1] + m_depthSize[2] + m_betweenWheel + m_depthSize[3]) depthNum = 3; else depthNum = 4; + } else { + sampling = 3; + if(abslocz < m_depthSize[0] + m_depthSize[1] + m_depthSize[2] + m_betweenWheel + m_depthSize[3] + m_depthSize[4] + m_depthSize[5]) + depthNum = 5; + else + depthNum = 6; + } + if( locy < m_pads[depthNum][4] ) region = 3; else region = 2; #ifdef DEBUG_HEC_OLD_DIAGNOSTIC - std::cout<<locy<<" "<<pads[depthNum][4]<<" "<<region<<std::endl; + std::cout<<locy<<" "<<m_pads[depthNum][4]<<" "<<region<<std::endl; #endif - switch(region) { - case 3: { etaBin = 3 - binSearch(locy, depthNum, region-2); break; } - case 2: { etaBin = 13 - binSearch(locy, depthNum, region-2); break; } - default: { assert(0<1); break; } - } - } - } else if (copyN==50 ) { // First Absorber - in front of HEC - copyModule = theTouchable->GetVolume(2)->GetCopyNo() - 1; - if(zSide<0) { - if(copyModule<16) copyModule = abs(copyModule - 15); else copyModule = 47 - copyModule; - } - phiBin = 2*copyModule; - if(zSide * locx > 0) ++phiBin; - /* - if(m_isX) { - if(zSide * pinLocal.y() > 0) ++phiBin; - } else { - if(zSide * pinLocal.x() > 0) ++phiBin; - } - */ - type = 1; - sampling = 2; - region = 3; -// etaBin = 13 - binSearchAll(fabs(pinLocal.y()/Units::mm), 0); -// etaBin = 16 - binSearchAll(fabs(pinLocal.y()/Units::mm), 0, true); - etaBin = 16 - binSearchAll(locy, 0, true); - if( etaBin < 0 ) etaBin = 0; - } else if (copyN==51 ) { // First Absorber - interwheel gap - copyModule = theTouchable->GetVolume(2)->GetCopyNo() - 1; - if(zSide<0) { - if(copyModule<16) copyModule = abs(copyModule - 15); else copyModule = 47 - copyModule; - } - phiBin = 2*copyModule; - if(zSide * locx > 0) ++phiBin; - /* - if(m_isX) { - if(zSide * pinLocal.y() > 0) ++phiBin; - } else { - if(zSide * pinLocal.x() > 0) ++phiBin; - } - */ - type = 1; - sampling = 2; - region = 4; -// etaBin = 13 - binSearchAll(fabs(pinLocal.y()/Units::mm), 0); -// etaBin = 16 - binSearchAll(fabs(pinLocal.y()/Units::mm), 3, true); - etaBin = 16 - binSearchAll(locy, 3, true); - } else if (copyN>=100 && copyN<= 106 ) { //Depth - copyModule = theTouchable->GetVolume(1)->GetCopyNo() - 1; - if(zSide<0) { - if(copyModule<16) copyModule = abs(copyModule - 15); else copyModule = 47 - copyModule; - } - phiBin = 2*copyModule; - if(zSide * locx > 0) ++phiBin; - /* - if(m_isX) { - if(zSide * pinLocal.y() > 0) ++phiBin; - } else { - if(zSide * pinLocal.x() > 0) ++phiBin; - } - double locy = fabs(pinLocal.y()/Units::mm); - */ - if(copyN==100 && locz < -depthSize[0]/2. + firstAbsorber[0]) { // in front of HEC - type = 1; - sampling = 2; + switch(region) { + case 3: { etaBin = 3 - binSearch(locy, depthNum, region-2); break; } + case 2: { etaBin = 13 - binSearch(locy, depthNum, region-2); break; } + default: { assert(0<1); break; } + } + } + } else if (copyN==50 ) { // First Absorber - in front of HEC + copyModule = theTouchable->GetVolume(2)->GetCopyNo() - 1; + if(zSide<0) { + if(copyModule<16) copyModule = abs(copyModule - 15); else copyModule = 47 - copyModule; + } + phiBin = 2*copyModule; + if(zSide * locx > 0) ++phiBin; + /* + if(m_isX) { + if(zSide * pinLocal.y() > 0) ++phiBin; + } else { + if(zSide * pinLocal.x() > 0) ++phiBin; + } + */ + type = 1; + sampling = 2; + region = 3; + // etaBin = 13 - binSearchAll(fabs(pinLocal.y()/Units::mm), 0); + // etaBin = 16 - binSearchAll(fabs(pinLocal.y()/Units::mm), 0, true); + etaBin = 16 - binSearchAll(locy, 0, true); + if( etaBin < 0 ) etaBin = 0; + } else if (copyN==51 ) { // First Absorber - interwheel gap + copyModule = theTouchable->GetVolume(2)->GetCopyNo() - 1; + if(zSide<0) { + if(copyModule<16) copyModule = abs(copyModule - 15); else copyModule = 47 - copyModule; + } + phiBin = 2*copyModule; + if(zSide * locx > 0) ++phiBin; + /* + if(m_isX) { + if(zSide * pinLocal.y() > 0) ++phiBin; + } else { + if(zSide * pinLocal.x() > 0) ++phiBin; + } + */ + type = 1; + sampling = 2; + region = 4; + // etaBin = 13 - binSearchAll(fabs(pinLocal.y()/Units::mm), 0); + // etaBin = 16 - binSearchAll(fabs(pinLocal.y()/Units::mm), 3, true); + etaBin = 16 - binSearchAll(locy, 3, true); + } else if (copyN>=100 && copyN<= 106 ) { //Depth + copyModule = theTouchable->GetVolume(1)->GetCopyNo() - 1; + if(zSide<0) { + if(copyModule<16) copyModule = abs(copyModule - 15); else copyModule = 47 - copyModule; + } + phiBin = 2*copyModule; + if(zSide * locx > 0) ++phiBin; + /* + if(m_isX) { + if(zSide * pinLocal.y() > 0) ++phiBin; + } else { + if(zSide * pinLocal.x() > 0) ++phiBin; + } + double locy = fabs(pinLocal.y()/Units::mm); + */ + if(copyN==100 && locz < -m_depthSize[0]/2. + m_firstAbsorber[0]) { // in front of HEC + type = 1; + sampling = 2; + region = 3; + // etaBin = 13 - binSearchAll(locy, 0); + etaBin = 16 - binSearchAll(locy, 0, true); + if( etaBin < 0) etaBin = 0; + } else if(copyN==103 && locz < -m_depthSize[3]/2. + m_firstAbsorber[3]) { // interwheel gap + type = 1; + region = 4; + sampling = 2; + // etaBin = 13 - binSearchAll(locy, 0); + etaBin = 16 - binSearchAll(locy, 3, true); + } else { // intermodule cracks + double distance = deadZone(fabs(locx),locy); + if(distance > deadzone) { // We should return the inactive Id !!!! + // std::cout<<"Calling kLocInactive"<<std::endl; + return CalculateIdentifier(a_step, kLocInactive, -1, deadzone); + } + copyModule = theTouchable->GetVolume(1)->GetCopyNo() - 1; + if(zSide<0) { + if(copyModule<16) copyModule = abs(copyModule - 15); else copyModule = 47 - copyModule; + } + if(zSide * locx < 0) phiBin = copyModule; + else { + if(copyModule == 31) phiBin = 0; else phiBin=copyModule+1; + } + type =2; + switch(copyN) { + case 100: {sampling = 0; break;} + case 101: case 102: {sampling=1; break;} + case 103: case 104: {sampling=2; break;} + case 105: case 106: {sampling=3; break;} + } + + if( locy < m_pads[copyN-100][4] ) { region = 3; -// etaBin = 13 - binSearchAll(locy, 0); - etaBin = 16 - binSearchAll(locy, 0, true); - if( etaBin < 0) etaBin = 0; - } else if(copyN==103 && locz < -depthSize[3]/2. + firstAbsorber[3]) { // interwheel gap - type = 1; - region = 4; - sampling = 2; -// etaBin = 13 - binSearchAll(locy, 0); - etaBin = 16 - binSearchAll(locy, 3, true); - } else { // intermodule cracks - double distance = deadZone(fabs(locx),locy); - if(distance > deadzone) { // We should return the inactive Id !!!! -// std::cout<<"Calling kLocInactive"<<std::endl; - return CalculateIdentifier(a_step, kLocInactive, -1, deadzone); - } - copyModule = theTouchable->GetVolume(1)->GetCopyNo() - 1; - if(zSide<0) { - if(copyModule<16) copyModule = abs(copyModule - 15); else copyModule = 47 - copyModule; - } - if(zSide * locx < 0) phiBin = copyModule; - else { - if(copyModule == 31) phiBin = 0; else phiBin=copyModule+1; - } - type =2; - switch(copyN) { - case 100: {sampling = 0; break;} - case 101: case 102: {sampling=1; break;} - case 103: case 104: {sampling=2; break;} - case 105: case 106: {sampling=3; break;} - } - - if( locy < pads[copyN-100][4] ) { - region = 3; - etaBin = 3 - binSearch(locy, copyN-100, region-2); - } - else { - region = 2; - etaBin = 13 - binSearch(locy, copyN-100, region-2); - } - } - } - -#ifdef DEBUG_HEC - std::cout <<"HEC::LocalGeometry ++Dead zSide = "<<zSide<<" type = "<<type<<" , sampling = "<<sampling - <<" , region="<<region << " , phiBin="<<phiBin<< " , etaBin="<<etaBin <<std::endl; + etaBin = 3 - binSearch(locy, copyN-100, region-2); + } + else { + region = 2; + etaBin = 13 - binSearch(locy, copyN-100, region-2); + } + } + } + +#ifdef DEBUG_HEC + std::cout <<"HEC::LocalGeometry ++Dead zSide = "<<zSide<<" type = "<<type<<" , sampling = "<<sampling + <<" , region="<<region << " , phiBin="<<phiBin<< " , etaBin="<<etaBin <<std::endl; #endif - result << 10 // DeadM - << 2*zSide // LAr - << type // DM type - << sampling - << region - << etaBin - << phiBin; - return result; + result << 10 // DeadM + << 2*zSide // LAr + << type // DM type + << sampling + << region + << etaBin + << phiBin; + return result; -// return Geometry::GetInstance()->CalculateIdentifier(a_step, kDead); + // return Geometry::GetInstance()->CalculateIdentifier(a_step, kDead); } } diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/components/LArG4HEC_entries.cxx b/LArCalorimeter/LArG4/LArG4HEC/src/components/LArG4HEC_entries.cxx new file mode 100644 index 0000000000000000000000000000000000000000..75fd9aaf1ce761469a47587c8ea13fa45d2951cb --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4HEC/src/components/LArG4HEC_entries.cxx @@ -0,0 +1,15 @@ +#include "GaudiKernel/DeclareFactoryEntries.h" + +#include "../LArHECLocalCalculator.h" +#include "../LocalCalibrationCalculator.h" +#include "LArG4HEC/LocalGeometry.h" +#include "../LArHECWheelCalculator.h" +#include "../LArHECCalibrationWheelCalculator.h" +#include "LArG4HEC/HECGeometry.h" + +DECLARE_SERVICE_FACTORY(LArHECLocalCalculator) +DECLARE_SERVICE_FACTORY(LArG4::HEC::LocalCalibrationCalculator) +DECLARE_SERVICE_FACTORY(LArG4::HEC::LocalGeometry) +DECLARE_SERVICE_FACTORY(LArHECWheelCalculator) +DECLARE_SERVICE_FACTORY(LArG4::HEC::LArHECCalibrationWheelCalculator) +DECLARE_SERVICE_FACTORY(LArG4::HEC::HECGeometry) diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4MiniFCAL/CMakeLists.txt index 2de5df3c296d773918aa2cb64c22b4b45485317d..ea2cf466106d743f8c6c4bc4a25959a0cec2ce27 100644 --- a/LArCalorimeter/LArG4/LArG4MiniFCAL/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/CMakeLists.txt @@ -7,16 +7,15 @@ atlas_subdir( LArG4MiniFCAL ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Calorimeter/CaloG4Sim - Control/StoreGate - GaudiKernel - LArCalorimeter/LArG4/LArG4Code PRIVATE + Calorimeter/CaloG4Sim Control/AthenaKernel + Control/StoreGate Database/AthenaPOOL/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/Identifier - LArCalorimeter/LArG4/LArG4RunControl ) + GaudiKernel + LArCalorimeter/LArG4/LArG4Code ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) @@ -26,12 +25,14 @@ find_package( Geant4 ) find_package( XercesC ) # Component(s) in the package: -atlas_add_library( LArG4MiniFCAL +atlas_add_component( LArG4MiniFCAL src/*.cc + src/components/*.cxx PUBLIC_HEADERS LArG4MiniFCAL - INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel LArG4Code CaloG4SimLib StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaKernel Identifier LArG4RunControl ) + INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} + LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} LArG4Code CaloG4SimLib StoreGateLib SGtests + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel Identifier LArG4RunControl ) +atlas_install_python_modules( python/*.py ) diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/LArG4MiniFCAL/MiniFCALCalculator.h b/LArCalorimeter/LArG4/LArG4MiniFCAL/LArG4MiniFCAL/MiniFCALCalculator.h deleted file mode 100755 index 7e0eb6f49f88bc76043226cb2f8af4285b16953b..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4MiniFCAL/LArG4MiniFCAL/MiniFCALCalculator.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// MiniFCALCalculator.hh - -// Revision history: - -// Aug-2008: M.Fincke First implementation for SLHC MiniFCal - -#ifndef LARG4MINIFCAL_MINIFCALCALCULATOR_H -#define LARG4MINIFCAL_MINIFCALCALCULATOR_H - -#include "LArG4Code/LArG4Identifier.h" -#include "LArG4Code/LArVCalculator.h" -#include "LArG4Code/LArVG4DetectorParameters.h" -#include <stdexcept> - -// Forward declarations. -class G4Step; -class MiniFCALAssignIdentifier; -class IMessageSvc; -namespace LArG4 { - namespace MiniFCAL { - class MiniFCALAssignIdentifier; - } -} - - -class MiniFCALCalculator : public LArVCalculator { -public: - - // Accessor for pointer to the singleton. - static MiniFCALCalculator* GetCalculator(); - - - ///////////////////////////////////////////// - // The interface for LArVCalculator. - - virtual G4float OOTcut() const { return m_OOTcut; } - virtual void SetOutOfTimeCut(G4double c) { m_OOTcut = c; } - - - virtual G4bool Process(const G4Step* a_step){return Process(a_step, m_hdata);} - virtual G4bool Process(const G4Step*, std::vector<LArHitData>&); - - virtual const LArG4Identifier& identifier(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].id; - } - - virtual G4double time(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].time; - } - virtual G4double energy(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - if(m_hdata.size()<1) throw std::range_error("No hit yet"); - return m_hdata[0].energy; - }; - virtual G4bool isInTime(int i=0) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return m_isInTime; - } - virtual G4bool isOutOfTime(int i) const { - if (i!=0) throw std::range_error("Multiple hits not yet implemented"); - return ( !m_isInTime ); - } - - -protected: - // The constructor is protected according to the singleton design - // pattern. - MiniFCALCalculator(); - -private: - static MiniFCALCalculator* m_instance; - - LArG4::MiniFCAL::MiniFCALAssignIdentifier *m_Geometry; - - //LArG4Identifier m_identifier; - //G4double m_time; - //G4double m_energy; - std::vector<LArHitData> m_hdata; - - G4float m_OOTcut; - G4bool m_isInTime; - -}; - -#endif // LARG4MINIFCAL_MINIFCALCALCULATOR_H - diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/cmt/requirements b/LArCalorimeter/LArG4/LArG4MiniFCAL/cmt/requirements index c58bbf503506ac8d3ea9dcdb2006daf8ba9714d8..d995eb1eb7910c063f6203d6d45c6a0ba1b2a81d 100755 --- a/LArCalorimeter/LArG4/LArG4MiniFCAL/cmt/requirements +++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/cmt/requirements @@ -5,22 +5,23 @@ author Margret Fincke-Keeler <mgf@uvic.ca> # G4 Hit processing for the Mini FCAL use AtlasPolicy AtlasPolicy-* -use LArG4Code LArG4Code-* LArCalorimeter/LArG4 use Geant4 Geant4-* External -use CaloG4Sim CaloG4Sim-* Calorimeter use GaudiInterface GaudiInterface-* External use StoreGate StoreGate-* Control use AtlasCLHEP AtlasCLHEP-* External # Build the library (and export the headers) -library LArG4MiniFCAL *.cc +library LArG4MiniFCAL *.cc -s=components *.cxx -apply_pattern installed_library +apply_pattern component_library +apply_pattern declare_python_modules files="*.py" private use AthenaKernel AthenaKernel-* Control use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel use Identifier Identifier-* DetectorDescription use RDBAccessSvc RDBAccessSvc-* Database/AthenaPOOL -use LArG4RunControl LArG4RunControl-* LArCalorimeter/LArG4 +#use LArG4RunControl LArG4RunControl-* LArCalorimeter/LArG4 +use LArG4Code LArG4Code-* LArCalorimeter/LArG4 +use CaloG4Sim CaloG4Sim-* Calorimeter diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/python/LArG4MiniFCALConfig.py b/LArCalorimeter/LArG4/LArG4MiniFCAL/python/LArG4MiniFCALConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..c39adf376cc4b937619dcdee8f9bfbd846b4ee71 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/python/LArG4MiniFCALConfig.py @@ -0,0 +1,22 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon import CfgMgr + +def getMiniFCALCalibrationCalculator(name="MiniFCALCalibrationCalculator", **kwargs): + return CfgMgr.LArG4__MiniFCAL__MiniFCALCalibrationCalculator(name, **kwargs) + +def getMiniFCALActiveCalibrationCalculator(name="MiniFCALActiveCalibrationCalculator", **kwargs): + kwargs.setdefault("GeometryType", "ACTIVE") + return getMiniFCALCalibrationCalculator(name, **kwargs) + +def getMiniFCALInactiveCalibrationCalculator(name="MiniFCALInactiveCalibrationCalculator", **kwargs): + kwargs.setdefault("GeometryType", "INACTIVE") + return getMiniFCALCalibrationCalculator(name, **kwargs) + +def getMiniFCALDeadCalibrationCalculator(name="MiniFCALDeadCalibrationCalculator", **kwargs): + kwargs.setdefault("GeometryType", "DEAD") + return getMiniFCALCalibrationCalculator(name, **kwargs) + +def getMiniFCALCalculator(name="MiniFCALCalculator", **kwargs): + return CfgMgr.MiniFCALCalculator(name, **kwargs) + diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/python/LArG4MiniFCALConfigDb.py b/LArCalorimeter/LArG4/LArG4MiniFCAL/python/LArG4MiniFCALConfigDb.py new file mode 100644 index 0000000000000000000000000000000000000000..e100117dd13c3bfec5023f313fd1845d21139d46 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/python/LArG4MiniFCALConfigDb.py @@ -0,0 +1,9 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.CfgGetter import addService + +addService("LArG4MiniFCAL.LArG4MiniFCALConfig.getMiniFCALCalculator","MiniFCALCalculator") +addService("LArG4MiniFCAL.LArG4MiniFCALConfig.getMiniFCALActiveCalibrationCalculator","MiniFCALActiveCalibrationCalculator") +addService("LArG4MiniFCAL.LArG4MiniFCALConfig.getMiniFCALInactiveCalibrationCalculator","MiniFCALInactiveCalibrationCalculator") +addService("LArG4MiniFCAL.LArG4MiniFCALConfig.getMiniFCALDeadCalibrationCalculator","MiniFCALDeadCalibrationCalculator") + diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALAssignIdentifier.cc b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALAssignIdentifier.cc old mode 100755 new mode 100644 index 1e2e3fc3978a7445a56d07d646c03056c771927a..83eb517225023f053423660b202efba8b2f876f6 --- a/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALAssignIdentifier.cc +++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALAssignIdentifier.cc @@ -4,9 +4,11 @@ // LArG4::MiniFCAL::MiniFCALAssignIdentifier #include "LArG4Code/LArG4Identifier.h" -#include "LArG4MiniFCAL/MiniFCALAssignIdentifier.h" +#include "MiniFCALAssignIdentifier.h" #include "Identifier/Identifier.h" +#include "CLHEP/Geometry/Point3D.h" + #include "G4RunManager.hh" #include "G4EventManager.hh" #include "G4SteppingManager.hh" @@ -21,7 +23,7 @@ #include "G4LogicalVolume.hh" #include "G4LogicalVolumeStore.hh" #include "G4TouchableHistory.hh" - + #include "RDBAccessSvc/IRDBAccessSvc.h" #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" @@ -40,279 +42,273 @@ #include <map> -using HepGeom::Point3D; - - namespace LArG4 { - + namespace MiniFCAL { - + MiniFCALAssignIdentifier* MiniFCALAssignIdentifier::m_instance = 0; - - + + MiniFCALAssignIdentifier* MiniFCALAssignIdentifier::GetInstance() { - if (m_instance == 0) m_instance = new MiniFCALAssignIdentifier(); + if (m_instance == nullptr) m_instance = new MiniFCALAssignIdentifier(); return m_instance; } - - + + MiniFCALAssignIdentifier::MiniFCALAssignIdentifier() - : m_halfLength(0), - m_absThick(0), - m_layThick(0), - m_nRings(0) + : m_halfLength(0), + m_absThick(0), + m_layThick(0), + m_nRings(0) { StatusCode sc; ISvcLocator *svcLocator = Gaudi::svcLocator(); - + sc = svcLocator->service("MessageSvc", m_msgsvc, true); - if(sc!=StatusCode::SUCCESS) - throw std::runtime_error("Error in MiniFcalAssingIdentifier, cannot access MessageSvc"); - - MsgStream log(m_msgsvc, "LArG4::MiniFcalAssignIdentifier"); + if(sc!=StatusCode::SUCCESS) + throw std::runtime_error("Error in MiniFcalAssingIdentifier, cannot access MessageSvc"); + + MsgStream log(m_msgsvc, "LArG4::MiniFcalAssignIdentifier"); log << MSG::DEBUG << "In MiniFcalAssignIdentifier - constructor; access database" << endmsg; - + IRDBAccessSvc* pAccessSvc(0); sc=svcLocator->service("RDBAccessSvc",pAccessSvc); if(sc != StatusCode::SUCCESS) { - log << MSG::ERROR <<"Cannot locate RDBAccessSvc!!" << endmsg; + log << MSG::ERROR <<"Cannot locate RDBAccessSvc!!" << endmsg; } - + IGeoModelSvc* geoModelSvc(0); sc = svcLocator->service ("GeoModelSvc",geoModelSvc); if (sc != StatusCode::SUCCESS) { - log << MSG::ERROR <<"Cannot locate GeoModelSvc!!" << endmsg; + log << MSG::ERROR <<"Cannot locate GeoModelSvc!!" << endmsg; } - - + + std::string AtlasVersion = geoModelSvc->atlasVersion(); std::string LArVersion = geoModelSvc->LAr_VersionOverride(); - + std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion; std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr"; - - pAccessSvc->connect(); + + pAccessSvc->connect(); std::string miniFcalVersion = pAccessSvc->getChildTag("MiniFcal",detectorKey,detectorNode); if(miniFcalVersion.empty()) { - m_initialized = false; - pAccessSvc->disconnect(); - return; + m_initialized = false; + pAccessSvc->disconnect(); + return; } - + //--- Get geometry information from database: const IRDBRecordset* recEnvelope = pAccessSvc->getRecordset("MiniFcalEnvelope",detectorKey,detectorNode); if(recEnvelope->size()==0) { - log << MSG::ERROR << "Unable to get envelope parameters from the database" << endmsg; + log << MSG::ERROR << "Unable to get envelope parameters from the database" << endmsg; } - + const IRDBRecordset* recCommon = pAccessSvc->getRecordset("MiniFcalCommon",detectorKey,detectorNode); if(recCommon->size()==0) { - log << MSG::ERROR << "Unable to get MiniFcalCommon from the database" << endmsg; + log << MSG::ERROR << "Unable to get MiniFcalCommon from the database" << endmsg; } - + const IRDBRecordset* recRings = pAccessSvc->getRecordset("MiniFcalRings",detectorKey,detectorNode); if(recRings->size()==0) { - log << MSG::ERROR << "Unable to get MiniFcalRings from the database" << endmsg; + log << MSG::ERROR << "Unable to get MiniFcalRings from the database" << endmsg; } m_halfLength = ((*recEnvelope)[0]->getDouble("DZ"))*CLHEP::mm; // half-length of MiniFcal module m_absThick = ((*recCommon)[0]->getDouble("ABSORBERTHICKNESS"))*CLHEP::mm; // half-length of MiniFcal module m_layThick = ((*recCommon)[0]->getDouble("LAYERTHICKNESS"))*CLHEP::mm; // half-length of MiniFcal module - + m_nRings=recRings->size(); - + for(unsigned i=0; i<recRings->size(); ++i) { - m_ringIndexes[(*recRings)[i]->getInt("RINGNUM")] = i; - m_ringRouter[(*recRings)[i]->getInt("RINGNUM")] = ((*recRings)[i]->getDouble("ROUTER"))*CLHEP::mm; - m_ringRinner[(*recRings)[i]->getInt("RINGNUM")] = ((*recRings)[i]->getDouble("RINNER"))*CLHEP::mm; - m_nWafers[(*recRings)[i]->getInt("RINGNUM")] =(*recRings)[i]->getInt("NWAFERS") ; + m_ringIndexes[(*recRings)[i]->getInt("RINGNUM")] = i; + m_ringRouter[(*recRings)[i]->getInt("RINGNUM")] = ((*recRings)[i]->getDouble("ROUTER"))*CLHEP::mm; + m_ringRinner[(*recRings)[i]->getInt("RINGNUM")] = ((*recRings)[i]->getDouble("RINNER"))*CLHEP::mm; + m_nWafers[(*recRings)[i]->getInt("RINGNUM")] =(*recRings)[i]->getInt("NWAFERS") ; } - pAccessSvc->disconnect(); - + pAccessSvc->disconnect(); + m_initialized = true; } - - - - + + + + //============================================================================================ - - LArG4Identifier MiniFCALAssignIdentifier::CalculateIdentifier(const G4Step* a_step, - const eMiniFCALAssignIdentifierType g_type) - - { + + LArG4Identifier MiniFCALAssignIdentifier::CalculateIdentifier(const G4Step* a_step, + const eMiniFCALAssignIdentifierType g_type) const + + { if(!m_initialized) return LArG4Identifier(); - StatusCode sc; - - MsgStream log(m_msgsvc, "LArG4::MiniFcalAssignIdentifier::Calculator"); - + MsgStream log(m_msgsvc, "LArG4::MiniFcalAssignIdentifier::Calculator"); + //--- Get coorditnates of G4 step - + G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); G4StepPoint* post_step_point = a_step->GetPostStepPoint(); - Point3D<double> globalPosition = pre_step_point->GetPosition(); - Point3D<double> globalPosition2 = post_step_point->GetPosition(); - + HepGeom::Point3D<double> globalPosition = pre_step_point->GetPosition(); + HepGeom::Point3D<double> globalPosition2 = post_step_point->GetPosition(); + G4TouchableHistory* theTouchable = (G4TouchableHistory*) (pre_step_point->GetTouchable()); G4String volumeName = theTouchable->GetVolume()->GetName() ; G4String volumeName2 = post_step_point->GetTouchable()->GetVolume()->GetName() ; - - + + G4ThreeVector midPositionG = (globalPosition + globalPosition2) * 0.5; // global atlas coordinates int zSide = 0; zSide = midPositionG.z()<0. ? -1:1; - + //--- Assign identifier according the the volumes we are in: - + if ( g_type==kActive || g_type==kInactive ) - { - int g4depth = theTouchable->GetHistoryDepth(); - - G4int index= -1; - - if(volumeName=="LArMgr::MiniFCAL::Layer") { - g4depth = g4depth-1; - index = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetCopyNo(); - } - else if(volumeName=="LArMgr::MiniFCAL::Wafer") { - g4depth = g4depth-2; - index = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetCopyNo(); - } - - - //--- Get local (ie: module) coordinates - - G4AffineTransform loc1Transform; - G4ThreeVector loc1Position ; - loc1Transform = theTouchable->GetHistory()->GetTransform(g4depth); - loc1Position = loc1Transform.TransformPoint(pre_step_point->GetPosition()); - - G4AffineTransform loc2Transform; - G4ThreeVector loc2Position ; - loc2Transform = post_step_point->GetTouchable()->GetHistory()->GetTransform(g4depth); - loc2Position = loc2Transform.TransformPoint(post_step_point->GetPosition()); - - if (g4depth!=4) log << MSG::INFO << "MinFcal local Coordinates - BIG Error!: " << volumeName << " " << g4depth << " " << endmsg; - - - G4ThreeVector midPosition = (loc1Position + loc2Position) * 0.5; // local module coordinates - - double phigrad=0.; - phigrad = midPosition.getPhi()*(180./M_PI); - if (phigrad<0.) phigrad = 360. + phigrad; - - - // initialize the identifier - LArG4Identifier minifcalID = LArG4Identifier(); - int ieta=-1; - int iphi=-1; - int idepth = -1; - - //--- find idepth - regardless of which volume we are in: - for (int ilongi = 0; ilongi<12; ilongi++) { - if ( midPosition.z() < (-m_halfLength+m_absThick+m_layThick) + double(ilongi)*(m_absThick+m_layThick) ) { - idepth = ilongi; - if (idepth==11) idepth=10; // that includes the end-plate now - break; - } - } - - - //--- First look at everything that is not an active wafer: -------------------------- - if(volumeName!="LArMgr::MiniFCAL::Wafer") { - - //--- find ieta: - G4double radi=sqrt(midPosition.x()*midPosition.x() + midPosition.y()*midPosition.y()); - - if (radi > m_ringRinner[0]) {ieta=0;} // everything at outer r ieta=0 - else if (radi<=m_ringRinner[m_nRings-2]) { ieta=m_nRings-1; } // at inner r maximum ieta - else { // all other r in-between - for (int j=0; j<(m_nRings-2); j++){ // goes from 0 to (nrings-1) - if (radi<=m_ringRinner[j] && radi>m_ringRinner[j+1] ) { ieta=j+1; break;} - } - } - - //--- find iphi: - double delphi = 360./double(m_nWafers[ieta]); - - if (zSide<0){ - phigrad -= 180.; - if (phigrad<0.) phigrad = -phigrad ; - else phigrad = -phigrad + 360. ; - } - - for (int j=0; j<m_nWafers[ieta]; j++){ - if (phigrad>delphi*double(j) && phigrad<=delphi*double(j+1)) { iphi=j; break;} - } - - - } // done with inactive ieta/iphi assignment - - - //--- this for active wafers now - go by copy number: - else { - ieta = int(float(index)/100.); - iphi=index%100 ; - } - - - //--- Check if there is anything unusual: - if (iphi<0) log << MSG::INFO << "MiniFcal iphi problem: Z " << volumeName << " " - << zSide << " " << phigrad << " " << iphi << " / ieta: " << ieta - << " " << m_nWafers[ieta] << endmsg; - if (ieta<0||ieta>(m_nRings-1)) log << MSG::INFO << " MiniFcal ieta problem - ieta=" - << volumeName << " " << ieta << endmsg; - - - if (idepth<0 || idepth>10) log << MSG::INFO << idepth << "MiniFcal-wrong idepth! " << midPosition.z() - << " | " << volumeName << " -> " << volumeName2 << endmsg; - - - // adjust idepth fo 4 samplings max: - if (idepth<2) idepth=0; - else if (idepth<8 && idepth>=2) idepth=1; - else if (idepth>=8) idepth=2; - else log << MSG::INFO << "Bad handling of the sampling! " << idepth <<endmsg; - - - minifcalID << 4 // LAr - << 3 // Fcal - << 2*zSide // +-Z - << 0 // module - << idepth // depth - << ieta // ieta - << iphi ; // iphi - - - - return minifcalID; - - } // end of if in active or inactive - + { + int g4depth = theTouchable->GetHistoryDepth(); + + G4int index= -1; + + if(volumeName=="LArMgr::MiniFCAL::Layer") { + g4depth = g4depth-1; + index = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetCopyNo(); + } + else if(volumeName=="LArMgr::MiniFCAL::Wafer") { + g4depth = g4depth-2; + index = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetCopyNo(); + } + + + //--- Get local (ie: module) coordinates + + G4AffineTransform loc1Transform; + G4ThreeVector loc1Position ; + loc1Transform = theTouchable->GetHistory()->GetTransform(g4depth); + loc1Position = loc1Transform.TransformPoint(pre_step_point->GetPosition()); + + G4AffineTransform loc2Transform; + G4ThreeVector loc2Position ; + loc2Transform = post_step_point->GetTouchable()->GetHistory()->GetTransform(g4depth); + loc2Position = loc2Transform.TransformPoint(post_step_point->GetPosition()); + + if (g4depth!=4) log << MSG::INFO << "MinFcal local Coordinates - BIG Error!: " << volumeName << " " << g4depth << " " << endmsg; + + + G4ThreeVector midPosition = (loc1Position + loc2Position) * 0.5; // local module coordinates + + double phigrad=0.; + phigrad = midPosition.getPhi()*(180./M_PI); + if (phigrad<0.) phigrad = 360. + phigrad; + + + // initialize the identifier + LArG4Identifier minifcalID = LArG4Identifier(); + int ieta=-1; + int iphi=-1; + int idepth = -1; + + //--- find idepth - regardless of which volume we are in: + for (int ilongi = 0; ilongi<12; ilongi++) { + if ( midPosition.z() < (-m_halfLength+m_absThick+m_layThick) + double(ilongi)*(m_absThick+m_layThick) ) { + idepth = ilongi; + if (idepth==11) idepth=10; // that includes the end-plate now + break; + } + } + + + //--- First look at everything that is not an active wafer: -------------------------- + if(volumeName!="LArMgr::MiniFCAL::Wafer") { + + //--- find ieta: + G4double radi=sqrt(midPosition.x()*midPosition.x() + midPosition.y()*midPosition.y()); + + if (radi > m_ringRinner.at(0)) {ieta=0;} // everything at outer r ieta=0 + else if (radi<=m_ringRinner.at(m_nRings-2)) { ieta=m_nRings-1; } // at inner r maximum ieta + else { // all other r in-between + for (int j=0; j<(m_nRings-2); j++){ // goes from 0 to (nrings-1) + if (radi<=m_ringRinner.at(j) && radi>m_ringRinner.at(j+1) ) { ieta=j+1; break;} + } + } + + //--- find iphi: + double delphi = 360./double(m_nWafers.at(ieta)); + + if (zSide<0){ + phigrad -= 180.; + if (phigrad<0.) phigrad = -phigrad ; + else phigrad = -phigrad + 360. ; + } + + for (int j=0; j<m_nWafers.at(ieta); j++){ + if (phigrad>delphi*double(j) && phigrad<=delphi*double(j+1)) { iphi=j; break;} + } + + + } // done with inactive ieta/iphi assignment + + + //--- this for active wafers now - go by copy number: + else { + ieta = int(float(index)/100.); + iphi=index%100 ; + } + + + //--- Check if there is anything unusual: + if (iphi<0) log << MSG::INFO << "MiniFcal iphi problem: Z " << volumeName << " " + << zSide << " " << phigrad << " " << iphi << " / ieta: " << ieta + << " " << m_nWafers.at(ieta) << endmsg; + if (ieta<0||ieta>(m_nRings-1)) log << MSG::INFO << " MiniFcal ieta problem - ieta=" + << volumeName << " " << ieta << endmsg; + + + if (idepth<0 || idepth>10) log << MSG::INFO << idepth << "MiniFcal-wrong idepth! " << midPosition.z() + << " | " << volumeName << " -> " << volumeName2 << endmsg; + + + // adjust idepth fo 4 samplings max: + if (idepth<2) idepth=0; + else if (idepth<8 && idepth>=2) idepth=1; + else if (idepth>=8) idepth=2; + else log << MSG::INFO << "Bad handling of the sampling! " << idepth <<endmsg; + + + minifcalID << 4 // LAr + << 3 // Fcal + << 2*zSide // +-Z + << 0 // module + << idepth // depth + << ieta // ieta + << iphi ; // iphi + + + + return minifcalID; + + } // end of if in active or inactive + else { - // Provision for dead material - we shoud never get here!; - // Use an ID that's close to the standard asignment for the moment with ieta/iphi=0 - log << MSG::WARNING << " MiniFcalAssignIdentifier: Found dead material. This should NOT happen! Assign DM ID: 10-4-2-0-5-0-0 " - << volumeName << " " << volumeName2 << endmsg; - LArG4Identifier minifcalID = LArG4Identifier(); - minifcalID << 10 // DM - << 4 // +/-LAr - << 2 // type (DM inside) - << 0 // sampling (0 or 1 in front of Fcal) - << 5 // region - << 0 // ieta - << 0 ; // iphi - - return minifcalID; + // Provision for dead material - we shoud never get here!; + // Use an ID that's close to the standard asignment for the moment with ieta/iphi=0 + log << MSG::WARNING << " MiniFcalAssignIdentifier: Found dead material. This should NOT happen! Assign DM ID: 10-4-2-0-5-0-0 " + << volumeName << " " << volumeName2 << endmsg; + LArG4Identifier minifcalID = LArG4Identifier(); + minifcalID << 10 // DM + << 4 // +/-LAr + << 2 // type (DM inside) + << 0 // sampling (0 or 1 in front of Fcal) + << 5 // region + << 0 // ieta + << 0 ; // iphi + + return minifcalID; } - + } // end calculateIdentifier - + } // namespace MiniFCAL - -} // namespace LArG4 +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/LArG4MiniFCAL/MiniFCALAssignIdentifier.h b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALAssignIdentifier.h old mode 100755 new mode 100644 similarity index 83% rename from LArCalorimeter/LArG4/LArG4MiniFCAL/LArG4MiniFCAL/MiniFCALAssignIdentifier.h rename to LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALAssignIdentifier.h index 04671854084c5a77b7574843d03ea6fa18af5498..85a62823453586232cac6835fc7b74cba35b266e --- a/LArCalorimeter/LArG4/LArG4MiniFCAL/LArG4MiniFCAL/MiniFCALAssignIdentifier.h +++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALAssignIdentifier.h @@ -5,7 +5,7 @@ // This class contains the geometry calculations needed to calculate // an identifier for a given G4Step in the MiniFCAL. -// Aug-2008: M.Fincke +// Aug-2008: M.Fincke #ifndef MiniFCALAssignIdentifier_H #define MiniFCALAssignIdentifier_H @@ -19,9 +19,7 @@ #include "G4ParticleDefinition.hh" #include "G4DynamicParticle.hh" #include "G4ThreeVector.hh" -#include "CLHEP/Geometry/Point3D.h" -#include "LArG4Code/LArVG4DetectorParameters.h" #include "globals.hh" #include <map> @@ -39,30 +37,30 @@ class MsgStream; class CaloDetDescrManager ; namespace LArG4 { - + namespace MiniFCAL { - + enum eMiniFCALAssignIdentifierType { kActive, kInactive, kDead }; - + class MiniFCALAssignIdentifier { - + public: - + // Standard implementation of a singleton pattern. static MiniFCALAssignIdentifier* GetInstance(); - virtual ~MiniFCALAssignIdentifier(){ ;} - - LArG4Identifier CalculateIdentifier( const G4Step* a_step, const eMiniFCALAssignIdentifierType type = kActive ); - - + virtual ~MiniFCALAssignIdentifier(){ ;} + + LArG4Identifier CalculateIdentifier( const G4Step* a_step, const eMiniFCALAssignIdentifierType type = kActive ) const; + + protected: MiniFCALAssignIdentifier(); IMessageSvc* m_msgsvc; - + private: static MiniFCALAssignIdentifier *m_instance; - - + + G4double m_halfLength; G4double m_absThick; G4double m_layThick; @@ -73,11 +71,11 @@ namespace LArG4 { std::map<int,G4double> m_ringRinner; int m_nRings; - bool m_initialized; + bool m_initialized; }; - + } // namespace MiniFCAL - + } // namespace LArG4 #endif // MiniFCALAssignIdentifier_H diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalculator.cc b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalculator.cc old mode 100755 new mode 100644 index e848bacef0ce6384bf4bcb8af8d0b5e2466e2fad..f6e8f2bbc40e4414ae8de1fd232644089fca50cf --- a/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalculator.cc @@ -2,10 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4MiniFCAL/MiniFCALCalculator.h" -#include "LArG4MiniFCAL/MiniFCALAssignIdentifier.h" - -#include "LArG4RunControl/LArG4GlobalOptions.h" +#include "MiniFCALCalculator.h" +#include "MiniFCALAssignIdentifier.h" #include "G4ThreeVector.hh" #include "G4StepPoint.hh" @@ -14,7 +12,6 @@ #include "G4LogicalVolumeStore.hh" #include "G4AffineTransform.hh" #include "G4TouchableHistory.hh" -#include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/Bootstrap.h" #include "StoreGate/StoreGateSvc.h" #include "AthenaKernel/getMessageSvc.h" @@ -27,52 +24,21 @@ namespace Units = Athena::Units; #undef DEBUG_HITS -// Standard implementation of a singleton pattern. - -MiniFCALCalculator* MiniFCALCalculator::m_instance = 0; - -MiniFCALCalculator* MiniFCALCalculator::GetCalculator() +MiniFCALCalculator::MiniFCALCalculator(const std::string& name, ISvcLocator *pSvcLocator):LArCalculatorSvcImp(name, pSvcLocator) { - if (m_instance == 0) - { - m_instance = new MiniFCALCalculator(); - } - return m_instance; } - -//MiniFCALCalculator::~MiniFCALCalculator() {} - -MiniFCALCalculator::MiniFCALCalculator() - :m_isInTime(false) +StatusCode MiniFCALCalculator::initialize() { - StoreGateSvc* detStore; - LArG4GlobalOptions *globalOptions=NULL; - - ISvcLocator *svcLocator = Gaudi::svcLocator(); - StatusCode status = svcLocator->service("DetectorStore", detStore); - - if(status.isSuccess()){ - status = detStore->retrieve(globalOptions, "LArG4GlobalOptions"); - if(status.isFailure()){ - throw std::runtime_error("MiniFCALCalculator: cannot retrieve LArG4GlobalOptions"); - } - } - else { - throw std::runtime_error("MiniFCALCalculator: cannot initialize StoreGate interface"); - } - - MsgStream log(Athena::getMessageSvc(),"MiniFCALCalculator" ); - log << MSG::INFO << "Use the MiniFCALCalculator for the MiniFCAL" << endmsg; - - m_OOTcut = globalOptions->OutOfTimeCut(); - m_Geometry = LArG4::MiniFCAL::MiniFCALAssignIdentifier::GetInstance(); + ATH_MSG_INFO("Use the MiniFCALCalculator for the MiniFCAL"); + m_Geometry = LArG4::MiniFCAL::MiniFCALAssignIdentifier::GetInstance(); + return StatusCode::SUCCESS; } -G4bool MiniFCALCalculator::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) +G4bool MiniFCALCalculator::Process(const G4Step* a_step, std::vector<LArHitData>& hdata) const { // make sure hdata is reset hdata.resize(1); @@ -83,21 +49,15 @@ G4bool MiniFCALCalculator::Process(const G4Step* a_step, std::vector<LArHitData> if(hdata[0].energy <= 0.) return false; // Find out how long it took the energy to get here. - G4double timeOfFlight = 0.5* ( a_step->GetPreStepPoint()->GetGlobalTime() - + a_step->GetPostStepPoint()->GetGlobalTime() ); - G4ThreeVector point = 0.5* ( a_step->GetPreStepPoint()->GetPosition() - + a_step->GetPostStepPoint()->GetPosition() ); + G4double timeOfFlight = 0.5* ( a_step->GetPreStepPoint()->GetGlobalTime() + + a_step->GetPostStepPoint()->GetGlobalTime() ); + G4ThreeVector point = 0.5* ( a_step->GetPreStepPoint()->GetPosition() + + a_step->GetPostStepPoint()->GetPosition() ); - hdata[0].time = timeOfFlight/Units::ns - point.mag()/Units::c_light/Units::ns; - - if (hdata[0].time > m_OOTcut) - m_isInTime = false; - else - m_isInTime = true; + hdata[0].time = (timeOfFlight - point.mag()/CLHEP::c_light)/Units::ns; // Calculate the identifier. hdata[0].id = m_Geometry->CalculateIdentifier( a_step, LArG4::MiniFCAL::kActive); return true; } - diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalculator.h b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalculator.h new file mode 100644 index 0000000000000000000000000000000000000000..079cb1e37a32172335fa5de8140352bdcc604722 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalculator.h @@ -0,0 +1,54 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// MiniFCALCalculator.hh + +// Revision history: + +// Aug-2008: M.Fincke First implementation for SLHC MiniFCal + +#ifndef LARG4MINIFCAL_MINIFCALCALCULATOR_H +#define LARG4MINIFCAL_MINIFCALCALCULATOR_H + +#include "LArG4Code/LArG4Identifier.h" +#include "LArG4Code/LArCalculatorSvcImp.h" +#include <stdexcept> + +// Forward declarations. +class G4Step; +class MiniFCALAssignIdentifier; +namespace LArG4 { + namespace MiniFCAL { + class MiniFCALAssignIdentifier; + } +} + + +class MiniFCALCalculator : public LArCalculatorSvcImp { +public: + + MiniFCALCalculator(const std::string& name, ISvcLocator * pSvcLocator); + StatusCode initialize() override final; + + ///////////////////////////////////////////// + + virtual G4float OOTcut() const override final { return m_OOTcut; } + virtual void SetOutOfTimeCut(G4double c) { m_OOTcut = c; } //FIXME public but not part of interface class + + + virtual G4bool Process(const G4Step*, std::vector<LArHitData>&) const override final; + + virtual G4bool isInTime(G4double hitTime) const override final + { + return !(hitTime > m_OOTcut); //FIXME should we be checking the absolute value of hdata[0].time here? + } + +private: + + LArG4::MiniFCAL::MiniFCALAssignIdentifier *m_Geometry; + + G4float m_OOTcut; +}; + +#endif // LARG4MINIFCAL_MINIFCALCALCULATOR_H diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalibrationCalculator.cc old mode 100755 new mode 100644 index ce9e66640464253da584b205f1a11d30a5f1a97e..458912acec237ca8b9a134d2bad8effafd87e3b8 --- a/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalibrationCalculator.cc @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4MiniFCAL/MiniFCALCalibrationCalculator.h" +#include "MiniFCALCalibrationCalculator.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/Bootstrap.h" @@ -20,26 +20,26 @@ namespace LArG4 { namespace MiniFCAL { - MiniFCALCalibrationCalculator::MiniFCALCalibrationCalculator(const eMiniFCALAssignIdentifierType type) { + MiniFCALCalibrationCalculator::MiniFCALCalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator) : LArCalibCalculatorSvcImp(name, pSvcLocator), + m_geometryType(kActive) { + declareProperty("GeometryType",m_strgeometryType="ACTIVE"); + } - StoreGateSvc* detStore; - ISvcLocator *svcLocator = Gaudi::svcLocator(); - StatusCode status = svcLocator->service("DetectorStore", detStore); - MsgStream log(Athena::getMessageSvc(),"MiniFCALCalculator" ); - if(status != StatusCode::SUCCESS ) { - log << MSG::ERROR << "No DetStore available !!" << endmsg; - } + StatusCode MiniFCALCalibrationCalculator::initialize() { - log << MSG::INFO << "Use the MiniFCALCalibrationCalculator for the MiniFCAL" << endmsg; + if(m_strgeometryType.find("DEAD") != std::string::npos){ + m_geometryType=kDead; + } else if (m_strgeometryType.find("INACTIVE") != std::string::npos){ + m_geometryType=kInactive; + } else {m_geometryType=kActive;} - // Make sure there are no uninitialized variables. - m_identifier = LArG4Identifier(); - m_energies.clear(); + ATH_MSG_INFO("Use the MiniFCALCalibrationCalculator for the MiniFCAL"); // Initialize the geometry and energy calculators. m_geometryCalculator = MiniFCALAssignIdentifier::GetInstance(); //m_energyCalculator = new CaloG4::SimulationEnergies(); - m_geometryType = type; + + return StatusCode::SUCCESS; } @@ -48,27 +48,22 @@ namespace LArG4 { //delete m_energyCalculator; } + G4bool MiniFCALCalibrationCalculator::Process(const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process) const + { + if ( process == kEnergyAndID || process == kOnlyEnergy ) { + m_energyCalculator.Energies( step, energies ); + } else { + for (unsigned int i=0; i != 4; i++) energies.push_back( 0. ); + } + - G4bool MiniFCALCalibrationCalculator::Process( const G4Step* a_step, - const eCalculatorProcessing a_process ) { - - m_energies.clear(); - if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) - { - m_energyCalculator.Energies( a_step, m_energies ); - } - else - for (unsigned int i=0; i != 4; i++) m_energies.push_back( 0. ); - - - - if ( a_process == kEnergyAndID || a_process == kOnlyID ) - { - // Calculate the identifier. - - m_identifier = m_geometryCalculator->CalculateIdentifier(a_step, m_geometryType ); + if ( process == kEnergyAndID || process == kOnlyID ) { + // Calculate the identifier. + identifier = m_geometryCalculator->CalculateIdentifier(step, m_geometryType ); // Check for bad result. - if ( m_identifier == LArG4Identifier() ) return false; + if ( identifier == LArG4Identifier() ) return false; return true; } diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/LArG4MiniFCAL/MiniFCALCalibrationCalculator.h b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalibrationCalculator.h old mode 100755 new mode 100644 similarity index 56% rename from LArCalorimeter/LArG4/LArG4MiniFCAL/LArG4MiniFCAL/MiniFCALCalibrationCalculator.h rename to LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalibrationCalculator.h index 2697f34d1170173760c27503a79a15c4e621fcc8..5f6405f454c5fe3904b8ab4808057be409994116 --- a/LArCalorimeter/LArG4/LArG4MiniFCAL/LArG4MiniFCAL/MiniFCALCalibrationCalculator.h +++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALCalibrationCalculator.h @@ -8,9 +8,9 @@ #define MiniFCALCalibrationCalculator_H #include "CaloG4Sim/SimulationEnergies.h" -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" -#include "LArG4MiniFCAL/MiniFCALAssignIdentifier.h" +#include "MiniFCALAssignIdentifier.h" #include "globals.hh" @@ -28,27 +28,23 @@ namespace LArG4 { namespace MiniFCAL { - class MiniFCALCalibrationCalculator : public VCalibrationCalculator { + class MiniFCALCalibrationCalculator : public LArCalibCalculatorSvcImp { public: - - MiniFCALCalibrationCalculator(const eMiniFCALAssignIdentifierType type = kActive); - virtual ~MiniFCALCalibrationCalculator(); - - virtual G4bool Process (const G4Step* step, - const eCalculatorProcessing p = kEnergyAndID); - - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - virtual const std::vector<G4double>& energies() const { return m_energies; } - private: - LArG4Identifier m_identifier; + MiniFCALCalibrationCalculator(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize(); + StatusCode finalize() {return StatusCode::SUCCESS;} + virtual ~MiniFCALCalibrationCalculator(); - std::vector<G4double> m_energies; + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing process = kEnergyAndID) const override final; + private: MiniFCALAssignIdentifier* m_geometryCalculator; eMiniFCALAssignIdentifierType m_geometryType; + std::string m_strgeometryType; CaloG4::SimulationEnergies m_energyCalculator; diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/src/components/LArG4MiniFCAL_entries.cxx b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/components/LArG4MiniFCAL_entries.cxx new file mode 100644 index 0000000000000000000000000000000000000000..c230b209fdbd4ac08b5782c0ab2c4ab11c3513f8 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/components/LArG4MiniFCAL_entries.cxx @@ -0,0 +1,7 @@ +#include "GaudiKernel/DeclareFactoryEntries.h" + +#include "../MiniFCALCalculator.h" +#include "../MiniFCALCalibrationCalculator.h" + +DECLARE_SERVICE_FACTORY(LArG4::MiniFCAL::MiniFCALCalibrationCalculator) +DECLARE_SERVICE_FACTORY(MiniFCALCalculator) diff --git a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4BarrelOptions.h b/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4BarrelOptions.h deleted file mode 100755 index 3924b277a730082908d672d5519a07279af06d93..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4BarrelOptions.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef _LArG4BarrelOptions_h_ -#define _LArG4BarrelOptions_h_ -#include "CLHEP/Units/SystemOfUnits.h" - -// ----------------------------------------------------------------------// -// // -// This class defines options for the EMB part of the Liquid Argon // -// simulation. A constructor sets the default values. This class is // -// supposed to be exported to python, configured through python commands // -// then stored in storegate and ultimately writted to the data stream. // -// Similar structures exist for the other subcomponents. // -// // -//-----------------------------------------------------------------------// - -class LArG4BarrelOptions { - - public: - // A constructor to insure that the data starts up with a reasonable set - // of defaults: - - inline LArG4BarrelOptions() : - m_EMBCurr (true), - m_EMBEtaTrans (true), - m_EMBXtalk (true), - m_EMBTimeCurr (false), - m_EMBTimeShower (false), - m_EMBTimeProp (false), - m_EMBdstep (0.2*CLHEP::mm), - m_EMBBirksLaw (false), - m_EMBBirksk (0.0486), - m_EMBHVEnable (false) {} - - void saveMe(); - void printMe(); - - // Set methods - inline void EMBCurr(bool value) { m_EMBCurr = value; } - inline void EMBEtaTrans(bool value) { m_EMBEtaTrans = value; } - inline void EMBXtalk(bool value) { m_EMBXtalk = value; } - inline void EMBTimeCurr(bool value) { m_EMBTimeCurr = value; } - inline void EMBTimeShower(bool value) { m_EMBTimeShower = value; } - inline void EMBTimeProp(bool value) { m_EMBTimeProp = value; } - inline void EMBdstep(double value) { m_EMBdstep = value; } - inline void EMBBirksLaw(bool value) { m_EMBBirksLaw = value; } - inline void EMBBirksk(double value) { m_EMBBirksk = value; } - inline void EMBHVEnable(bool value) { m_EMBHVEnable = value; } - - // Get methods - inline bool EMBCurr(void) const { return m_EMBCurr; } - inline bool EMBEtaTrans(void) const { return m_EMBEtaTrans; } - inline bool EMBXtalk(void) const { return m_EMBXtalk; } - inline bool EMBTimeCurr(void) const { return m_EMBTimeCurr; } - inline bool EMBTimeShower(void) const { return m_EMBTimeShower; } - inline bool EMBTimeProp(void) const { return m_EMBTimeProp; } - inline double EMBdstep(void) const { return m_EMBdstep; } - inline bool EMBBirksLaw(void) const { return m_EMBBirksLaw; } - inline double EMBBirksk(void) const { return m_EMBBirksk; } - inline bool EMBHVEnable(void) const { return m_EMBHVEnable; } - - private: - // Switch for energy-current computation. - bool m_EMBCurr; - - // Switch for transition effect at eta=0.8 - bool m_EMBEtaTrans; - - // Switch for crosstalk effect in the strips: - bool m_EMBXtalk; - - // Switch for effect of current maps on time - bool m_EMBTimeCurr; - - // Switch to simulation effect of shower propagation with a cell, on time. - bool m_EMBTimeShower; - - // Switch to simulate the effect of signal propagation in the electrode, on time. - bool m_EMBTimeProp; - - // Value of the substep length in the current simulation - double m_EMBdstep; - - // Birks' law - bool m_EMBBirksLaw; - - // Birks' law, constant k - double m_EMBBirksk; - - // Enable HV imperfections in simulation - bool m_EMBHVEnable; - -}; - -#ifndef GAUDI_NEUTRAL -#include "CLIDSvc/CLASS_DEF.h" -CLASS_DEF(LArG4BarrelOptions, 321345322, 1) -#endif - -#endif diff --git a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4EMECOptions.h b/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4EMECOptions.h deleted file mode 100755 index 84306c9ceb3097d1ea31fe791067f688aeb76258..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4EMECOptions.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef _LArG4EMECOptions_h_ -#define _LArG4EMECOptions_h_ -#include "CLHEP/Units/SystemOfUnits.h" - -// ----------------------------------------------------------------------// -// // -// This class defines options for the EMEC part of the Liquid Argon // -// simulation. A constructor sets the default values. This class is // -// supposed to be exported to python, configured through python commands // -// then stored in storegate and ultimately writted to the data stream. // -// Similar structures exist for the other subcomponents. // -// // -//-----------------------------------------------------------------------// - -// uncomment this to turn on runtime selection -// of the method for LArWheelCalculator::parameterized_slant_angle -//#define LARWHEELCALCULATOR_PSA_DEVELOPMENT - -#include <string> - -class LArG4EMECOptions -{ - public: - - enum ECORRTYPE {NONE, CHCOLL, GAPOLD, GAPADJ, GAP_E, GAP_S, GAP_SE, CHCOLL1}; - - inline LArG4EMECOptions() : - - m_EMECECorrType(CHCOLL1), - m_EMECGapPower(1.4), - m_EMECChMap("v03"), - m_EMECEsr(0.2*CLHEP::mm), - m_EMECHVMap("v02"), -#ifdef LARWHEELCALCULATOR_PSA_DEVELOPMENT - m_EMECFoldA("param"), //"param" "table" "iter" -#endif - m_EMECBirksLaw (false), - m_EMECBirksk (0.0486), - m_EMECHVEnable (false){} - - // m_EMECPhiRotation("off"), // or "g3" - // m_EMECSagging("off"), // or "" or "a b c d" - // m_EMECInnerSlantParam("default"), // or "" or "a b c d e" - // m_EMECOuterSlantParam("default") {} // -- " --- - - void saveMe(); - void printMe(); - - // Set methods - inline void EMECECorrType(ECORRTYPE value) { m_EMECECorrType = value; } - inline void EMECGapPower(double value) { m_EMECGapPower = value; } - inline void EMECChMap(std::string value) { m_EMECChMap = value; } - inline void EMECEsr(double value) { m_EMECEsr = value; } - inline void EMECHVMap(std::string value) { m_EMECHVMap = value; } -#ifdef LARWHEELCALCULATOR_PSA_DEVELOPMENT - inline void EMECFoldA(std::string value) { m_EMECFoldA = value; } -#endif - inline void EMECBirksLaw(bool value) { m_EMECBirksLaw = value; } - inline void EMECBirksk(double value) { m_EMECBirksk = value; } - inline void EMECHVEnable (bool value) { m_EMECHVEnable = value; } - - //inline void EMECPhiRotation(std::string value) {m_EMECPhiRotation = value;} - //inline void EMECSagging(std::string value) {m_EMECSagging = value;} - //inline void EMECInnerSlantParam(std::string value) {m_EMECInnerSlantParam = value;} - //inline void EMECOuterSlantParam(std::string value) {m_EMECOuterSlantParam = value;} - - // Get methods - inline ECORRTYPE EMECECorrType(void) { return m_EMECECorrType; } - inline double EMECGapPower(void) { return m_EMECGapPower; } - inline std::string EMECChMap(void) { return m_EMECChMap; } - inline double EMECEsr(void) { return m_EMECEsr; } - inline std::string EMECHVMap(void) { return m_EMECHVMap; } -#ifdef LARWHEELCALCULATOR_PSA_DEVELOPMENT - inline std::string EMECFoldA(void) { return m_EMECFoldA; } -#endif - inline bool EMECBirksLaw(void) const { return m_EMECBirksLaw; } - inline double EMECBirksk(void) const { return m_EMECBirksk; } - inline bool EMECHVEnable(void) const { return m_EMECHVEnable; } - //inline std::string EMECPhiRotation(void) { return m_EMECPhiRotation; } - //inline std::string EMECSagging(void) { return m_EMECSagging; } - //inline std::string EMECInnerSlantParam(void) { return m_EMECInnerSlantParam;} - //inline std::string EMECOuterSlantParam(void) { return m_EMECOuterSlantParam;} - - - private: - - // Type of energy correction. - ECORRTYPE m_EMECECorrType; - - // Gap adjustment power - double m_EMECGapPower; - - // Field Map Version - std::string m_EMECChMap; - - // Signal suppression - double m_EMECEsr; - - // High Voltage file version - std::string m_EMECHVMap; - - // method for folding angle calculation; - // "table": based on interpolation of the official table(ref:ABS.YYY.00.DR.2) - // "param": based on parametrization - // "iter": some iterational technique - // NOTE: this option has no effect unless - // LARWHEELCALCULATOR_PSA_DEVELOPMENT is defined in - // GeoSpecialShapes/LArWheelCalculator.h - -#ifdef LARWHEELCALCULATOR_PSA_DEVELOPMENT - std::string m_EMECFoldA; -#endif - // for G3 compatibility - //std::string m_EMECPhiRotation; - - // Sagging of fans - //std::string m_EMECSagging; - - // - //std::string m_EMECInnerSlantParam; - //std::string m_EMECOuterSlantParam; - - // Birks' law - bool m_EMECBirksLaw; - - // Birks' law, constant k - double m_EMECBirksk; - - // HV imperfections - bool m_EMECHVEnable; - - - -}; - -#ifndef GAUDI_NEUTRAL -#include "CLIDSvc/CLASS_DEF.h" -CLASS_DEF(LArG4EMECOptions, 321345323, 1) -#endif - -#endif diff --git a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4FCALOptions.h b/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4FCALOptions.h deleted file mode 100644 index 8ecd0560f863f153900e09561581815b84911061..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4FCALOptions.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef _LArG4FCALOptions_h_ -#define _LArG4FCALOptions_h_ -#include "CLHEP/Units/SystemOfUnits.h" - -// ----------------------------------------------------------------------// -// // -// This class defines options for the FCAL part of the Liquid Argon // -// simulation. A constructor sets the default values. This class is // -// supposed to be exported to python, configured through python commands // -// then stored in storegate and ultimately writted to the data stream. // -// Similar structures exist for the other subcomponents. // -// // -//-----------------------------------------------------------------------// - -class LArG4FCALOptions { - - public: - // A constructor to insure that the data starts up with a reasonable set - // of defaults: - - inline LArG4FCALOptions() : - m_FCALBirksLaw (false), - m_FCALBirksk (0.0486), - m_FCALHVEnable(false){} - - void saveMe(); - void printMe(); - - // Set methods - inline void FCALBirksLaw(bool value) { m_FCALBirksLaw = value; } - inline void FCALBirksk(double value) { m_FCALBirksk = value; } - inline void FCALEnableHV(bool value) { m_FCALHVEnable = value; } - // Get methods - inline bool FCALBirksLaw(void) const { return m_FCALBirksLaw; } - inline double FCALBirksk(void) const { return m_FCALBirksk; } - inline bool FCALHVEnable(void ) const { return m_FCALHVEnable; } - private: - - // Birks' law - bool m_FCALBirksLaw; - - // Birks' law, constant k - double m_FCALBirksk; - - // Enable HV - bool m_FCALHVEnable; - -}; - -#include "CLIDSvc/CLASS_DEF.h" -CLASS_DEF(LArG4FCALOptions, 190061068, 1) - -#endif diff --git a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4GlobalOptions.h b/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4GlobalOptions.h deleted file mode 100755 index a350ec98aa92ea4449e0a58e2fc7285cc309cbab..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4GlobalOptions.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef _LArG4GlobalOptions_h_ -#define _LArG4GlobalOptions_h_ -#include "CLHEP/Units/SystemOfUnits.h" - -// ----------------------------------------------------------------------// -// // -// This class defines options for the Global part of the Liquid Argon // -// simulation. A constructor sets the default values. This class is // -// supposed to be exported to python, configured through python commands // -// then stored in storegate and ultimately writted to the data stream. // -// Similar structures exist for the other subcomponents. // -// // -//-----------------------------------------------------------------------// - -#include <string> - -class LArG4GlobalOptions { - - public: - // A constructor to insure that the data starts up with a reasonable set - // of defaults: - - inline LArG4GlobalOptions() : - m_OutOfTimeCut (300*CLHEP::ns) {} - - void saveMe(); - void printMe(); - - // Set methods - inline void OutOfTimeCut(double value) { m_OutOfTimeCut = value; } - - // Get methods - inline double OutOfTimeCut(void) const { return m_OutOfTimeCut; } - - private: - // Value of the substep length in the current simulation - double m_OutOfTimeCut; - -}; - -#ifndef GAUDI_NEUTRAL -#include "CLIDSvc/CLASS_DEF.h" -CLASS_DEF(LArG4GlobalOptions, 321345321, 1) -#endif - -#endif diff --git a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4HECOptions.h b/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4HECOptions.h deleted file mode 100755 index 11426e7cf38ebfc772330af8f4b0b2697e994973..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4HECOptions.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef _LArG4HECOptions_h_ -#define _LArG4HECOptions_h_ -#include "CLHEP/Units/SystemOfUnits.h" - -// ----------------------------------------------------------------------// -// // -// This class defines options for the HEC part of the Liquid Argon // -// simulation. A constructor sets the default values. This class is // -// supposed to be exported to python, configured through python commands // -// then stored in storegate and ultimately writted to the data stream. // -// Similar structures exist for the other subcomponents. // -// // -//-----------------------------------------------------------------------// - -class LArG4HECOptions { - - public: - // A constructor to insure that the data starts up with a reasonable set - // of defaults: - - inline LArG4HECOptions() : - m_HECBirksLaw (false), - m_HECBirksk (0.0486), - m_HECHVEnable (false) {} - - void saveMe(); - void printMe(); - - // Set methods - inline void HECBirksLaw(bool value) { m_HECBirksLaw = value; } - inline void HECBirksk(double value) { m_HECBirksk = value; } - inline void HECHVEnable(bool value) { m_HECHVEnable = value; } - - // Get methods - inline bool HECBirksLaw(void) const { return m_HECBirksLaw; } - inline double HECBirksk(void) const { return m_HECBirksk; } - inline bool HECHVEnable(void) const { return m_HECHVEnable; } - - private: - - // Birks' law - bool m_HECBirksLaw; - - // Birks' law, constant k - double m_HECBirksk; - - // HV Imperfections: - bool m_HECHVEnable; - -}; - -#include "CLIDSvc/CLASS_DEF.h" -CLASS_DEF(LArG4HECOptions, 207610189, 1) - -#endif diff --git a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4RunControlDict.h b/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4RunControlDict.h index 11d20f6a8e2b47bb850022c8b2b28de48b9f5ee8..acb931407e6491db48ced5d0ba7be6b70a5d6543 100755 --- a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4RunControlDict.h +++ b/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/LArG4RunControlDict.h @@ -2,11 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArG4RunControl/LArG4GlobalOptions.h" -#include "LArG4RunControl/LArG4BarrelOptions.h" -#include "LArG4RunControl/LArG4EMECOptions.h" -#include "LArG4RunControl/LArG4HECOptions.h" -#include "LArG4RunControl/LArG4FCALOptions.h" #include "LArG4RunControl/LArG4TBPosOptions.h" #include "LArG4RunControl/LArGeoTBGeometricOptions.h" #include "LArG4RunControl/LArGeoTBH1GeoOptions.h" diff --git a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/selection.xml b/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/selection.xml index cfc38b6bcd8bb3cd5bf37ee48fe63b862cfac2ba..723bf7e34bd0f0bda7dbce6a52b9f28e96ad7fd4 100755 --- a/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/selection.xml +++ b/LArCalorimeter/LArG4/LArG4RunControl/LArG4RunControl/selection.xml @@ -1,9 +1,4 @@ <lcgdict> - <class name="LArG4GlobalOptions"/> - <class name="LArG4BarrelOptions"/> - <class name="LArG4EMECOptions"/> - <class name="LArG4HECOptions"/> - <class name="LArG4FCALOptions"/> <class name="LArG4TBPosOptions"/> <class name="LArGeoTBGeometricOptions"/> <class name="LArGeoTBH1GeoOptions"/> diff --git a/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4BarrelOptions.cxx b/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4BarrelOptions.cxx deleted file mode 100755 index b4fb0aa68faa4962138b5cf0c91d5fead206e309..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4BarrelOptions.cxx +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4RunControl/LArG4BarrelOptions.h" - -#include "GaudiKernel/ServiceHandle.h" -#include "StoreGate/StoreGateSvc.h" - - -void LArG4BarrelOptions::saveMe() -{ - ServiceHandle<StoreGateSvc> detStore ("DetectorStore", - "LArG4BarrelOptions::saveMe"); - if (detStore.retrieve().isSuccess()) { - if (detStore->record(this,"LArG4BarrelOptions").isFailure()) - std::cout << "Can not record LArG4BarrelOptions" << std::endl; - } -} - -void LArG4BarrelOptions::printMe() -{ - std::cout << " *** *** This is the object of type LArG4BarrelOptions *** *** \n"; - std::cout << " ** EMBCurr = " << (m_EMBCurr ? "true" : "false") << "\n"; - std::cout << " ** EMBEtaTrans = " << (m_EMBEtaTrans ? "true" : "false") << "\n"; - std::cout << " ** EMBXtalk = " << (m_EMBXtalk ? "true" : "false") << "\n"; - std::cout << " ** EMBTimeCurr = " << (m_EMBTimeCurr ? "true" : "false") << "\n"; - std::cout << " ** EMBTimeShower = " << (m_EMBTimeShower ? "true" : "false") << "\n"; - std::cout << " ** EMBTimeProp = " << (m_EMBTimeProp ? "true" : "false") << "\n"; - std::cout << " ** EMBdstep = " << m_EMBdstep << "\n *** *** \n"; - std::cout << " ** EMBBirksLaw = " << (m_EMBBirksLaw ? "true" : "false") << "\n"; - std::cout << "** EMBBirksk = " << m_EMBBirksk << "\n *** *** \n"; - std::cout << "** EMBHVEnable = " << m_EMBHVEnable << "\n *** *** \n"; -} diff --git a/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4EMECOptions.cxx b/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4EMECOptions.cxx deleted file mode 100755 index d3e2175a2ff50991943914821a9ae2e1eee162a7..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4EMECOptions.cxx +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4RunControl/LArG4EMECOptions.h" - -#include "GaudiKernel/ServiceHandle.h" -#include "StoreGate/StoreGateSvc.h" - -void LArG4EMECOptions::saveMe() -{ - ServiceHandle<StoreGateSvc> detStore ("DetectorStore", - "LArG4EMECOptions::saveMe"); - if (detStore.retrieve().isSuccess()) { - if (detStore->record(this,"LArG4EMECOptions").isFailure()) - std::cout << "Can not record LArG4EMECOptions" << std::endl; - } -} - -void LArG4EMECOptions::printMe() -{ - std::cout << " *** *** This is the object of type LArG4EMECOptions *** *** \n"; - std::string x; - if(m_EMECECorrType == NONE) x="NONE(=0)"; - if(m_EMECECorrType == CHCOLL) x="CHCOLL(=1)"; - if(m_EMECECorrType == GAPADJ) x="GAPADJ(=3)"; - if(m_EMECECorrType == GAPOLD) x="GAPOLD(=2"; - if(m_EMECECorrType == GAP_E) x="GAP_E(=4)"; - if(m_EMECECorrType == GAP_S) x="GAP_S(=5)"; - if(m_EMECECorrType == GAP_SE) x="GAP_SE(6)"; - if(m_EMECECorrType == CHCOLL1) x="CHCOLL1(7)"; - std::cout << " ** EMECECorrType = " << x << "\n"; - std::cout << " ** EMECGapPower = " << m_EMECGapPower << "\n"; - std::cout << " ** EMECChMap = " << m_EMECChMap << "\n"; - std::cout << " ** EMECHVMap = " << m_EMECHVMap << "\n"; - std::cout << " ** EMECEsr = " << m_EMECEsr << "\n"; -#ifdef LARWHEELCALCULATOR_PSA_DEVELOPMENT - std::cout << " ** EMECFoldA = " << m_EMECFoldA << "\n"; -#endif - std::cout << " ** EMECBirksLaw = " << (m_EMECBirksLaw ? "true" : "false") << "\n"; - std::cout << "** EMECBirksk = " << m_EMECBirksk << "\n *** *** \n"; - std::cout << "** EMECHVEnable = " << m_EMECHVEnable << "\n *** *** \n"; - - - // std::cout << " ** EMECPhiRotation = " << m_EMECPhiRotation << "\n"; - //std::cout << " ** EMECSagging = " << m_EMECSagging << "\n"; - //std::cout << " ** EMECInnerSlantParam = " << m_EMECInnerSlantParam << "\n"; - //std::cout << " ** EMECOuterSlantParam = " << m_EMECOuterSlantParam << "\n *** *** \n"; -} diff --git a/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4FCALOptions.cxx b/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4FCALOptions.cxx deleted file mode 100644 index 0102a15af20a47a55d587c4c6c6796af3dbd3295..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4FCALOptions.cxx +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4RunControl/LArG4FCALOptions.h" - -#include "GaudiKernel/ServiceHandle.h" -#include "StoreGate/StoreGateSvc.h" - - -void LArG4FCALOptions::saveMe() -{ - ServiceHandle<StoreGateSvc> detStore ("DetectorStore", - "LArG4FCALOptions::saveMe"); - if (detStore.retrieve().isSuccess()) { - if (detStore->record(this,"LArG4FCALOptions").isFailure()) - std::cout << "Can not record LArG4FCALOptions" << std::endl; - } -} - -void LArG4FCALOptions::printMe() -{ - std::cout << " ** FCALBirksLaw = " << (m_FCALBirksLaw ? "true" : "false") << "\n"; - std::cout << " ** FCALBirksk = " << m_FCALBirksk << "\n *** *** \n"; - std::cout << " ** FCALHVEnable = " << m_FCALHVEnable << "\n *** *** \n"; -} diff --git a/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4GlobalOptions.cxx b/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4GlobalOptions.cxx deleted file mode 100755 index c66d5ce5c21a95ca1ffe447875d3923aa219515e..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4GlobalOptions.cxx +++ /dev/null @@ -1,25 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4RunControl/LArG4GlobalOptions.h" - -#include "GaudiKernel/ServiceHandle.h" -#include "StoreGate/StoreGateSvc.h" - - -void LArG4GlobalOptions::saveMe() -{ - ServiceHandle<StoreGateSvc> detStore ("DetectorStore", - "LArG4GlobalOptions::saveMe"); - if (detStore.retrieve().isSuccess()) { - if (detStore->record(this,"LArG4GlobalOptions").isFailure()) - std::cout << "Can not record LArG4GlobalOptions" << std::endl; - } -} - -void LArG4GlobalOptions::printMe() -{ - std::cout << " *** *** This is the object of type LArG4GlobalOptions *** *** \n"; - std::cout << " ** OutOfTimeCut = " << m_OutOfTimeCut << "\n *** *** \n"; -} diff --git a/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4HECOptions.cxx b/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4HECOptions.cxx deleted file mode 100755 index fa6992007f3db5e9a706979fded854e33c488108..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4HECOptions.cxx +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4RunControl/LArG4HECOptions.h" - -#include "GaudiKernel/ServiceHandle.h" -#include "StoreGate/StoreGateSvc.h" - - -void LArG4HECOptions::saveMe() -{ - ServiceHandle<StoreGateSvc> detStore ("DetectorStore", - "LArG4HECOptions::saveMe"); - if (detStore.retrieve().isSuccess()) { - if (detStore->record(this,"LArG4HECOptions").isFailure()) - std::cout << "Can not record LArG4HECOptions" << std::endl; - } -} - -void LArG4HECOptions::printMe() -{ - std::cout << " ** HECBirksLaw = " << (m_HECBirksLaw ? "true" : "false") << "\n"; - std::cout << " ** HECBirksk = " << m_HECBirksk << "\n *** *** \n"; - std::cout << " ** HECHVEnable = " << m_HECHVEnable << "\n *** *** \n"; -} diff --git a/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4TBPosOptions.cxx b/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4TBPosOptions.cxx index 132e1b2d841ee58b300a1f4fd2e63c30fb5c53be..063da7a3b85fe85897245613602bc66e0aaa8ea3 100755 --- a/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4TBPosOptions.cxx +++ b/LArCalorimeter/LArG4/LArG4RunControl/src/LArG4TBPosOptions.cxx @@ -4,16 +4,27 @@ #include "LArG4RunControl/LArG4TBPosOptions.h" -#include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/ISvcLocator.h" +#include "GaudiKernel/Bootstrap.h" #include "StoreGate/StoreGateSvc.h" void LArG4TBPosOptions::saveMe() { - ServiceHandle<StoreGateSvc> detStore ("DetectorStore", - "LArG4TBPosOptions::saveMe"); - if (detStore.retrieve().isSuccess()) { - if (detStore->record(this,"LArG4TBPosOptions").isFailure()) - std::cout << "Can not record LArG4TBPosOptions" << std::endl; + IService* pSvc; + ISvcLocator* svcLocator = Gaudi::svcLocator(); + StatusCode result = svcLocator->service("DetectorStore",pSvc); + + if(result.isSuccess()) + { + StoreGateSvc* detStore = dynamic_cast<StoreGateSvc*>(pSvc); + if (!detStore){ + std::cout << "LArG4TBPosOptions::saveMe ERROR Could not dynamic cast det store" << std::endl; + return; + } + result=detStore->record(this,"LArG4TBPosOptions"); + if(!result.isSuccess()) + std::cout << "Can not record LArG4BarrelOptions" << std::endl; + } } diff --git a/LArCalorimeter/LArG4/LArG4RunControl/src/LArGeoTB2004Options.cxx b/LArCalorimeter/LArG4/LArG4RunControl/src/LArGeoTB2004Options.cxx index 55a79141a3850d161ee319caf64222dac7ce8960..e3d3b5c34024900d3a6ee071198a1217d526c4a8 100644 --- a/LArCalorimeter/LArG4/LArG4RunControl/src/LArGeoTB2004Options.cxx +++ b/LArCalorimeter/LArG4/LArG4RunControl/src/LArGeoTB2004Options.cxx @@ -4,15 +4,25 @@ #include "LArG4RunControl/LArGeoTB2004Options.h" -#include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/ISvcLocator.h" +#include "GaudiKernel/Bootstrap.h" #include "StoreGate/StoreGateSvc.h" void LArGeoTB2004Options::saveMe() { - ServiceHandle<StoreGateSvc> detStore ("DetectorStore", - "LArG4BarrelOptions::saveMe"); - if (detStore.retrieve().isSuccess()) { - if (detStore->record(this,"LArGeoTB2004Options").isFailure()) + IService* pSvc; + ISvcLocator* svcLocator = Gaudi::svcLocator(); + StatusCode result = svcLocator->service("DetectorStore",pSvc); + + if(result.isSuccess()) + { + StoreGateSvc* detStore = dynamic_cast<StoreGateSvc*>(pSvc); + if (!detStore){ + std::cout << "LArGeoTB2004Options::saveMe ERROR Could not dynamic cast det store" << std::endl; + return; + } + result=detStore->record(this,"LArGeoTB2004Options"); + if(!result.isSuccess()) std::cout << "Can not record LArGeoTB2004Options" << std::endl; } } diff --git a/LArCalorimeter/LArG4/LArG4RunControl/src/LArGeoTBGeometricOptions.cxx b/LArCalorimeter/LArG4/LArG4RunControl/src/LArGeoTBGeometricOptions.cxx index 6c76c88acde17d4fb2d3f769fe4bbb6d55621efb..4cf779a0d596e46ee4dbc73cee0b73f44d16bc55 100755 --- a/LArCalorimeter/LArG4/LArG4RunControl/src/LArGeoTBGeometricOptions.cxx +++ b/LArCalorimeter/LArG4/LArG4RunControl/src/LArGeoTBGeometricOptions.cxx @@ -4,15 +4,25 @@ #include "LArG4RunControl/LArGeoTBGeometricOptions.h" -#include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/ISvcLocator.h" +#include "GaudiKernel/Bootstrap.h" #include "StoreGate/StoreGateSvc.h" void LArGeoTBGeometricOptions::saveMe() { - ServiceHandle<StoreGateSvc> detStore ("DetectorStore", - "LArGeoTBGeometricOptions::saveMe"); - if (detStore.retrieve().isSuccess()) { - if (detStore->record(this,"LArGeoTBGeometricOptions").isFailure()) + IService* pSvc; + ISvcLocator* svcLocator = Gaudi::svcLocator(); + StatusCode result = svcLocator->service("DetectorStore",pSvc); + + if(result.isSuccess()) + { + StoreGateSvc* detStore = dynamic_cast<StoreGateSvc*>(pSvc); + if (!detStore){ + std::cout << "LArGeoTBGeometricOptions::saveMe ERROR Could not dynamic cast det store" << std::endl; + return; + } + result=detStore->record(this,"LArGeoTBGeometricOptions"); + if(!result.isSuccess()) std::cout << "Can not record LArGeoTBGeometricOptions" << std::endl; } } diff --git a/LArCalorimeter/LArG4/LArG4RunControl/src/LArGeoTBH1GeoOptions.cxx b/LArCalorimeter/LArG4/LArG4RunControl/src/LArGeoTBH1GeoOptions.cxx index de0448cb942490a91749a21bb30c4b3323c76b29..952ad5b69b5e48287932f7dfcf883b5a6943a8ea 100755 --- a/LArCalorimeter/LArG4/LArG4RunControl/src/LArGeoTBH1GeoOptions.cxx +++ b/LArCalorimeter/LArG4/LArG4RunControl/src/LArGeoTBH1GeoOptions.cxx @@ -4,15 +4,25 @@ #include "LArG4RunControl/LArGeoTBH1GeoOptions.h" -#include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/ISvcLocator.h" +#include "GaudiKernel/Bootstrap.h" #include "StoreGate/StoreGateSvc.h" void LArGeoTBH1GeoOptions::saveMe() { - ServiceHandle<StoreGateSvc> detStore ("DetectorStore", - "LArGeoTBH1GeoOptions::saveMe"); - if (detStore.retrieve().isSuccess()) { - if (detStore->record(this,"LArGeoTBH1GeoOptions").isFailure()) + IService* pSvc; + ISvcLocator* svcLocator = Gaudi::svcLocator(); + StatusCode result = svcLocator->service("DetectorStore",pSvc); + + if(result.isSuccess()) + { + StoreGateSvc* detStore = dynamic_cast<StoreGateSvc*>(pSvc); + if (!detStore){ + std::cout << "LArGeoTBH1GeoOptions::saveMe ERROR Could not dynamic cast det store" << std::endl; + return; + } + result=detStore->record(this,"LArGeoTBH1GeoOptions"); + if(!result.isSuccess()) std::cout << "Can not record LArGeoTBH1GeoOptions" << std::endl; } } diff --git a/LArCalorimeter/LArG4/LArG4SD/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4SD/CMakeLists.txt index d5499d64e51ffc4c7dcac8317edd7b334c0313e2..a0e41afc27a9c1590e21df202770b4c5b78863f6 100644 --- a/LArCalorimeter/LArG4/LArG4SD/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4SD/CMakeLists.txt @@ -8,17 +8,8 @@ atlas_subdir( LArG4SD ) # Declare the package's dependencies: atlas_depends_on_subdirs( PRIVATE Calorimeter/CaloG4Sim - Calorimeter/CaloSimEvent - Control/CxxUtils - Control/StoreGate GaudiKernel - LArCalorimeter/LArG4/LArG4Barrel - LArCalorimeter/LArG4/LArG4Code - LArCalorimeter/LArG4/LArG4EC - LArCalorimeter/LArG4/LArG4FCAL - LArCalorimeter/LArG4/LArG4HEC - LArCalorimeter/LArG4/LArG4MiniFCAL - LArCalorimeter/LArSimEvent ) + LArCalorimeter/LArG4/LArG4Code ) # External dependencies: find_package( CLHEP ) @@ -30,9 +21,8 @@ atlas_add_component( LArG4SD src/*.cc src/components/*.cxx INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloG4SimLib CaloSimEvent CxxUtils StoreGateLib SGtests GaudiKernel LArG4Barrel LArG4Code LArG4EC LArG4FCAL LArG4HEC LArG4MiniFCAL LArSimEvent ) + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloG4SimLib GaudiKernel LArG4Code ) # Install files from the package: -atlas_install_headers( LArG4SD ) +#atlas_install_headers( LArG4SD ) atlas_install_python_modules( python/*.py ) - diff --git a/LArCalorimeter/LArG4/LArG4SD/cmt/requirements b/LArCalorimeter/LArG4/LArG4SD/cmt/requirements index 11b2470de8b910a3b9f626b5b50bc0b05a4e2005..07f677ee1f65f598eaedcd46842c595fdc2fb805 100644 --- a/LArCalorimeter/LArG4/LArG4SD/cmt/requirements +++ b/LArCalorimeter/LArG4/LArG4SD/cmt/requirements @@ -6,34 +6,13 @@ use AtlasPolicy AtlasPolicy-* private use GaudiInterface GaudiInterface-* External - -use LArG4Barrel LArG4Barrel-* LArCalorimeter/LArG4 -use LArG4EC LArG4EC-* LArCalorimeter/LArG4 -use LArG4FCAL LArG4FCAL-* LArCalorimeter/LArG4 -use LArG4HEC LArG4HEC-* LArCalorimeter/LArG4 -use LArG4MiniFCAL LArG4MiniFCAL-* LArCalorimeter/LArG4 -#use LArG4RunControl LArG4RunControl-* LArCalorimeter/LArG4 -#use MCTruth MCTruth-* Simulation/G4Sim -#use CaloIdentifier CaloIdentifier-* Calorimeter use CaloG4Sim CaloG4Sim-* Calorimeter -#use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas -#use Geant4 Geant4-* External use LArG4Code LArG4Code-* LArCalorimeter/LArG4 -#use AtlasCLHEP AtlasCLHEP-* External - -# Needed to create hit collections. -use LArSimEvent LArSimEvent-* LArCalorimeter -use CaloSimEvent CaloSimEvent-* Calorimeter -use StoreGate StoreGate-* Control -use CxxUtils CxxUtils-* Control +use AtlasCLHEP AtlasCLHEP-* External use Geant4 Geant4-* External -public - -apply_pattern declare_python_modules files="*.py" +public library LArG4SD *.cc components/*.cxx apply_pattern component_library -#library LArG4SD *.cc -#apply_pattern installed_library - +apply_pattern declare_python_modules files="*.py" diff --git a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py index 704078df253e15579b7697761e56e12da69cdddc..4d6c37e8067d1b120feb91c0fae5418f87849328 100644 --- a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py +++ b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py @@ -24,7 +24,7 @@ def getLArActiveSensitiveDetector(name="LArActiveSensitiveDetector", **kwargs): kwargs.setdefault("ParticleID",simFlags.ParticleID()) # No effect currently kwargs.setdefault("OutputCollectionNames", ["LArCalibrationHitActive"]) - return CfgMgr.LArG4ActiveSDTool(name, **kwargs) + return CfgMgr.LArG4__ActiveSDTool(name, **kwargs) def getLArDeadSensitiveDetector(name="LArDeadSensitiveDetector", **kwargs): ## Main configuration @@ -112,7 +112,7 @@ def getLArDeadSensitiveDetector(name="LArDeadSensitiveDetector", **kwargs): kwargs.setdefault("doEscapedEnergy",simFlags.CalibrationRun.get_Value()!='DeadLAr') # No effect currently kwargs.setdefault("OutputCollectionNames", ["LArCalibrationHitDeadMaterial"]) - return CfgMgr.LArG4DeadSDTool(name, **kwargs) + return CfgMgr.LArG4__DeadSDTool(name, **kwargs) def getLArEMBSensitiveDetector(name="LArEMBSensitiveDetector", **kwargs): ## Main configuration @@ -123,7 +123,7 @@ def getLArEMBSensitiveDetector(name="LArEMBSensitiveDetector", **kwargs): # Hook for fast simulation from G4AtlasApps.SimFlags import simFlags kwargs.setdefault("UseFrozenShowers", simFlags.LArParameterization()>0) - return CfgMgr.LArG4EMBSDTool(name, **kwargs) + return CfgMgr.LArG4__EMBSDTool(name, **kwargs) def getLArEMECSensitiveDetector(name="LArEMECSensitiveDetector", **kwargs): from G4AtlasApps.SimFlags import simFlags @@ -139,7 +139,7 @@ def getLArEMECSensitiveDetector(name="LArEMECSensitiveDetector", **kwargs): kwargs.setdefault("OutputCollectionNames", ["LArHitEMEC"]) # Hook for fast simulation kwargs.setdefault("UseFrozenShowers", simFlags.LArParameterization()>0) - return CfgMgr.LArG4EMECSDTool(name, **kwargs) + return CfgMgr.LArG4__EMECSDTool(name, **kwargs) def getLArFCALSensitiveDetector(name="LArFCALSensitiveDetector", **kwargs): kwargs.setdefault("FCAL1Volumes",["LArMgr::LAr::FCAL::Module1::Gap"]) @@ -150,7 +150,7 @@ def getLArFCALSensitiveDetector(name="LArFCALSensitiveDetector", **kwargs): # Hook for fast simulation from G4AtlasApps.SimFlags import simFlags kwargs.setdefault("UseFrozenShowers", simFlags.LArParameterization()>0) - return CfgMgr.LArG4FCALSDTool(name, **kwargs) + return CfgMgr.LArG4__FCALSDTool(name, **kwargs) def getLArHECSensitiveDetector(name="LArHECSensitiveDetector", **kwargs): #kwargs.setdefault("SliceVolumes",["LAr::HEC::Module::Depth::Slice"]) @@ -159,7 +159,7 @@ def getLArHECSensitiveDetector(name="LArHECSensitiveDetector", **kwargs): # You might think this should go here, but we don't think so! LAr::HEC::Module::Depth::Slice::Wheel"]) # No effect currently kwargs.setdefault("OutputCollectionNames", ["LArHitHEC"]) - return CfgMgr.LArG4HECSDTool(name, **kwargs) + return CfgMgr.LArG4__HECSDTool(name, **kwargs) def getLArInactiveSensitiveDetector(name="LArInactiveSensitiveDetector", **kwargs): ## Main configuration @@ -220,11 +220,13 @@ def getLArInactiveSensitiveDetector(name="LArInactiveSensitiveDetector", **kwarg kwargs.setdefault("ParticleID",simFlags.ParticleID()) # No effect currently kwargs.setdefault("OutputCollectionNames", ["LArCalibrationHitInactive"]) - return CfgMgr.LArG4InactiveSDTool(name, **kwargs) + return CfgMgr.LArG4__InactiveSDTool(name, **kwargs) def getLArMiniFCALSensitiveDetector(name="LArMiniFCALSensitiveDetector", **kwargs): kwargs.setdefault("MiniVolumes",["LArMgr::MiniFCAL::Wafer"]) # No effect currently kwargs.setdefault("OutputCollectionNames", ["LArHitMiniFCAL"]) - return CfgMgr.LArG4MiniFCALSDTool(name, **kwargs) + return CfgMgr.LArG4__MiniFCALSDTool(name, **kwargs) +def getCalibrationDefaultCalculator(name="CalibrationDefaultCalculator", **kwargs): + return CfgMgr.LArG4__CalibrationDefaultCalculator(name, **kwargs) diff --git a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfigDb.py b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfigDb.py index a50d8e5565baf8f6bdd2c8696a5b93818b9fe4cb..952acf3bec8d3118ddb9ac0cf1f807791b55ce57 100644 --- a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfigDb.py +++ b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfigDb.py @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -from AthenaCommon.CfgGetter import addTool +from AthenaCommon.CfgGetter import addTool, addService addTool("LArG4SD.LArG4SDConfig.getLArActiveSensitiveDetector","LArActiveSensitiveDetector") addTool("LArG4SD.LArG4SDConfig.getLArDeadSensitiveDetector","LArDeadSensitiveDetector") addTool("LArG4SD.LArG4SDConfig.getLArEMBSensitiveDetector","LArEMBSensitiveDetector") @@ -10,3 +10,4 @@ addTool("LArG4SD.LArG4SDConfig.getLArHECSensitiveDetector","LArHECSensitiveDetec addTool("LArG4SD.LArG4SDConfig.getLArInactiveSensitiveDetector","LArInactiveSensitiveDetector") addTool("LArG4SD.LArG4SDConfig.getLArMiniFCALSensitiveDetector","LArMiniFCALSensitiveDetector") +addService("LArG4SD.LArG4SDConfig.getCalibrationDefaultCalculator","CalibrationDefaultCalculator") diff --git a/LArCalorimeter/LArG4/LArG4SD/src/ActiveSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/ActiveSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..0f6372e12c64ac9791a605f80c59dac02ab29f9a --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/ActiveSDTool.cc @@ -0,0 +1,113 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ActiveSDTool.h" + +#include "LArG4Code/SDWrapper.h" + + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + ActiveSDTool::ActiveSDTool(const std::string& type, const std::string& name, + const IInterface *parent) + : CalibSDTool(type, name, parent) + , m_hitCollName("LArCalibrationHitActive") + , m_bpsmodcalc("BarrelPresamplerCalibrationCalculator", name) + , m_embcalc("BarrelCalibrationCalculator", name) + , m_emepiwcalc("EMECPosInnerWheelCalibrationCalculator", name) + , m_emeniwcalc("EMECNegInnerWheelCalibrationCalculator", name) + , m_emepowcalc("EMECPosOuterWheelCalibrationCalculator", name) + , m_emenowcalc("EMECNegOuterWheelCalibrationCalculator", name) + , m_emepscalc("EMECPresamplerCalibrationCalculator", name) + , m_emeobarcalc("EMECBackOuterBarretteCalibrationCalculator", name) + , m_heccalc("HECCalibrationWheelActiveCalculator", name) + , m_fcal1calc("FCAL1CalibCalculator", name) + , m_fcal2calc("FCAL2CalibCalculator", name) + , m_fcal3calc("FCAL3CalibCalculator", name) + , m_minfcalcalc("MiniFCALActiveCalibrationCalculator", name) + { + declareProperty("HitCollectionName", m_hitCollName); + declareProperty("StacVolumes", m_stacVolumes); + declareProperty("PresamplerVolumes", m_presBarVolumes); + declareProperty("PosIWVolumes", m_posIWVolumes); + declareProperty("NegIWVolumes", m_negIWVolumes); + declareProperty("PosOWVolumes", m_posOWVolumes); + declareProperty("NegOWVolumes", m_negOWVolumes); + declareProperty("PresVolumes", m_presECVolumes); + declareProperty("BOBarretteVolumes", m_bobVolumes); + declareProperty("FCAL1Volumes", m_fcal1Volumes); + declareProperty("FCAL2Volumes", m_fcal2Volumes); + declareProperty("FCAL3Volumes", m_fcal3Volumes); + declareProperty("SliceVolumes", m_sliceVolumes); + declareProperty("MiniVolumes", m_miniVolumes); + + declareProperty("EMBPSCalibrationCalculator",m_bpsmodcalc); + declareProperty("EMBCalibrationCalculator",m_embcalc); + declareProperty("EMECPosIWCalibrationCalculator",m_emepiwcalc); + declareProperty("EMECNegIWCalibrationCalculator",m_emeniwcalc); + declareProperty("EMECPosOWCalibrationCalculator",m_emepowcalc); + declareProperty("EMECNegOWCalibrationCalculator",m_emenowcalc); + declareProperty("EMECPSCalibrationCalculator",m_emepscalc); + declareProperty("EMECBOBCalibrationCalculator",m_emeobarcalc); + declareProperty("HECWActiveCalculator",m_heccalc); + declareProperty("FCAL1CalibCalculator",m_fcal1calc); + declareProperty("FCAL2CalibCalculator",m_fcal2calc); + declareProperty("FCAL3CalibCalculator",m_fcal3calc); + declareProperty("MiniFCALActiveCalibrationCalculator",m_minfcalcalc); + } + + //--------------------------------------------------------------------------- + // Initialization of Athena-components + //--------------------------------------------------------------------------- + StatusCode ActiveSDTool::initializeCalculators() + { + // Lots of calculators !!! + ATH_CHECK(m_bpsmodcalc.retrieve()); + ATH_CHECK(m_embcalc.retrieve()); + ATH_CHECK(m_emepiwcalc.retrieve()); + ATH_CHECK(m_emeniwcalc.retrieve()); + ATH_CHECK(m_emepowcalc.retrieve()); + ATH_CHECK(m_emenowcalc.retrieve()); + ATH_CHECK(m_emepscalc.retrieve()); + ATH_CHECK(m_emeobarcalc.retrieve()); + ATH_CHECK(m_heccalc.retrieve()); + ATH_CHECK(m_fcal1calc.retrieve()); + ATH_CHECK(m_fcal2calc.retrieve()); + ATH_CHECK(m_fcal3calc.retrieve()); + ATH_CHECK(m_minfcalcalc.retrieve()); + + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create SD wrapper for current thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* ActiveSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new CalibSDWrapper("LArActiveSDWrapper", m_hitCollName); + + // Create the SDs. + sdWrapper->addSD( makeOneSD( "Barrel::Presampler::Module::Calibration", &*m_bpsmodcalc, m_presBarVolumes ) ); + sdWrapper->addSD( makeOneSD( "EMB::STAC::Calibration", &*m_embcalc, m_stacVolumes ) ); + sdWrapper->addSD( makeOneSD( "EMEC::Pos::InnerWheel::Calibration", &*m_emepiwcalc, m_posIWVolumes ) ); + sdWrapper->addSD( makeOneSD( "EMEC::Neg::InnerWheel::Calibration", &*m_emeniwcalc, m_negIWVolumes ) ); + sdWrapper->addSD( makeOneSD( "EMEC::Pos::OuterWheel::Calibration", &*m_emepowcalc, m_posOWVolumes ) ); + sdWrapper->addSD( makeOneSD( "EMEC::Neg::OuterWheel::Calibration", &*m_emenowcalc, m_negOWVolumes ) ); + sdWrapper->addSD( makeOneSD( "Endcap::Presampler::LiquidArgon::Calibration", &*m_emepscalc, m_presECVolumes ) ); + sdWrapper->addSD( makeOneSD( "EMEC::BackOuterBarrette::Calibration", &*m_emeobarcalc, m_bobVolumes ) ); + sdWrapper->addSD( makeOneSD( "FCAL::Module1::Gap::Calibration", &*m_fcal1calc, m_fcal1Volumes ) ); + sdWrapper->addSD( makeOneSD( "FCAL::Module2::Gap::Calibration", &*m_fcal2calc, m_fcal2Volumes ) ); + sdWrapper->addSD( makeOneSD( "FCAL::Module3::Gap::Calibration", &*m_fcal3calc, m_fcal3Volumes ) ); + sdWrapper->addSD( makeOneSD( "HEC::Module::Depth::Slice::Wheel::Calibration", &*m_heccalc, m_sliceVolumes ) ); + sdWrapper->addSD( makeOneSD( "MiniFCAL::Wafer", &*m_minfcalcalc, m_miniVolumes ) ); + + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4SD/src/ActiveSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/ActiveSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..2c0bd8b827e77b1f3fcbbc819d09b5b24b45ddda --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/ActiveSDTool.h @@ -0,0 +1,78 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4SD_ACTIVESDTOOL_H +#define LARG4SD_ACTIVESDTOOL_H + +// System includes +#include <string> +#include <vector> + +// Project includes +#include "LArG4Code/CalibSDTool.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" + +namespace LArG4 +{ + + /// @class ActiveSDTool + /// @brief Sensitive detector tool which manages activate-area LAr calib SDs. + /// + /// Design is in flux. + /// + class ActiveSDTool : public CalibSDTool + { + + public: + + /// Constructor + ActiveSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + + /// Initialize Calculator Services + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + + /// @name SD volumes + /// @{ + std::vector<std::string> m_stacVolumes; + std::vector<std::string> m_presBarVolumes; + std::vector<std::string> m_posIWVolumes; + std::vector<std::string> m_negIWVolumes; + std::vector<std::string> m_posOWVolumes; + std::vector<std::string> m_negOWVolumes; + std::vector<std::string> m_presECVolumes; + std::vector<std::string> m_bobVolumes; + std::vector<std::string> m_fcal1Volumes; + std::vector<std::string> m_fcal2Volumes; + std::vector<std::string> m_fcal3Volumes; + std::vector<std::string> m_sliceVolumes; + std::vector<std::string> m_miniVolumes; + /// @} + + ServiceHandle<ILArCalibCalculatorSvc> m_bpsmodcalc; //LArG4::BarrelPresampler::CalibrationCalculator + ServiceHandle<ILArCalibCalculatorSvc> m_embcalc; //LArG4::Barrel::CalibrationCalculator + ServiceHandle<ILArCalibCalculatorSvc> m_emepiwcalc; //LArG4::EC::CalibrationCalculator(LArWheelCalculator::InnerAbsorberWheel, 1) + ServiceHandle<ILArCalibCalculatorSvc> m_emeniwcalc; //LArG4::EC::CalibrationCalculator(LArWheelCalculator::InnerAbsorberWheel, -1) + ServiceHandle<ILArCalibCalculatorSvc> m_emepowcalc; //LArG4::EC::CalibrationCalculator(LArWheelCalculator::OuterAbsorberWheel, 1) + ServiceHandle<ILArCalibCalculatorSvc> m_emenowcalc; //LArG4::EC::CalibrationCalculator(LArWheelCalculator::OuterAbsorberWheel, -1) + ServiceHandle<ILArCalibCalculatorSvc> m_emepscalc; //LArG4::EC::PresamplerCalibrationCalculator + ServiceHandle<ILArCalibCalculatorSvc> m_emeobarcalc; //LArG4::EC::CalibrationCalculator(LArWheelCalculator::BackOuterBarretteWheelCalib, 1) + ServiceHandle<ILArCalibCalculatorSvc> m_heccalc; //LArG4::HEC::LArHECCalibrationWheelCalculator(LArG4::HEC::kWheelActive) + ServiceHandle<ILArCalibCalculatorSvc> m_fcal1calc; + ServiceHandle<ILArCalibCalculatorSvc> m_fcal2calc; + ServiceHandle<ILArCalibCalculatorSvc> m_fcal3calc; + ServiceHandle<ILArCalibCalculatorSvc> m_minfcalcalc; //LArG4::MiniFCAL::MiniFCALCalibrationCalculator(LArG4::MiniFCAL::kActive) + }; // class ActiveSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/CalibrationDefaultCalculator.cc b/LArCalorimeter/LArG4/LArG4SD/src/CalibrationDefaultCalculator.cc new file mode 100644 index 0000000000000000000000000000000000000000..738b8927d8b1528e0dd40f3f1d64c7d4bbea8499 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/CalibrationDefaultCalculator.cc @@ -0,0 +1,309 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// LArG4::CalibrationDefaultCalculator +// Prepared 04-Mar-2004 Bill Seligman +// Modified 22-Sep-2004 Mikhail Leltchouk + +// The calibration studies rely on every volume in the simulation +// being made into a sensitive detector. There is a practical +// problem: What if we're still in the middle of developing code, and +// not every volume has been made sensitive yet? What if we've +// overlooked a volume? Or (the most common case), what if we have an +// energy deposit in a volume that is not being directly calibrated? + +// This class provides a "default behavior" for all energy deposits +// that are not made in a volume that's been made sensitive for +// calibration studies. + +// This class calculates the values needed for calibration hits in the +// simulation. + +#undef DEBUG_HITS +#undef DEBUG_VOLUMES + +#include "CalibrationDefaultCalculator.h" +#include "LArG4Code/LArG4Identifier.h" + +#include "G4ThreeVector.hh" +#include "G4Step.hh" +#include "globals.hh" +#include "CLHEP/Units/PhysicalConstants.h" + +#include <cmath> +#include <string> +#include <climits> +#include <algorithm> +#include <set> +#include <numeric> + +#undef DEBUG_DMXYZ + +namespace LArG4 { + + CalibrationDefaultCalculator::CalibrationDefaultCalculator(const std::string& name, ISvcLocator *pSvcLocator) + : LArCalibCalculatorSvcImp(name, pSvcLocator) + { + } + + + CalibrationDefaultCalculator::~CalibrationDefaultCalculator() + { + } + + G4bool CalibrationDefaultCalculator::Process (const G4Step* a_step, + LArG4Identifier & _identifier, + std::vector<G4double> & _energies, + const eCalculatorProcessing a_process) const + { + // Use the calculators to determine the energies and the + // identifier associated with this G4Step. Note that the + // default is to process both the energy and the ID. + + _energies.clear(); + if ( a_process == kEnergyAndID || a_process == kOnlyEnergy ) + { + m_energyCalculator.Energies( a_step, _energies ); + } + else { + for (unsigned int i=0; i != 4; i++) _energies.push_back(0.); + } + + _identifier.clear(); + if ( a_process == kEnergyAndID || a_process == kOnlyID ) + { + // Call after volume-by-volume calls only if none of these calls assigned + // the SimulationEnergies::Energies of current step to identifier and one + // of the existing hit collections. + + // Calculate the mid-point of the step, and the simple geometry variables. + + const G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); + const G4StepPoint* post_step_point = a_step->GetPostStepPoint(); + + const G4ThreeVector startPoint = pre_step_point->GetPosition(); + const G4ThreeVector endPoint = post_step_point->GetPosition(); + const G4ThreeVector p = (startPoint + endPoint) * 0.5; + + const G4double rho = p.perp(); + const G4double eta = fabs( p.pseudoRapidity() ); + G4double phi = p.phi(); + if ( phi<0. ) { phi += 2.*M_PI; } // Normalize for phiBin calculation + + const G4int detector = 10; // calorimeter "dead" materials + + // Initialize identifier variables with (invalid) default + // values (INT_MIN is defined in <climits>). + G4int subdet = INT_MIN; + G4int type = INT_MIN; + G4int sampling = INT_MIN; + G4int region = INT_MIN; + G4int etaBin = INT_MIN; + G4int phiBin = INT_MIN; + + if ( eta > 5. ) // "forward" leakage + { + // subdet = +/-4, "+" or " -" according to sign of Z in World coorinate + subdet = ( p.z() > 0.) ? 4 : -4; + // type = 1, sampling = 3 leakage outside calorimeters: + type = 1; + sampling = 3; + if ( eta < 8.) // leakage between eta = 5 and 8 + { + region = 1; + etaBin = (int) ( ( eta - 5. ) * 0.5 * m_oneOverDeta ); + phiBin = (int) ( phi * m_oneOverDphi ); + if (phiBin>m_phiBinMax) phiBin=m_phiBinMax; + } + else // "very forward" leakage eta >= 8. + { + region = 2; + etaBin = 0; // no eta-phi subdivision + phiBin = 0; + } + } + else if ( rho > m_rhoCalorOut || fabs( p.z() ) > m_zCalorOut ) + { + // type = 1, sampling = 3 leakage outside calorimeters: + type = 1; + sampling = 3; + region = 0; + phiBin = (int) ( phi * m_oneOverDphi ); + if (phiBin>m_phiBinMax) phiBin=m_phiBinMax; + + if ( eta < 1.7) // leakage outside Tile + { + // subdet = +/-5, "+" or " -" according to sign of Z in World coorinate + subdet = ( p.z() > 0.) ? 5 : -5; + etaBin = (int) ( eta * m_oneOverDeta ); + } + else // leakage outside LAr HEC + { + // subdet = +/-4, "+" or " -" according to sign of Z in World coorinate + subdet = ( p.z() > 0.) ? 4 : -4; + etaBin = (int) ( ( eta - 1.7 ) * m_oneOverDeta ); + } // outside at eta covered by Tile or by LAr HEC + + } // leakage outside calorimeters: + + else if ( rho < m_rhoInDetOut && fabs( p.z() ) < m_zInDetOut ) + + { + subdet = ( p.z() > 0.) ? 4 : -4; + // type = 1, sampling = 0, region = 1-5 => Inner Detector + type = 1; + sampling = 0; + region = 5; // TRT support, cables, services + if ( rho < 980.*CLHEP::mm ) region = 4; // TRT + if ( rho < 650.*CLHEP::mm ) region = 3; // support + if ( rho < 540.*CLHEP::mm ) region = 2; // SCT + if ( rho < 270.*CLHEP::mm ) region = 1; // Pixels with support, beam pipe + etaBin = (int) ( eta * m_oneOverDeta ); + phiBin = (int) ( phi * m_oneOverDphi ); + if (phiBin>m_phiBinMax) phiBin=m_phiBinMax; + + // g.p. 23.05.2011 beam pipe material outside of inner detector area close to FCal + } else if( fabs( p.z() ) >= m_zInDetOut) { + subdet = ( p.z() > 0.) ? 4 : -4; + phiBin = (int) ( phi * m_oneOverDphi ); + if (phiBin>m_phiBinMax) phiBin=m_phiBinMax; + if(eta>=2.9 && eta<5.0) { + if(fabs(p.z()) < m_z1BeforeFCal) { + type = 1; + sampling = 1; + region = 7; + etaBin = (int) ( (eta-3.2) * m_oneOverDeta ); + } else if (fabs(p.z()) < m_z2BeforeFCal){ + type = 2; + sampling = 0; + region = 5; + etaBin = (int) ( (eta-3.0) * m_oneOverDeta ); + } else if (fabs(p.z()) < m_startZFCal1) { + type = 2; + sampling = 1; + region = 5; + etaBin = (int) ( (eta-3.0) * m_oneOverDeta ); + } + // g.p. back leakages in beam pipe + } else if ( eta >= 5. && eta < 8.0) { + type = 1; + sampling = 3; + region = 1; + etaBin = (int) ( (eta-5.)* 0.5 * m_oneOverDeta ); + } else if (eta>8.) { + type = 1; + sampling = 3; + region = 2; + etaBin = 0; + phiBin = 0; + } + if(etaBin<0) etaBin=0; + } + + + // If the point falls outside any of the above "if" + // statements, use a "none-of-the-above" identifier. + + if + ( subdet == INT_MIN || + type == INT_MIN || + sampling == INT_MIN || + region == INT_MIN || + etaBin == INT_MIN || + phiBin == INT_MIN ) + { +#if defined (DEBUG_VOLUMES) || defined (DEBUG_HITS) + static std::set<G4String> volumeList; + const G4String namePhys = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetName(); + const G4String nameLog = a_step->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName(); + + std::set<G4String>::iterator i = volumeList.find( nameLog ); + if ( i == volumeList.end() ) + { + volumeList.insert( nameLog ); + std::cout << "LArG4::CalibrationDefaultCalculator::Process" + << std::endl + << " default ID used in logical volume '" + << nameLog + << "'" + << std::endl + << " (each such volume is only listed once)" + << std::endl; + } + + static const G4int messageMax = 10; + static G4int messageCount = 0; + if ( messageCount++ < messageMax ) + { + std::cout << " detailed error (" << messageCount + << " of " << messageMax << " max displayed):" + << std::endl + << " G4Step at unexpected place: (x,y,z) [mm] = (" + << p.x()/mm << "," + << p.y()/mm << "," + << p.z()/mm + << "), eta=" << eta + << ", phi=" << phi + << ", rho=" << rho + << std::endl + << " in physical volume '" << namePhys << "'" + << std::endl + << " (subdet,type,sampling,region,etaBin,phiBin)=(" + << subdet << "," + << type << "," + << sampling << "," + << region << "," + << etaBin << "," + << phiBin + << "); using default ID" + << std::endl; + } +#endif + subdet = ( p.z() > 0.) ? 4 : -4; + type = 1; + sampling = 0; + region = 0; + etaBin = (int) ( eta * m_oneOverDeta ); + if ( etaBin > 49 ) etaBin = 49; + phiBin = (int) ( phi * m_oneOverDphi ); + if (phiBin>m_phiBinMax) phiBin=m_phiBinMax; +#ifdef DEBUG_DMXYZ + G4double energy = std::accumulate(_energies.begin(),_energies.end(), 0.); + if(energy > 1e-15) LArG4::CalibrationDefaultCalculator::Print("UNEXP DefaultCalculator",_identifier,a_step,_energies); +#endif + } + + // Create the LArG4Identifier. + _identifier << detector + << subdet + << type + << sampling + << region + << etaBin + << phiBin; + } + +#ifdef DEBUG_HITS + G4double energy = accumulate(_energies.begin(),_energies.end(),0.); + std::cout << "LArG4::CalibrationDefaultCalculator::Process" + << " ID=" << std::string(_identifier) + << " energy=" << energy + << " energies=(" << _energies[0] + << "," << _energies[1] + << "," << _energies[2] + << "," << _energies[3] << ")" + << std::endl; +#endif +#ifdef DEBUG_DMXYZ +// LArG4::CalibrationDefaultCalculator::Print("DMXYZ DefaultCalculator",_identifier,a_step,_energies); +#endif + + // Check for bad result. + if ( _identifier == LArG4Identifier() ) + return false; + + return true; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/CalibrationDefaultCalculator.h b/LArCalorimeter/LArG4/LArG4SD/src/CalibrationDefaultCalculator.h similarity index 56% rename from LArCalorimeter/LArG4/LArG4Code/LArG4Code/CalibrationDefaultCalculator.h rename to LArCalorimeter/LArG4/LArG4SD/src/CalibrationDefaultCalculator.h index 17477fe7b0c0b334a701ebb78b4186684f51a742..8972453352b58930eef234de72c26862fa1b3f74 100644 --- a/LArCalorimeter/LArG4/LArG4Code/LArG4Code/CalibrationDefaultCalculator.h +++ b/LArCalorimeter/LArG4/LArG4SD/src/CalibrationDefaultCalculator.h @@ -18,7 +18,7 @@ #ifndef LArG4_CalibrationDefaultCalculator_H #define LArG4_CalibrationDefaultCalculator_H -#include "LArG4Code/VCalibrationCalculator.h" +#include "LArG4Code/LArCalibCalculatorSvcImp.h" #include "LArG4Code/LArG4Identifier.h" #include "CaloG4Sim/SimulationEnergies.h" @@ -32,12 +32,14 @@ class G4Step; namespace LArG4 { - class CalibrationDefaultCalculator : public VCalibrationCalculator { + class CalibrationDefaultCalculator : public LArCalibCalculatorSvcImp { public: - - CalibrationDefaultCalculator(); + + CalibrationDefaultCalculator(const std::string& name, ISvcLocator *pSvcLocator); + StatusCode initialize() {return StatusCode::SUCCESS;} + StatusCode finalize() {return StatusCode::SUCCESS;} virtual ~CalibrationDefaultCalculator(); - + // The Process method returns a boolean value. If it's true, the // hit can be used by Geant4; if it's false, there's something wrong // with the energy deposit and it should be ignored. @@ -49,25 +51,31 @@ namespace LArG4 { // can never tell). Use the enum to control any special // processing. - virtual G4bool Process (const G4Step*, - const eCalculatorProcessing = kEnergyAndID); - - // The cell identifier determined by the Process method. - virtual const LArG4Identifier& identifier() const { return m_identifier; } - - // The calibration energies as determined by the Process method for - // the current G4Step. Units are the native G4 unit of energy. - virtual const std::vector<G4double>& energies() const { return m_energies; } + virtual G4bool Process (const G4Step* step, LArG4Identifier & identifier, + std::vector<G4double> & energies, + const eCalculatorProcessing p = kEnergyAndID) const override final; private: - // The results of the calculation. - LArG4Identifier m_identifier; - std::vector<G4double> m_energies; // The usual calibration energy calculator. CaloG4::SimulationEnergies m_energyCalculator; + // hardcoded numbers + const double m_oneOverDeta = 10.; // 1/Deta = 1./0.1 = 10. + const double m_oneOverDphi = 32./M_PI; // 1/Dphi + const int m_phiBinMax = 63; + const double m_rhoAlignmentSafety = 50.*CLHEP::mm; + const double m_zAlignmentSafety = 100.*CLHEP::mm; + const double m_rhoCalorOut = 3885.*CLHEP::mm - m_rhoAlignmentSafety; + const double m_zCalorOut = 6100.*CLHEP::mm - m_zAlignmentSafety; + const double m_rhoInDetOut = 1150.*CLHEP::mm + m_rhoAlignmentSafety; + const double m_zInDetOut = 3511.*CLHEP::mm + m_zAlignmentSafety; + const double m_startZFCal1 = 4668.5 - m_zAlignmentSafety; + const double m_z1BeforeFCal = 4225.5 + m_zAlignmentSafety; // + const double m_z2BeforeFCal = 4557.5 + m_zAlignmentSafety; // + + }; } // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4SD/src/DeadSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/DeadSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..c1212f206bc2df2d0c4e9ee0c12067bf30119bec --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/DeadSDTool.cc @@ -0,0 +1,137 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "DeadSDTool.h" + +#include "LArG4Code/SDWrapper.h" + +#include "CalibrationDefaultCalculator.h" + +// For escaped energy +#include "CaloG4Sim/EscapedEnergyRegistry.h" +#include "CaloG4Sim/CalibrationDefaultProcessing.h" +#include "LArG4Code/EscapedEnergyProcessing.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + DeadSDTool::DeadSDTool(const std::string& type, const std::string& name, + const IInterface* parent) + : CalibSDTool(type, name, parent) + , m_hitCollName("LArCalibrationHitDeadMaterial") + , m_embccalc("BarrelCryostatCalibrationCalculator", name) + , m_embclarcalc("BarrelCryostatCalibrationLArCalculator", name) + , m_mixcalc("BarrelCryostatCalibrationMixedCalculator", name) + , m_dmcalc("DMCalibrationCalculator", name) + , m_embpscalc("BarrelPresamplerCalibrationCalculator", name) + , m_embcalc("BarrelCalibrationCalculator", name) + , m_emeccalc("EndcapCryostatCalibrationCalculator", name) + , m_emecclarcalc("EndcapCryostatCalibrationLArCalculator", name) + , m_ememixcalc("EndcapCryostatCalibrationMixedCalculator", name) + , m_emesupcalc("EMECSupportCalibrationCalculator", name) + , m_heccalc("HECCalibrationWheelDeadCalculator", name) + , m_defcalc("CalibrationDefaultCalculator", name) + { + declareProperty("HitCollectionName", m_hitCollName); + declareProperty("BarrelCryVolumes", m_barCryVolumes); + declareProperty("BarrelCryLArVolumes", m_barCryLArVolumes); + declareProperty("BarrelCryMixVolumes", m_barCryMixVolumes); + declareProperty("DeadMaterialVolumes", m_DMVolumes); + declareProperty("BarrelPresVolumes", m_barPresVolumes); + declareProperty("BarrelVolumes", m_barVolumes); + declareProperty("ECCryVolumes", m_ECCryVolumes); + declareProperty("ECCryLArVolumes", m_ECCryLArVolumes); + declareProperty("ECCryMixVolumes", m_ECCryMixVolumes); + declareProperty("ECSupportVolumes", m_ECSupportVolumes); + declareProperty("HECWheelVolumes", m_HECWheelVolumes); + declareProperty("doEscapedEnergy", m_do_eep=false); + + declareProperty("EMBCryoCalibrationCalculator",m_embccalc); + declareProperty("EMBCryoLArCalibrationCalculator",m_embclarcalc); + declareProperty("EMBCryoMixCalibrationCalculator",m_mixcalc); + declareProperty("DMCalibrationCalculator",m_dmcalc); + declareProperty("EMBPSCalibrationCalculator",m_embpscalc); + declareProperty("EMBCalibrationCalculator",m_embcalc); + declareProperty("ECCryoCalibrationCalculator",m_emeccalc); + declareProperty("ECCryoLArCalibrationCalculator",m_emecclarcalc); + declareProperty("ECCryoMixCalibrationCalculator",m_ememixcalc); + declareProperty("EMECSuppCalibrationCalculator",m_emesupcalc); + declareProperty("HECWheelDeadCalculator",m_heccalc); + declareProperty("DefaultCalibrationCalculator",m_defcalc); + } + + //--------------------------------------------------------------------------- + // Initialization of Athena-components + //--------------------------------------------------------------------------- + StatusCode DeadSDTool::initializeCalculators() + { + // Lots of calculators !!! + ATH_CHECK(m_embccalc.retrieve()); + ATH_CHECK(m_embclarcalc.retrieve()); + ATH_CHECK(m_mixcalc.retrieve()); + ATH_CHECK(m_dmcalc.retrieve()); + ATH_CHECK(m_embpscalc.retrieve()); + ATH_CHECK(m_embcalc.retrieve()); + ATH_CHECK(m_emeccalc.retrieve()); + ATH_CHECK(m_emecclarcalc.retrieve()); + ATH_CHECK(m_ememixcalc.retrieve()); + ATH_CHECK(m_emesupcalc.retrieve()); + ATH_CHECK(m_heccalc.retrieve()); + // Take care of the default material + if (m_do_eep) + { + ATH_CHECK(m_defcalc.retrieve()); + } + + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create SDs for the current thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* DeadSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new CalibSDWrapper("LArDeadSDWrapper", m_hitCollName); + + // Create the SDs. + sdWrapper->addSD( makeOneSD("LArDead::BarrelCryostat::Dead", &*m_embccalc, m_barCryVolumes ) ); + sdWrapper->addSD( makeOneSD("LArDead::BarrelCryostat::LAr::Dead", &*m_embclarcalc, m_barCryLArVolumes ) ); + sdWrapper->addSD( makeOneSD("LArDead::BarrelCryostat::Mixed::Dead", &*m_mixcalc, m_barCryMixVolumes ) ); + sdWrapper->addSD( makeOneSD("LArDead::DM::Dead", &*m_dmcalc, m_DMVolumes ) ); + sdWrapper->addSD( makeOneSD("LArDead::Barrel::Presampler::Dead", &*m_embpscalc, m_barPresVolumes ) ); + sdWrapper->addSD( makeOneSD("LArDead::Barrel::Dead", &*m_embcalc, m_barVolumes ) ); + sdWrapper->addSD( makeOneSD("LArDead::EndcapCryostat::Dead", &*m_emeccalc, m_ECCryVolumes ) ); + sdWrapper->addSD( makeOneSD("LArDead::EndcapCryostat::LAr::Dead", &*m_emecclarcalc, m_ECCryLArVolumes ) ); + sdWrapper->addSD( makeOneSD("LArDead::EndcapCryostat::Mixed::Dead", &*m_ememixcalc, m_ECCryMixVolumes ) ); + sdWrapper->addSD( makeOneSD("LArDead::EMECSupport::Dead", &*m_emesupcalc, m_ECSupportVolumes ) ); + sdWrapper->addSD( makeOneSD("LArDead::HEC::Wheel::Inactive", &*m_heccalc, m_HECWheelVolumes ) ); + + // Take care of the default material + if (m_do_eep) + { + const std::vector<std::string> noVolumes; + auto uninstSD = makeOneSD("Default::Dead::Uninstrumented::Calibration::Region", &*m_defcalc, noVolumes); + + // Initialize the escaped energy processing for LAr volumes. + // This is from initialize processing in the former LArG4CalibSD. + // I still think we can do better than this, though. + // FIXME: I don't think this is thread safe!! + ATH_MSG_DEBUG("Creating EscapedEnergyProcessing and adding to registry"); + CaloG4::VEscapedEnergyProcessing* eep = + new EscapedEnergyProcessing( uninstSD.get() ); + CaloG4::EscapedEnergyRegistry* registry = + CaloG4::EscapedEnergyRegistry::GetInstance(); + registry->AddAndAdoptProcessing( "LAr::", eep ); + + sdWrapper->addSD( std::move(uninstSD) ); + } + + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4SD/src/DeadSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/DeadSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..2f1660269e36396d1421fcc2afef7779d230d9d1 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/DeadSDTool.h @@ -0,0 +1,84 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4SD_DEADSDTOOL_H +#define LARG4SD_DEADSDTOOL_H + +// System includes +#include <string> +#include <vector> + +// Project includes +#include "LArG4Code/CalibSDTool.h" + +namespace LArG4 +{ + + class DeadSDTool : public CalibSDTool + { + + public: + + // Constructor + DeadSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + + /// Initialize Calculator Services + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + + /// Do we add the escaped energy processing? + /// This is only in "mode 1" (Tile+LAr), not in "DeadLAr" mode + bool m_do_eep; + + // The volumes per SD, and the corresponding SDs + std::vector<std::string> m_barCryVolumes; + std::vector<std::string> m_barCryLArVolumes; + std::vector<std::string> m_barCryMixVolumes; + std::vector<std::string> m_DMVolumes; + std::vector<std::string> m_barPresVolumes; + std::vector<std::string> m_barVolumes; + std::vector<std::string> m_ECCryVolumes; + std::vector<std::string> m_ECCryLArVolumes; + std::vector<std::string> m_ECCryMixVolumes; + std::vector<std::string> m_ECSupportVolumes; + std::vector<std::string> m_HECWheelVolumes; + //LArG4CalibSD* m_barCrySD; + //LArG4CalibSD* m_barCryLArSD; + //LArG4CalibSD* m_barCryMixSD; + //LArG4CalibSD* m_DMSD; + //LArG4CalibSD* m_barPresSD; + //LArG4CalibSD* m_barSD; + //LArG4CalibSD* m_ECCrySD; + //LArG4CalibSD* m_ECCryLArSD; + //LArG4CalibSD* m_ECCryMixSD; + //LArG4CalibSD* m_ECSupportSD; + //LArG4CalibSD* m_HECWheelSD; + //LArG4CalibSD* m_uninstSD; + + ServiceHandle<ILArCalibCalculatorSvc> m_embccalc; //BarrelCryostat::CalibrationCalculator() + ServiceHandle<ILArCalibCalculatorSvc> m_embclarcalc; //BarrelCryostat::CalibrationLArCalculator() + ServiceHandle<ILArCalibCalculatorSvc> m_mixcalc; //BarrelCryostat::CalibrationMixedCalculator() + ServiceHandle<ILArCalibCalculatorSvc> m_dmcalc; //DM::CalibrationCalculator() + ServiceHandle<ILArCalibCalculatorSvc> m_embpscalc; //BarrelPresampler::CalibrationCalculator() + ServiceHandle<ILArCalibCalculatorSvc> m_embcalc; //Barrel::CalibrationCalculator() + ServiceHandle<ILArCalibCalculatorSvc> m_emeccalc; //EndcapCryostat::CalibrationCalculator() + ServiceHandle<ILArCalibCalculatorSvc> m_emecclarcalc; //EndcapCryostat::CalibrationLArCalculator() + ServiceHandle<ILArCalibCalculatorSvc> m_ememixcalc; //EndcapCryostat::CalibrationMixedCalculator() + ServiceHandle<ILArCalibCalculatorSvc> m_emesupcalc; //EMECSupportCalibrationCalculator() + ServiceHandle<ILArCalibCalculatorSvc> m_heccalc; //HEC::LArHECCalibrationWheelCalculator(HEC::kWheelDead) + ServiceHandle<ILArCalibCalculatorSvc> m_defcalc; //CalibrationDefaultCalculator() + + }; + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..2eddb6e3242f8d5d58af75915dbc0f5beddf6ddb --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.cc @@ -0,0 +1,64 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EMBSDTool.h" + +// Project includes +#include "LArG4Code/SDWrapper.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + EMBSDTool::EMBSDTool(const std::string& type, const std::string& name, + const IInterface* parent) + : SimpleSDTool(type, name, parent) + , m_hitCollName("LArHitEMB") + , m_embcalc("EMBCalculator", name) + , m_pscalc("EMBPresamplerCalculator", name) + { + declareProperty("HitCollectionName", m_hitCollName); + declareProperty("StacVolumes", m_stacVolumes); + declareProperty("PresamplerVolumes", m_presVolumes); + + declareProperty("EMBCalculator",m_embcalc); + declareProperty("EMBPSCalculator",m_pscalc); + } + + //--------------------------------------------------------------------------- + // Initialization of Athena-components + //--------------------------------------------------------------------------- + StatusCode EMBSDTool::initializeCalculators() + { + ATH_CHECK(m_pscalc.retrieve()); + ATH_CHECK(m_embcalc.retrieve()); + + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the SD wrapper for current worker thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* EMBSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new SimpleSDWrapper("LArEMBSDWrapper", m_hitCollName); + + // Add the SDs + sdWrapper->addSD( makeOneSD("LAr::Barrel::Presampler::Module", &*m_pscalc, m_presVolumes) ); + sdWrapper->addSD( makeOneSD("LAr::EMB::STAC", &*m_embcalc, m_stacVolumes) ); + + // Setup frozen shower SD + if(useFrozenShowers()) + { + sdWrapper->addFastSimSD("BarrelFastSimDedicatedSD"); + } + + // Return the wrapper as my SD + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..a89293715557bf7a52f8ef5b0e8898cf0b62f1ba --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.h @@ -0,0 +1,61 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4SD_EMBSDTOOL_H +#define LARG4SD_EMBSDTOOL_H + +// System includes +#include <string> +#include <vector> + +// Project includes +#include "LArG4Code/SimpleSDTool.h" +#include "LArG4Code/ILArCalculatorSvc.h" + +namespace LArG4 +{ + + /// @class EMBSDTool + /// @brief SD tool which manages EM barrel sensitive detectors. + /// + /// NOTE: this design is in flux, migrating to be more multi-threading-friendly + /// + class EMBSDTool : public SimpleSDTool + { + + public: + + /// Constructor + EMBSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + + /// Initialize Calculator Services + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// @name Configuration + /// @{ + + /// Hit collection name + std::string m_hitCollName; + + /// List of volumes for the stac SD + std::vector<std::string> m_stacVolumes; + /// List of volumes for the presampler SD + std::vector<std::string> m_presVolumes; + + /// @} + + ServiceHandle<ILArCalculatorSvc> m_embcalc; //LArBarrelCalculator::GetCalculator() + ServiceHandle<ILArCalculatorSvc> m_pscalc; //LArBarrelPresamplerCalculator::GetCalculator() + + }; // class EMBSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..0f55d3e1f2898dc49b9afc79be68ffd469704ccd --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.cc @@ -0,0 +1,95 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EMECSDTool.h" + +#include "LArG4Code/SDWrapper.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + EMECSDTool::EMECSDTool(const std::string& type, const std::string& name, + const IInterface *parent) + : SimpleSDTool(type, name, parent), + m_hitCollName("LArHitEMEC") + , m_emepiwcalc("EMECPosInnerWheelCalculator", name) + , m_emeniwcalc("EMECNegInnerWheelCalculator", name) + , m_emepowcalc("EMECPosOuterWheelCalculator", name) + , m_emenowcalc("EMECNegOuterWheelCalculator", name) + , m_emepscalc("EMECPresamplerCalculator", name) + , m_emeobarcalc("EMECBackOuterBarretteCalculator", name) + { + declareProperty("HitCollectionName", m_hitCollName); + declareProperty("PosIWVolumes", m_posIWVolumes); + declareProperty("NegIWVolumes", m_negIWVolumes); + declareProperty("PosOWVolumes", m_posOWVolumes); + declareProperty("NegOWVolumes", m_negOWVolumes); + declareProperty("PresVolumes", m_presVolumes); + declareProperty("BOBarretteVolumes", m_bobVolumes); + + declareProperty("EMECPosIWCalculator", m_emepiwcalc); + declareProperty("EMECNegIWCalculator", m_emeniwcalc); + declareProperty("EMECPosOWCalculator", m_emepowcalc); + declareProperty("EMECNegOWCalculator", m_emenowcalc); + declareProperty("EMECPSCalculator", m_emepscalc); + declareProperty("EMECBOBCalculator", m_emeobarcalc); + } + + //--------------------------------------------------------------------------- + // Initialization of Athena-components + //--------------------------------------------------------------------------- + StatusCode EMECSDTool::initializeCalculators() + { + ATH_CHECK(m_emepiwcalc.retrieve()); + ATH_CHECK(m_emeniwcalc.retrieve()); + ATH_CHECK(m_emepowcalc.retrieve()); + ATH_CHECK(m_emenowcalc.retrieve()); + ATH_CHECK(m_emepscalc.retrieve()); + ATH_CHECK(m_emeobarcalc.retrieve()); + + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the SD wrapper for current worker thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* EMECSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new SimpleSDWrapper("LArEMECSDWrapper", m_hitCollName); + + // Add the SDs + sdWrapper->addSD( + makeOneSD( "LAr::EMEC::Pos::InnerWheel", &*m_emepiwcalc, m_posIWVolumes ) + ); + sdWrapper->addSD( + makeOneSD( "LAr::EMEC::Neg::InnerWheel", &*m_emeniwcalc, m_negIWVolumes ) + ); + sdWrapper->addSD( + makeOneSD( "LAr::EMEC::Pos::OuterWheel", &*m_emepowcalc, m_posOWVolumes ) + ); + sdWrapper->addSD( + makeOneSD( "LAr::EMEC::Neg::OuterWheel", &*m_emenowcalc, m_negOWVolumes ) + ); + sdWrapper->addSD( + makeOneSD( "LAr::Endcap::Presampler::LiquidArgon", &*m_emepscalc, m_presVolumes ) + ); + sdWrapper->addSD( + makeOneSD( "LAr::EMEC::BackOuterBarrette::Module::Phidiv", &*m_emeobarcalc, m_bobVolumes ) + ); + + // Setup frozen shower SD + if(useFrozenShowers()) + { + sdWrapper->addFastSimSD("EndcapFastSimDedicatedSD"); + } + + // Return the wrapper as my SD + return sdWrapper; + } + +} diff --git a/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..730c5e8fdaaa69d1bec3c9ba4bafdc0401b80bfa --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.h @@ -0,0 +1,67 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4SD_EMECSDTOOL_H +#define LARG4SD_EMECSDTOOL_H + +// System includes +#include <string> +#include <vector> + +// Project includes +#include "LArG4Code/SimpleSDTool.h" +#include "LArG4Code/ILArCalculatorSvc.h" + +namespace LArG4 +{ + + /// @class EMECSDTool + /// @brief SD tool which manages EM endcap sensitive detectors. + /// + /// NOTE: this design is in flux, migrating to be more multi-threading-friendly + /// + class EMECSDTool : public SimpleSDTool + { + + public: + + /// Constructor + EMECSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + + /// Initialize Calculator Services + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + + /// @name List of volumes for each SD and the corresponding SD + /// @{ + std::vector<std::string> m_posIWVolumes; + std::vector<std::string> m_negIWVolumes; + std::vector<std::string> m_posOWVolumes; + std::vector<std::string> m_negOWVolumes; + std::vector<std::string> m_presVolumes; + std::vector<std::string> m_bobVolumes; + /// @} + + ServiceHandle<ILArCalculatorSvc> m_emepiwcalc; //EnergyCalculator(LArG4::InnerAbsorberWheel, LArG4::EMEC_ECOR_ROPT, 1) + ServiceHandle<ILArCalculatorSvc> m_emeniwcalc; //EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel, LArG4::EMEC_ECOR_ROPT, -1), + ServiceHandle<ILArCalculatorSvc> m_emepowcalc; //EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel, EC::EnergyCalculator::EMEC_ECOR_ROPT, 1), + ServiceHandle<ILArCalculatorSvc> m_emenowcalc; //EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel, EC::EnergyCalculator::EMEC_ECOR_ROPT, -1), + ServiceHandle<ILArCalculatorSvc> m_emepscalc; //LArEndcapPresamplerCalculator::GetCalculator() + ServiceHandle<ILArCalculatorSvc> m_emeobarcalc; //EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteWheel) + + + + }; // class EMECSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..493fba86a9db97982560a9c3687a346c73b70bf4 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.cc @@ -0,0 +1,68 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "FCALSDTool.h" + +#include "LArG4Code/SDWrapper.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + FCALSDTool::FCALSDTool(const std::string& type, const std::string& name, + const IInterface* parent) + : SimpleSDTool(type, name, parent) + , m_hitCollName("LArHitFCAL") + , m_fcal1calc("FCAL1Calculator", name) + , m_fcal2calc("FCAL2Calculator", name) + , m_fcal3calc("FCAL3Calculator", name) + { + declareProperty("HitCollectionName", m_hitCollName); + declareProperty("FCAL1Volumes", m_fcal1Volumes); + declareProperty("FCAL2Volumes", m_fcal2Volumes); + declareProperty("FCAL3Volumes", m_fcal3Volumes); + + declareProperty("FCAL1Calculator", m_fcal1calc); + declareProperty("FCAL2Calculator", m_fcal2calc); + declareProperty("FCAL3Calculator", m_fcal3calc); + } + + //--------------------------------------------------------------------------- + // Initialization of Athena-components + //--------------------------------------------------------------------------- + StatusCode FCALSDTool::initializeCalculators() + { + ATH_CHECK(m_fcal1calc.retrieve()); + ATH_CHECK(m_fcal2calc.retrieve()); + ATH_CHECK(m_fcal3calc.retrieve()); + + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the SD wrapper for current worker thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* FCALSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new SimpleSDWrapper("LArFCALSDWrapper", m_hitCollName); + + // Add the SDs + sdWrapper->addSD( makeOneSD("LAr::FCAL::Module1::Gap", &*m_fcal1calc, m_fcal1Volumes) ); + sdWrapper->addSD( makeOneSD("LAr::FCAL::Module2::Gap", &*m_fcal2calc, m_fcal2Volumes) ); + sdWrapper->addSD( makeOneSD("LAr::FCAL::Module3::Gap", &*m_fcal3calc, m_fcal3Volumes) ); + + // Setup frozen shower SD + if(useFrozenShowers()) + { + sdWrapper->addFastSimSD("FCALFastSimDedicatedSD"); + } + + // Return the wrapper as my SD + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..f41499e7c7619c3d6caa0bae88fa982f04f0f989 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.h @@ -0,0 +1,59 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4SD_FCALSDTOOL_H +#define LARG4SD_FCALSDTOOL_H + +// System includes +#include <string> +#include <vector> + +// Project includes +#include "LArG4Code/SimpleSDTool.h" +#include "LArG4Code/ILArCalculatorSvc.h" + +namespace LArG4 +{ + + /// @class FCALSDTool + /// @brief SD tool which manages the LAr forward calo sensitive detectors. + /// + /// NOTE: this design is in flux, migrating to be more multi-threading-friendly + /// + class FCALSDTool : public SimpleSDTool + { + + public: + + /// Constructor + FCALSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + + /// Initialize Calculator Services + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + + /// List of volumes for each SD + /// @{ + std::vector<std::string> m_fcal1Volumes; + std::vector<std::string> m_fcal2Volumes; + std::vector<std::string> m_fcal3Volumes; + /// @} + + ServiceHandle<ILArCalculatorSvc> m_fcal1calc; //LArFCAL1Calculator::GetInstance() + ServiceHandle<ILArCalculatorSvc> m_fcal2calc; //LArFCAL2Calculator::GetInstance() + ServiceHandle<ILArCalculatorSvc> m_fcal3calc; //LArFCAL3Calculator::GetInstance() + + }; // class FCALSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..671f46e34ec0858ae91cf85f5e3768cd7479d6c2 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.cc @@ -0,0 +1,61 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "HECSDTool.h" + +#include "LArG4Code/SDWrapper.h" + + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + HECSDTool::HECSDTool(const std::string& type, const std::string& name, + const IInterface* parent) + : SimpleSDTool(type, name, parent) + , m_hitCollName("LArHitHEC") + , m_heccalc("HECWheelCalculator", name) + { + declareProperty("HitCollectionName", m_hitCollName); + //declareProperty("SliceVolumes", m_sliceVolumes); + //declareProperty("LocalVolumes", m_localVolumes); + declareProperty("WheelVolumes", m_wheelVolumes); + + declareProperty("HECWheelCalculator", m_heccalc); + } + + //--------------------------------------------------------------------------- + // Initialization of Athena-components + //--------------------------------------------------------------------------- + StatusCode HECSDTool::initializeCalculators() + { + ATH_CHECK(m_heccalc.retrieve()); + + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the SD wrapper for current worker thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* HECSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new SimpleSDWrapper("LArHECSDWrapper", m_hitCollName); + + // Add the SDs + //sdWrapper->addSD( makeOneSD("LAr::HEC::Module::Depth::Slice", + // LArHECCalculator::GetCalculator(), + // m_sliceVolumes) ); + //sdWrapper->addSD( makeOneSD("LAr::HEC::Module::Depth::Slice::Local", + // LArHECLocalCalculator::GetCalculator(), + // m_localVolumes) ); + + sdWrapper->addSD( makeOneSD("LAr::HEC::Module::Depth::Slice::Wheel", &*m_heccalc, m_wheelVolumes) ); + + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..bd0580949d96fe685341366eacd091bbca93bc0c --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4SD_HECSDTOOL_H +#define LARG4SD_HECSDTOOL_H + +// System includes +#include <string> +#include <vector> + +// Project includes +#include "LArG4Code/SimpleSDTool.h" +#include "LArG4Code/ILArCalculatorSvc.h" + +namespace LArG4 +{ + + /// @class HECSDTool + /// @brief SD tool which manages the LAr hadronic endcap sensitive detectors. + /// + /// NOTE: this design is in flux, migrating to be more multi-threading-friendly + /// + class HECSDTool : public SimpleSDTool + { + + public: + + /// Constructor + HECSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + + /// Initialize Calculator Services + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + + /// List of volumes for each SD + /// @{ + std::vector<std::string> m_sliceVolumes; + std::vector<std::string> m_localVolumes; + std::vector<std::string> m_wheelVolumes; + /// @} + + ServiceHandle<ILArCalculatorSvc> m_heccalc; //LArHECWheelCalculator::GetCalculator() + }; // class HECSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/InactiveSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/InactiveSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..f874ed97b7a99a1ef01286e25084058e177202c4 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/InactiveSDTool.cc @@ -0,0 +1,147 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "InactiveSDTool.h" + +#include "LArG4Code/SDWrapper.h" + + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + InactiveSDTool::InactiveSDTool(const std::string& type, const std::string& name, + const IInterface *parent) + : CalibSDTool(type, name, parent) + , m_hitCollName("LArCalibrationHitInactive") + , m_embpscalc("BarrelPresamplerCalibrationCalculator", name) + , m_embcalc("BarrelCalibrationCalculator", name) + , m_emepiwcalc("EMECPosInnerWheelCalibrationCalculator", name) + , m_emeniwcalc("EMECNegInnerWheelCalibrationCalculator", name) + , m_emepowcalc("EMECPosOuterWheelCalibrationCalculator", name) + , m_emenowcalc("EMECNegOuterWheelCalibrationCalculator", name) + , m_heccalc("HECCalibrationWheelInactiveCalculator", name) + , m_fcal1calc("FCAL1CalibCalculator", name) + , m_fcal2calc("FCAL2CalibCalculator", name) + , m_fcal3calc("FCAL3CalibCalculator", name) + , m_minfcalcalc("MiniFCALInactiveCalibrationCalculator", name) + { + declareProperty("HitCollectionName", m_hitCollName); + declareProperty("BarrelPreVolumes", m_barPreVolumes); + declareProperty("BarrelVolumes", m_barVolumes); + declareProperty("ECPosInVolumes", m_ECPosInVolumes); + declareProperty("ECPosOutVolumes", m_ECPosOutVolumes); + declareProperty("ECNegInVolumes", m_ECNegInVolumes); + declareProperty("ECNegOutVolumes", m_ECNegOutVolumes); + //declareProperty("HECVolumes", m_HECVolumes={"LAr::HEC::Inactive"}); + //declareProperty("HECLocalVolumes", m_HECLocVolumes={"LAr::HEC::Local::Inactive"}); + declareProperty("HECWheelVolumes", m_HECWheelVolumes); + declareProperty("FCAL1Volumes", m_fcal1Volumes); + declareProperty("FCAL2Volumes", m_fcal2Volumes); + declareProperty("FCAL3Volumes", m_fcal3Volumes); + declareProperty("MiniMomVolumes", m_miniMomVolumes); + declareProperty("MiniVolumes", m_miniVolumes); + declareProperty("MiniLayVolumes", m_miniLayVolumes); + + declareProperty("EMBPSCalibrationCalculator", m_embpscalc); + declareProperty("EMBCalibrationCalculator", m_embcalc); + declareProperty("EMECPosIWCalibrationCalculator", m_emepiwcalc); + declareProperty("EMECNegIWCalibrationCalculator", m_emeniwcalc); + declareProperty("EMECPosOWCalibrationCalculator", m_emepowcalc); + declareProperty("EMECNegOWCalibrationCalculator", m_emenowcalc); + declareProperty("HECWheelInactiveCalculator", m_heccalc); + declareProperty("FCAL1CalibCalculator", m_fcal1calc); + declareProperty("FCAL2CalibCalculator", m_fcal2calc); + declareProperty("FCAL3CalibCalculator", m_fcal3calc); + declareProperty("MiniFCALInactiveCalibrationCalculator", m_minfcalcalc); + } + + //--------------------------------------------------------------------------- + // Initialization of Athena-components + //--------------------------------------------------------------------------- + StatusCode InactiveSDTool::initializeCalculators() + { + ATH_CHECK(m_embpscalc.retrieve()); + ATH_CHECK(m_embcalc.retrieve()); + ATH_CHECK(m_emepiwcalc.retrieve()); + ATH_CHECK(m_emepowcalc.retrieve()); + ATH_CHECK(m_emeniwcalc.retrieve()); + ATH_CHECK(m_emenowcalc.retrieve()); + ATH_CHECK(m_heccalc.retrieve()); + ATH_CHECK(m_fcal1calc.retrieve()); + ATH_CHECK(m_fcal2calc.retrieve()); + ATH_CHECK(m_fcal3calc.retrieve()); + ATH_CHECK(m_minfcalcalc.retrieve()); + + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create SD wrapper for current thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* InactiveSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new CalibSDWrapper("LArInactiveSDWrapper", m_hitCollName); + + sdWrapper->addSD( + makeOneSD("LAr::Barrel::Presampler::Inactive", &*m_embpscalc, m_barPreVolumes) + ); + sdWrapper->addSD( + makeOneSD("LAr::Barrel::Inactive", &*m_embcalc, m_barVolumes) + ); + sdWrapper->addSD( + makeOneSD("LAr::EMEC::Pos::InnerWheel::Inactive", &*m_emepiwcalc, m_ECPosInVolumes) + ); + sdWrapper->addSD( + makeOneSD("LAr::EMEC::Pos::OuterWheel::Inactive", &*m_emepowcalc, m_ECPosOutVolumes) + ); + sdWrapper->addSD( + makeOneSD("LAr::EMEC::Neg::InnerWheel::Inactive", &*m_emeniwcalc, m_ECNegInVolumes) + ); + sdWrapper->addSD( + makeOneSD("LAr::EMEC::Neg::OuterWheel::Inactive", &*m_emenowcalc, m_ECNegOutVolumes) + ); + + //sdWrapper->addSD( + // makeOneSD("LAr::HEC::Inactive", + // new HEC::CalibrationCalculator(HEC::kInactive), + // m_HECVolumes) + //); + + //sdWrapper->addSD( + // makeOneSD("LAr::HEC::Local::Inactive", + // new HEC::LocalCalibrationCalculator(HEC::kLocInactive), + // m_HECLocVolumes) + //); + + sdWrapper->addSD( + makeOneSD("LAr::HEC::Wheel::Inactive", &*m_heccalc, m_HECWheelVolumes) + ); + sdWrapper->addSD( + makeOneSD("LAr::FCAL::Inactive1", &*m_fcal1calc, m_fcal1Volumes) + ); + sdWrapper->addSD( + makeOneSD("LAr::FCAL::Inactive2", &*m_fcal2calc, m_fcal2Volumes) + ); + sdWrapper->addSD( + makeOneSD("LAr::FCAL::Inactive3", &*m_fcal3calc, m_fcal3Volumes) + ); + sdWrapper->addSD( + makeOneSD("MiniFCALMother::Inactive", &*m_minfcalcalc, m_miniMomVolumes) + ); + sdWrapper->addSD( + makeOneSD("MiniFCAL::Inactive", &*m_minfcalcalc, m_miniVolumes) + ); + sdWrapper->addSD( + makeOneSD("MiniFCAL::Layer::Inactive", &*m_minfcalcalc, m_miniLayVolumes) + ); + + // Return the wrapper as my SD + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4SD/src/InactiveSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/InactiveSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..4d128086b31125613850686c7e41f6b7fbea3041 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/InactiveSDTool.h @@ -0,0 +1,77 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4SD_INACTIVESDTOOL_H +#define LARG4SD_INACTIVESDTOOL_H + +// System includes +#include <string> +#include <vector> + +// Project includes +#include "LArG4Code/CalibSDTool.h" +#include "LArG4Code/ILArCalibCalculatorSvc.h" + +namespace LArG4 +{ + + /// @class InactiveSDTool + /// @brief Sensitive detector tool which manages inactive-area LAr calib SDs. + /// + /// Design is in flux. + /// + class InactiveSDTool : public CalibSDTool + { + + public: + + /// Constructor + InactiveSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + + /// Initialize Calculator Services + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + + /// @name SD volumes + /// @{ + std::vector<std::string> m_barPreVolumes; + std::vector<std::string> m_barVolumes; + std::vector<std::string> m_ECPosInVolumes; + std::vector<std::string> m_ECPosOutVolumes; + std::vector<std::string> m_ECNegInVolumes; + std::vector<std::string> m_ECNegOutVolumes; + std::vector<std::string> m_HECWheelVolumes; + std::vector<std::string> m_fcal1Volumes; + std::vector<std::string> m_fcal2Volumes; + std::vector<std::string> m_fcal3Volumes; + std::vector<std::string> m_miniMomVolumes; + std::vector<std::string> m_miniVolumes; + std::vector<std::string> m_miniLayVolumes; + /// @} + + ServiceHandle<ILArCalibCalculatorSvc> m_embpscalc; //BarrelPresampler::CalibrationCalculator + ServiceHandle<ILArCalibCalculatorSvc> m_embcalc; //Barrel::CalibrationCalculator + ServiceHandle<ILArCalibCalculatorSvc> m_emepiwcalc;//LArG4::EC::CalibrationCalculator(LArWheelCalculator::InnerAbsorberWheel, 1) + ServiceHandle<ILArCalibCalculatorSvc> m_emeniwcalc;//LArG4::EC::CalibrationCalculator(LArWheelCalculator::InnerAbsorberWheel, -1) + ServiceHandle<ILArCalibCalculatorSvc> m_emepowcalc; //LArG4::EC::CalibrationCalculator(LArWheelCalculator::OuterAbsorberWheel, 1) + ServiceHandle<ILArCalibCalculatorSvc> m_emenowcalc; //LArG4::EC::CalibrationCalculator(LArWheelCalculator::OuterAbsorberWheel, -1) + ServiceHandle<ILArCalibCalculatorSvc> m_heccalc; //LArG4::HEC::LArHECCalibrationWheelCalculator(LArG4::HEC::kWheelInactive) + ServiceHandle<ILArCalibCalculatorSvc> m_fcal1calc; + ServiceHandle<ILArCalibCalculatorSvc> m_fcal2calc; + ServiceHandle<ILArCalibCalculatorSvc> m_fcal3calc; + ServiceHandle<ILArCalibCalculatorSvc> m_minfcalcalc; //LArG4::MiniFCAL::MiniFCALCalibrationCalculator(LArG4::MiniFCAL::kInactive) + + }; // class InactiveSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4ActiveSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/LArG4ActiveSDTool.cc deleted file mode 100644 index 04d27af54b0e40d0d556445439d14fc1b4993ba3..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4ActiveSDTool.cc +++ /dev/null @@ -1,128 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4ActiveSDTool.h" - -#include "LArG4Code/LArG4CalibSD.h" - -#include "LArG4Code/LArG4Hit.h" -#include "CxxUtils/make_unique.h" - -// All the calculators I need -#include "LArG4Barrel/LArBarrelCalibrationCalculator.h" -#include "LArG4Barrel/PresamplerCalibrationCalculator.h" -#include "LArG4EC/PresamplerCalibrationCalculator.h" -#include "LArG4EC/CalibrationCalculator.h" -#include "LArG4EC/PresamplerCalibrationCalculator.h" -#include "LArG4FCAL/LArFCAL1CalibCalculator.h" -#include "LArG4FCAL/LArFCAL2CalibCalculator.h" -#include "LArG4FCAL/LArFCAL3CalibCalculator.h" -#include "LArG4MiniFCAL/MiniFCALCalibrationCalculator.h" -#include "LArG4HEC/LArHECCalibrationWheelCalculator.h" - -LArG4ActiveSDTool::LArG4ActiveSDTool(const std::string& type, const std::string& name, - const IInterface *parent) - : LArG4SDTool(type,name,parent) - , m_HitColl("LArCalibrationHitActive") - , m_stacSD(nullptr) - , m_presBarSD(nullptr) - , m_posIWSD(nullptr) - , m_negIWSD(nullptr) - , m_posOWSD(nullptr) - , m_negOWSD(nullptr) - , m_presECSD(nullptr) - , m_bobSD(nullptr) - , m_fcal1SD(nullptr) - , m_fcal2SD(nullptr) - , m_fcal3SD(nullptr) - , m_sliceSD(nullptr) - , m_miniSD(nullptr) -{ - declareProperty("StacVolumes",m_stacVolumes); - declareProperty("PresamplerVolumes",m_presBarVolumes); - declareProperty("PosIWVolumes",m_posIWVolumes); - declareProperty("NegIWVolumes",m_negIWVolumes); - declareProperty("PosOWVolumes",m_posOWVolumes); - declareProperty("NegOWVolumes",m_negOWVolumes); - declareProperty("PresVolumes",m_presECVolumes); - declareProperty("BOBarretteVolumes",m_bobVolumes); - declareProperty("FCAL1Volumes",m_fcal1Volumes); - declareProperty("FCAL2Volumes",m_fcal2Volumes); - declareProperty("FCAL3Volumes",m_fcal3Volumes); - declareProperty("SliceVolumes",m_sliceVolumes); - declareProperty("MiniVolumes",m_miniVolumes); - - declareInterface<ISensitiveDetector>(this); -} - -StatusCode LArG4ActiveSDTool::initializeSD() -{ - // Lots of singleton calculators !!! - m_presBarSD = new LArG4CalibSD( "Barrel::Presampler::Module::Calibration" , new LArG4::BarrelPresampler::CalibrationCalculator() , m_doPID ); - m_stacSD = new LArG4CalibSD( "EMB::STAC::Calibration" , new LArG4::Barrel::CalibrationCalculator() , m_doPID ); - m_posIWSD = new LArG4CalibSD( "EMEC::Pos::InnerWheel::Calibration" , new LArG4::EC::CalibrationCalculator(LArWheelCalculator::InnerAbsorberWheel, 1) , m_doPID ); - m_negIWSD = new LArG4CalibSD( "EMEC::Neg::InnerWheel::Calibration" , new LArG4::EC::CalibrationCalculator(LArWheelCalculator::InnerAbsorberWheel, -1) , m_doPID ); - m_posOWSD = new LArG4CalibSD( "EMEC::Pos::OuterWheel::Calibration" , new LArG4::EC::CalibrationCalculator(LArWheelCalculator::OuterAbsorberWheel, 1) , m_doPID ); - m_negOWSD = new LArG4CalibSD( "EMEC::Neg::OuterWheel::Calibration" , new LArG4::EC::CalibrationCalculator(LArWheelCalculator::OuterAbsorberWheel, -1) , m_doPID ); - m_presECSD = new LArG4CalibSD( "Endcap::Presampler::LiquidArgon::Calibration" , new LArG4::EC::PresamplerCalibrationCalculator() , m_doPID ); - m_bobSD = new LArG4CalibSD( "EMEC::BackOuterBarrette::Calibration", new LArG4::EC::CalibrationCalculator(LArWheelCalculator::BackOuterBarretteWheelCalib, 1) , m_doPID ); - m_fcal1SD = new LArG4CalibSD( "FCAL::Module1::Gap::Calibration" , LArG4::FCAL::LArFCAL1CalibCalculator::GetCalculator() , m_doPID ); - m_fcal2SD = new LArG4CalibSD( "FCAL::Module2::Gap::Calibration" , LArG4::FCAL::LArFCAL2CalibCalculator::GetCalculator() , m_doPID ); - m_fcal3SD = new LArG4CalibSD( "FCAL::Module3::Gap::Calibration" , LArG4::FCAL::LArFCAL3CalibCalculator::GetCalculator() , m_doPID ); - m_sliceSD = new LArG4CalibSD( "HEC::Module::Depth::Slice::Wheel::Calibration" , new LArG4::HEC::LArHECCalibrationWheelCalculator(LArG4::HEC::kWheelActive) , m_doPID ); - m_miniSD = new LArG4CalibSD( "MiniFCAL::Wafer" , new LArG4::MiniFCAL::MiniFCALCalibrationCalculator(LArG4::MiniFCAL::kActive) , m_doPID ); - - std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; - configuration[m_presBarSD] = &m_presBarVolumes; - configuration[m_stacSD] = &m_stacVolumes; - configuration[m_posIWSD] = &m_posIWVolumes; - configuration[m_posOWSD] = &m_posOWVolumes; - configuration[m_negIWSD] = &m_negIWVolumes; - configuration[m_negOWSD] = &m_negOWVolumes; - configuration[m_presECSD] = &m_presECVolumes; - configuration[m_bobSD] = &m_bobVolumes; - configuration[m_fcal1SD] = &m_fcal1Volumes; - configuration[m_fcal2SD] = &m_fcal2Volumes; - configuration[m_fcal3SD] = &m_fcal3Volumes; - configuration[m_sliceSD] = &m_sliceVolumes; - configuration[m_miniSD] = &m_miniVolumes; - setupAllSDs(configuration); - - // make sure they have the identifiers they need - setupHelpers(m_presBarSD); - setupHelpers(m_stacSD); - setupHelpers(m_posIWSD); - setupHelpers(m_posOWSD); - setupHelpers(m_negIWSD); - setupHelpers(m_negOWSD); - setupHelpers(m_presECSD); - setupHelpers(m_bobSD); - setupHelpers(m_fcal1SD); - setupHelpers(m_fcal2SD); - setupHelpers(m_fcal3SD); - setupHelpers(m_sliceSD); - setupHelpers(m_miniSD); - - return StatusCode::SUCCESS; -} - -StatusCode LArG4ActiveSDTool::Gather() -{ - // In this case, *unlike* other SDs, the *tool* owns the collection - if (!m_HitColl.isValid()) m_HitColl = CxxUtils::make_unique<CaloCalibrationHitContainer>(m_HitColl.name()); - m_presBarSD->EndOfAthenaEvent( &*m_HitColl ); - m_stacSD ->EndOfAthenaEvent( &*m_HitColl ); - m_posIWSD ->EndOfAthenaEvent( &*m_HitColl ); - m_negIWSD ->EndOfAthenaEvent( &*m_HitColl ); - m_posOWSD ->EndOfAthenaEvent( &*m_HitColl ); - m_negOWSD ->EndOfAthenaEvent( &*m_HitColl ); - m_presECSD ->EndOfAthenaEvent( &*m_HitColl ); - m_bobSD ->EndOfAthenaEvent( &*m_HitColl ); - m_fcal1SD ->EndOfAthenaEvent( &*m_HitColl ); - m_fcal2SD ->EndOfAthenaEvent( &*m_HitColl ); - m_fcal3SD ->EndOfAthenaEvent( &*m_HitColl ); - m_sliceSD ->EndOfAthenaEvent( &*m_HitColl ); - m_miniSD ->EndOfAthenaEvent( &*m_HitColl ); - return StatusCode::SUCCESS; -} diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4ActiveSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/LArG4ActiveSDTool.h deleted file mode 100644 index 3bc861f1b948b97c98b010454c7f5af45328e804..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4ActiveSDTool.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LARG4ACTIVESDTOOL_H -#define LARG4ACTIVESDTOOL_H - -#include "LArG4Code/LArG4SDTool.h" -#include <string> -#include <vector> - -#include "StoreGate/WriteHandle.h" -#include "CaloSimEvent/CaloCalibrationHitContainer.h" - -class LArG4CalibSD; - -class LArG4ActiveSDTool : public LArG4SDTool -{ - public: - // Constructor - LArG4ActiveSDTool(const std::string& type, const std::string& name, const IInterface *parent); - - // Destructor - virtual ~LArG4ActiveSDTool() {} - - // Method in which all the SDs are created and assigned to the relevant volumes - StatusCode initializeSD() override final; - - // Calls down to all the SDs to get them to pack their hits into a central collection - StatusCode Gather() override final; - - /** Beginning of an athena event. This is where collection initialization should happen. - If we are using a WriteHandle, then this could be empty. */ -// StatusCode SetupEvent() override final; - - private: - // The actual hit container - here because the base class is for both calib and standard SD tools - SG::WriteHandle<CaloCalibrationHitContainer> m_HitColl; - - std::vector<std::string> m_stacVolumes; - std::vector<std::string> m_presBarVolumes; - std::vector<std::string> m_posIWVolumes; - std::vector<std::string> m_negIWVolumes; - std::vector<std::string> m_posOWVolumes; - std::vector<std::string> m_negOWVolumes; - std::vector<std::string> m_presECVolumes; - std::vector<std::string> m_bobVolumes; - std::vector<std::string> m_fcal1Volumes; - std::vector<std::string> m_fcal2Volumes; - std::vector<std::string> m_fcal3Volumes; - std::vector<std::string> m_sliceVolumes; - std::vector<std::string> m_miniVolumes; - - LArG4CalibSD* m_stacSD; - LArG4CalibSD* m_presBarSD; - LArG4CalibSD* m_posIWSD; - LArG4CalibSD* m_negIWSD; - LArG4CalibSD* m_posOWSD; - LArG4CalibSD* m_negOWSD; - LArG4CalibSD* m_presECSD; - LArG4CalibSD* m_bobSD; - LArG4CalibSD* m_fcal1SD; - LArG4CalibSD* m_fcal2SD; - LArG4CalibSD* m_fcal3SD; - LArG4CalibSD* m_sliceSD; - LArG4CalibSD* m_miniSD; -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4DeadSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/LArG4DeadSDTool.cc deleted file mode 100644 index dec603cdbba84fb7d349e5e508dc03fc82e08d78..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4DeadSDTool.cc +++ /dev/null @@ -1,167 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4DeadSDTool.h" - -#include "LArG4Code/LArG4CalibSD.h" - -#include "LArG4Code/LArG4Hit.h" -#include "CxxUtils/make_unique.h" - -// The calculators that I need... -#include "LArG4Barrel/LArBarrelCalibrationCalculator.h" -#include "LArG4Barrel/CryostatCalibrationCalculator.h" -#include "LArG4Barrel/CryostatCalibrationMixedCalculator.h" -#include "LArG4Barrel/CryostatCalibrationLArCalculator.h" -#include "LArG4Barrel/DMCalibrationCalculator.h" -#include "LArG4Barrel/PresamplerCalibrationCalculator.h" -#include "LArG4EC/CryostatCalibrationCalculator.h" -#include "LArG4EC/CryostatCalibrationMixedCalculator.h" -#include "LArG4EC/CryostatCalibrationLArCalculator.h" -#include "LArG4EC/EMECSupportCalibrationCalculator.h" -#include "LArG4HEC/LArHECCalibrationWheelCalculator.h" -#include "LArG4Code/CalibrationDefaultCalculator.h" - -// For escaped energy -#include "CaloG4Sim/EscapedEnergyRegistry.h" -#include "CaloG4Sim/CalibrationDefaultProcessing.h" -#include "LArG4Code/EscapedEnergyProcessing.h" - -LArG4DeadSDTool::LArG4DeadSDTool(const std::string& type, const std::string& name, - const IInterface *parent) - : LArG4SDTool(type,name,parent) - , m_HitColl("LArCalibrationHitDeadMaterial") - , m_barCrySD(nullptr) - , m_barCryLArSD(nullptr) - , m_barCryMixSD(nullptr) - , m_DMSD(nullptr) - , m_barPresSD(nullptr) - , m_barSD(nullptr) - , m_ECCrySD(nullptr) - , m_ECCryLArSD(nullptr) - , m_ECCryMixSD(nullptr) - , m_ECSupportSD(nullptr) - , m_HECWheelSD(nullptr) - , m_uninstSD(nullptr) -{ - declareProperty("BarrelCryVolumes",m_barCryVolumes); - declareProperty("BarrelCryLArVolumes",m_barCryLArVolumes); - declareProperty("BarrelCryMixVolumes",m_barCryMixVolumes); - declareProperty("DeadMaterialVolumes",m_DMVolumes); - declareProperty("BarrelPresVolumes",m_barPresVolumes); - declareProperty("BarrelVolumes",m_barVolumes); - declareProperty("ECCryVolumes",m_ECCryVolumes); - declareProperty("ECCryLArVolumes",m_ECCryLArVolumes); - declareProperty("ECCryMixVolumes",m_ECCryMixVolumes); - declareProperty("ECSupportVolumes",m_ECSupportVolumes); - declareProperty("HECWheelVolumes",m_HECWheelVolumes); - //declareProperty("HECVolumes",m_HECVolumes={"LArDead::HEC::Dead"}); - //declareProperty("HECLocalVolumes",m_HECLocVolumes={"LArDead::HEC::Local::Dead"}); - //declareProperty("MiniMomVolumes",m_miniMomVolumes={"MiniFCALMother::Dead"}); - //declareProperty("MiniVolumes",m_miniVolumes={"MiniFCAL::Dead"}); - //declareProperty("MiniLayVolumes",m_miniLayVolumes={"MiniFCAL::Layer::Dead"}); - declareProperty("doEscapedEnergy",m_do_eep=false); - declareInterface<ISensitiveDetector>(this); -} - -StatusCode LArG4DeadSDTool::initializeSD() -{ - // Lots of singleton calculators !!! - m_barCrySD = new LArG4CalibSD( "LArDead::BarrelCryostat::Dead" , new LArG4::BarrelCryostat::CalibrationCalculator() , m_doPID); - m_barCryLArSD = new LArG4CalibSD( "LArDead::BarrelCryostat::LAr::Dead" , new LArG4::BarrelCryostat::CalibrationLArCalculator() , m_doPID); - m_barCryMixSD = new LArG4CalibSD( "LArDead::BarrelCryostat::Mixed::Dead" , new LArG4::BarrelCryostat::CalibrationMixedCalculator() , m_doPID); - m_DMSD = new LArG4CalibSD( "LArDead::DM::Dead" , new LArG4::DM::CalibrationCalculator() , m_doPID); - m_barPresSD = new LArG4CalibSD( "LArDead::Barrel::Presampler::Dead" , new LArG4::BarrelPresampler::CalibrationCalculator() , m_doPID); - m_barSD = new LArG4CalibSD( "LArDead::Barrel::Dead" , new LArG4::Barrel::CalibrationCalculator() , m_doPID); - m_ECCrySD = new LArG4CalibSD( "LArDead::EndcapCryostat::Dead" , new LArG4::EndcapCryostat::CalibrationCalculator() , m_doPID); - m_ECCryLArSD = new LArG4CalibSD( "LArDead::EndcapCryostat::LAr::Dead" , new LArG4::EndcapCryostat::CalibrationLArCalculator() , m_doPID); - m_ECCryMixSD = new LArG4CalibSD( "LArDead::EndcapCryostat::Mixed::Dead" , new LArG4::EndcapCryostat::CalibrationMixedCalculator() , m_doPID); - m_ECSupportSD = new LArG4CalibSD( "LArDead::EMECSupport::Dead" , new LArG4::EMECSupportCalibrationCalculator() , m_doPID); - m_HECWheelSD = new LArG4CalibSD( "LArDead::HEC::Wheel::Inactive" , new LArG4::HEC::LArHECCalibrationWheelCalculator(LArG4::HEC::kWheelDead) , m_doPID); - //m_HECSD = new LArG4CalibSD( "LArDead::HEC::Inactive" , new LArG4::HEC::CalibrationCalculator(LArG4::HEC::kDead) , m_doPID); - //m_HECLocSD = new LArG4CalibSD( "LArDead::HEC::Local::Inactive" , new LArG4::HEC::LocalCalibrationCalculator(LArG4::HEC::kLocDead) , m_doPID); - //m_miniMomSD = new LArG4CalibSD( "MiniFCALMother::Dead" , new LArG4::MiniFCAL::MiniFCALCalibrationCalculator(LArG4::MiniFCAL::kDead) , m_doPID); - //m_miniSD = new LArG4CalibSD( "MiniFCAL::Dead" , new LArG4::MiniFCAL::MiniFCALCalibrationCalculator(LArG4::MiniFCAL::kDead) , m_doPID); - //m_miniLaySD = new LArG4CalibSD( "MiniFCAL::Layer::Dead" , new LArG4::MiniFCAL::MiniFCALCalibrationCalculator(LArG4::MiniFCAL::kDead) , m_doPID); - // Take care of the default material - if (m_do_eep) m_uninstSD = new LArG4CalibSD( "Default::Dead::Uninstrumented::Calibration::Region" , new LArG4::CalibrationDefaultCalculator() , m_doPID ); - - std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; - configuration[m_barCrySD] = &m_barCryVolumes; - configuration[m_barCryLArSD] = &m_barCryLArVolumes; - configuration[m_barCryMixSD] = &m_barCryMixVolumes; - configuration[m_DMSD] = &m_DMVolumes; - configuration[m_barPresSD] = &m_barPresVolumes; - configuration[m_barSD] = &m_barVolumes; - configuration[m_ECCrySD] = &m_ECCryVolumes; - configuration[m_ECCryLArSD] = &m_ECCryLArVolumes; - configuration[m_ECCryMixSD] = &m_ECCryMixVolumes; - configuration[m_ECSupportSD] = &m_ECSupportVolumes; - configuration[m_HECWheelSD] = &m_HECWheelVolumes; - //configuration[m_HECSD] = &m_HECVolumes; - //configuration[m_HECLocSD] = &m_HECLocVolumes; - //configuration[m_miniMomSD] = &m_miniMomVolumes; - //configuration[m_miniSD] = &m_miniVolumes; - //configuration[m_miniLaySD] = &m_miniLayVolumes; - if (m_do_eep) configuration[m_uninstSD] = new std::vector<std::string>; // No volumes for this guy - setupAllSDs(configuration); - - // Make sure they have the helpers they need - setupHelpers(m_barCrySD); - setupHelpers(m_barCryLArSD); - setupHelpers(m_barCryMixSD); - setupHelpers(m_DMSD); - setupHelpers(m_barPresSD); - setupHelpers(m_barSD); - setupHelpers(m_ECCrySD); - setupHelpers(m_ECCryLArSD); - setupHelpers(m_ECCryMixSD); - setupHelpers(m_ECSupportSD); - setupHelpers(m_HECWheelSD); - //setupHelpers(m_HECSD); - //setupHelpers(m_HECLocSD); - //setupHelpers(m_miniMomSD); - //setupHelpers(m_miniSD); - //setupHelpers(m_miniLaySD); - if (m_do_eep) setupHelpers(m_uninstSD); - - // This is from initialize processing in the former LArG4CalibSD - // I still think we can do better than this, though - if (m_do_eep){ - ATH_MSG_INFO("new EscapedEnergyProcessing"); - // Initialize the escaped energy processing for LAr volumes. - CaloG4::VEscapedEnergyProcessing* eep = new EscapedEnergyProcessing(m_uninstSD); - - ATH_MSG_INFO("EER instance"); - CaloG4::EscapedEnergyRegistry* registry = CaloG4::EscapedEnergyRegistry::GetInstance(); - ATH_MSG_INFO("addAndAdoptProcessing"); - registry->AddAndAdoptProcessing( "LAr::", eep ); - } - - return StatusCode::SUCCESS; -} - -StatusCode LArG4DeadSDTool::Gather() -{ - // In this case, *unlike* other SDs, the *tool* owns the collection - if (!m_HitColl.isValid()) m_HitColl = CxxUtils::make_unique<CaloCalibrationHitContainer>(m_HitColl.name()); - m_barCrySD ->EndOfAthenaEvent( &*m_HitColl ); - m_barCryLArSD->EndOfAthenaEvent( &*m_HitColl ); - m_barCryMixSD->EndOfAthenaEvent( &*m_HitColl ); - m_DMSD ->EndOfAthenaEvent( &*m_HitColl ); - m_barPresSD ->EndOfAthenaEvent( &*m_HitColl ); - m_barSD ->EndOfAthenaEvent( &*m_HitColl ); - m_ECCrySD ->EndOfAthenaEvent( &*m_HitColl ); - m_ECCryLArSD ->EndOfAthenaEvent( &*m_HitColl ); - m_ECCryMixSD ->EndOfAthenaEvent( &*m_HitColl ); - m_ECSupportSD->EndOfAthenaEvent( &*m_HitColl ); - m_HECWheelSD ->EndOfAthenaEvent( &*m_HitColl ); - //m_HECSD ->EndOfAthenaEvent( &*m_HitColl ); - //m_HECLocSD ->EndOfAthenaEvent( &*m_HitColl ); - //m_miniMomSD ->EndOfAthenaEvent( &*m_HitColl ); - //m_miniSD ->EndOfAthenaEvent( &*m_HitColl ); - //m_miniLaySD ->EndOfAthenaEvent( &*m_HitColl ); - if (m_do_eep) m_uninstSD ->EndOfAthenaEvent( &*m_HitColl ); - return StatusCode::SUCCESS; -} diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4DeadSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/LArG4DeadSDTool.h deleted file mode 100644 index c8b7a254d3723e6cb5f86489545f027020def5ea..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4DeadSDTool.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LARG4DEADSDTOOL_H -#define LARG4DEADSDTOOL_H - -#include "LArG4Code/LArG4SDTool.h" -#include <string> -#include <vector> - -#include "StoreGate/WriteHandle.h" -#include "CaloSimEvent/CaloCalibrationHitContainer.h" - -class LArG4CalibSD; - -class LArG4DeadSDTool : public LArG4SDTool -{ - public: - // Constructor - LArG4DeadSDTool(const std::string& type, const std::string& name, const IInterface *parent); - - // Destructor - virtual ~LArG4DeadSDTool() {} - - // Method in which all the SDs are created and assigned to the relevant volumes - StatusCode initializeSD() override final; - - // Calls down to all the SDs to get them to pack their hits into a central collection - StatusCode Gather() override final; - - /** Beginning of an athena event. This is where collection initialization should happen. - If we are using a WriteHandle, then this could be empty. */ -// StatusCode SetupEvent() override final; - - private: - // Do we add the escaped energy processing? This is only in "mode 1" (Tile+LAr), not in "DeadLAr" mode - bool m_do_eep; - - // The actual hit container - here because the base class is for both calib and standard SD tools - SG::WriteHandle<CaloCalibrationHitContainer> m_HitColl; - - // The volumes per SD, and the corresponding SDs - std::vector<std::string> m_barCryVolumes; - std::vector<std::string> m_barCryLArVolumes; - std::vector<std::string> m_barCryMixVolumes; - std::vector<std::string> m_DMVolumes; - std::vector<std::string> m_barPresVolumes; - std::vector<std::string> m_barVolumes; - std::vector<std::string> m_ECCryVolumes; - std::vector<std::string> m_ECCryLArVolumes; - std::vector<std::string> m_ECCryMixVolumes; - std::vector<std::string> m_ECSupportVolumes; - std::vector<std::string> m_HECWheelVolumes; - LArG4CalibSD* m_barCrySD; - LArG4CalibSD* m_barCryLArSD; - LArG4CalibSD* m_barCryMixSD; - LArG4CalibSD* m_DMSD; - LArG4CalibSD* m_barPresSD; - LArG4CalibSD* m_barSD; - LArG4CalibSD* m_ECCrySD; - LArG4CalibSD* m_ECCryLArSD; - LArG4CalibSD* m_ECCryMixSD; - LArG4CalibSD* m_ECSupportSD; - LArG4CalibSD* m_HECWheelSD; - LArG4CalibSD* m_uninstSD; - -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4EMBSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/LArG4EMBSDTool.cc deleted file mode 100644 index d45c703119a4aa51d9d06dc0d0b732e1cd45a2ae..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4EMBSDTool.cc +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4EMBSDTool.h" -#include "LArG4Code/LArG4SimpleSD.h" - -#include "LArG4Code/LArG4Hit.h" - -#include "LArG4Barrel/LArBarrelCalculator.h" -#include "LArG4Barrel/LArBarrelPresamplerCalculator.h" - -#include "CxxUtils/make_unique.h" -#include "G4SDManager.hh" - -LArG4EMBSDTool::LArG4EMBSDTool(const std::string& type, const std::string& name, - const IInterface *parent) - : LArG4SDTool(type,name,parent) - , m_HitColl("LArHitEMB") - , m_presSD(nullptr) - , m_stacSD(nullptr) -{ - declareProperty("StacVolumes",m_stacVolumes); - declareProperty("PresamplerVolumes",m_presVolumes); - declareInterface<ISensitiveDetector>(this); -} - -StatusCode LArG4EMBSDTool::initializeSD() -{ - m_presSD = new LArG4SimpleSD( "LAr::Barrel::Presampler::Module" , LArBarrelPresamplerCalculator::GetCalculator() , m_timeBinType , m_timeBinWidth ); - m_stacSD = new LArG4SimpleSD( "LAr::EMB::STAC" , LArBarrelCalculator::GetCalculator() , m_timeBinType , m_timeBinWidth ); - - std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; - configuration[m_presSD] = &m_presVolumes; - configuration[m_stacSD] = &m_stacVolumes; - setupAllSDs(configuration); - - // Make sure the helpers are all set up - setupHelpers(m_presSD); - setupHelpers(m_stacSD); - - return StatusCode::SUCCESS; -} - -StatusCode LArG4EMBSDTool::Gather() -{ - // In this case, *unlike* other SDs, the *tool* owns the collection - if (!m_HitColl.isValid()) m_HitColl = CxxUtils::make_unique<LArHitContainer>(m_HitColl.name()); - m_presSD->EndOfAthenaEvent( &*m_HitColl ); - m_stacSD->EndOfAthenaEvent( &*m_HitColl ); - - // Additions for optional fast simulation - if (m_useFrozenShowers){ - // FIXME: this is very expensive, especially for a fastsim! - LArG4SimpleSD* fastSD = dynamic_cast<LArG4SimpleSD*> - ( G4SDManager::GetSDMpointer()->FindSensitiveDetector("BarrelFastSimDedicatedSD") ); - if (fastSD){ - fastSD->EndOfAthenaEvent( &*m_HitColl ); - } else { - ATH_MSG_WARNING( "Could not find BarrelFastSimDedicatedSD, but fast sim was configured" ); - } - } - - return StatusCode::SUCCESS; -} diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4EMBSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/LArG4EMBSDTool.h deleted file mode 100644 index 0255cd218eab43813a489608a92fa485a29c8d72..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4EMBSDTool.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LARG4EMBSDTOOL_H -#define LARG4EMBSDTOOL_H - -#include "LArG4Code/LArG4SDTool.h" -#include <string> -#include <vector> - -#include "StoreGate/WriteHandle.h" -#include "LArSimEvent/LArHitContainer.h" - -class LArG4SimpleSD; - -/// @class LArG4EMBSDTool -/// @brief SD tool which manages EM barrel sensitive detectors. -/// -/// NOTE: this design has some multi-threading issues which will need to be -/// addressed. -/// -class LArG4EMBSDTool : public LArG4SDTool -{ - public: - /// Constructor - LArG4EMBSDTool(const std::string& type, const std::string& name, const IInterface *parent); - - /// Destructor - virtual ~LArG4EMBSDTool() {} - - /// Method in which all the SDs are created and assigned to the relevant volumes - StatusCode initializeSD() override final; - - /// Calls down to all the SDs to get them to pack their hits into a central collection - StatusCode Gather() override final; - - /** Beginning of an athena event. This is where collection initialization should happen. - If we are using a WriteHandle, then this could be empty. */ - //StatusCode SetupEvent() override final; - - private: - /// The actual hit container - here because the base class is for both calib and standard SD tools - SG::WriteHandle<LArHitContainer> m_HitColl; - - /// List of volumes for the stac SD - std::vector<std::string> m_stacVolumes; - /// List of volumes for the presampler SD - std::vector<std::string> m_presVolumes; - /// Pointer to the presampler SD - LArG4SimpleSD* m_presSD; - /// Pointer to the stac SD - LArG4SimpleSD* m_stacSD; -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4EMECSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/LArG4EMECSDTool.cc deleted file mode 100644 index d2e49d7e2ce8dd9466b5101c06a65354a9f2bf75..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4EMECSDTool.cc +++ /dev/null @@ -1,97 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4EMECSDTool.h" -#include "LArG4Code/LArG4SimpleSD.h" - -#include "LArG4Code/LArG4Hit.h" - -#include "LArG4EC/EnergyCalculator.h" -#include "LArG4EC/LArEndcapPresamplerCalculator.h" - -#include "CxxUtils/make_unique.h" -#include "G4SDManager.hh" - -LArG4EMECSDTool::LArG4EMECSDTool(const std::string& type, const std::string& name, - const IInterface *parent) - : LArG4SDTool(type,name,parent) - , m_HitColl("LArHitEMEC") - , m_posIWSD(nullptr) - , m_negIWSD(nullptr) - , m_posOWSD(nullptr) - , m_negOWSD(nullptr) - , m_presSD(nullptr) - , m_bobSD(nullptr) -{ - declareProperty("PosIWVolumes",m_posIWVolumes); - declareProperty("NegIWVolumes",m_negIWVolumes); - declareProperty("PosOWVolumes",m_posOWVolumes); - declareProperty("NegOWVolumes",m_negOWVolumes); - declareProperty("PresVolumes",m_presVolumes); - declareProperty("BOBarretteVolumes",m_bobVolumes); - //declareProperty("BIBarretteVolumes",m_bibVolumes={"LArMgr::LAr::EMEC::BackInnerBarrette::Module::Phidiv"}); - declareInterface<ISensitiveDetector>(this); -} - -StatusCode LArG4EMECSDTool::initializeSD() -{ - m_posIWSD = new LArG4SimpleSD( "LAr::EMEC::Pos::InnerWheel" , new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel, LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, 1) , m_timeBinType , m_timeBinWidth ); - m_negIWSD = new LArG4SimpleSD( "LAr::EMEC::Neg::InnerWheel" , new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel, LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, -1) , m_timeBinType , m_timeBinWidth ); - m_posOWSD = new LArG4SimpleSD( "LAr::EMEC::Pos::OuterWheel" , new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel, LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, 1) , m_timeBinType , m_timeBinWidth ); - m_negOWSD = new LArG4SimpleSD( "LAr::EMEC::Neg::OuterWheel" , new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel, LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, -1) , m_timeBinType , m_timeBinWidth ); - m_presSD = new LArG4SimpleSD( "LAr::Endcap::Presampler::LiquidArgon" , LArEndcapPresamplerCalculator::GetCalculator() , m_timeBinType , m_timeBinWidth ); - m_bobSD = new LArG4SimpleSD( "LAr::EMEC::BackOuterBarrette::Module::Phidiv", new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteWheel) , m_timeBinType , m_timeBinWidth); - //m_bibSD = new LArG4SimpleSD( "LAr::EMEC::BackInnerBarrette::Module::Phidiv" , new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackInnerBarretteWheel) , m_timeBinType , m_timeBinWidth); - - std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; - configuration[m_posIWSD] = &m_posIWVolumes; - configuration[m_posOWSD] = &m_posOWVolumes; - configuration[m_negIWSD] = &m_negIWVolumes; - configuration[m_negOWSD] = &m_negOWVolumes; - configuration[m_presSD] = &m_presVolumes; - configuration[m_bobSD] = &m_bobVolumes; - //configuration[m_bibSD] = &m_bibVolumes; - setupAllSDs(configuration); - - // Make sure the ID helpers are all set up - setupHelpers(m_posIWSD); - setupHelpers(m_posOWSD); - setupHelpers(m_negIWSD); - setupHelpers(m_negOWSD); - setupHelpers(m_presSD); - setupHelpers(m_bobSD); - //setupHelpers(m_bibSD); - - return StatusCode::SUCCESS; -} - -StatusCode LArG4EMECSDTool::Gather() -{ - // In this case, *unlike* other SDs, the *tool* owns the collection - if (!m_HitColl.isValid()) m_HitColl = CxxUtils::make_unique<LArHitContainer>(m_HitColl.name()); - - // Hand this collection name off to the SDs. They will be writing to the - // collection, but only one at a time! - m_posIWSD->EndOfAthenaEvent( &*m_HitColl ); - m_negIWSD->EndOfAthenaEvent( &*m_HitColl ); - m_posOWSD->EndOfAthenaEvent( &*m_HitColl ); - m_negOWSD->EndOfAthenaEvent( &*m_HitColl ); - m_presSD->EndOfAthenaEvent( &*m_HitColl ); - m_bobSD->EndOfAthenaEvent( &*m_HitColl ); - //m_bibSD->EndOfAthenaEvent( &*m_HitColl ); - - // Additions for optional fast simulation - if (m_useFrozenShowers){ - // FIXME: this is very expensive, especially for a fastsim! - LArG4SimpleSD * fastSD = dynamic_cast<LArG4SimpleSD*> - ( G4SDManager::GetSDMpointer()->FindSensitiveDetector("EndcapFastSimDedicatedSD") ); - if (fastSD){ - fastSD->EndOfAthenaEvent( &*m_HitColl ); - } else { - ATH_MSG_WARNING( "Could not find EndcapFastSimDedicatedSD, but fast sim was configured" ); - } - } - - return StatusCode::SUCCESS; -} diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4EMECSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/LArG4EMECSDTool.h deleted file mode 100644 index bb99308f44d9556b35017103922a44ef3bf9cd25..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4EMECSDTool.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LARG4EMECSDTOOL_H -#define LARG4EMECSDTOOL_H - -#include "LArG4Code/LArG4SDTool.h" -#include <string> -#include <vector> - -#include "StoreGate/WriteHandle.h" -#include "LArSimEvent/LArHitContainer.h" - -class LArG4SimpleSD; - -/// @class LArG4EMECSDTool -/// @brief SD tool which manages EM endcap sensitive detectors. -/// -/// NOTE: this design has some multi-threading issues which will need to be -/// addressed. -/// -class LArG4EMECSDTool : public LArG4SDTool -{ - public: - /// Constructor - LArG4EMECSDTool(const std::string& type, const std::string& name, const IInterface *parent); - - /// Destructor - virtual ~LArG4EMECSDTool() {} - - /// Method in which all the SDs are created and assigned to the relevant volumes - StatusCode initializeSD() override final; - - /// Calls down to all the SDs to get them to pack their hits into a central collection - StatusCode Gather() override final; - - private: - /// The actual hit container - here because the base class is for both calib and standard SD tools - SG::WriteHandle<LArHitContainer> m_HitColl; - - // List of volumes for each SD and the corresponding SD - std::vector<std::string> m_posIWVolumes; - std::vector<std::string> m_negIWVolumes; - std::vector<std::string> m_posOWVolumes; - std::vector<std::string> m_negOWVolumes; - std::vector<std::string> m_presVolumes; - std::vector<std::string> m_bobVolumes; - LArG4SimpleSD* m_posIWSD; - LArG4SimpleSD* m_negIWSD; - LArG4SimpleSD* m_posOWSD; - LArG4SimpleSD* m_negOWSD; - LArG4SimpleSD* m_presSD; - LArG4SimpleSD* m_bobSD; -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4FCALSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/LArG4FCALSDTool.cc deleted file mode 100644 index 11c8d19ac763512be5858c0dc9ed8deb806641b2..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4FCALSDTool.cc +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4FCALSDTool.h" -#include "LArG4Code/LArG4SimpleSD.h" - -#include "LArG4Code/LArG4Hit.h" - -#include "LArG4FCAL/LArFCAL1Calculator.h" -#include "LArG4FCAL/LArFCAL2Calculator.h" -#include "LArG4FCAL/LArFCAL3Calculator.h" - -#include "CxxUtils/make_unique.h" -#include "G4SDManager.hh" - -LArG4FCALSDTool::LArG4FCALSDTool(const std::string& type, const std::string& name, - const IInterface *parent) - : LArG4SDTool(type,name,parent) - , m_HitColl("LArHitFCAL") - , m_fcal1SD(nullptr) - , m_fcal2SD(nullptr) - , m_fcal3SD(nullptr) -{ - declareProperty("FCAL1Volumes",m_fcal1Volumes); - declareProperty("FCAL2Volumes",m_fcal2Volumes); - declareProperty("FCAL3Volumes",m_fcal3Volumes); - declareInterface<ISensitiveDetector>(this); -} - -StatusCode LArG4FCALSDTool::initializeSD() -{ - m_fcal1SD = new LArG4SimpleSD( "LAr::FCAL::Module1::Gap" , LArFCAL1Calculator::GetInstance() , m_timeBinType , m_timeBinWidth ); - m_fcal2SD = new LArG4SimpleSD( "LAr::FCAL::Module2::Gap" , LArFCAL2Calculator::GetInstance() , m_timeBinType , m_timeBinWidth ); - m_fcal3SD = new LArG4SimpleSD( "LAr::FCAL::Module3::Gap" , LArFCAL3Calculator::GetInstance() , m_timeBinType , m_timeBinWidth ); - - std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; - configuration[m_fcal1SD] = &m_fcal1Volumes; - configuration[m_fcal2SD] = &m_fcal2Volumes; - configuration[m_fcal3SD] = &m_fcal3Volumes; - setupAllSDs(configuration); - - // Make sure the ID helpers are all set up - setupHelpers(m_fcal1SD); - setupHelpers(m_fcal2SD); - setupHelpers(m_fcal3SD); - - return StatusCode::SUCCESS; -} - -StatusCode LArG4FCALSDTool::Gather() -{ - // In this case, *unlike* other SDs, the *tool* owns the collection - if (!m_HitColl.isValid()) m_HitColl = CxxUtils::make_unique<LArHitContainer>(m_HitColl.name()); - // Hand this collection name off to the SDs. They will be writing to the - // collection, but only one at a time! - m_fcal1SD->EndOfAthenaEvent( &*m_HitColl ); - m_fcal2SD->EndOfAthenaEvent( &*m_HitColl ); - m_fcal3SD->EndOfAthenaEvent( &*m_HitColl ); - - // Additions for optional fast simulation - if (m_useFrozenShowers){ - // FIXME: this is very expensive, especially for a fastsim! - LArG4SimpleSD * fastSD = dynamic_cast<LArG4SimpleSD*>( G4SDManager::GetSDMpointer()->FindSensitiveDetector("FCALFastSimDedicatedSD") ); - if (fastSD){ - fastSD->EndOfAthenaEvent( &*m_HitColl ); - } else { - ATH_MSG_WARNING( "Could not find FCALFastSimDedicatedSD, but fast sim was configured" ); - } - } - - return StatusCode::SUCCESS; -} diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4FCALSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/LArG4FCALSDTool.h deleted file mode 100644 index bda3d8100b17ed234b7a8764f82ccf43fc340321..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4FCALSDTool.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LARG4FCALSDTOOL_H -#define LARG4FCALSDTOOL_H - -#include "LArG4Code/LArG4SDTool.h" -#include <string> -#include <vector> - -#include "StoreGate/WriteHandle.h" -#include "LArSimEvent/LArHitContainer.h" - -class LArG4SimpleSD; - -/// @class LArG4FCALSDTool -/// @brief SD tool which manages the LAr forward calo sensitive detectors. -/// -/// NOTE: this design has some multi-threading issues which will need to be -/// addressed. -/// -class LArG4FCALSDTool : public LArG4SDTool -{ - public: - /// Constructor - LArG4FCALSDTool(const std::string& type, const std::string& name, const IInterface *parent); - - /// Destructor - virtual ~LArG4FCALSDTool() {} - - /// Method in which all the SDs are created and assigned to the relevant volumes - StatusCode initializeSD() override final; - - /// Calls down to all the SDs to get them to pack their hits into a central collection - StatusCode Gather() override final; - - /** Beginning of an athena event. This is where collection initialization should happen. - If we are using a WriteHandle, then this could be empty. */ - //StatusCode SetupEvent() override final; - - private: - /// The actual hit container - here because the base class is for both calib and standard SD tools - SG::WriteHandle<LArHitContainer> m_HitColl; - - // List of volumes for each SD and their corresponding SD - std::vector<std::string> m_fcal1Volumes; - std::vector<std::string> m_fcal2Volumes; - std::vector<std::string> m_fcal3Volumes; - LArG4SimpleSD* m_fcal1SD; - LArG4SimpleSD* m_fcal2SD; - LArG4SimpleSD* m_fcal3SD; - -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4HECSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/LArG4HECSDTool.cc deleted file mode 100644 index 855388baf31e69e5ce06f113d382fc2b500cf2c2..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4HECSDTool.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4HECSDTool.h" -#include "LArG4Code/LArG4SimpleSD.h" - -#include "LArG4Code/LArG4Hit.h" - -#include "LArG4HEC/LArHECCalculator.h" -#include "LArG4HEC/LArHECLocalCalculator.h" -#include "LArG4HEC/LArHECWheelCalculator.h" - -#include "CxxUtils/make_unique.h" - -LArG4HECSDTool::LArG4HECSDTool(const std::string& type, const std::string& name, - const IInterface *parent) - : LArG4SDTool(type,name,parent) - , m_HitColl("LArHitHEC") - //, m_sliceSD(nullptr) - //, m_localSD(nullptr) - , m_wheelSD(nullptr) -{ - //declareProperty("SliceVolumes",m_sliceVolumes); - //declareProperty("LocalVolumes",m_localVolumes); - declareProperty("WheelVolumes",m_wheelVolumes); - // Only Wheel volumes? Why are the others there? - declareInterface<ISensitiveDetector>(this); -} - -StatusCode LArG4HECSDTool::initializeSD() -{ - //m_sliceSD = new LArG4SimpleSD( "LAr::HEC::Module::Depth::Slice" , LArHECCalculator::GetCalculator() , m_timeBinType , m_timeBinWidth ); - //m_localSD = new LArG4SimpleSD( "LAr::HEC::Module::Depth::Slice::Local" , LArHECLocalCalculator::GetCalculator() , m_timeBinType , m_timeBinWidth ); - m_wheelSD = new LArG4SimpleSD( "LAr::HEC::Module::Depth::Slice::Wheel" , LArHECWheelCalculator::GetCalculator() , m_timeBinType , m_timeBinWidth ); - - std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; - //configuration[m_sliceSD] = &m_sliceVolumes; - //configuration[m_localSD] = &m_localVolumes; - configuration[m_wheelSD] = &m_wheelVolumes; - setupAllSDs(configuration); - - // Make sure the ID helpers are all set up - //setupHelpers(m_sliceSD); - //setupHelpers(m_localSD); - setupHelpers(m_wheelSD); - - return StatusCode::SUCCESS; -} - -StatusCode LArG4HECSDTool::Gather() -{ - // In this case, *unlike* other SDs, the *tool* owns the collection - if (!m_HitColl.isValid()) m_HitColl = CxxUtils::make_unique<LArHitContainer>(m_HitColl.name()); - // Hand this collection name off to the SDs. They will be writing to the - // collection, but only one at a time! - //m_sliceSD->EndOfAthenaEvent( &*m_HitColl ); - //m_localSD->EndOfAthenaEvent( &*m_HitColl ); - m_wheelSD->EndOfAthenaEvent( &*m_HitColl ); - return StatusCode::SUCCESS; -} diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4HECSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/LArG4HECSDTool.h deleted file mode 100644 index 43cca9aa718d9c1732759de44fd84a4020faf688..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4HECSDTool.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LARG4HECSDTOOL_H -#define LARG4HECSDTOOL_H - -#include "LArG4Code/LArG4SDTool.h" -#include <string> -#include <vector> - -#include "StoreGate/WriteHandle.h" -#include "LArSimEvent/LArHitContainer.h" - -class LArG4SimpleSD; - -/// @class LArG4HECSDTool -/// @brief SD tool which manages the LAr hadronic endcap sensitive detectors. -/// -/// NOTE: this design has some multi-threading issues which will need to be -/// addressed. -/// -class LArG4HECSDTool : public LArG4SDTool -{ - public: - /// Constructor - LArG4HECSDTool(const std::string& type, const std::string& name, const IInterface *parent); - - /// Destructor - virtual ~LArG4HECSDTool() {} - - /// Method in which all the SDs are created and assigned to the relevant volumes - StatusCode initializeSD() override final; - - /// Calls down to all the SDs to get them to pack their hits into a central collection - StatusCode Gather() override final; - - /** Beginning of an athena event. This is where collection initialization should happen. - If we are using a WriteHandle, then this could be empty. */ - //StatusCode SetupEvent() override final; - - private: - /// The actual hit container - here because the base class is for both calib and standard SD tools - SG::WriteHandle<LArHitContainer> m_HitColl; - - std::vector<std::string> m_sliceVolumes; - std::vector<std::string> m_localVolumes; - std::vector<std::string> m_wheelVolumes; - //LArG4SimpleSD* m_sliceSD; - //LArG4SimpleSD* m_localSD; - LArG4SimpleSD* m_wheelSD; - -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4InactiveSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/LArG4InactiveSDTool.cc deleted file mode 100644 index a4e68f61cdae879746388670552d933c083d26eb..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4InactiveSDTool.cc +++ /dev/null @@ -1,136 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4InactiveSDTool.h" - -#include "LArG4Code/LArG4CalibSD.h" - -#include "LArG4Code/LArG4Hit.h" -#include "CxxUtils/make_unique.h" - -// All the calculators that I need -#include "LArG4Barrel/LArBarrelCalibrationCalculator.h" -#include "LArG4Barrel/PresamplerCalibrationCalculator.h" -#include "LArG4EC/CalibrationCalculator.h" -#include "LArG4HEC/LArHECCalibrationWheelCalculator.h" -#include "LArG4FCAL/LArFCAL1CalibCalculator.h" -#include "LArG4FCAL/LArFCAL2CalibCalculator.h" -#include "LArG4FCAL/LArFCAL3CalibCalculator.h" -#include "LArG4MiniFCAL/MiniFCALCalibrationCalculator.h" - - -LArG4InactiveSDTool::LArG4InactiveSDTool(const std::string& type, const std::string& name, - const IInterface *parent) - : LArG4SDTool(type,name,parent) - , m_HitColl("LArCalibrationHitInactive") - , m_barPreSD(nullptr) - , m_barSD(nullptr) - , m_ECPosInSD(nullptr) - , m_ECPosOutSD(nullptr) - , m_ECNegInSD(nullptr) - , m_ECNegOutSD(nullptr) - , m_HECWheelSD(nullptr) - , m_fcal1SD(nullptr) - , m_fcal2SD(nullptr) - , m_fcal3SD(nullptr) - , m_miniMomSD(nullptr) - , m_miniSD(nullptr) - , m_miniLaySD(nullptr) -{ - declareProperty("BarrelPreVolumes",m_barPreVolumes); - declareProperty("BarrelVolumes",m_barVolumes); - declareProperty("ECPosInVolumes",m_ECPosInVolumes); - declareProperty("ECPosOutVolumes",m_ECPosOutVolumes); - declareProperty("ECNegInVolumes",m_ECNegInVolumes); - declareProperty("ECNegOutVolumes",m_ECNegOutVolumes); - //declareProperty("HECVolumes",m_HECVolumes={"LAr::HEC::Inactive"}); - //declareProperty("HECLocalVolumes",m_HECLocVolumes={"LAr::HEC::Local::Inactive"}); - declareProperty("HECWheelVolumes",m_HECWheelVolumes); - declareProperty("FCAL1Volumes",m_fcal1Volumes); - declareProperty("FCAL2Volumes",m_fcal2Volumes); - declareProperty("FCAL3Volumes",m_fcal3Volumes); - declareProperty("MiniMomVolumes",m_miniMomVolumes); - declareProperty("MiniVolumes",m_miniVolumes); - declareProperty("MiniLayVolumes",m_miniLayVolumes); - declareInterface<ISensitiveDetector>(this); -} - -StatusCode LArG4InactiveSDTool::initializeSD() -{ - // Lots of singleton calculators !!! - m_barPreSD = new LArG4CalibSD( "LAr::Barrel::Presampler::Inactive" , new LArG4::BarrelPresampler::CalibrationCalculator() , m_doPID ); - m_barSD = new LArG4CalibSD( "LAr::Barrel::Inactive" , new LArG4::Barrel::CalibrationCalculator() , m_doPID ); - m_ECPosInSD = new LArG4CalibSD( "LAr::EMEC::Pos::InnerWheel::Inactive" , new LArG4::EC::CalibrationCalculator(LArWheelCalculator::InnerAbsorberWheel, 1) , m_doPID ); - m_ECPosOutSD = new LArG4CalibSD( "LAr::EMEC::Pos::OuterWheel::Inactive" , new LArG4::EC::CalibrationCalculator(LArWheelCalculator::OuterAbsorberWheel, 1) , m_doPID ); - m_ECNegInSD = new LArG4CalibSD( "LAr::EMEC::Neg::InnerWheel::Inactive" , new LArG4::EC::CalibrationCalculator(LArWheelCalculator::InnerAbsorberWheel, -1) , m_doPID ); - m_ECNegOutSD = new LArG4CalibSD( "LAr::EMEC::Neg::OuterWheel::Inactive" , new LArG4::EC::CalibrationCalculator(LArWheelCalculator::OuterAbsorberWheel, -1) , m_doPID ); - //m_HECSD = new LArG4CalibSD( "LAr::HEC::Inactive" , new LArG4::HEC::CalibrationCalculator(LArG4::HEC::kInactive) , m_doPID ); - //m_HECLocSD = new LArG4CalibSD( "LAr::HEC::Local::Inactive" , new LArG4::HEC::LocalCalibrationCalculator(LArG4::HEC::kLocInactive) , m_doPID ); - m_HECWheelSD = new LArG4CalibSD( "LAr::HEC::Wheel::Inactive" , new LArG4::HEC::LArHECCalibrationWheelCalculator(LArG4::HEC::kWheelInactive) , m_doPID ); - m_fcal1SD = new LArG4CalibSD( "LAr::FCAL::Inactive1" , LArG4::FCAL::LArFCAL1CalibCalculator::GetCalculator() , m_doPID ); - m_fcal2SD = new LArG4CalibSD( "LAr::FCAL::Inactive2" , LArG4::FCAL::LArFCAL2CalibCalculator::GetCalculator() , m_doPID ); - m_fcal3SD = new LArG4CalibSD( "LAr::FCAL::Inactive3" , LArG4::FCAL::LArFCAL3CalibCalculator::GetCalculator() , m_doPID ); - m_miniMomSD = new LArG4CalibSD( "MiniFCALMother::Inactive" , new LArG4::MiniFCAL::MiniFCALCalibrationCalculator(LArG4::MiniFCAL::kInactive) , m_doPID ); - m_miniSD = new LArG4CalibSD( "MiniFCAL::Inactive" , new LArG4::MiniFCAL::MiniFCALCalibrationCalculator(LArG4::MiniFCAL::kInactive) , m_doPID ); - m_miniLaySD = new LArG4CalibSD( "MiniFCAL::Layer::Inactive" , new LArG4::MiniFCAL::MiniFCALCalibrationCalculator(LArG4::MiniFCAL::kInactive) , m_doPID ); - - std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; - configuration[m_barPreSD] = &m_barPreVolumes; - configuration[m_barSD] = &m_barVolumes; - configuration[m_ECPosInSD] = &m_ECPosInVolumes; - configuration[m_ECPosOutSD] = &m_ECPosOutVolumes; - configuration[m_ECNegInSD] = &m_ECNegInVolumes; - configuration[m_ECNegOutSD] = &m_ECNegOutVolumes; - //configuration[m_HECSD] = &m_HECVolumes; - //configuration[m_HECLocSD] = &m_HECLocVolumes; - configuration[m_HECWheelSD] = &m_HECWheelVolumes; - configuration[m_fcal1SD] = &m_fcal1Volumes; - configuration[m_fcal2SD] = &m_fcal2Volumes; - configuration[m_fcal3SD] = &m_fcal3Volumes; - configuration[m_miniMomSD] = &m_miniMomVolumes; - configuration[m_miniSD] = &m_miniVolumes; - configuration[m_miniLaySD] = &m_miniLayVolumes; - setupAllSDs(configuration); - - // Make sure the ID helpers are all set up - setupHelpers(m_barPreSD); - setupHelpers(m_barSD); - setupHelpers(m_ECPosInSD); - setupHelpers(m_ECPosOutSD); - setupHelpers(m_ECNegInSD); - setupHelpers(m_ECNegOutSD); - //setupHelpers(m_HECSD); - //setupHelpers(m_HECLocSD); - setupHelpers(m_HECWheelSD); - setupHelpers(m_fcal1SD); - setupHelpers(m_fcal2SD); - setupHelpers(m_fcal3SD); - setupHelpers(m_miniMomSD); - setupHelpers(m_miniSD); - setupHelpers(m_miniLaySD); - - return StatusCode::SUCCESS; -} - -StatusCode LArG4InactiveSDTool::Gather() -{ - // In this case, *unlike* other SDs, the *tool* owns the collection - if (!m_HitColl.isValid()) m_HitColl = CxxUtils::make_unique<CaloCalibrationHitContainer>(m_HitColl.name()); - m_barPreSD->EndOfAthenaEvent( &*m_HitColl ); - m_barSD ->EndOfAthenaEvent( &*m_HitColl ); - m_ECPosInSD ->EndOfAthenaEvent( &*m_HitColl ); - m_ECPosOutSD ->EndOfAthenaEvent( &*m_HitColl ); - m_ECNegInSD ->EndOfAthenaEvent( &*m_HitColl ); - m_ECNegOutSD ->EndOfAthenaEvent( &*m_HitColl ); - //m_HECSD ->EndOfAthenaEvent( &*m_HitColl ); - //m_HECLocSD ->EndOfAthenaEvent( &*m_HitColl ); - m_HECWheelSD ->EndOfAthenaEvent( &*m_HitColl ); - m_fcal1SD ->EndOfAthenaEvent( &*m_HitColl ); - m_fcal2SD ->EndOfAthenaEvent( &*m_HitColl ); - m_fcal3SD ->EndOfAthenaEvent( &*m_HitColl ); - m_miniMomSD ->EndOfAthenaEvent( &*m_HitColl ); - m_miniSD ->EndOfAthenaEvent( &*m_HitColl ); - m_miniLaySD ->EndOfAthenaEvent( &*m_HitColl ); - return StatusCode::SUCCESS; -} diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4InactiveSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/LArG4InactiveSDTool.h deleted file mode 100644 index b1500f11e3de3257da4cee0d3b9b731d2c81b9d2..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4InactiveSDTool.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LARG4INACTIVESDTOOL_H -#define LARG4INACTIVESDTOOL_H - -#include "LArG4Code/LArG4SDTool.h" -#include <string> -#include <vector> - -#include "StoreGate/WriteHandle.h" -#include "CaloSimEvent/CaloCalibrationHitContainer.h" - -class LArG4CalibSD; - -class LArG4InactiveSDTool : public LArG4SDTool -{ - public: - // Constructor - LArG4InactiveSDTool(const std::string& type, const std::string& name, const IInterface *parent); - - // Destructor - virtual ~LArG4InactiveSDTool() {} - - // Method in which all the SDs are created and assigned to the relevant volumes - StatusCode initializeSD() override final; - - // Calls down to all the SDs to get them to pack their hits into a central collection - StatusCode Gather() override final; - - /** Beginning of an athena event. This is where collection initialization should happen. - If we are using a WriteHandle, then this could be empty. */ -// StatusCode SetupEvent() override final; - - private: - // The actual hit container - here because the base class is for both calib and standard SD tools - SG::WriteHandle<CaloCalibrationHitContainer> m_HitColl; - - // The list of volumes and the corresponding SDs - std::vector<std::string> m_barPreVolumes; - std::vector<std::string> m_barVolumes; - std::vector<std::string> m_ECPosInVolumes; - std::vector<std::string> m_ECPosOutVolumes; - std::vector<std::string> m_ECNegInVolumes; - std::vector<std::string> m_ECNegOutVolumes; - std::vector<std::string> m_HECWheelVolumes; - std::vector<std::string> m_fcal1Volumes; - std::vector<std::string> m_fcal2Volumes; - std::vector<std::string> m_fcal3Volumes; - std::vector<std::string> m_miniMomVolumes; - std::vector<std::string> m_miniVolumes; - std::vector<std::string> m_miniLayVolumes; - LArG4CalibSD* m_barPreSD; - LArG4CalibSD* m_barSD; - LArG4CalibSD* m_ECPosInSD; - LArG4CalibSD* m_ECPosOutSD; - LArG4CalibSD* m_ECNegInSD; - LArG4CalibSD* m_ECNegOutSD; - LArG4CalibSD* m_HECWheelSD; - LArG4CalibSD* m_fcal1SD; - LArG4CalibSD* m_fcal2SD; - LArG4CalibSD* m_fcal3SD; - LArG4CalibSD* m_miniMomSD; - LArG4CalibSD* m_miniSD; - LArG4CalibSD* m_miniLaySD; - -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4MiniFCALSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/LArG4MiniFCALSDTool.cc deleted file mode 100644 index 2741c04dac65ad7bcbc78b14f7f4890e71317050..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4MiniFCALSDTool.cc +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArG4MiniFCALSDTool.h" -#include "LArG4Code/LArG4SimpleSD.h" - -#include "LArG4Code/LArG4Hit.h" - -#include "LArG4MiniFCAL/MiniFCALCalculator.h" - -#include "CxxUtils/make_unique.h" - -LArG4MiniFCALSDTool::LArG4MiniFCALSDTool(const std::string& type, const std::string& name, - const IInterface *parent) - : LArG4SDTool(type,name,parent) - , m_HitColl("LArHitMiniFCAL") // I don't know what this should be!!! - , m_miniSD(nullptr) -{ - declareProperty("MiniVolumes",m_miniVolumes); - declareInterface<ISensitiveDetector>(this); -} - -StatusCode LArG4MiniFCALSDTool::initializeSD() -{ - m_miniSD = new LArG4SimpleSD( "MiniFCAL::Wafer", MiniFCALCalculator::GetCalculator(), - m_timeBinType , m_timeBinWidth ); - - std::map<G4VSensitiveDetector*,std::vector<std::string>*> configuration; - configuration[m_miniSD] = &m_miniVolumes; - setupAllSDs(configuration); - - // Make sure the ID helpers are all set up - setupHelpers(m_miniSD); - - return StatusCode::SUCCESS; -} - -StatusCode LArG4MiniFCALSDTool::Gather() -{ - // In this case, *unlike* other SDs, the *tool* owns the collection - if (!m_HitColl.isValid()) m_HitColl = CxxUtils::make_unique<LArHitContainer>(m_HitColl.name()); - // Hand this collection name off to the SDs. They will be writing to the - // collection, but only one at a time! - m_miniSD->EndOfAthenaEvent( &*m_HitColl ); - return StatusCode::SUCCESS; -} diff --git a/LArCalorimeter/LArG4/LArG4SD/src/LArG4MiniFCALSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/LArG4MiniFCALSDTool.h deleted file mode 100644 index 704df373fa30169e394939e2d6f6e17a641c91c0..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArG4/LArG4SD/src/LArG4MiniFCALSDTool.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LARG4MINIFCALSDTOOL_H -#define LARG4MINIFCALSDTOOL_H - -#include "LArG4Code/LArG4SDTool.h" -#include <string> -#include <vector> - -#include "StoreGate/WriteHandle.h" -#include "LArSimEvent/LArHitContainer.h" - -class LArG4SimpleSD; - -class LArG4MiniFCALSDTool : public LArG4SDTool -{ - public: - // Constructor - LArG4MiniFCALSDTool(const std::string& type, const std::string& name, const IInterface *parent); - - // Destructor - virtual ~LArG4MiniFCALSDTool() {} - - // Method in which all the SDs are created and assigned to the relevant volumes - StatusCode initializeSD() override final; - - // Calls down to all the SDs to get them to pack their hits into a central collection - StatusCode Gather() override final; - - /** Beginning of an athena event. This is where collection initialization should happen. - If we are using a WriteHandle, then this could be empty. */ -// StatusCode SetupEvent() override final; - - private: - // The actual hit container - here because the base class is for both calib and standard SD tools - SG::WriteHandle<LArHitContainer> m_HitColl; - - // The list of volumes per SD and the corresponding SD - std::vector<std::string> m_miniVolumes; - LArG4SimpleSD* m_miniSD; - -}; - -#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.cc new file mode 100644 index 0000000000000000000000000000000000000000..40c1dec44d1e36892c31d2b82dea413d853bcfd2 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.cc @@ -0,0 +1,48 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "MiniFCALSDTool.h" + +#include "LArG4Code/SDWrapper.h" + +namespace LArG4 +{ + + //--------------------------------------------------------------------------- + // Constructor + //--------------------------------------------------------------------------- + MiniFCALSDTool::MiniFCALSDTool(const std::string& type, const std::string& name, + const IInterface* parent) + : SimpleSDTool(type, name, parent), + m_hitCollName("LArHitMiniFCAL") + , m_calc("MiniFCALCalculator", name) + { + declareProperty("HitCollectionName", m_hitCollName); + declareProperty("MiniVolumes", m_miniVolumes); + + declareProperty("MiniFCALCalculator", m_calc); + } + + StatusCode MiniFCALSDTool::initializeCalculators() + { + ATH_CHECK(m_calc.retrieve()); + return StatusCode::SUCCESS; + } + + //--------------------------------------------------------------------------- + // Create the SD wrapper for current worker thread + //--------------------------------------------------------------------------- + G4VSensitiveDetector* MiniFCALSDTool::makeSD() + { + // Create the wrapper + auto sdWrapper = new SimpleSDWrapper("LArMiniFCALSDWrapper", m_hitCollName); + + // Add the SDs + sdWrapper->addSD( makeOneSD("MiniFCAL::Wafer", &*m_calc, m_miniVolumes) ); + + // Return the wrapper as my SD + return sdWrapper; + } + +} // namespace LArG4 diff --git a/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.h new file mode 100644 index 0000000000000000000000000000000000000000..2fde7470afb8e878eb73ada23d2930044e26c31f --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.h @@ -0,0 +1,53 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARG4SD_MINIFCALSDTOOL_H +#define LARG4SD_MINIFCALSDTOOL_H + +// System includes +#include <string> +#include <vector> + +// Project includes +#include "LArG4Code/SimpleSDTool.h" +#include "LArG4Code/ILArCalculatorSvc.h" + +namespace LArG4 +{ + + /// @class MiniFCALSDTool + /// @brief SD tool which manages the Mini FCAL sensitive detectors. + /// + /// NOTE: this design is in flux. + /// + class MiniFCALSDTool : public SimpleSDTool + { + + public: + + // Constructor + MiniFCALSDTool(const std::string& type, const std::string& name, + const IInterface* parent); + + private: + + // Initialize Calculator Services + StatusCode initializeCalculators() override final; + + /// Create the SD wrapper for current worker thread + G4VSensitiveDetector* makeSD() override final; + + /// Hit collection name + std::string m_hitCollName; + + /// The list of volumes + std::vector<std::string> m_miniVolumes; + + ServiceHandle<ILArCalculatorSvc> m_calc; //MiniFCALCalculator::GetCalculator() + + }; // class MiniFCALSDTool + +} // namespace LArG4 + +#endif diff --git a/LArCalorimeter/LArG4/LArG4SD/src/components/LArG4SD_entries.cxx b/LArCalorimeter/LArG4/LArG4SD/src/components/LArG4SD_entries.cxx index 711a78fd1d3b06404913c6024c8686127ed540c5..6ca192b78f7343690627e57de01f86c8fb74d019 100644 --- a/LArCalorimeter/LArG4/LArG4SD/src/components/LArG4SD_entries.cxx +++ b/LArCalorimeter/LArG4/LArG4SD/src/components/LArG4SD_entries.cxx @@ -1,19 +1,24 @@ #include "GaudiKernel/DeclareFactoryEntries.h" -#include "../LArG4EMBSDTool.h" -#include "../LArG4EMECSDTool.h" -#include "../LArG4HECSDTool.h" -#include "../LArG4FCALSDTool.h" -#include "../LArG4MiniFCALSDTool.h" -#include "../LArG4InactiveSDTool.h" -#include "../LArG4ActiveSDTool.h" -#include "../LArG4DeadSDTool.h" +// MT-friendly LAr SD tools +#include "../EMBSDTool.h" +#include "../EMECSDTool.h" +#include "../HECSDTool.h" +#include "../FCALSDTool.h" +#include "../MiniFCALSDTool.h" +#include "../ActiveSDTool.h" +#include "../InactiveSDTool.h" +#include "../DeadSDTool.h" -DECLARE_TOOL_FACTORY( LArG4EMBSDTool ) -DECLARE_TOOL_FACTORY( LArG4EMECSDTool ) -DECLARE_TOOL_FACTORY( LArG4HECSDTool ) -DECLARE_TOOL_FACTORY( LArG4FCALSDTool ) -DECLARE_TOOL_FACTORY( LArG4MiniFCALSDTool ) -DECLARE_TOOL_FACTORY( LArG4InactiveSDTool ) -DECLARE_TOOL_FACTORY( LArG4ActiveSDTool ) -DECLARE_TOOL_FACTORY( LArG4DeadSDTool ) \ No newline at end of file +#include "../CalibrationDefaultCalculator.h" + +DECLARE_TOOL_FACTORY( LArG4::EMBSDTool ) +DECLARE_TOOL_FACTORY( LArG4::EMECSDTool ) +DECLARE_TOOL_FACTORY( LArG4::HECSDTool ) +DECLARE_TOOL_FACTORY( LArG4::FCALSDTool ) +DECLARE_TOOL_FACTORY( LArG4::MiniFCALSDTool ) +DECLARE_TOOL_FACTORY( LArG4::ActiveSDTool ) +DECLARE_TOOL_FACTORY( LArG4::InactiveSDTool ) +DECLARE_TOOL_FACTORY( LArG4::DeadSDTool ) + +DECLARE_SERVICE_FACTORY( LArG4::CalibrationDefaultCalculator ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EMECSupportConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EMECSupportConstruction.cxx index a080c620f1dcdf80f042fff5ac2b0f90eba0be40..9de61749dab09c9cb0ee190d73717234e79f1642 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EMECSupportConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EMECSupportConstruction.cxx @@ -724,7 +724,7 @@ void EMECSupportConstruction::put_front_outer_barettes(GeoPhysVol *motherPhysica double dr = getNumber(m_DB_numbers, numbers, "DRabs", "PARVALUE", 41.4); // start of barrette rel to start of abs. double dx = getNumber(m_DB_numbers, numbers, "Labs", "PARVALUE", 1290.) / 2.; // length of the connected part assert(rmn + dr > rminFOB && rmn + dr + dx*2 < rmaxFOB); - double dy = LArWheelCalculator::GetFanHalfThickness(LArWheelCalculator::OuterAbsorberWheel); + double dy = LArWheelCalculator::GetFanHalfThickness(LArG4::OuterAbsorberWheel); const double r0A = rmn + dr + dx; GeoBox *shapeFOBA = new GeoBox(dx, dy, dzFOB); GeoLogVol *logicalFOBA = new GeoLogVol(name, shapeFOBA, m_G10FeOuter); @@ -736,7 +736,7 @@ void EMECSupportConstruction::put_front_outer_barettes(GeoPhysVol *motherPhysica dr = getNumber(m_DB_numbers, numbers, "DRele", "PARVALUE", 48.4); dx = getNumber(m_DB_numbers, numbers, "Lele", "PARVALUE", 1283.8) / 2.; assert(rmn + dr > rminFOB && rmn + dr + dx*2 < rmaxFOB); - dy = LArWheelCalculator::GetFanHalfThickness(LArWheelCalculator::OuterElectrodWheel); + dy = LArWheelCalculator::GetFanHalfThickness(LArG4::OuterElectrodWheel); const double r0E = rmn + dr + dx; double x0 = r0E * cos(dfi/2.); double y0 = r0E * sin(dfi/2.); @@ -821,7 +821,7 @@ void EMECSupportConstruction::put_front_inner_barettes(GeoPhysVol *motherPhysica double dr = getNumber(m_DB_numbers, numbers, "DRabs", "PARVALUE", 75.6); // start of barrette rel to start of abs. double dx = getNumber(m_DB_numbers, numbers, "Labs", "PARVALUE", 192.) / 2.; // length of the connected part assert(rmn + dr > rminFIB && rmn + dr + dx*2 < rmaxFIB); - double dy = LArWheelCalculator::GetFanHalfThickness(LArWheelCalculator::InnerAbsorberWheel); + double dy = LArWheelCalculator::GetFanHalfThickness(LArG4::InnerAbsorberWheel); const double r0A = rmn + dr + dx; GeoBox *shapeFIBA = new GeoBox(dx, dy, dzFIB); GeoLogVol *logicalFIBA = new GeoLogVol(name, shapeFIBA, m_G10FeInner); @@ -833,7 +833,7 @@ void EMECSupportConstruction::put_front_inner_barettes(GeoPhysVol *motherPhysica dr = getNumber(m_DB_numbers, numbers, "DRele", "PARVALUE", 106.3); dx = getNumber(m_DB_numbers, numbers, "Lele", "PARVALUE", 144.4) / 2.; assert(rmn + dr > rminFIB && rmn + dr + dx*2 < rmaxFIB); - dy = LArWheelCalculator::GetFanHalfThickness(LArWheelCalculator::InnerElectrodWheel); + dy = LArWheelCalculator::GetFanHalfThickness(LArG4::InnerElectrodWheel); const double r0E = rmn + dr + dx; double x0 = r0E * cos(dfi/2.); double y0 = r0E * sin(dfi/2.); @@ -918,7 +918,7 @@ void EMECSupportConstruction::put_back_outer_barettes(GeoPhysVol *motherPhysical double dr = getNumber(m_DB_numbers, numbers, "DRabs", "PARVALUE", 42.1); // start of barrette rel to start of abs double dx = getNumber(m_DB_numbers, numbers, "Labs", "PARVALUE", 1229.) / 2.; // length of the connected part assert(rmn + dr > rminBOB && rmn + dr + dx * 2 < rmaxBOB); - double dy = LArWheelCalculator::GetFanHalfThickness(LArWheelCalculator::OuterAbsorberWheel); + double dy = LArWheelCalculator::GetFanHalfThickness(LArG4::OuterAbsorberWheel); const double r0A = rmn + dr + dx; GeoBox *shapeBOBA = new GeoBox(dx, dy, dzBOB); GeoLogVol *logicalBOBA = new GeoLogVol(name, shapeBOBA, m_G10FeOuter); @@ -930,7 +930,7 @@ void EMECSupportConstruction::put_back_outer_barettes(GeoPhysVol *motherPhysical dr = getNumber(m_DB_numbers, numbers, "DRele", "PARVALUE", 41.); dx = getNumber(m_DB_numbers, numbers, "Lele", "PARVALUE", 1246.9) / 2.; assert(rmn + dr > rminBOB && rmn + dr + dx*2 < rmaxBOB); - dy = LArWheelCalculator::GetFanHalfThickness(LArWheelCalculator::OuterElectrodWheel); + dy = LArWheelCalculator::GetFanHalfThickness(LArG4::OuterElectrodWheel); double r0E = rmn + dr + dx; double y0 = r0E * sin(dfi/2.); double x0 = r0E * cos(dfi/2.); @@ -1017,7 +1017,7 @@ void EMECSupportConstruction::put_back_inner_barettes(GeoPhysVol *motherPhysical double rmn = getNumber(m_DB_numbers, numbers, "R0", "PARVALUE", 344.28); // start of abs. double dr = getNumber(m_DB_numbers, numbers, "DRabs", "PARVALUE", 56.1); // start of barrette rel to start of abs. double dx = getNumber(m_DB_numbers, numbers, "Labs", "PARVALUE", 255.) / 2.; - double dy = LArWheelCalculator::GetFanHalfThickness(LArWheelCalculator::InnerAbsorberWheel); + double dy = LArWheelCalculator::GetFanHalfThickness(LArG4::InnerAbsorberWheel); assert(rmn+dr>rminBIB && rmn+dr+dx*2.<rmaxBIB); const double r0A = rmn + dr + dx; GeoBox *shapeBIBA = new GeoBox(dx, dy, dzBIB); @@ -1031,7 +1031,7 @@ void EMECSupportConstruction::put_back_inner_barettes(GeoPhysVol *motherPhysical dr = getNumber(m_DB_numbers, numbers, "DRele", "PARVALUE", 76.6); dx = getNumber(m_DB_numbers, numbers, "Lele", "PARVALUE", 208.9) / 2.; assert(rmn + dr > rminBIB && rmn + dr + dx * 2. < rmaxBIB); - dy = LArWheelCalculator::GetFanHalfThickness(LArWheelCalculator::InnerElectrodWheel); + dy = LArWheelCalculator::GetFanHalfThickness(LArG4::InnerElectrodWheel); const double r0E = rmn + dr + dx; double y0 = r0E * sin(dfi * 0.5); double x0 = r0E * cos(dfi * 0.5); diff --git a/LArCalorimeter/LArRecUtils/CMakeLists.txt b/LArCalorimeter/LArRecUtils/CMakeLists.txt index 2070b80bd7a1a4812e07447aac5b35b92fcf9bca..453f02ba68904efcdbe7e8267f2ab3dbb5175704 100644 --- a/LArCalorimeter/LArRecUtils/CMakeLists.txt +++ b/LArCalorimeter/LArRecUtils/CMakeLists.txt @@ -67,5 +67,5 @@ atlas_install_joboptions( share/*.py ) atlas_add_test( LArFCalTowerBuilderTool SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/test/LArFCalTowerBuilderTool_test.sh PROPERTIES TIMEOUT 300 - EXTRAPATTERNS "[0-9] [A-Z]+ 20[123][0-9]|Reading file|^CORAL/Services/ConnectionService (Info|Warning)|^RelationalDatabase Info|^Data source lookup|^DetDescrCnvSvc +INFO|^CORAL/RelationalPlugins/frontier Info|^PluginManager Info|^RalSessionMgr Warning|^DBReplicaSvc +INFO|IOVDbSvc +INFO|^Py:Athena +INFO|^EventInfoMgtInit: Got release|^TEnvRec::ChangeValue|^PoolSvc +INFO|being retired|including file|Deaccess DbDatabase|^IoComponentMgr +INFO|File version|Global positioning|^Domain|duplicate entry|already loaded|RootDbase: all good|frontier.c|^Py:ConfigurableDb +(WARNING|INFO)|ApplicationMgr +INFO|INFO [sS]top|^CaloIdMgrDetDes.*INFO|^TTOnlineIDDetDe.*INFO|^CaloIDHelper_ID.*INFO|^AtlasDetectorID +INFO|^AthenaEventLoopMgrWARNING|^CaloDM_IDDetDes.*INFO|^CaloLVL1_IDDetD.*INFO|^LArFCAL_ID +INFO|^LArMiniFCAL_IDD.*INFO|^LArHEC_ID +INFO|^LArMiniFCAL_ID +INFO|TileTBIdDetDesc.*INFO|^TileIDDetDescrCnv +INFO|CaloCell_IDDetD.*INFO|TileID +INFO|^LArFCAL_IDDetDe.*INFO|^TileTBIDDetDesc.*INFO|^LArEM_ID +INFO|^LArHEC_IDDetDes.*INFO|^LArEM_IDDetDesc.*INFO|^EndcapDMConstru.*INFO|^GeoModelSvc +INFO|U-shape parameter|XMLFileCatalog Info|No IOVSvcTool associated|^RalSessionMgr Info|RDBMS technology|^AthenaRootStre.* INFO|^GUID: Class pool::DbString has GUID|INFO TileDddbManager|^HGTD_ID *INFO" + EXTRA_PATTERNS "[0-9] [A-Z]+ 20[123][0-9]|Reading file|^CORAL/Services/ConnectionService (Info|Warning)|^RelationalDatabase Info|^Data source lookup|^DetDescrCnvSvc +INFO|^CORAL/RelationalPlugins/frontier Info|^PluginManager Info|^RalSessionMgr Warning|^DBReplicaSvc +INFO|IOVDbSvc +INFO|^Py:Athena +INFO|^EventInfoMgtInit: Got release|^TEnvRec::ChangeValue|^PoolSvc +INFO|being retired|including file|Deaccess DbDatabase|^IoComponentMgr +INFO|File version|Global positioning|^Domain|duplicate entry|already loaded|RootDbase: all good|frontier.c|^Py:ConfigurableDb +(WARNING|INFO)|ApplicationMgr +INFO|INFO [sS]top|^CaloIdMgrDetDes.*INFO|^TTOnlineIDDetDe.*INFO|^CaloIDHelper_ID.*INFO|^AtlasDetectorID +INFO|^AthenaEventLoopMgrWARNING|^CaloDM_IDDetDes.*INFO|^CaloLVL1_IDDetD.*INFO|^LArFCAL_ID +INFO|^LArMiniFCAL_IDD.*INFO|^LArHEC_ID +INFO|^LArMiniFCAL_ID +INFO|TileTBIdDetDesc.*INFO|^TileIDDetDescrCnv +INFO|CaloCell_IDDetD.*INFO|TileID +INFO|^LArFCAL_IDDetDe.*INFO|^TileTBIDDetDesc.*INFO|^LArEM_ID +INFO|^LArHEC_IDDetDes.*INFO|^LArEM_IDDetDesc.*INFO|^EndcapDMConstru.*INFO|^GeoModelSvc +INFO|U-shape parameter|XMLFileCatalog Info|No IOVSvcTool associated|^RalSessionMgr Info|RDBMS technology|^AthenaRootStre.* INFO|^GUID: Class pool::DbString has GUID|INFO TileDddbManager|^HGTD_ID *INFO|Unable to locate catalog" ) diff --git a/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref b/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref new file mode 100644 index 0000000000000000000000000000000000000000..95f4afb4d77b988f39047b1bf0d337f36c959a09 --- /dev/null +++ b/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref @@ -0,0 +1,6796 @@ +Fri Feb 17 13:58:26 EST 2017 +WARNING: TCMALLOCDIR not defined, will use libc malloc +Py:Athena INFO including file "AthenaCommon/Preparation.py" +Py:Athena INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?] +Py:Athena INFO including file "AthenaCommon/Bootstrap.py" +Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" +Py:Athena INFO executing ROOT6Setup +Py:Athena INFO including file "AthenaCommon/Execution.py" +Py:Athena INFO including file "LArRecUtils/LArFCalTowerBuilderTool_test.py" +SetGeometryVersion.py obtained major release version 21 +Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" +Py:ConfigurableDb INFO Read module info for 4102 configurables from 2 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! +EventInfoMgtInit: Got release version sss-rel_0 +Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 +Data source lookup using /home/sss/atlas/DBRelease/dblookup.xml file +Py:Athena INFO including file "CaloIdCnv/CaloIdCnv_joboptions.py" +Py:Athena INFO including file "CaloConditions/CaloConditions_jobOptions.py" +Py:Athena INFO including file "CaloConditions/LArTTCellMap_ATLAS_jobOptions.py" +Py:Athena INFO including file "CaloConditions/CaloTTIdMap_ATLAS_jobOptions.py" +Py:Athena INFO including file "TileIdCnv/TileIdCnv_jobOptions.py" +# setting LC_ALL to "C" +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) + running on karma on Fri Feb 17 13:59:22 2017 +==================================================================================================================================== +ApplicationMgr INFO Successfully loaded modules : AthenaServices +ApplicationMgr INFO Application Manager Configured successfully +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Successfully loaded modules : LArRecUtils +Py:Athena INFO including file "AthenaCommon/runbatch.py" +StatusCodeSvc INFO initialize +AthDictLoaderSvc INFO in initialize... +AthDictLoaderSvc INFO acquired Dso-registry +ClassIDSvc INFO getRegistryEntries: read 13274 CLIDRegistry entries for module ALL +ChronoStatSvc INFO Number of skipped events for MemStat-1 +CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) +CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) +MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 +PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-00-00 +PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] +PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled +PoolSvc INFO Frontier compression level set to 5 +DBReplicaSvc INFO Read replica configuration from /home/sss/atlas/rootaccess/build/share/dbreplica.config +DBReplicaSvc INFO No specific match for domain found - use default fallback +DBReplicaSvc INFO Total of 1 servers found for host karma [atlas_dd ] +PoolSvc INFO Successfully setup replica sorting algorithm +PoolSvc INFO Setting up APR FileCatalog and Streams +PoolSvc INFO Resolved path (via DATAPATH) is /home/sss/atlas/DBRelease/current/poolcond/PoolCat_oflcond.xml +PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml +PoolSvc INFO Re-initializing PoolSvc +IOVDbSvc INFO Opened read transaction for POOL PersistencySvc +IOVDbSvc INFO Only 5 POOL conditions files will be open at once +IOVDbSvc INFO Global tag: OFLCOND-SDR-BS14T-IBL-06 set from joboptions +IOVDbSvc INFO Read from meta data only for folder /TagInfo +IOVDbSvc INFO Initialised with 3 connections and 7 folders +IOVDbSvc INFO Service IOVDbSvc initialised successfully +IOVDbSvc INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found. +IOVDbSvc INFO Opening COOL connection for COOLOFL_LAR/OFLP200 +CoralApplication Info Create a cool::CoralApplication... +CoralApplication Info Create a new own CORAL connection service +CoralApplication Info Create the COOL database service +RalDatabaseSvc Info Instantiate the RalDatabaseSvc +CoralApplication Info Create a cool::CoralApplication... DONE +RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_LAR/OFLP200' +RalSessionMgr Info Connect to the database server +CORAL/Services/ConnectionService Info Re-ordering 14 replicas using installed algorithm +CORAL/Services/ConnectionService Info Sorting algorithm selected 2 replicas +CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/sqlite200 is not writable" )' - do NOT retry +CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected +CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/sqlite200 is not writable" ) +CORAL/Services/ConnectionService Info New connection to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" with connectionID=C#4 has been connected +CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" for user "" in read-only mode +RalSessionMgr Info Start a read-only transaction active for the duration of the database connection +RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_LAR/OFLP200' +RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.9.4 will be opened using CURRENT client release number 3.1.6 +IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" +IOVSvcTool INFO IOVRanges will be checked at every Event +IOVDbSvc INFO Opening COOL connection for COOLOFL_CALO/OFLP200 +RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_CALO/OFLP200' +RalSessionMgr Info Connect to the database server +CORAL/Services/ConnectionService Info Re-ordering 14 replicas using installed algorithm +CORAL/Services/ConnectionService Info Sorting algorithm selected 2 replicas +CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/sqlite200 is not writable" )' - do NOT retry +CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected +CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/sqlite200 is not writable" ) +CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" for user "" in read-only mode +RalSessionMgr Info Start a read-only transaction active for the duration of the database connection +RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_CALO/OFLP200' +RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.9.4 will be opened using CURRENT client release number 3.1.6 +IOVDbSvc INFO Disconnecting from COOLOFL_LAR/OFLP200 +RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection +RalSessionMgr Info Disconnect from the database server +CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 +RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_LAR/OFLP200' +RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_LAR/OFLP200' +IOVDbSvc INFO Disconnecting from COOLOFL_CALO/OFLP200 +RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection +RalSessionMgr Info Disconnect from the database server +CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 +CORAL/Services/ConnectionService Info Connection to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" with connectionID=C#4 will be disconnected +RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_CALO/OFLP200' +RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_CALO/OFLP200' +IOVDbSvc INFO Added taginfo remove for /LAR/Align +IOVDbSvc INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas +IOVDbSvc INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas +IOVDbSvc INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas +IOVDbSvc INFO Added taginfo remove for /LAR/LArCellPositionShift +IOVDbSvc INFO Added taginfo remove for /LAR/Identifier/LArTTCellMapAtlas +DetDescrCnvSvc INFO initializing +DetDescrCnvSvc INFO Found DetectorStore service +DetDescrCnvSvc INFO filling proxies for detector managers +DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store +DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store +GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['LArDetectorToolNV/LArDetectorToolNV','TileDetectorTool/TileDetectorTool']) +CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm +CORAL/Services/ConnectionService Info Sorting algorithm selected 3 replicas +CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/geomDB is not writable" )' - do NOT retry +CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected +CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/geomDB is not writable" ) +CORAL/Services/ConnectionService Info New connection to service "/home/sss/atlas/DBRelease/current/geomDB/geomDB_sqlite" with connectionID=C#7 has been connected +CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "/home/sss/atlas/DBRelease/current/geomDB/geomDB_sqlite" for user "" in read-only mode +ClassIDSvc INFO getRegistryEntries: read 2896 CLIDRegistry entries for module ALL +GeoModelSvc.LAr... INFO Keys for LAr are ATLAS-R2-2015-03-01-00 ATLAS +GeoModelSvc.LAr... INFO Building LAr version LAr-Revised-17-01 while ATLAS version is ATLAS-R2-2015-03-01-00 +GeoModelSvc.LAr... INFO LAr Geometry Options: +GeoModelSvc.LAr... INFO Sagging = false +GeoModelSvc.LAr... INFO Barrel = ON +GeoModelSvc.LAr... INFO Endcap = ON +BarrelConstruction INFO Getting primary numbers for ATLAS, ATLAS-R2-2015-03-01-00 +BarrelConstruction INFO Makes detailed absorber sandwich ? 1 1 +BarrelConstruction INFO Use sagging in geometry ? 0 +============== EMEC Construction =============== + multi-layered version of absorbers activated, mlabs == 1 +================================================ +EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc +ClassIDSvc INFO getRegistryEntries: read 66 CLIDRegistry entries for module ALL +CaloIDHelper_ID... INFO in createObj: creating a TileTBID helper object in the detector store +IdDictDetDescrCnv INFO in initialize +IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store +IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml +IdDictDetDescrCnv INFO Reading InnerDetector IdDict file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml +IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml +IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml +IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml +IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.02.xml +IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors_2010.xml +IdDictDetDescrCnv INFO Found id dicts: +IdDictDetDescrCnv INFO Using dictionary tag: null +IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file +IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml +IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-01 file IdDictParser/IdDictForwardDetectors_2010.xml +IdDictDetDescrCnv INFO Dictionary InnerDetector version IBL-DBM DetDescr tag InDetIdentifier-IBL3D25-02 file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml +IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml +IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file +IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file +IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.02 DetDescr tag MuonIdentifier-05 file IdDictParser/IdDictMuonSpectrometer_R.02.xml +IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml +TileTBID INFO initialize_from_dictionary +AtlasDetectorID INFO initialize_from_dictionary - OK +ClassIDSvc INFO getRegistryEntries: read 111 CLIDRegistry entries for module ALL +EndcapDMConstru... INFO Start building EC electronics geometry +============== EMEC Construction =============== + multi-layered version of absorbers activated, mlabs == 1 +================================================ +EndcapDMConstru... INFO Start building EC electronics geometry +GeoModelSvc INFO GeoModelSvc.LArDetectorToolNV SZ= 5840Kb Time = 0.89S +GeoModelSvc.Til... INFO Entering TileDetectorTool::create() +GeoModelSvc.Til... INFO TileDddbManager: m_tag = ATLAS-R2-2015-03-01-00 +GeoModelSvc.Til... INFO TileDddbManager: n_tiglob = 5 +GeoModelSvc.Til... INFO TileDddbManager: n_timod = 320 +GeoModelSvc.Til... INFO TileDddbManager: n_cuts = 9 +GeoModelSvc.Til... INFO TileDddbManager: n_saddle = 1 +GeoModelSvc.Til... INFO TileDddbManager: n_tilb = 21 +GeoModelSvc.Til... INFO TileDddbManager: n_tileSwitches = 1 +CaloIDHelper_ID... INFO in createObj: creating a TileID helper object in the detector store +AtlasDetectorID INFO initialize_from_dictionary - OK +TileNeighbour INFO Reading file /home/sss/atlas/rootaccess/build/share/TileNeighbour_reduced.txt +CaloIDHelper_ID... INFO in createObj: creating a CaloCell_ID helper object in the detector store +CaloIDHelper_ID... INFO in createObj: creating a LArEM_ID helper object in the detector store +AtlasDetectorID INFO initialize_from_dictionary - OK +CaloIDHelper_ID... INFO in createObj: creating a LArHEC_ID helper object in the detector store +AtlasDetectorID INFO initialize_from_dictionary - OK +CaloIDHelper_ID... INFO in createObj: creating a LArFCAL_ID helper object in the detector store +AtlasDetectorID INFO initialize_from_dictionary - OK +LArFCAL_Base_ID INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal2DNeighbors-April2011.txt +LArFCAL_Base_ID INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal3DNeighborsNext-April2011.txt +LArFCAL_Base_ID INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal3DNeighborsPrev-April2011.txt +CaloIDHelper_ID... INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store +AtlasDetectorID INFO initialize_from_dictionary - OK +LArMiniFCAL_ID INFO initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID. +AtlasDetectorID INFO initialize_from_dictionary - OK +TileHWIDDetDesc... INFO in createObj: creating a TileHWID helper object in the detector store +TileHWID INFO initialize_from_dictionary +AtlasDetectorID INFO initialize_from_dictionary - OK +GeoModelSvc.Til... INFO U-shape parameter from database is: 1 +GeoModelSvc.Til... INFO Entering TileAtlasFactory::create() +GeoModelSvc.Til... INFO Tile Geometry with Saddle supports, starting from TileCal-CSC-02 xxx +GeoModelSvc.Til... INFO => New BFingerLengthPos 430.5 +GeoModelSvc.Til... INFO => New BFingerLengthNeg 420.5 +GeoModelSvc.Til... INFO Positioning barrel with translation 0 +GeoModelSvc.Til... INFO Positioning positive barrel finger with translation 3035.25 +GeoModelSvc.Til... INFO Positioning negative barrel finger with translation -3030.25 +GeoModelSvc.Til... INFO Positioning positive ext.barrel with translation 4854.75 +GeoModelSvc.Til... INFO Positioning positive ext.barrel finger with translation ztrans= 6338.5 +GeoModelSvc.Til... INFO Positioning positive ext.barrel saddle with translation ztrans= 6192.5 +GeoModelSvc.Til... INFO Positive ITC envelope parameters: PLUG1 Rmin= 3438.85 Rmax= 4250 dzITC1= 154.5 +GeoModelSvc.Til... INFO PLUG2 Rmin= 2981 Rmax= 3440 dzITC2= 47.425 +GeoModelSvc.Til... INFO Positioning positive ITC with translation 3405 +GeoModelSvc.Til... INFO Positioning positive Gap with translation 3552 +GeoModelSvc.Til... INFO Positioning positive Crack with translation 3536 +GeoModelSvc.Til... INFO Positioning negative ext.barrel with translation ztrans -4854.75 +GeoModelSvc.Til... INFO Positioning negative ext.barrel finger with translation ztrans= -6338.5 +GeoModelSvc.Til... INFO Positioning negative ext.barrel saddle with translation ztrans= -6192.5 +GeoModelSvc.Til... INFO Negative ITC envelope parameters: PLUG1 Rmin= 3438.85 Rmax= 4250 dzITC1= 154.5 +GeoModelSvc.Til... INFO PLUG2 Rmin= 2981 Rmax= 3440 dzITC2= 47.425 +GeoModelSvc.Til... INFO Positioning negative ITC with translation -3405 +GeoModelSvc.Til... INFO Positioning negative Gap with translation -3552 +GeoModelSvc.Til... INFO Positioning negative Crack with translation -3536 +GeoModelSvc.Til... INFO Global positioning of barrel with rotation (0,0,0)) and translation (0,0,0) CLHEP::cm +GeoModelSvc.Til... INFO Global positioning of positive ext.barrel with rotation (0,0,0)) and translation (0,0,0) CLHEP::cm +GeoModelSvc.Til... INFO Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) CLHEP::cm +GeoModelSvc.Til... INFO TileDetDescrManager: entering create_elements() +ClassIDSvc INFO getRegistryEntries: read 6 CLIDRegistry entries for module ALL +GeoModelSvc INFO GeoModelSvc.TileDetectorTool SZ= 3832Kb Time = 0.22S +CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 +CORAL/Services/ConnectionService Info Connection to service "/home/sss/atlas/DBRelease/current/geomDB/geomDB_sqlite" with connectionID=C#7 will be disconnected +ClassIDSvc INFO getRegistryEntries: read 63 CLIDRegistry entries for module ALL +AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 +AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq +AthAlgSeq INFO Member list: LArFCalTowerBuilderToolTestAlg/towertest +CaloIdMgrDetDes... INFO in createObj: creating a CaloDescrManager object in the detector store +ClassIDSvc INFO getRegistryEntries: read 395 CLIDRegistry entries for module ALL +CaloIDHelper_ID... INFO in createObj: creating a CaloDM_ID helper object in the detector store +CaloDM_ID INFO initialize_from_dictionary +AtlasDetectorID INFO initialize_from_dictionary - OK +CaloIDHelper_ID... INFO in createObj: creating a CaloLVL1_ID helper object in the detector store +CaloLVL1_ID INFO initialize_from_dictionary +AtlasDetectorID INFO initialize_from_dictionary - OK +CaloIDHelper_ID... INFO in createObj: creating a TTOnlineID helper object in the detector store +TTOnlineID INFO initialize_from_dictionary +AtlasDetectorID INFO initialize_from_dictionary - OK +CaloIDHelper_ID... INFO in createObj: creating a CaloCell_SuperCell_ID helper object in the detector store +CaloIDHelper_ID... INFO in createObj: creating a LArEM_SuperCell_ID helper object in the detector store +AtlasDetectorID INFO initialize_from_dictionary - OK +CaloIDHelper_ID... INFO in createObj: creating a LArHEC_SuperCell_ID helper object in the detector store +AtlasDetectorID INFO initialize_from_dictionary - OK +CaloIDHelper_ID... INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store +AtlasDetectorID INFO initialize_from_dictionary - OK +LArFCAL_Base_ID INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells2DNeighborsNew-April2014.txt +LArFCAL_Base_ID INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells3DNeighborsNextNew-April2014.txt +LArFCAL_Base_ID INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt +CaloIDHelper_ID... INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store +AtlasDetectorID INFO initialize_from_dictionary - OK +TileNeighbour INFO Reading file /home/sss/atlas/rootaccess/build/share/TileSuperCellNeighbour.txt +AtlasDetectorID INFO initialize_from_dictionary - OK +CaloIdMgrDetDes... INFO Finished +CaloIdMgrDetDes... INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv +ToolSvc.LArFCal... INFO CaloTowerBuilder for the FCal initiated +HistogramPersis...WARNING Histograms saving not required. +ApplicationMgr INFO Application Manager Initialized successfully +ApplicationMgr INFO Application Manager Started successfully +AthenaEventLoopMgr INFO ===>>> start of run 1 <<<=== +EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc +EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr +ClassIDSvc INFO getRegistryEntries: read 104 CLIDRegistry entries for module ALL +IOVDbSvc INFO Opening COOL connection for COOLOFL_LAR/OFLP200 +RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_LAR/OFLP200' +RalSessionMgr Info Connect to the database server +CORAL/Services/ConnectionService Info Re-ordering 14 replicas using installed algorithm +CORAL/Services/ConnectionService Info Sorting algorithm selected 2 replicas +CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/sqlite200 is not writable" )' - do NOT retry +CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected +CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/sqlite200 is not writable" ) +CORAL/Services/ConnectionService Info New connection to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" with connectionID=C#9 has been connected +CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" for user "" in read-only mode +RalSessionMgr Info Start a read-only transaction active for the duration of the database connection +RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_LAR/OFLP200' +RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.9.4 will be opened using CURRENT client release number 3.1.6 +IOVDbSvc INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARAlign-mc11-00 for folder /LAR/Align +IOVDbSvc INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift +IOVDbSvc INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARIdentifierLArTTCellMapAtlas-HadFcalFix2 for folder /LAR/Identifier/LArTTCellMapAtlas +IOVDbSvc INFO Disconnecting from COOLOFL_LAR/OFLP200 +RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection +RalSessionMgr Info Disconnect from the database server +CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 +CORAL/Services/ConnectionService Info Connection to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" with connectionID=C#9 will be disconnected +RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_LAR/OFLP200' +RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_LAR/OFLP200' +DbSession Info Open DbSession +Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] +Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC +Domain[ROOT_All] Info /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root +RootDatabase.open Info /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200 +ClassIDSvc INFO getRegistryEntries: read 45 CLIDRegistry entries for module ALL +CaloMgrDetDescrCnv INFO in createObj: creating a Calo Detector Manager object in the detector store +CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm +CORAL/Services/ConnectionService Info Sorting algorithm selected 3 replicas +CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/geomDB is not writable" )' - do NOT retry +CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#10 will be disconnected +CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/geomDB is not writable" ) +CORAL/Services/ConnectionService Info New connection to service "/home/sss/atlas/DBRelease/current/geomDB/geomDB_sqlite" with connectionID=C#11 has been connected +CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "/home/sss/atlas/DBRelease/current/geomDB/geomDB_sqlite" for user "" in read-only mode +CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 +CORAL/Services/ConnectionService Info Connection to service "/home/sss/atlas/DBRelease/current/geomDB/geomDB_sqlite" with connectionID=C#11 will be disconnected +ClassIDSvc INFO getRegistryEntries: read 60 CLIDRegistry entries for module ALL +Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A +Domain[ROOT_All] Info /home/sss/atlas/DBRelease/current/poolcond/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root +RootDatabase.open Info /home/sss/atlas/DBRelease/current/poolcond/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root File version:52200 +AthenaEventLoopMgr INFO ===>>> start processing event #1, run #1 0 events processed so far <<<=== +test1 +towers +0 1 1 0 +1 1 2 0 +2 1 3 0 +3 1 4 0 +4 1 5 0 +5 1 6 0 +6 1 7 0 +7 1 8 0 +8 1 9 0 +9 1 10 0 +10 1 11 0 +11 1 12 0 +12 1 13 0 +13 1 14 0 +14 1 15 0 +15 1 16 0 +16 1 17 0 +17 1 18 0 +18 1 19 0 +19 1 20 0 +20 1 21 1395.95 180450 +21 1 22 0 +22 1 23 0 +23 1 24 0 +24 1 25 2167.68 180704 +25 1 26 0 +26 1 27 0 +27 1 28 0 +28 1 29 0 +29 1 30 0 +30 1 31 190.527 180705 +31 1 32 0 +32 1 33 0 +33 1 34 1363.14 180692 +34 1 35 0 +35 1 36 0 +36 1 37 8348.26 179937 180693 +37 1 38 11118.9 179937 180444 +38 1 39 7795.88 180444 +39 1 40 13119.6 179921 180444 +40 1 41 0 +41 1 42 0 +42 1 43 5107.42 180445 180694 +43 1 44 12108.2 179938 180445 +44 1 45 2710.82 179938 +45 1 46 0 +46 1 47 0 +47 1 48 0 +48 1 49 0 +49 1 50 0 +50 1 51 0 +51 1 52 5031.5 179941 +52 1 53 6777.1 179941 180446 +53 1 54 872.804 180446 +54 1 55 0 +55 1 56 0 +56 1 57 0 +57 1 58 0 +58 1 59 0 +59 1 60 0 +60 1 61 0 +61 1 62 0 +62 1 63 0 +63 1 64 0 +64 2 1 21229.4 179943 179944 180423 180424 +65 2 2 16872.7 179944 180424 180699 +66 2 3 11650.8 179928 180408 180424 180699 +67 2 4 182.712 180699 +68 2 5 8932.04 179945 180700 +69 2 6 15230.3 179945 180448 180700 +70 2 7 3902.14 180448 +71 2 8 21303.9 179929 180448 +72 2 9 0 +73 2 10 2379.31 180449 180701 +74 2 11 10844.3 179946 180449 180701 +75 2 12 26380.1 179946 180449 +76 2 13 0 +77 2 14 0 +78 2 15 0 +79 2 16 6319.88 180440 180441 +80 2 17 3835.03 179948 180441 +81 2 18 0 +82 2 19 0 +83 2 20 28521.5 179949 180450 +84 2 21 20410.3 179949 180450 +85 2 22 2901.6 180450 180689 +86 2 23 24024.5 179933 180442 180689 +87 2 24 22184.9 179933 180442 180704 +88 2 25 15533.2 180451 180704 +89 2 26 31043.7 179950 180451 +90 2 27 31198.1 179950 180451 180690 +91 2 28 1599.7 180690 +92 2 29 12402.7 179919 179935 180415 180705 +93 2 30 49718.2 179935 180415 180431 180705 +94 2 31 38142.9 179951 180431 180705 +95 2 32 42411.1 179936 179951 180416 180431 +96 2 33 12787 179936 180416 180692 +97 2 34 25966.3 179920 179936 180416 180692 +98 2 35 45102.8 179920 180400 180416 180692 +99 2 36 14024.6 179904 180400 180692 +100 2 37 27936.1 179937 180400 180432 180693 +101 2 38 35347.5 179937 180432 180444 180693 +102 2 39 30966 179921 180444 180693 +103 2 40 45874.5 179905 179921 180444 180678 +104 2 41 23704.8 179921 180433 180444 180678 +105 2 42 13596.5 179922 180433 180694 +106 2 43 27826.3 179938 180445 180694 +107 2 44 38273.7 179938 180445 180694 +108 2 45 14397.4 179938 180445 +109 2 46 17644 179923 180419 +110 2 47 13477.1 179923 179939 180434 180695 +111 2 48 28248.5 179939 180434 180695 +112 2 49 8638.66 179940 180435 180695 180696 +113 2 50 7667.11 179940 180435 180696 +114 2 51 11042.5 179924 180420 +115 2 52 15094.5 179941 +116 2 53 28648.7 179941 180446 +117 2 54 14831 179941 180446 180681 +118 2 55 13421.6 179925 180436 180446 180681 +119 2 56 33509.2 179925 180436 +120 2 57 9681.97 179925 180436 180697 +121 2 58 4059.01 180447 180697 +122 2 59 17592.7 179942 180447 +123 2 60 5194.01 179942 180682 +124 2 61 1752.1 180698 +125 2 62 12419.9 179927 180423 180698 +126 2 63 21857.9 179927 179943 180423 180698 +127 2 64 9809.59 179943 180423 +128 3 1 46424.3 179943 179944 180423 180424 +129 3 2 45067 179928 179944 180424 180699 +130 3 3 29327.8 179928 180408 180424 180699 +131 3 4 46150.9 179912 179928 180408 180699 +132 3 5 43666.7 179912 179945 180408 180438 180700 +133 3 6 25151.9 179897 179945 180438 180448 180700 +134 3 7 24478.9 179913 179929 180448 180700 +135 3 8 36621.5 179913 179929 180448 180686 +136 3 9 12765.7 179929 179930 180439 180686 180701 +137 3 10 6200.57 179930 180439 180701 +138 3 11 23780.1 179930 179946 180449 180701 +139 3 12 39000.7 179914 179946 180449 180701 +140 3 13 30172.3 179931 179946 180427 180449 +141 3 14 27974.6 179931 180427 180702 +142 3 15 30254 179947 180440 180702 +143 3 16 29211.2 179947 180440 180441 180702 +144 3 17 24878.1 179948 180441 180703 +145 3 18 38151.5 179932 179948 180428 180441 180703 +146 3 19 47165.9 179932 179949 180428 180703 +147 3 20 36136.5 179901 179932 179949 180413 180428 180450 +148 3 21 13954.1 179901 179949 180450 180689 +149 3 22 15946.4 179917 179933 180442 180450 180689 +150 3 23 27996.1 179917 179933 180442 180689 180704 +151 3 24 43324.4 179933 179934 180429 180442 180689 180704 +152 3 25 57386.6 179934 180429 180451 180704 +153 3 26 63783 179934 179950 180451 180690 180704 +154 3 27 71152.4 179918 179950 180443 180451 180690 +155 3 28 23707.6 179919 180415 180690 +156 3 29 30776.4 179919 179935 180415 180705 +157 3 30 46163.6 179935 180415 180431 180705 +158 3 31 58436.2 179935 179951 180431 180705 +159 3 32 42411.1 179936 179951 180416 180431 +160 3 33 12787 179936 180416 180692 +161 3 34 41449.8 179920 179936 180416 180692 +162 3 35 47802.3 179920 180400 180692 +163 3 36 25115.4 179904 180400 +164 3 37 51134.1 179889 179904 179937 180400 180432 180693 +165 3 38 39705.1 179889 179937 180417 180432 180693 +166 3 39 37491.8 179905 179921 180417 180432 180444 180677 180678 180693 +167 3 40 48713.7 179905 179921 180433 180444 180678 +168 3 41 35341.3 179890 179905 179922 180433 180678 180694 +169 3 42 39721 179922 180433 180678 180694 +170 3 43 26291.7 179922 180445 180694 +171 3 44 44939.6 179906 179938 180402 180445 180694 180695 +172 3 45 37046.9 179906 179923 179938 180402 180419 180445 180695 +173 3 46 38017.5 179923 180419 180695 +174 3 47 44896.5 179923 179939 180419 180434 180695 +175 3 48 52674.6 179939 180434 180695 +176 3 49 19401 179940 180435 180695 180696 +177 3 50 18977.3 179940 180435 180696 +178 3 51 31630.2 179924 180420 180696 +179 3 52 41043.7 179924 179941 180420 180446 180696 +180 3 53 40291.8 179893 179941 180405 180446 180696 +181 3 54 8305.47 179909 180446 180681 +182 3 55 26740.2 179909 179925 180436 180681 +183 3 56 34634.2 179909 179925 180436 180681 180697 +184 3 57 23780.9 179925 179926 180421 180436 180447 180697 +185 3 58 19310.5 179926 179942 180447 180682 180697 +186 3 59 40587.1 179910 179942 180437 180447 180682 180697 +187 3 60 35777.1 179910 179911 179942 180407 180437 180447 180682 +188 3 61 42284.6 179911 180407 180682 180698 +189 3 62 30233.9 179927 180407 180698 +190 3 63 46545.8 179927 179943 180423 180698 +191 3 64 31054.3 179943 180423 180698 +192 4 1 35653.8 179895 179896 179943 179944 180391 180392 180424 180684 +193 4 2 43798.7 179880 179896 179928 179944 180392 180424 180699 +194 4 3 42467.8 179880 179928 180392 180408 180424 180699 +195 4 4 58969.3 179864 179912 180408 180699 +196 4 5 59425.5 179897 179912 180408 180438 180700 +197 4 6 46507.1 179897 180425 180438 180700 +198 4 7 36042.4 179881 179913 180425 180438 180448 180685 180686 180700 +199 4 8 32672.4 179898 179913 179929 180425 180426 180439 180448 180686 +200 4 9 51296.5 179898 179913 179930 180439 180686 180701 +201 4 10 22507.3 179882 179930 180439 180686 180701 +202 4 11 29961.6 179882 179914 179930 180410 180449 180701 +203 4 12 50526 179914 179946 180410 180449 180701 180702 +204 4 13 40581.1 179899 179914 179931 180410 180427 180702 +205 4 14 36578.5 179899 179931 180427 180702 +206 4 15 25585.3 179899 179915 179947 180427 180440 180702 +207 4 16 35405.9 179915 179947 180440 180441 180702 +208 4 17 42054 179916 179948 180441 180703 +209 4 18 56455.7 179900 179916 179932 179948 180428 180441 180703 +210 4 19 67154.5 179900 179932 180428 180703 +211 4 20 18641.1 179884 179901 180413 180703 +212 4 21 19813 179869 179901 180413 180450 180673 180689 180703 +213 4 22 28830.5 179869 179917 180413 180442 180689 +214 4 23 23685.7 179869 179885 179917 180429 180442 180689 +215 4 24 37559.7 179885 179934 180429 180442 180674 180689 180704 +216 4 25 64739.5 179885 179902 179934 180429 180674 180704 +217 4 26 66479.6 179902 179918 179934 180430 180443 180451 180674 180690 180704 +218 4 27 58275.7 179918 180443 180690 +219 4 28 50146.5 179871 179918 179919 180399 180415 180443 180690 180691 +220 4 29 41099 179871 179919 180399 180415 180690 180691 180705 +221 4 30 22190.7 179887 179935 180399 180415 180691 180705 +222 4 31 9883.11 179887 179903 180399 180691 180705 +223 4 32 15146.2 179888 179903 180384 180399 180691 +224 4 33 16532.3 179888 180384 180676 180692 +225 4 34 36111.1 179872 179888 180384 180676 180692 +226 4 35 38262.3 179856 179872 179904 180384 180676 180692 +227 4 36 39608.1 179856 179904 180384 180400 180676 180693 +228 4 37 32751.1 179857 179889 179904 180400 180401 180432 180661 180693 +229 4 38 55382 179873 179889 180417 180432 180677 180693 +230 4 39 54170.5 179873 179905 180417 180432 180677 180678 +231 4 40 53541.6 179841 179873 179890 179905 180417 180418 180677 180678 +232 4 41 55228.1 179890 180433 180678 +233 4 42 54560.7 179858 179874 179890 179922 180386 180402 180433 180662 180678 180694 +234 4 43 28017.2 179874 180402 180433 180662 180694 +235 4 44 20734.3 179874 179906 180402 180662 180694 180695 +236 4 45 37758.9 179875 179906 180402 180419 180695 +237 4 46 56509.7 179891 179923 180419 180695 +238 4 47 30775.5 179891 179907 180387 180403 180419 180434 180695 +239 4 48 13369.5 179907 180403 180434 180695 +240 4 49 18227.8 179908 180403 180404 180435 180695 180696 +241 4 50 18801.2 179892 179908 180388 180404 180420 180435 180696 +242 4 51 36463 179892 179924 180420 180696 +243 4 52 38182.6 179876 179892 179893 179924 180405 180420 180696 +244 4 53 32471.7 179893 180405 180696 +245 4 54 21518 179861 179893 179909 180405 180446 180681 180696 +246 4 55 28890.3 179861 179909 180405 180436 180665 180681 +247 4 56 24021.5 179877 179909 180421 180436 180681 +248 4 57 22405 179877 179926 180421 180666 180697 +249 4 58 26649.3 179894 179926 180421 180422 180437 180447 180666 180697 +250 4 59 63840.9 179894 179910 179942 180437 180447 180682 180697 +251 4 60 72486.1 179910 179911 180407 180437 180682 +252 4 61 51851.6 179863 179911 180407 180682 +253 4 62 42820.8 179863 179879 179911 179927 180391 180407 180698 +254 4 63 49893.2 179879 179895 179927 179943 180391 180423 180698 +255 4 64 22037.6 179895 179943 180391 180683 180698 +256 5 1 34011.1 179847 179848 179895 179896 180391 180392 180684 +257 5 2 37651 179848 179880 179896 180392 180684 +258 5 3 66642.4 179864 179880 180392 180684 180699 +259 5 4 50068.7 179864 180392 180684 +260 5 5 47744.4 179864 179865 179897 180409 180669 +261 5 6 43467.3 179833 179865 179881 179897 180425 180438 180685 180700 +262 5 7 66191.2 179881 180425 180426 180685 180686 +263 5 8 86123.8 179849 179881 179898 180425 180426 180685 180686 +264 5 9 56405.9 179866 179898 180426 180439 180686 +265 5 10 58266.7 179866 179882 179898 180394 180410 180439 180670 180701 +266 5 11 62625.9 179850 179882 180410 180670 +267 5 12 46100.8 179850 179883 179914 180410 180702 +268 5 13 61862.5 179883 179899 180410 180427 180702 +269 5 14 42228.5 179851 179899 180395 180427 180702 +270 5 15 37923 179851 179867 179899 179915 180395 180411 180702 +271 5 16 22104.2 179867 179915 180411 180702 +272 5 17 37062.8 179868 179916 180412 180703 +273 5 18 48623.9 179852 179868 179900 179916 180396 180412 180703 +274 5 19 71001.6 179852 179884 179900 180396 180413 180428 180703 +275 5 20 61800.6 179884 180413 180703 +276 5 21 42037.1 179837 179869 179884 179901 180413 180673 +277 5 22 43145.6 179837 179853 179869 180397 180413 180673 +278 5 23 27710.2 179853 179885 180397 180673 180689 +279 5 24 36315.8 179853 179870 179885 180429 180430 180674 +280 5 25 43012 179870 179902 180429 180430 180674 +281 5 26 62191.2 179854 179902 180430 180443 180674 +282 5 27 34487.9 179854 179886 179902 179918 180414 180443 180658 180690 +283 5 28 20474.4 179871 179886 180414 180658 180690 +284 5 29 45143.2 179871 180399 180691 +285 5 30 34331.5 179823 179839 179871 179887 180399 180691 +286 5 31 24927.7 179839 179855 179887 179903 180399 180691 +287 5 32 34212.9 179840 179855 179888 179903 180384 180399 180691 +288 5 33 16734.4 179840 179888 180384 180676 +289 5 34 28161.6 179824 179872 180384 180676 +290 5 35 45399 179808 179824 179856 179872 180384 180676 +291 5 36 44679.2 179856 179857 180384 180401 180661 180676 +292 5 37 59934.5 179857 180401 180661 +293 5 38 37825.3 179825 179857 179873 180401 180661 180677 +294 5 39 60183.1 179825 179841 179873 180417 180418 180677 +295 5 40 50516.9 179841 180417 180418 180677 180678 +296 5 41 56385.5 179826 179858 179890 180386 180418 180662 180678 +297 5 42 58931.2 179858 180386 180662 +298 5 43 48616.5 179810 179842 179874 180386 180402 180662 +299 5 44 53718 179842 179875 180402 180662 +300 5 45 57317 179827 179875 180402 180695 +301 5 46 47096.4 179827 179843 179875 179891 180387 180402 180695 +302 5 47 31962.3 179843 179859 179891 179907 180387 180403 180695 +303 5 48 7551.95 179859 179907 180403 180695 +304 5 49 49731.1 179860 179908 180403 180404 180695 180696 +305 5 50 53274.7 179844 179860 179892 179908 180388 180404 180696 +306 5 51 18176.8 179844 179892 180388 180696 +307 5 52 51259.8 179828 179876 179892 180388 180405 180696 +308 5 53 44651.7 179829 179876 180405 180696 +309 5 54 20650.4 179829 179861 180405 180665 +310 5 55 15459.8 179845 179861 180389 180405 180665 180681 +311 5 56 19247 179845 179877 180389 180421 180665 180666 +312 5 57 63233.8 179862 179877 180421 180422 180666 +313 5 58 62433.2 179862 179894 180422 180666 +314 5 59 31868.2 179846 179894 179910 180422 180437 180666 180682 +315 5 60 65845.2 179878 179910 180406 180437 180650 180682 +316 5 61 38995 179863 179878 180391 180406 180650 180682 180683 +317 5 62 42094.1 179863 179879 180391 180683 +318 5 63 34964.2 179831 179879 180391 180683 +319 5 64 36415.3 179847 179895 180391 180683 +320 6 1 54640 179847 179848 180391 180392 180684 +321 6 2 69809.3 179832 179848 180392 180684 +322 6 3 66886.5 179816 179832 180392 180684 +323 6 4 52807.2 179800 179816 179864 179865 180392 180409 180684 +324 6 5 57327.3 179800 179833 179865 180409 180669 +325 6 6 16413.5 179833 180409 180669 180685 +326 6 7 60907.2 179817 179833 179849 179881 180409 180425 180426 180685 +327 6 8 70500.6 179834 179849 180426 180685 +328 6 9 76202 179834 179866 180394 180426 180670 +329 6 10 66276.3 179818 179866 180394 180670 +330 6 11 38348.1 179818 179850 180410 180670 +331 6 12 39437.4 179819 179835 179850 179883 180410 180670 180702 +332 6 13 46880.6 179835 179883 180410 180702 +333 6 14 58595.6 179835 179851 180395 180702 +334 6 15 68597 179803 179851 179867 180395 180411 180702 +335 6 16 61522.2 179803 179867 180411 180702 +336 6 17 77003.8 179804 179868 180412 180703 +337 6 18 40750.4 179788 179852 179868 180396 180412 180703 +338 6 19 48880.8 179836 179852 180396 180413 180703 +339 6 20 70655.7 179820 179836 179884 180413 180673 180703 +340 6 21 61091.8 179820 179837 180413 180673 +341 6 22 42391.8 179805 179837 180397 180413 180673 +342 6 23 32341.7 179789 179805 179853 180397 180673 +343 6 24 47399 179821 179853 180397 180673 +344 6 25 50183.6 179821 179838 179870 180414 180430 180658 180674 +345 6 26 31921.9 179838 179854 179870 180414 180430 180658 180674 +346 6 27 32201 179806 179854 180414 180658 +347 6 28 43394.8 179806 179822 179886 180414 180658 +348 6 29 59697.1 179822 179823 180399 180414 180691 +349 6 30 61105 179823 179839 180399 180691 +350 6 31 49726.2 179807 179839 179855 180383 180399 180691 +351 6 32 45557.7 179776 179807 179840 179855 180368 180383 180384 180399 180691 +352 6 33 20054.6 179776 179840 180368 180384 180676 +353 6 34 38202.5 179776 179824 180368 180384 180676 +354 6 35 30007.4 179808 179824 180384 180676 +355 6 36 35010 179792 179808 180401 180661 180676 +356 6 37 48121.7 179792 179793 179825 179857 180401 180661 +357 6 38 32919.9 179793 179809 179825 180401 180661 +358 6 39 52485 179809 179841 180401 180661 180677 +359 6 40 45889.4 179761 179809 179826 179841 180385 180386 180418 180645 180662 +360 6 41 40946.5 179794 179826 179858 180386 180662 +361 6 42 69824 179794 179810 179858 180386 180662 +362 6 43 67846.2 179778 179810 179811 179842 180386 180402 180662 +363 6 44 38276.6 179811 179842 180402 180662 +364 6 45 33408.7 179811 179827 180402 180662 180695 +365 6 46 38122.8 179763 179779 179827 179843 180355 180387 180402 180695 +366 6 47 40231.8 179779 179843 179859 180371 180387 180679 180695 +367 6 48 23355.4 179795 179859 180371 180403 180679 180695 +368 6 49 72784 179796 179860 180371 180372 180403 180404 180679 180680 180695 180696 +369 6 50 62036 179780 179796 179844 179860 180372 180388 180404 180680 180696 +370 6 51 23154.2 179780 179828 179844 180372 180388 180696 +371 6 52 63810 179828 180405 180696 +372 6 53 49847.4 179812 179828 179829 179876 180405 180665 180696 +373 6 54 43163.3 179797 179812 179829 180405 180665 +374 6 55 38016.4 179797 179845 180389 180665 +375 6 56 49689 179781 179797 179813 179845 180389 180665 +376 6 57 89980.9 179813 179862 180389 180422 180665 180666 +377 6 58 68947.3 179830 179862 180406 180422 180666 +378 6 59 32343.1 179830 179846 180406 180650 +379 6 60 59004.8 179798 179814 179846 179878 180406 180650 +380 6 61 54228.2 179814 179815 179863 179878 180406 180650 180683 +381 6 62 59638.4 179815 179831 180391 180683 +382 6 63 52393.5 179831 180391 180683 +383 6 64 47113 179847 180391 180683 +384 7 1 8603.73 179784 179799 180375 180376 180684 +385 7 2 27087.6 179784 179832 180376 180392 180684 +386 7 3 39416 179768 179784 179816 179832 180376 180392 180684 +387 7 4 37675.7 179768 179800 179816 180376 180392 180409 180669 180684 +388 7 5 30090.9 179800 179801 180409 180669 +389 7 6 46084.3 179785 179801 179817 179833 180409 180669 +390 7 7 72115.6 179785 179817 180409 180669 +391 7 8 34765.6 179769 179817 179834 180393 180394 180653 180670 +392 7 9 67543.7 179802 179834 180394 180670 +393 7 10 70004.7 179786 179802 179818 180394 180670 +394 7 11 37685 179786 179818 179819 180394 180410 180670 +395 7 12 46124.6 179755 179819 180363 180410 180670 +396 7 13 52738.8 179755 179771 179835 180363 180410 180687 180702 +397 7 14 29060.2 179771 179787 179835 180379 180687 180702 +398 7 15 36457.1 179787 179803 180379 180687 +399 7 16 50821 179803 180379 180380 180687 +400 7 17 28030.7 179804 180380 180688 +401 7 18 63773.2 179788 180380 180688 +402 7 19 45910.2 179772 179788 179836 180364 180688 180703 +403 7 20 56983.4 179756 179772 179820 179836 180364 180413 180657 180673 180688 180703 +404 7 21 55617.1 179756 179773 179820 180364 180397 180413 180673 +405 7 22 8599.78 179773 179805 180397 180673 +406 7 23 31212.4 179773 179789 179805 180397 180673 +407 7 24 51440.3 179774 179789 179821 180397 180398 180642 180673 +408 7 25 32114 179774 179838 180398 180642 +409 7 26 34397.3 179790 179838 180414 180658 +410 7 27 67853.9 179790 179806 180414 180658 +411 7 28 72031.3 179758 179791 179806 179822 180382 180414 180658 +412 7 29 45574.6 179791 179822 179823 180382 180383 180658 180691 +413 7 30 24185.3 179791 179807 180383 180691 +414 7 31 18953.7 179807 180383 180691 +415 7 32 14339.7 179776 179807 180368 180383 180691 +416 7 33 9752.09 179776 180368 180676 +417 7 34 25968.1 179776 180368 180676 +418 7 35 32521.7 179760 180368 180676 +419 7 36 40640.7 179760 179792 179808 180369 180661 +420 7 37 44969.4 179745 179792 179793 180369 180401 180661 +421 7 38 52655.9 179777 179793 180401 180661 +422 7 39 52032.9 179761 179777 179809 180385 180401 180645 180661 +423 7 40 26729.5 179761 180385 180645 +424 7 41 44532 179761 179794 179826 180385 180386 180645 180662 +425 7 42 37247.7 179778 179794 179810 180386 180662 +426 7 43 13592.3 179778 180386 180662 +427 7 44 30151.1 179747 179778 179811 180355 180370 180402 180646 180662 +428 7 45 52997.2 179747 179763 179811 180355 180646 180679 +429 7 46 52831.2 179715 179763 179779 180355 180679 +430 7 47 36424.4 179731 179779 180371 180679 +431 7 48 21755.5 179731 179795 180371 180679 +432 7 49 37776.8 179732 179796 180371 180372 180679 180680 +433 7 50 35951.2 179732 179780 179796 180372 180680 +434 7 51 48890 179732 179764 179780 180372 180680 +435 7 52 80631.4 179748 179764 179828 180356 180680 +436 7 53 57286.2 179748 179812 180356 180405 180649 180665 +437 7 54 23430.1 179765 179812 180389 180405 180665 +438 7 55 38351.1 179765 179781 179797 180389 180665 +439 7 56 52713 179781 179813 180389 180665 +440 7 57 25081.6 179766 179813 180389 180390 180634 180665 +441 7 58 39730.1 179766 179782 179830 180390 180406 180634 180650 +442 7 59 37610.6 179782 179798 179830 179846 180406 180650 +443 7 60 63559.2 179798 179814 180406 180650 +444 7 61 59853.6 179783 179814 179815 180374 180406 180650 +445 7 62 40230.7 179783 179815 180375 180391 180683 +446 7 63 18390.9 179799 179831 180375 180391 180683 +447 7 64 4060.75 179799 180375 180683 +448 8 1 29778.3 179784 179799 180375 180376 180668 180684 +449 8 2 23414.6 179784 180376 180668 180684 +450 8 3 22815.2 179768 180376 180668 180684 +451 8 4 30750.1 179768 180377 180669 180684 +452 8 5 36539.6 179753 179801 180377 180669 +453 8 6 69790.7 179753 179785 179801 180377 180409 180669 +454 8 7 37900.5 179769 179785 180393 180409 180653 180669 +455 8 8 25703.5 179769 180393 180653 +456 8 9 28848.5 179769 179770 179802 180393 180394 180653 180670 +457 8 10 47811.5 179786 180394 180670 +458 8 11 41748.7 179786 180378 180394 180654 180670 +459 8 12 24749.4 179755 179786 180363 180378 180654 +460 8 13 37493 179723 179755 179771 180363 180654 180687 +461 8 14 49511.6 179723 179739 179771 180363 180379 180687 +462 8 15 39480.7 179739 180379 180687 +463 8 16 24543.7 179739 180379 180380 180687 +464 8 17 7454.92 179740 180380 180688 +465 8 18 12258.3 179740 180380 180688 +466 8 19 27133.1 179724 179772 180364 180688 +467 8 20 38698.4 179724 179756 179772 180364 180657 +468 8 21 38788.9 179756 179773 180381 180657 +469 8 22 17863.8 179773 180381 180397 180657 180673 +470 8 23 16152.7 179757 179773 180397 180398 180642 180673 +471 8 24 28923.7 179757 179774 179789 180398 180642 +472 8 25 42809 179774 180398 180642 +473 8 26 43370.5 179742 179774 179790 180366 180398 180414 180642 180658 +474 8 27 30954.6 179758 179790 180382 180658 +475 8 28 16186.4 179758 180382 180658 +476 8 29 38675.4 179791 180382 180658 180659 180691 +477 8 30 24080.7 179791 180383 180675 +478 8 31 25933.6 179807 180383 180675 +479 8 32 41491.9 179776 179807 180368 180383 180675 +480 8 33 32305.4 179776 180368 180660 +481 8 34 31296.4 179760 179776 180368 180660 +482 8 35 31939.6 179760 180368 180369 180644 180660 +483 8 36 34647.6 179745 179760 180369 180644 180661 +484 8 37 26187 179745 180369 180661 +485 8 38 50063.2 179729 179745 179777 180353 180369 180645 180661 +486 8 39 43506.6 179729 179761 180353 180385 180645 +487 8 40 41009.1 179761 179762 180385 180645 +488 8 41 32856.9 179762 180385 180645 +489 8 42 28039.6 179762 179778 180354 180370 180385 180386 180645 180646 180662 +490 8 43 16388.8 179778 180370 180646 +491 8 44 24462.2 179746 179747 179778 180370 180646 +492 8 45 37689.6 179715 179747 180355 180646 +493 8 46 45102.5 179715 180355 180679 +494 8 47 15051.5 179731 180371 180679 +495 8 48 10873.1 179731 180371 180679 +496 8 49 11269.6 179732 180371 180372 180679 180680 +497 8 50 14182.5 179732 180372 180680 +498 8 51 19467.8 179716 179732 180356 180372 180680 +499 8 52 25683.8 179716 179748 179764 180356 180649 180680 +500 8 53 37176.8 179716 179733 179748 180356 180373 180649 +501 8 54 17590.9 179765 180373 180649 +502 8 55 20587.4 179765 180373 180389 180649 180665 +503 8 56 20845.1 179749 179765 179781 180389 180390 180634 180665 +504 8 57 12623.2 179749 179766 180390 180634 +505 8 58 8833.03 179766 180390 180634 +506 8 59 20810.1 179750 179766 179782 180374 180390 180406 180634 180650 +507 8 60 19355.8 179750 179798 180374 180650 +508 8 61 34908.1 179750 179783 180374 180650 +509 8 62 34762.7 179783 180374 180375 180650 180667 180683 +510 8 63 22947.3 179783 179799 180375 180667 180683 +511 8 64 18516.3 179799 180375 180667 180683 +512 9 1 37038.2 179752 179767 179784 179799 180359 180360 180375 180376 180668 +513 9 2 29322.3 179752 179784 180360 180376 180668 +514 9 3 30265.2 179736 179768 180344 180360 180376 180377 180652 180668 +515 9 4 38432.4 179753 179768 180377 180652 +516 9 5 55771.6 179753 180377 180652 180669 +517 9 6 49723.3 179737 179753 180361 180377 180653 180669 +518 9 7 37853.2 179737 179769 180361 180393 180653 +519 9 8 37854 179769 179770 180393 180653 +520 9 9 44033.3 179770 180362 180393 180638 180653 +521 9 10 41570.9 179770 179786 180362 180378 180638 180654 180670 +522 9 11 35580.4 179754 179786 180378 180654 +523 9 12 37082.2 179723 179754 180363 180378 180654 +524 9 13 34494.2 179723 180363 180654 180687 +525 9 14 48360.4 179723 179739 180363 180379 180687 +526 9 15 40165.3 179739 180347 180379 180687 +527 9 16 40447.5 179707 179739 180347 180348 180379 180380 180687 +528 9 17 15166.2 179708 179740 180348 180380 180688 +529 9 18 15326.4 179724 179740 180348 180364 180380 180688 +530 9 19 28636.3 179724 180364 180657 180688 +531 9 20 31130.9 179724 179741 180364 180381 180657 +532 9 21 53301.4 179741 180381 180657 +533 9 22 42340.8 179725 179741 179773 180365 180381 180657 +534 9 23 32151.2 179757 179773 180365 180381 180641 180642 180657 +535 9 24 34065.4 179757 180365 180398 180641 180642 +536 9 25 45817 179726 179742 179757 179774 180366 180398 180642 +537 9 26 31253.3 179742 180366 180642 +538 9 27 24865.6 179742 179758 180366 180382 180626 180642 180658 180659 +539 9 28 22483.9 179743 179758 180351 180382 180659 +540 9 29 29469.7 179743 179758 179759 179791 180351 180382 180659 +541 9 30 18617.4 179759 180351 180367 180659 180675 +542 9 31 22776.2 179775 180367 180675 +543 9 32 31871.8 179744 179775 180352 180367 180675 +544 9 33 19379.9 179744 180352 180660 +545 9 34 15757.3 179728 179744 180352 180660 +546 9 35 22413.3 179728 180336 180352 180644 180660 +547 9 36 43394 179712 179745 179760 180336 180369 180644 +548 9 37 42687.6 179712 179745 180336 180369 180644 +549 9 38 30213.6 179729 180353 180629 180645 +550 9 39 35177.1 179729 180353 180645 +551 9 40 48824.5 179713 179761 179762 180353 180385 180645 +552 9 41 43333.8 179762 180354 180385 180630 180645 +553 9 42 27300.2 179730 179762 179778 180354 180370 180630 180646 +554 9 43 31548.7 179730 179746 180354 180370 180646 +555 9 44 38411.1 179746 180370 180646 +556 9 45 33677.2 179715 179746 180355 180370 180646 +557 9 46 41499.8 179683 179715 180323 180355 180646 180663 180679 +558 9 47 22383 179683 179699 179731 180323 180339 180371 180663 180679 +559 9 48 30343.1 179699 179731 180339 180371 180663 180679 +560 9 49 32896.9 179700 179732 180339 180340 180371 180372 180663 180664 180679 180680 +561 9 50 19557.4 179700 179732 180340 180372 180664 180680 +562 9 51 26924.9 179684 179716 179732 180324 180356 180372 180664 180680 +563 9 52 16198.9 179716 180356 180649 180680 +564 9 53 22824.6 179716 179733 180356 180373 180649 +565 9 54 18758.7 179733 180373 180649 +566 9 55 29031.7 179717 179733 179749 179765 180357 180373 180633 180649 +567 9 56 45837.2 179749 180357 180390 180633 180634 +568 9 57 29471.2 179749 179766 180390 180634 +569 9 58 7296.01 179734 179766 180358 180390 180634 +570 9 59 5067.48 179734 180358 180634 +571 9 60 24406 179750 180374 180650 180651 +572 9 61 28686.9 179750 179783 180374 180651 +573 9 62 52360 179751 179783 180343 180359 180374 180375 180651 180667 +574 9 63 29041.7 179751 179767 179783 179799 180359 180375 180667 +575 9 64 25251.8 179767 179799 180359 180375 180667 +576 10 1 61605.8 179752 179767 180359 180360 180668 +577 10 2 47939.2 179736 179752 180360 180668 +578 10 3 17675.6 179736 180344 180360 180652 180668 +579 10 4 15078.4 179720 179736 180344 180652 +580 10 5 28864.4 179720 179753 180344 180377 180652 +581 10 6 47564.1 179705 179737 180345 180361 180637 180652 +582 10 7 51413.1 179721 179737 180361 180637 180653 +583 10 8 35052.2 179721 179770 180346 180361 180393 180638 180653 +584 10 9 35316.2 179738 179770 180362 180638 180653 +585 10 10 29562.6 179738 179770 180362 180638 +586 10 11 36908.8 179738 179754 180362 180378 180638 180654 +587 10 12 45038.5 179722 179754 180315 180378 180654 180655 +588 10 13 41723.5 179691 179723 180331 180363 180654 180655 +589 10 14 37956.7 179691 180331 180671 180687 +590 10 15 26846.8 179707 180347 180671 +591 10 16 23735.8 179707 180347 180348 180671 +592 10 17 12849.7 179708 180348 180672 +593 10 18 11824.6 179692 179708 180332 180348 180672 +594 10 19 11897.9 179692 180332 180656 180657 180672 +595 10 20 25451.8 179692 179709 179724 179741 180316 180332 180364 180381 180656 180657 +596 10 21 50610 179709 179741 180316 180381 180656 180657 +597 10 22 55760.9 179725 179741 180365 180381 180641 180657 +598 10 23 42267.1 179725 179757 180365 180641 +599 10 24 36233.9 179725 179726 179757 180349 180365 180641 180642 +600 10 25 51690.9 179726 180349 180366 180626 180641 180642 +601 10 26 43783.1 179726 179742 180366 180626 180642 +602 10 27 20313.9 179710 179742 180350 180366 180626 180659 +603 10 28 21707.7 179743 180351 180659 +604 10 29 21959.4 179743 179759 180351 180659 +605 10 30 15664.8 179759 180351 180367 180659 180675 +606 10 31 32333.3 179759 179775 180335 180367 180675 +607 10 32 46052.3 179696 179727 179744 179775 180320 180335 180352 180367 180675 +608 10 33 25463.8 179696 179744 180320 180352 180660 +609 10 34 22158.1 179728 179744 180320 180352 180660 +610 10 35 27471.2 179712 179728 180336 180644 +611 10 36 54751.5 179712 180336 180644 +612 10 37 48376.5 179697 179712 180336 180337 180629 180644 +613 10 38 54865.8 179697 179729 180337 180353 180629 +614 10 39 45453.3 179713 179729 180353 180629 180645 +615 10 40 40014.5 179713 180338 180353 180613 180630 180645 +616 10 41 29760.8 179698 179713 179730 179762 180338 180354 180630 +617 10 42 21411.8 179730 180354 180630 +618 10 43 31816.9 179682 179730 179746 180322 180354 180370 180630 180646 +619 10 44 35499.9 179714 179746 180307 180370 180646 180647 +620 10 45 33135.3 179683 179714 180307 180323 180647 +621 10 46 38614.1 179683 180323 180647 180663 +622 10 47 39195.1 179683 179699 180323 180339 180663 +623 10 48 33159.8 179699 180339 180663 +624 10 49 32198.1 179700 180339 180340 180663 180664 +625 10 50 33364 179700 180340 180664 +626 10 51 37217.1 179684 180324 180664 +627 10 52 52364.3 179684 180324 180648 +628 10 53 33155.2 179701 179733 180308 180373 180648 180649 +629 10 54 27658.4 179701 179717 179733 180308 180357 180373 180633 180649 +630 10 55 40088.1 179717 180357 180633 +631 10 56 45120 179717 179749 180357 180633 +632 10 57 31178.5 179718 179749 180341 180357 180358 180633 180634 +633 10 58 10420.5 179718 179734 180358 180618 180634 +634 10 59 7353.82 179702 179734 180342 180358 180618 +635 10 60 19594.8 179702 179734 179735 179750 180342 180343 180358 180374 180618 180651 +636 10 61 31995.4 179735 180343 180651 +637 10 62 51349.2 179735 179751 180343 180651 +638 10 63 56059 179751 179767 180359 180667 +639 10 64 37024.6 179767 180359 180667 +640 11 1 33944.7 179704 179719 180327 180328 180636 180668 +641 11 2 51535 179688 179704 179736 179752 180328 180360 180636 180668 +642 11 3 20604.6 179688 179736 180312 180328 180344 180360 180620 180636 180652 180668 +643 11 4 25046.7 179672 179720 180312 180344 180620 180652 +644 11 5 46854.2 179705 179720 180344 180345 180637 180652 +645 11 6 66985.5 179705 180345 180637 +646 11 7 39794.3 179689 179721 179737 180329 180345 180361 180637 +647 11 8 39241.1 179706 179721 180346 180621 180638 +648 11 9 48416.9 179706 179721 179738 180346 180362 180638 +649 11 10 40876.2 179690 179738 180330 180362 180622 180638 +650 11 11 28892.6 179690 179722 179738 180315 180330 180362 180622 180638 180654 180655 +651 11 12 57599.9 179722 180315 180655 +652 11 13 56819 179659 179691 179722 180315 180331 180655 +653 11 14 58982.5 179659 179691 180331 180655 180671 +654 11 15 33107.1 179659 179675 179707 180331 180347 180671 +655 11 16 29548.1 179675 179707 180347 180348 180671 +656 11 17 28983.7 179676 179708 180348 180672 +657 11 18 20320 179660 179676 179692 179708 180332 180348 180672 +658 11 19 16413.1 179660 179692 180332 180656 180672 +659 11 20 19929.5 179644 179709 180316 180656 +660 11 21 31097.4 179677 179709 180316 180333 180625 180656 +661 11 22 47469.3 179677 179725 180333 180365 180625 180641 +662 11 23 66160.8 179677 179693 179725 180333 180349 180365 180625 180641 +663 11 24 57025.9 179693 179726 180349 180610 180641 +664 11 25 54046.6 179693 179694 179726 180334 180349 180610 +665 11 26 30429.2 179694 179710 179726 180334 180350 180366 180626 +666 11 27 17854.2 179710 180350 180626 +667 11 28 30664.2 179678 179695 179710 179743 180318 180319 180350 180351 180626 180627 180659 +668 11 29 66412.8 179695 179743 180319 180351 180627 180659 +669 11 30 70950.9 179711 180319 180335 180627 180643 180659 +670 11 31 60235.5 179711 179727 180335 180643 +671 11 32 33749.1 179696 179727 180320 180335 180643 +672 11 33 17171.4 179696 180320 180628 +673 11 34 19046.7 179680 179696 180320 180628 +674 11 35 36908.4 179664 179680 180304 180612 180644 +675 11 36 59942.7 179664 179712 180304 180336 180612 180644 +676 11 37 67432.4 179665 179697 180305 180337 180597 180629 180644 +677 11 38 72290.6 179681 179697 180337 180629 +678 11 39 69680.2 179681 179713 180321 180337 180338 180613 180629 +679 11 40 52740.7 179649 179681 179698 179713 180321 180338 180613 +680 11 41 50112.8 179698 180338 180613 180630 +681 11 42 36292.7 179666 179682 179698 179730 180306 180322 180338 180354 180614 180630 +682 11 43 25421.4 179682 180322 180614 +683 11 44 34265.2 179635 179682 179714 180307 180322 180614 180647 +684 11 45 28735 179635 179714 180307 180647 +685 11 46 70128 179651 179683 180275 180323 180647 180663 +686 11 47 44881.1 179651 179667 180275 180291 180323 180339 180631 180663 +687 11 48 30920 179667 180291 180339 180631 180663 +688 11 49 31277.7 179668 180291 180292 180339 180340 180631 180632 180663 180664 +689 11 50 29472.1 179652 179668 180276 180292 180340 180632 180664 +690 11 51 46113.2 179652 179684 180276 180324 180648 180664 +691 11 52 50187.8 179636 179652 179684 179701 180308 180324 180648 +692 11 53 44083.6 179636 179701 180308 180648 +693 11 54 52880.3 179669 179701 180308 180325 180617 180648 +694 11 55 67103.4 179669 179717 180325 180357 180617 180633 +695 11 56 50488.6 179685 179717 180341 180357 180633 +696 11 57 33888.6 179685 179718 180341 180602 180633 +697 11 58 24600.6 179686 179718 180326 180341 180342 180358 180602 180618 +698 11 59 21926.4 179686 179702 180342 180618 +699 11 60 27555.2 179702 180342 180618 180651 +700 11 61 54113.6 179687 179735 180311 180343 180619 180651 +701 11 62 77137.7 179687 179703 179735 179751 180311 180343 180619 180651 +702 11 63 71117.1 179703 179719 179751 179767 180327 180359 180635 180667 +703 11 64 23252.8 179719 180327 180635 180667 +704 12 1 69672.3 179656 179671 179704 179719 180295 180296 180327 180328 180636 +705 12 2 43142.9 179640 179656 179688 179704 180296 180328 180636 +706 12 3 23678.1 179672 179688 180312 180620 180636 +707 12 4 36908.6 179672 180312 180620 +708 12 5 56865.2 179672 179673 179705 180312 180313 180345 180605 180620 180637 +709 12 6 59066.7 179641 179673 179689 179705 180313 180345 180605 180637 +710 12 7 50143.6 179657 179689 180329 180345 180621 180637 +711 12 8 69530.3 179657 179689 179706 180329 180346 180621 +712 12 9 51909.1 179674 179706 180314 180346 180606 180621 180622 180638 +713 12 10 44606.7 179674 179690 179706 180314 180330 180346 180622 180638 +714 12 11 45430.7 179658 179690 180330 180622 +715 12 12 51963.2 179643 179658 179722 180267 180315 180330 180622 180655 +716 12 13 54521.3 179643 179659 180267 180315 180331 180623 180655 +717 12 14 51116.2 179611 179659 180283 180331 180623 180639 180655 180671 +718 12 15 55927.9 179611 179627 179659 179675 180283 180299 180639 180671 +719 12 16 63351.9 179627 179675 180299 180300 180639 +720 12 17 88043.3 179628 179676 180300 180640 +721 12 18 66080.9 179612 179628 179660 179676 180284 180300 180640 180672 +722 12 19 34667.1 179612 179644 179660 180268 180284 180332 180624 180656 +723 12 20 28909.6 179644 180268 180316 180624 180656 +724 12 21 31480.3 179644 179645 179677 180301 180316 180333 180625 180656 +725 12 22 69940 179645 179661 179677 180317 180333 180625 +726 12 23 46879.7 179661 179693 180317 180349 180609 180625 180641 +727 12 24 66931.4 179661 179662 179693 180285 180317 180334 180349 180609 180610 +728 12 25 72129 179662 179694 180334 180610 +729 12 26 55256 179646 179662 179694 180302 180334 180350 180578 180610 180626 +730 12 27 43349.6 179646 179678 179694 179710 180318 180350 180594 180626 +731 12 28 46864.2 179678 179695 180318 180319 180594 180627 +732 12 29 87953.2 179647 179695 180287 180319 180627 +733 12 30 88573 179647 179663 179695 179711 180287 180319 180627 180643 +734 12 31 58755 179663 179679 179711 179727 180303 180335 180643 +735 12 32 71667.2 179648 179679 179696 179727 180288 180303 180320 180335 180643 +736 12 33 39587 179648 179696 180288 180320 180628 +737 12 34 43609.1 179632 179680 180272 180288 180304 180320 180612 180628 +738 12 35 50577.6 179616 179632 179664 179680 180272 180304 180612 +739 12 36 54592.2 179616 179664 179665 180272 180304 180305 180597 180612 +740 12 37 76156.4 179665 180305 180597 +741 12 38 52969.9 179633 179665 179681 180289 180305 180337 180581 180597 180629 +742 12 39 67435.1 179633 179649 179681 180289 180321 180581 180613 180629 +743 12 40 65290.8 179649 180321 180613 +744 12 41 60681.9 179634 179666 179698 180274 180306 180338 180598 180613 +745 12 42 46309 179666 180306 180598 180614 +746 12 43 37520.9 179618 179650 179682 180290 180306 180322 180614 +747 12 44 35900.9 179635 179650 180259 180290 180307 180322 180582 180614 180615 180647 +748 12 45 40623.5 179587 179635 180259 180307 180615 180647 +749 12 46 55614.1 179587 179603 179635 179651 180259 180275 180615 +750 12 47 50602.4 179603 179619 179651 179667 180275 180291 180631 +751 12 48 40306.8 179619 179667 180291 180631 +752 12 49 28955.2 179620 179668 180291 180292 180631 180632 +753 12 50 41482 179604 179620 179652 179668 180276 180292 180632 +754 12 51 67176 179604 179652 180276 180616 180632 +755 12 52 63430.2 179588 179636 179652 180260 180276 180308 180616 180648 +756 12 53 49788.3 179636 179637 180260 180293 180308 180325 180585 180616 180617 180648 +757 12 54 78062 179637 179669 180293 180325 180617 +758 12 55 47019.9 179653 179669 180309 180325 180617 +759 12 56 38153.5 179653 179685 180309 180341 180601 180602 180617 180633 +760 12 57 54710.9 179654 179685 180326 180341 180602 +761 12 58 46877.4 179654 179686 180326 180602 180618 +762 12 59 34034.4 179638 179686 179702 180294 180310 180326 180342 180586 180602 180618 +763 12 60 93988.1 179670 179702 180310 180342 180586 180618 +764 12 61 95678.7 179670 179687 180310 180311 180586 180619 +765 12 62 109008 179687 179703 180311 180619 +766 12 63 69527.4 179655 179703 180279 180295 180311 180327 180619 180635 +767 12 64 34517.4 179671 179719 180295 180327 180635 +768 13 1 73944.9 179656 179671 180295 180296 180604 180636 +769 13 2 55830.6 179640 179656 180280 180296 180588 180604 180636 +770 13 3 27858.5 179624 179640 180280 180588 180620 +771 13 4 44867.9 179608 179624 179672 179673 180280 180281 180312 180313 180605 180620 +772 13 5 72225 179608 179609 179641 179673 180281 180313 180605 +773 13 6 95814.4 179641 180297 180313 180589 180605 +774 13 7 84979.8 179625 179641 179657 179689 180297 180329 180589 180621 +775 13 8 92504.5 179625 179642 179657 180282 180297 180329 180606 180621 +776 13 9 61465.6 179642 179674 180282 180314 180606 +777 13 10 65521.2 179626 179674 180266 180314 180606 180622 +778 13 11 64583.2 179626 179658 180266 180298 180314 180330 180590 180622 +779 13 12 80754.9 179595 179610 179643 179658 180267 180298 180590 180623 +780 13 13 72887.1 179595 179643 180267 180623 +781 13 14 50279 179595 179611 180267 180283 180623 180639 +782 13 15 71970.4 179563 179579 179611 179627 180235 180251 180283 180299 180639 +783 13 16 64771.4 179579 179627 180251 180252 180299 180300 180607 180639 +784 13 17 99915.3 179580 179628 180252 180300 180608 180640 +785 13 18 79885.9 179564 179612 179628 180236 180284 180300 180624 180640 +786 13 19 41035.7 179596 179612 180268 180284 180624 +787 13 20 51400.5 179596 179597 179644 180268 180301 180593 180624 +788 13 21 60530.6 179597 179645 180301 180593 +789 13 22 54805.1 179613 179645 180269 180301 180317 180333 180593 180625 +790 13 23 79970.8 179581 179613 179661 180269 180285 180317 180609 180625 +791 13 24 94534.1 179629 179661 180285 180609 +792 13 25 102007 179598 179629 179630 179662 180270 180285 180302 180334 180578 180609 180610 +793 13 26 78463.6 179630 179646 180302 180578 180610 +794 13 27 104382 179614 179646 180254 180286 180302 180318 180578 180594 +795 13 28 59672.7 179614 179631 179678 180286 180318 180594 +796 13 29 80420.9 179631 179647 180286 180287 180579 180594 180595 180627 +797 13 30 87586.6 179647 179663 180287 180595 180627 +798 13 31 76936.2 179599 179615 179663 179679 180255 180271 180287 180303 180595 180611 180643 +799 13 32 81923.6 179584 179615 179648 179679 180256 180271 180288 180303 180611 +800 13 33 58095.2 179584 179648 180256 180288 180596 +801 13 34 79429.1 179568 179632 180240 180256 180272 180288 180580 180596 180612 180628 +802 13 35 62814.4 179616 179632 180272 180580 180612 +803 13 36 53707 179600 179616 180272 180273 180564 180580 180597 180612 +804 13 37 68597.8 179600 179601 179633 179665 180273 180305 180597 +805 13 38 48548.9 179601 179617 179633 180241 180289 180305 180581 180597 +806 13 39 72502.4 179617 180289 180581 180613 +807 13 40 70883.3 179585 179617 179634 179649 180257 180274 180289 180321 180565 180581 180598 180613 +808 13 41 70832.6 179586 179634 179666 180274 180598 +809 13 42 60001.5 179586 179618 179666 180258 180274 180306 180566 180598 180614 +810 13 43 57336.1 179570 179602 179618 179650 180258 180290 180306 180582 180614 +811 13 44 49260.1 179602 179650 180290 180582 +812 13 45 78059.7 179587 179602 180259 180290 180582 180615 +813 13 46 67586.4 179539 179555 179587 179603 180211 180227 180259 180275 180583 180615 +814 13 47 60812.1 179555 179603 179619 180227 180275 180291 180583 180599 180615 180631 +815 13 48 64339.3 179571 179619 180243 180291 180599 180631 +816 13 49 40626.6 179572 179620 180243 180244 180291 180292 180599 180600 180631 180632 +817 13 50 48159.5 179556 179572 179604 179620 180228 180244 180276 180292 180600 180632 +818 13 51 73677.5 179540 179556 179588 179604 180212 180228 180260 180276 180584 180616 180632 +819 13 52 124536 179588 180260 180616 +820 13 53 74330.9 179588 179589 179637 180260 180293 180585 180616 +821 13 54 80416.9 179557 179589 179605 179637 180261 180293 180325 180585 180617 +822 13 55 97354.2 179605 179653 180261 180309 180569 180585 180601 180617 +823 13 56 90797.6 179573 179605 179621 179653 180277 180309 180601 +824 13 57 120578 179590 179621 179654 180262 180277 180326 180601 180602 +825 13 58 67036.4 179622 179654 180294 180326 180570 180602 +826 13 59 81442.1 179622 179638 180294 180310 180570 180586 +827 13 60 106444 179606 179623 179638 179670 180278 180310 180586 +828 13 61 75798.4 179623 179639 179670 179687 180278 180279 180310 180311 180586 180619 +829 13 62 45564.9 179639 179655 180279 180587 180619 +830 13 63 45243.1 179655 180279 180295 180587 180603 180619 180635 +831 13 64 33895.5 179671 180295 180603 180635 +832 14 1 25273 179592 179607 180263 180264 180604 +833 14 2 31145.1 179576 179592 179640 180248 180264 180588 180604 +834 14 3 56312.1 179560 179576 179624 179640 180248 180280 180588 +835 14 4 58833.5 179544 179560 179608 179624 180232 180248 180280 180281 180572 180588 180605 +836 14 5 82564.6 179544 179608 179609 180232 180249 180281 180557 180572 180605 +837 14 6 123054 179577 179609 179625 179641 180249 180281 180297 180557 180589 180605 +838 14 7 100873 179577 179593 179625 180249 180265 180297 180573 180589 +839 14 8 48795.3 179593 179642 180265 180282 180573 180589 180606 +840 14 9 98665.2 179530 179594 179642 180250 180265 180282 180573 180574 180606 +841 14 10 86572.5 179546 179578 179594 179626 180250 180266 180282 180314 180574 180590 180606 +842 14 11 46635.4 179578 179610 179626 180266 180298 180574 180590 +843 14 12 112540 179562 179610 180203 180298 180558 180590 +844 14 13 95142.4 179547 179562 179595 180203 180219 180267 180558 180591 180623 +845 14 14 120504 179547 179563 180219 180235 180591 180623 +846 14 15 92375.5 179515 179531 179563 179579 180235 180251 180607 +847 14 16 61388.9 179531 179579 180251 180252 180607 +848 14 17 65465.8 179532 179580 180252 180608 +849 14 18 110642 179516 179564 180236 180592 180608 +850 14 19 92626.4 179548 179564 180220 180236 180592 180624 +851 14 20 80276.7 179548 179549 179596 179597 180204 180220 180268 180301 180561 180592 180593 180624 +852 14 21 96794 179501 179549 179565 179597 180204 180237 180269 180301 180561 180593 +853 14 22 68291.3 179565 179613 180269 180577 180593 +854 14 23 53091.8 179533 179581 179613 180253 180269 180285 180577 180609 +855 14 24 97258.9 179517 179581 179598 179629 180221 180253 180270 180285 180562 180577 180609 +856 14 25 111508 179598 180270 180562 180578 +857 14 26 102370 179550 179582 179598 179630 180238 180254 180270 180302 180562 180578 +858 14 27 125072 179582 179614 180254 180286 180546 180578 180594 +859 14 28 68585 179566 179567 179614 179631 180222 180239 180254 180286 180546 180579 180594 +860 14 29 82335.8 179567 179583 179631 179647 180239 180255 180286 180287 180579 180595 +861 14 30 128670 179583 179599 180255 180595 +862 14 31 97318.7 179599 179615 180255 180271 180595 180611 +863 14 32 91114.8 179584 179615 180208 180223 180256 180271 180611 +864 14 33 85993.2 179584 180208 180256 180596 +865 14 34 97292.7 179552 179568 180240 180256 180580 180596 +866 14 35 63130.3 179552 180240 180580 +867 14 36 116184 179536 179600 180224 180273 180564 180580 +868 14 37 76786.4 179553 179600 179601 180209 180224 180241 180273 180549 180564 180597 +869 14 38 88945.7 179569 179601 180241 180549 180581 +870 14 39 67683.3 179537 179569 179585 179617 180225 180241 180257 180289 180565 180581 +871 14 40 54410.7 179538 179585 180257 180565 +872 14 41 113807 179538 179586 179634 180210 180242 180257 180274 180534 180565 180566 180598 +873 14 42 98989.9 179522 179570 179586 179618 180242 180258 180566 +874 14 43 73060 179506 179570 180226 180258 180550 180566 180582 +875 14 44 86195.2 179506 179554 179570 179602 180195 180226 180258 180290 180550 180582 +876 14 45 103800 179539 179554 179602 180195 180211 180550 180582 180583 +877 14 46 102198 179491 179507 179539 179555 180211 180227 180583 +878 14 47 57189.5 179507 179555 180227 180583 180599 +879 14 48 57885.4 179523 179571 180243 180599 +880 14 49 49186.3 179524 179572 180243 180244 180599 180600 +881 14 50 40354 179508 179524 179556 179572 180228 180244 180600 +882 14 51 81059.2 179492 179508 179540 179556 180212 180228 180584 +883 14 52 125261 179540 179541 179588 180196 180212 180553 180584 180616 +884 14 53 105724 179541 179589 180196 180293 180553 180585 +885 14 54 142006 179493 179557 179589 180229 180261 180293 180553 180569 180585 +886 14 55 101453 179525 179557 179573 179605 180245 180261 180569 180585 +887 14 56 104048 179509 179573 179621 180213 180245 180262 180277 180554 180569 180601 +888 14 57 112358 179509 179590 179621 180262 180277 180554 180601 +889 14 58 107376 179542 179574 179590 179622 180230 180246 180262 180294 180554 180570 +890 14 59 82902.3 179574 179606 179622 180246 180294 180538 180570 +891 14 60 120503 179558 179606 179623 180231 180246 180278 180538 180570 180571 180586 +892 14 61 113587 179559 179623 180231 180278 180571 180586 180587 +893 14 62 64342.1 179575 179639 180247 180279 180587 +894 14 63 107276 179575 179591 179655 180247 180263 180587 180603 +895 14 64 39145.2 179607 180263 180603 +896 15 1 52243.6 179528 179543 179592 179607 180215 180216 180264 180556 180604 +897 15 2 70484.8 179512 179576 180200 180216 180248 180264 180540 180556 180588 180604 +898 15 3 101974 179480 179496 179560 180184 180200 180248 180540 180588 +899 15 4 64088.4 179480 179544 179561 180184 180232 180524 180572 +900 15 5 106646 179529 179561 180217 180232 180557 180572 +901 15 6 136494 179497 179529 179577 179609 180201 180217 180249 180557 180589 +902 15 7 54741.8 179545 179577 180233 180249 180541 180557 180573 180589 +903 15 8 121830 179513 179530 179545 179593 180185 180218 180233 180265 180542 180573 +904 15 9 105501 179498 179530 179546 179594 180218 180250 180542 180573 180574 +905 15 10 70567.5 179482 179546 180202 180250 180526 180574 +906 15 11 88624.2 179482 179514 179578 180202 180234 180266 180526 180558 180574 180590 +907 15 12 111566 179466 179483 179514 179562 180203 180234 180558 +908 15 13 103402 179483 179499 179547 179562 180139 180155 180203 180219 180558 180559 180591 +909 15 14 107818 179499 179515 179547 180155 180171 180219 180235 180559 180591 +910 15 15 147345 179451 179467 179515 179531 180171 180187 180235 180251 180559 180575 180591 180607 +911 15 16 89665.2 179467 179531 180187 180188 180251 180252 180575 180607 +912 15 17 67851.8 179468 179532 180188 180252 180576 180608 +913 15 18 136214 179452 179516 180172 180236 180560 180576 180592 180608 +914 15 19 141016 179500 179548 180156 180220 180560 180592 +915 15 20 123505 179484 179500 179548 179549 180140 180204 180220 180544 180561 180592 +916 15 21 129546 179453 179484 179501 179549 180204 180237 180529 180561 +917 15 22 107234 179469 179501 179533 179565 180205 180237 180253 180269 180529 180577 +918 15 23 89618.4 179469 179485 179533 180205 180221 180253 180529 180545 180577 +919 15 24 122357 179485 179517 179581 180221 180545 180562 180577 +920 15 25 155343 179517 179518 179550 179598 180190 180221 180238 180270 180530 180545 180562 +921 15 26 141114 179502 179550 179582 180206 180238 180254 180530 180546 180562 180578 +922 15 27 118686 179502 179534 179566 179582 180206 180222 180254 180546 +923 15 28 57475.7 179486 179534 179566 180174 180191 180222 180239 180531 180546 180579 +924 15 29 116709 179486 179503 179567 180191 180239 180531 180579 +925 15 30 96392.1 179503 179519 179583 180191 180207 180255 180547 180595 +926 15 31 118737 179535 180207 180223 180547 180563 180595 +927 15 32 140323 179520 179551 180208 180223 180563 +928 15 33 124708 179504 179520 180208 180548 +929 15 34 47747.6 179488 179504 180192 180208 180532 180548 180580 +930 15 35 55184.7 179472 179488 179536 179552 180176 180192 180224 180240 180516 180532 180564 180580 +931 15 36 124644 179472 179473 179536 179553 180176 180224 180516 180564 +932 15 37 78611.2 179473 179521 179553 180161 180209 180224 180517 180549 180564 +933 15 38 122059 179489 179521 179569 180193 180209 180241 180533 180549 +934 15 39 91584.6 179489 179505 179537 180193 180225 180533 180565 +935 15 40 88162.6 179457 179505 179537 179538 180177 180210 180225 180257 180533 180534 180565 +936 15 41 112272 179490 179522 179538 180210 180534 180566 +937 15 42 93427.5 179442 179474 179490 179522 180178 180194 180210 180242 180502 180518 180534 180566 +938 15 43 121631 179458 179474 179506 179522 180194 180226 180242 180518 180566 +939 15 44 103797 179458 179475 179506 179554 180162 180195 180226 180518 180550 +940 15 45 70375.5 179475 179491 179554 180131 180195 180211 180535 180550 180583 +941 15 46 117887 179427 179491 180147 180211 180551 180583 +942 15 47 73915.6 179443 179507 180163 180227 180551 180567 180583 180599 +943 15 48 31147.6 179459 179523 180179 180567 +944 15 49 100898 179460 179524 180179 180180 180567 180568 +945 15 50 93324.3 179444 179460 179508 179524 180164 180180 180228 180552 180568 180584 180600 +946 15 51 77827.2 179428 179444 179492 179508 180148 180164 180212 180228 180552 180584 +947 15 52 114896 179476 179492 179541 180132 180148 180196 180212 180536 180552 180553 180584 +948 15 53 167485 179445 179476 179493 179541 180132 180196 180229 180553 +949 15 54 142680 179445 179461 179493 179557 180197 180229 180261 180521 180553 180569 +950 15 55 72074.8 179461 179525 180197 180245 180521 180569 +951 15 56 128147 179477 179509 179525 179573 180213 180245 180537 180569 +952 15 57 105043 179477 179509 179510 179590 180182 180213 180230 180262 180537 180554 +953 15 58 135957 179510 179542 180230 180522 180554 +954 15 59 84453.7 179494 179526 179542 179574 180198 180214 180230 180246 180522 180538 180570 +955 15 60 136993 179526 179558 180214 180231 180538 180571 +956 15 61 158429 179478 179495 179558 179559 180183 180231 180523 180571 +957 15 62 116579 179495 179511 179559 179575 180183 180199 180231 180247 180523 180539 180571 180587 +958 15 63 94060.9 179511 179527 179575 179591 180199 180215 180247 180263 180539 180555 180587 180603 +959 15 64 60946.6 179527 179543 179591 179607 180215 180263 180555 180603 +960 16 1 95584.2 179464 179479 179528 179543 180167 180168 180215 180216 180508 180556 +961 16 2 160650 179432 179448 179496 179512 180152 180168 180200 180216 180492 180508 180540 180556 +962 16 3 135795 179416 179432 179480 179496 180136 180152 180184 180200 180524 180540 +963 16 4 105594 179400 179416 179480 179481 180136 180169 180184 180524 180525 +964 16 5 141456 179449 179481 179529 179561 180169 180184 180217 180524 180525 180557 +965 16 6 146344 179417 179449 179497 179529 180137 180169 180201 180217 180493 180525 180541 180557 +966 16 7 175411 179433 179497 179513 179545 180153 180201 180233 180509 180541 +967 16 8 195399 179401 179433 179465 179513 180153 180185 180233 180509 180541 180542 180573 +968 16 9 160391 179402 179450 179465 179498 180138 180185 180186 180218 180510 180542 +969 16 10 154501 179386 179434 179450 179482 179498 180186 180202 180218 180510 180526 180542 +970 16 11 108814 179434 179466 179482 179514 180154 180170 180202 180234 180494 180526 +971 16 12 161055 179418 179466 179483 180139 180170 180234 180526 180543 180558 +972 16 13 211561 179419 179435 179483 179499 180139 180155 180543 180559 +973 16 14 177408 179371 179435 179451 180091 180155 180171 180511 180559 +974 16 15 170450 179387 179451 179467 180107 180171 180187 180511 180527 180559 180575 +975 16 16 121438 179403 179467 180123 180124 180187 180188 180527 180575 +976 16 17 109570 179388 179404 179452 179468 180108 180124 180172 180188 180528 180576 +977 16 18 82260.4 179372 179388 179436 179452 180092 180108 180156 180172 180512 180528 180560 180576 +978 16 19 101664 179372 179420 179436 180092 180140 180156 180512 180544 180560 +979 16 20 191933 179405 179420 179484 180140 180173 180544 +980 16 21 157700 179357 179405 179421 179453 180157 180173 180237 180497 180529 180544 180561 +981 16 22 130686 179373 179421 179453 179469 180157 180189 180205 180237 180481 180497 180529 +982 16 23 158171 179373 179437 179469 179485 180189 180205 180221 180513 180529 180545 +983 16 24 209904 179389 179437 179470 179485 180141 180189 180190 180221 180498 180513 180545 +984 16 25 150725 179406 179438 179470 179518 180158 180190 180238 180498 180530 180545 +985 16 26 136335 179390 179422 179438 179502 179518 180142 180158 180206 180238 180466 180498 180530 +986 16 27 146475 179422 179454 179502 179534 180142 180174 180206 180222 180482 180514 180530 180546 +987 16 28 130788 179374 179423 179454 179486 180126 180174 180191 180514 180531 180546 +988 16 29 170865 179423 179439 179486 179503 180126 180143 180191 180483 180514 180531 +989 16 30 136799 179439 179455 179503 179519 180143 180159 180191 180207 180483 180499 180531 180547 +990 16 31 67834 179455 179471 180159 180175 180499 180515 180547 180563 +991 16 32 83073.1 179456 179487 180112 180127 180160 180175 180515 180563 +992 16 33 157129 179440 179456 180112 180160 180500 180548 +993 16 34 180199 179424 179440 180144 180160 180484 180500 180532 180548 +994 16 35 96311.3 179408 179424 179472 179488 180128 180144 180176 180192 180468 180484 180516 180532 +995 16 36 123975 179392 179408 179472 179473 180113 180128 180161 180176 180468 180516 180517 +996 16 37 100017 179361 179441 179473 180113 180161 180485 180517 180549 +997 16 38 151527 179409 179441 179489 179521 180129 180161 180193 180209 180485 180517 180533 180549 +998 16 39 148072 179377 179393 179425 179489 179505 180129 180145 180193 180225 180469 180501 180533 +999 16 40 86044.7 179393 179425 179457 179505 180145 180177 180501 180534 +1000 16 41 107879 179394 179442 179457 179490 180130 180177 180178 180210 180454 180501 180502 180534 +1001 16 42 91797.8 179378 179442 179474 180178 180194 180486 180502 180518 +1002 16 43 186255 179362 179378 179426 179458 179474 180114 180146 180194 180226 180486 180518 +1003 16 44 46429.8 179362 179410 179458 180146 180162 180470 180518 180535 +1004 16 45 93184.4 179347 179410 179411 179475 180067 180131 180162 180535 +1005 16 46 103498 179347 179363 179411 179427 180067 180083 180131 180147 180487 180503 180535 180551 +1006 16 47 125829 179363 179379 179427 179443 180083 180099 180147 180163 180503 180519 180551 180567 +1007 16 48 125883 179379 179395 179443 179459 180099 180115 180163 180179 180519 180567 +1008 16 49 191094 179396 179460 180115 180116 180179 180180 180519 180520 180567 180568 +1009 16 50 108181 179380 179444 179460 180100 180164 180180 180504 180520 180552 180568 +1010 16 51 158772 179364 179428 179444 180084 180148 180164 180488 180504 180552 +1011 16 52 112421 179348 179412 179428 179476 180068 180132 180148 180488 180536 180552 +1012 16 53 149083 179397 179412 179445 179476 180132 180165 180489 180536 180553 +1013 16 54 166794 179349 179413 179445 179461 180149 180165 180197 180229 180473 180489 180521 +1014 16 55 141946 179365 179413 179429 179461 180181 180197 180505 180521 +1015 16 56 185129 179381 179429 179462 179477 180133 180181 180182 180213 180505 180537 +1016 16 57 132754 179398 179462 179510 180150 180182 180490 180537 +1017 16 58 129851 179398 179430 179494 179510 180150 180182 180198 180230 180490 180522 +1018 16 59 101662 179414 179446 179494 179526 180134 180166 180198 180214 180506 180522 180538 +1019 16 60 119661 179446 179478 179526 180166 180214 180474 180506 180538 +1020 16 61 95100.4 179415 179431 179478 179495 180118 180135 180166 180183 180506 180523 +1021 16 62 137884 179431 179447 179495 179511 180135 180151 180183 180199 180523 180539 +1022 16 63 174492 179447 179463 179511 179527 180151 180167 180199 180215 180491 180507 180539 180555 +1023 16 64 99186.4 179463 179479 179527 179543 180167 180215 180507 180555 +1024 17 1 174502 179368 179384 179399 179448 179464 179479 180119 180120 180168 180460 180508 +1025 17 2 152215 179352 179368 179432 179448 180104 180120 180152 180168 180492 180508 +1026 17 3 144948 179336 179352 179416 179432 180088 180104 180136 180152 180476 180492 180524 +1027 17 4 145108 179289 179320 179336 179369 179400 179416 180072 180088 180121 180136 180461 180476 180524 180525 +1028 17 5 166175 179337 179369 179400 179449 180073 180121 180169 180461 180493 180525 +1029 17 6 85322 179305 179337 179385 179417 180073 180137 180493 +1030 17 7 206075 179321 179385 179401 179433 180105 180137 180153 180201 180477 180509 180541 +1031 17 8 215541 179321 179353 179401 179465 180089 180105 180153 180185 180462 180477 180509 +1032 17 9 197051 179290 179338 179353 179402 180089 180106 180138 180462 180509 180510 +1033 17 10 151483 179274 179322 179338 179386 179450 180106 180122 180138 180186 180462 180494 180510 +1034 17 11 176673 179306 179322 179370 179386 179434 180090 180122 180154 180478 180494 180526 +1035 17 12 178299 179306 179354 179370 179418 180059 180090 180154 180170 180478 180494 180543 +1036 17 13 193295 179291 179354 179355 179418 179419 180059 180075 180139 180170 180495 180543 +1037 17 14 197772 179291 179307 179355 179371 180011 180075 180091 180495 180511 +1038 17 15 242756 179307 179323 179387 180011 180027 180091 180107 180463 180511 180527 +1039 17 16 210458 179339 179403 180043 180044 180123 180124 180463 180479 180480 180527 +1040 17 17 211024 179324 179340 179388 179404 180028 180044 180108 180124 180464 180480 180528 +1041 17 18 181322 179308 179324 179372 179388 180012 180028 180092 180108 180464 180512 180528 +1042 17 19 157977 179292 179308 179356 179372 180012 180076 180092 180496 180512 +1043 17 20 207424 179276 179292 179341 179356 179405 179420 180060 180076 180140 180173 180496 180497 180544 +1044 17 21 229047 179293 179341 179357 179405 180060 180093 180157 180173 180481 180497 180544 +1045 17 22 191167 179293 179309 179357 179373 179421 180077 180093 180125 180157 180481 180497 180513 +1046 17 23 149353 179261 179309 179325 179373 179389 180109 180125 180141 180189 180465 180481 180513 +1047 17 24 155969 179277 179325 179358 179389 180094 180109 180141 180465 180498 180513 +1048 17 25 175588 179278 179326 179358 179406 180046 180094 180110 180158 180465 180466 180498 +1049 17 26 189867 179310 179326 179390 179406 179438 180062 180110 180142 180158 180466 180498 180530 +1050 17 27 159554 179310 179342 179390 179422 180062 180078 180142 180466 180482 +1051 17 28 188019 179294 179342 179374 179423 179454 180078 180079 180126 180174 180482 180514 +1052 17 29 215284 179294 179343 179359 179423 179439 180079 180095 180126 180143 180483 180514 180531 +1053 17 30 234329 179359 179375 179439 179455 180095 180111 180143 180159 180483 180499 +1054 17 31 180398 179311 179375 179391 180047 180063 180111 180127 180499 180515 +1055 17 32 269922 179296 179311 179327 179376 179391 179407 180048 180063 180112 180127 180467 180515 +1056 17 33 179608 179280 179296 179360 179376 180048 180112 180452 180500 +1057 17 34 144913 179264 179280 179344 179360 180032 180096 180484 +1058 17 35 124019 179312 179328 179344 179408 179424 180080 180096 180128 180468 180484 +1059 17 36 173646 179281 179312 179361 179392 180064 180080 180113 180128 180453 180468 180517 +1060 17 37 153593 179281 179329 179361 179409 180017 180064 180065 180113 180129 180453 180485 180517 +1061 17 38 147698 179297 179329 179377 179409 180049 180065 180097 180129 180485 +1062 17 39 160361 179297 179313 179377 179393 179425 180033 180049 180097 180129 180145 180469 180501 +1063 17 40 177277 179265 179313 179345 179393 180033 180081 180097 180145 180454 180469 180501 +1064 17 41 149707 179282 179330 179345 179394 180050 180081 180098 180130 180454 180502 +1065 17 42 136279 179266 179314 179330 179378 180098 180114 180130 180178 180454 180486 180502 +1066 17 43 157835 179250 179298 179314 179362 179378 180066 180082 180114 180146 180470 180486 +1067 17 44 149089 179298 179346 179362 179410 180051 180082 180146 180162 180470 180486 180535 +1068 17 45 153577 179267 179283 179346 179347 180051 180067 180470 180487 180535 +1069 17 46 171323 179283 179299 179347 179363 179987 180003 180067 180083 180487 180503 +1070 17 47 172461 179299 179315 179363 179379 180003 180019 180083 180099 180455 180503 180519 +1071 17 48 252562 179251 179315 179331 179379 179395 180019 180035 180099 180115 180455 180471 180519 +1072 17 49 238462 179252 179332 179396 180035 180036 180115 180116 180456 180472 180519 180520 +1073 17 50 177241 179300 179316 179380 180004 180020 180084 180100 180456 180504 180520 +1074 17 51 181845 179284 179300 179348 179364 179988 180004 180068 180084 180488 180504 +1075 17 52 218622 179268 179284 179333 179348 180052 180068 180488 180536 +1076 17 53 193912 179285 179333 179349 179397 180052 180085 180149 180165 180489 180536 +1077 17 54 143637 179237 179285 179301 179349 179413 180069 180085 180117 180149 180473 180489 +1078 17 55 187779 179253 179301 179317 179365 180101 180117 180133 180181 180473 180505 +1079 17 56 185595 179269 179317 179350 179381 180086 180101 180133 180457 180505 +1080 17 57 147736 179270 179350 179381 179398 179462 180038 180086 180133 180150 180182 180457 180458 180490 +1081 17 58 205363 179318 179382 179398 179430 180102 180134 180150 180458 180490 180522 +1082 17 59 144355 179302 179334 179382 179414 180054 180070 180102 180134 180458 180474 +1083 17 60 175540 179334 179366 179414 179446 180070 180118 180134 180166 180474 180506 +1084 17 61 126367 179286 179335 179366 179415 180071 180087 180118 180135 180475 180506 180523 +1085 17 62 108719 179335 179351 179367 179431 179447 180087 180103 180135 180151 180475 180491 180523 +1086 17 63 143769 179367 179383 179447 179463 180103 180151 180491 +1087 17 64 184965 179383 179399 179463 179479 180119 180167 180459 180507 +1088 18 1 244661 179192 179208 179223 179288 179304 179319 179976 179991 179992 180055 180056 180460 180508 +1089 18 2 268193 179176 179192 179272 179288 179352 179960 179992 180040 180056 180104 180492 180508 +1090 18 3 155882 179240 179256 179272 179336 179352 180024 180040 180088 180104 180476 180492 +1091 18 4 188016 179224 179240 179289 179320 180008 180024 180072 180088 180461 180476 +1092 18 5 224633 179161 179209 179224 179257 179289 179337 179369 180008 180025 180072 180073 180461 180493 +1093 18 6 170006 179177 179209 179241 179257 179305 179337 179993 180025 180057 180073 180493 +1094 18 7 185232 179193 179241 179273 179305 179321 179385 179977 180041 180057 180105 180477 +1095 18 8 148446 179193 179225 179273 179290 179353 179961 179978 180009 180041 180089 180462 180477 +1096 18 9 179817 179146 179225 179226 179274 179290 179338 179978 180009 180058 180089 180106 180462 +1097 18 10 225151 179210 179226 179274 179322 179338 180010 180042 180058 180106 180122 180462 +1098 18 11 146826 179194 179210 179258 179306 179322 179962 180042 180074 180090 180122 180478 180494 +1099 18 12 167106 179178 179242 179275 179306 179354 179962 179979 179994 180026 180059 180090 180478 +1100 18 13 178623 179195 179211 179275 179291 179979 179995 180059 180075 180495 +1101 18 14 211073 179211 179227 179291 179307 179995 180011 180075 180495 180511 +1102 18 15 185401 179147 179163 179227 179243 179307 179323 179963 180011 180027 180463 +1103 18 16 124848 179163 179179 179243 179259 179339 179963 180027 180043 180044 180463 180479 180480 +1104 18 17 220495 179164 179180 179244 179260 179324 179964 180028 180044 180464 180480 +1105 18 18 253313 179148 179164 179228 179244 179308 179324 180012 180028 180464 +1106 18 19 137633 179212 179228 179292 179308 179996 180012 180076 180496 180512 +1107 18 20 191813 179165 179196 179212 179229 179276 179292 179980 179996 180029 180060 180076 180496 +1108 18 21 315257 179165 179181 179229 179245 179293 179341 179981 179997 180029 180060 180077 180093 +1109 18 22 223931 179181 179197 179245 179309 179981 180045 180077 180125 180481 +1110 18 23 158999 179133 179197 179213 179261 179325 180013 180045 180061 180109 +1111 18 24 183515 179149 179213 179230 179277 179965 179966 180046 180061 180094 180465 +1112 18 25 220242 179150 179198 179230 179278 179358 179966 179982 180014 180046 180094 +1113 18 26 171132 179182 179198 179246 179310 179326 179982 180014 180062 180110 180466 +1114 18 27 74731.9 179182 179214 179246 179262 179310 179342 179998 180030 180062 180078 180482 +1115 18 28 125425 179166 179214 179247 179262 179294 180015 180030 180079 +1116 18 29 180363 179247 179263 179294 179343 180015 180031 180079 180095 180483 +1117 18 30 167694 179183 179199 179263 179279 179295 179359 180031 180047 180095 +1118 18 31 207153 179199 179215 179295 179311 179983 179999 180047 180063 +1119 18 32 261479 179200 179215 179231 179296 179311 179327 179967 179968 179983 180048 180063 180467 +1120 18 33 197973 179184 179200 179280 179296 179968 179984 180048 180452 +1121 18 34 176867 179168 179184 179264 179280 179952 180032 +1122 18 35 181969 179152 179232 179248 179312 179328 180016 180080 180468 +1123 18 36 178386 179216 179232 179281 179312 180000 180016 180064 180080 180468 +1124 18 37 83102.7 179153 179201 179216 179249 179281 180000 180017 180064 +1125 18 38 127611 179169 179201 179233 179297 179329 179985 180017 180049 180065 180485 +1126 18 39 186478 179169 179185 179233 179265 179313 179969 180033 180049 180097 180469 +1127 18 40 226821 179137 179185 179217 179265 179282 179345 179953 179970 180001 180033 180081 +1128 18 41 190650 179154 179217 179218 179282 179970 180001 180050 180081 180454 +1129 18 42 245031 179138 179202 179218 179266 180002 180034 180050 180098 +1130 18 43 143342 179122 179186 179202 179250 179314 179954 180034 180066 180114 +1131 18 44 219164 179170 179186 179234 179267 179298 179954 179986 180018 180051 180066 180082 180470 +1132 18 45 179138 179170 179187 179203 179267 179283 179971 179987 180018 180051 180487 +1133 18 46 181971 179123 179139 179203 179219 179283 179299 179987 180003 +1134 18 47 153604 179139 179155 179219 179235 179955 180003 180019 180455 +1135 18 48 122954 179155 179171 179235 179251 179955 180019 180035 180455 180471 +1136 18 49 189635 179156 179172 179236 179252 179956 180020 180035 180036 180456 180472 +1137 18 50 205229 179140 179156 179220 179236 179956 180004 180020 180456 +1138 18 51 187766 179124 179140 179204 179220 179284 179300 179988 180004 +1139 18 52 211781 179188 179204 179268 179284 179972 179988 180052 180488 +1140 18 53 192106 179157 179221 179268 179285 179972 179973 179989 180021 180052 180085 +1141 18 54 190938 179109 179173 179189 179237 179285 179301 179973 180037 180069 180085 180117 180473 +1142 18 55 207658 179141 179189 179205 179237 179253 179301 180005 180037 180053 180069 180101 180117 180473 +1143 18 56 197063 179125 179205 179222 179253 179269 179317 179957 179958 180053 180086 180101 180457 +1144 18 57 270887 179142 179190 179222 179269 179270 179350 179958 179974 180038 180053 180086 180457 +1145 18 58 290831 179190 179238 179270 179318 179974 180006 180038 180054 180102 180458 +1146 18 59 241034 179174 179206 179238 179302 179334 179990 180022 180054 180070 180458 180474 +1147 18 60 160529 179158 179206 179254 179286 179334 180007 180022 180070 180071 180474 +1148 18 61 160213 179239 179255 179286 179335 180007 180071 180087 180475 +1149 18 62 128899 179255 179271 179335 179351 180023 180087 180475 +1150 18 63 226903 179191 179207 179287 179303 179367 179959 180039 180103 180491 +1151 18 64 216021 179207 179223 179303 179319 179959 179975 179991 180055 180459 180507 +1152 19 1 333601 178968 178984 179048 179096 179112 179128 179143 179192 179208 179223 179976 179991 179992 +1153 19 2 240631 179000 179032 179048 179176 179192 179960 +1154 19 3 182216 178952 179016 179144 179160 179240 179256 180024 +1155 19 4 189205 178952 179064 179080 179144 179224 179240 180008 +1156 19 5 314259 178969 178985 179033 179080 179129 179161 179209 179224 179257 180008 180025 +1157 19 6 143180 179001 179065 179097 179113 179129 179177 179209 179993 180025 +1158 19 7 280457 179017 179081 179113 179145 179177 179193 179241 179977 180057 +1159 19 8 88729.6 178953 179049 179081 179145 179146 179193 179225 179961 180041 +1160 19 9 84844.5 178954 179049 179050 179146 179162 179225 179226 179978 180058 +1161 19 10 170591 179002 179082 179098 179130 179162 179210 180010 +1162 19 11 218777 178986 179066 179114 179130 179194 179210 179962 180074 +1163 19 12 324177 178970 178986 179018 179034 179114 179178 179194 179242 179962 179994 180026 +1164 19 13 254985 178971 178987 179003 179034 179083 179115 179178 179195 179211 179979 179995 +1165 19 14 89511.4 179003 179019 179051 179131 179147 179211 179995 +1166 19 15 168022 179035 179051 179099 179147 179163 179963 +1167 19 16 190309 178955 179035 179067 179163 179179 179963 +1168 19 17 180566 178956 179052 179084 179164 179180 179964 +1169 19 18 157614 179052 179068 179100 179148 179164 +1170 19 19 218445 178988 179004 179036 179116 179132 179148 179212 179996 +1171 19 20 176386 178972 178988 179020 179116 179165 179196 179980 +1172 19 21 217575 178957 178989 179020 179101 179165 179181 179981 179997 +1173 19 22 143105 178957 179021 179037 179069 179101 179117 179181 179197 179981 180077 +1174 19 23 220129 178973 179005 179053 179069 179085 179117 179133 179197 180013 +1175 19 24 148537 178973 179053 179054 179133 179149 179213 179230 179965 179966 180061 +1176 19 25 218031 178974 179054 179086 179149 179150 179198 179230 179966 179982 +1177 19 26 242254 178974 179022 179086 179118 179182 179198 +1178 19 27 137175 178958 179006 179070 179102 179134 179182 179214 179998 +1179 19 28 181259 178958 178959 178990 179038 179087 179134 179166 179247 180015 +1180 19 29 159792 178959 179071 179087 179167 179247 179263 180015 +1181 19 30 160240 179007 179039 179167 179183 +1182 19 31 179525 179023 179039 179055 179103 179199 179215 179999 +1183 19 32 247443 178975 178991 179055 179119 179120 179135 179151 179200 179215 179231 +1184 19 33 312589 178960 178976 179040 179088 179104 179120 179184 179200 +1185 19 34 202372 178992 179008 179024 179040 179152 179168 179184 +1186 19 35 180748 178944 179008 179136 179152 +1187 19 36 155355 178944 178977 179056 179072 179136 179153 179216 180000 +1188 19 37 262653 178961 178977 179025 179072 179121 179153 +1189 19 38 236865 178993 179057 179089 179105 179121 179169 179201 +1190 19 39 208826 179009 179073 179105 179137 179169 179185 179969 +1191 19 40 164735 178945 179041 179073 179137 179154 179217 179953 +1192 19 41 150932 178946 179041 179042 179138 179154 179970 +1193 19 42 148217 178946 178994 179074 179090 179122 179138 179202 +1194 19 43 166774 178978 179058 179074 179106 179122 179186 179954 +1195 19 44 170277 178962 178978 179010 179026 179106 179170 179186 179954 179986 +1196 19 45 230065 178963 178979 179026 179075 179107 179170 179187 179971 +1197 19 46 103941 178995 179011 179043 179107 179123 179139 +1198 19 47 116247 179027 179043 179091 179139 179155 +1199 19 48 112921 178947 179027 179059 179155 179171 179955 +1200 19 49 63539.4 178948 179044 179076 179156 179172 179956 +1201 19 50 258674 179044 179060 179092 179140 179156 179956 +1202 19 51 288856 178980 178996 179028 179060 179124 179140 +1203 19 52 158597 178964 178980 179012 179108 179124 179157 179188 179972 +1204 19 53 250306 178949 178981 179012 179093 179157 179173 179973 179989 +1205 19 54 196581 178949 179013 179029 179093 179109 179173 179973 +1206 19 55 188411 178965 178997 179061 179077 179109 179141 179189 180005 +1207 19 56 88437.7 178965 179045 179125 179141 179205 179957 180053 +1208 19 57 124368 178966 179046 179078 179125 179142 179222 179958 179974 +1209 19 58 242187 178966 179014 179078 179110 179142 179174 179190 179974 +1210 19 59 247304 178998 179062 179094 179110 179126 179174 179206 179990 +1211 19 60 306364 178950 178982 178998 179030 179079 179126 179158 179206 180022 +1212 19 61 201780 178951 179063 179079 179158 179159 179239 179255 180007 +1213 19 62 124458 178999 179031 179159 179175 179255 180023 +1214 19 63 250774 179015 179031 179047 179095 179175 179191 179207 179959 +1215 19 64 266569 178967 178983 179047 179111 179127 179143 179207 179223 179959 179975 179991 +1216 20 1 27188.6 178968 178984 +1217 20 2 0 +1218 20 3 515.414 178952 +1219 20 4 7619.88 178952 179064 +1220 20 5 52610.4 178969 178985 179033 +1221 20 6 584.334 179001 +1222 20 7 6032.81 179017 +1223 20 8 21492.3 178953 179049 +1224 20 9 19614 178954 179050 +1225 20 10 3724.84 178954 179002 +1226 20 11 968.486 178986 +1227 20 12 11871.3 178970 179018 +1228 20 13 28228.5 178971 178987 +1229 20 14 1639.25 179003 +1230 20 15 5882.9 179035 +1231 20 16 21118.9 178955 +1232 20 17 29534.5 178956 +1233 20 18 0 +1234 20 19 8577.06 178988 +1235 20 20 16747 178972 178988 179020 +1236 20 21 24543.4 178957 178989 179020 +1237 20 22 5230.84 178957 +1238 20 23 4693.15 178973 +1239 20 24 4829.87 179053 +1240 20 25 20585 178974 179054 +1241 20 26 5816.88 178974 +1242 20 27 0 +1243 20 28 10422.4 178958 178990 +1244 20 29 12260.6 178959 +1245 20 30 0 +1246 20 31 0 +1247 20 32 0 +1248 20 33 0 +1249 20 34 0 +1250 20 35 1477.85 178944 +1251 20 36 0 +1252 20 37 2042.97 178961 +1253 20 38 0 +1254 20 39 0 +1255 20 40 2307.94 178945 +1256 20 41 9454.54 178946 +1257 20 42 0 +1258 20 43 0 +1259 20 44 0 +1260 20 45 6643.24 178963 +1261 20 46 0 +1262 20 47 0 +1263 20 48 17622.1 178947 +1264 20 49 1263.59 178948 +1265 20 50 0 +1266 20 51 0 +1267 20 52 6962.18 178964 178980 +1268 20 53 8543.91 178949 179012 +1269 20 54 6928.47 178949 +1270 20 55 0 +1271 20 56 2418.47 178965 179045 +1272 20 57 450.914 178966 179046 +1273 20 58 1763.63 178966 +1274 20 59 5197.08 178998 +1275 20 60 44834 178950 178982 +1276 20 61 20197.2 178951 179063 +1277 20 62 485.636 178999 +1278 20 63 7338.78 179015 +1279 20 64 25757.2 178967 178983 +1280 21 1 0 +1281 21 2 0 +1282 21 3 0 +1283 21 4 0 +1284 21 5 0 +1285 21 6 0 +1286 21 7 0 +1287 21 8 0 +1288 21 9 0 +1289 21 10 0 +1290 21 11 0 +1291 21 12 0 +1292 21 13 0 +1293 21 14 0 +1294 21 15 0 +1295 21 16 0 +1296 21 17 0 +1297 21 18 0 +1298 21 19 0 +1299 21 20 0 +1300 21 21 0 +1301 21 22 0 +1302 21 23 0 +1303 21 24 0 +1304 21 25 0 +1305 21 26 0 +1306 21 27 0 +1307 21 28 0 +1308 21 29 0 +1309 21 30 0 +1310 21 31 0 +1311 21 32 0 +1312 21 33 0 +1313 21 34 0 +1314 21 35 0 +1315 21 36 0 +1316 21 37 0 +1317 21 38 0 +1318 21 39 0 +1319 21 40 0 +1320 21 41 0 +1321 21 42 0 +1322 21 43 0 +1323 21 44 0 +1324 21 45 0 +1325 21 46 0 +1326 21 47 0 +1327 21 48 0 +1328 21 49 0 +1329 21 50 0 +1330 21 51 0 +1331 21 52 0 +1332 21 53 0 +1333 21 54 0 +1334 21 55 0 +1335 21 56 0 +1336 21 57 0 +1337 21 58 0 +1338 21 59 0 +1339 21 60 0 +1340 21 61 0 +1341 21 62 0 +1342 21 63 0 +1343 21 64 0 +1344 22 1 0 +1345 22 2 0 +1346 22 3 0 +1347 22 4 0 +1348 22 5 0 +1349 22 6 0 +1350 22 7 0 +1351 22 8 0 +1352 22 9 0 +1353 22 10 0 +1354 22 11 0 +1355 22 12 0 +1356 22 13 0 +1357 22 14 0 +1358 22 15 0 +1359 22 16 0 +1360 22 17 0 +1361 22 18 0 +1362 22 19 0 +1363 22 20 0 +1364 22 21 0 +1365 22 22 0 +1366 22 23 0 +1367 22 24 0 +1368 22 25 0 +1369 22 26 0 +1370 22 27 0 +1371 22 28 0 +1372 22 29 0 +1373 22 30 0 +1374 22 31 0 +1375 22 32 0 +1376 22 33 0 +1377 22 34 0 +1378 22 35 0 +1379 22 36 0 +1380 22 37 0 +1381 22 38 0 +1382 22 39 0 +1383 22 40 0 +1384 22 41 0 +1385 22 42 0 +1386 22 43 0 +1387 22 44 0 +1388 22 45 0 +1389 22 46 0 +1390 22 47 0 +1391 22 48 0 +1392 22 49 0 +1393 22 50 0 +1394 22 51 0 +1395 22 52 0 +1396 22 53 0 +1397 22 54 0 +1398 22 55 0 +1399 22 56 0 +1400 22 57 0 +1401 22 58 0 +1402 22 59 0 +1403 22 60 0 +1404 22 61 0 +1405 22 62 0 +1406 22 63 0 +1407 22 64 0 +1408 23 1 0 +1409 23 2 0 +1410 23 3 0 +1411 23 4 0 +1412 23 5 0 +1413 23 6 0 +1414 23 7 0 +1415 23 8 0 +1416 23 9 0 +1417 23 10 0 +1418 23 11 0 +1419 23 12 0 +1420 23 13 0 +1421 23 14 0 +1422 23 15 0 +1423 23 16 0 +1424 23 17 0 +1425 23 18 0 +1426 23 19 0 +1427 23 20 0 +1428 23 21 0 +1429 23 22 0 +1430 23 23 0 +1431 23 24 0 +1432 23 25 0 +1433 23 26 0 +1434 23 27 0 +1435 23 28 0 +1436 23 29 0 +1437 23 30 0 +1438 23 31 0 +1439 23 32 0 +1440 23 33 0 +1441 23 34 0 +1442 23 35 0 +1443 23 36 0 +1444 23 37 0 +1445 23 38 0 +1446 23 39 0 +1447 23 40 0 +1448 23 41 0 +1449 23 42 0 +1450 23 43 0 +1451 23 44 0 +1452 23 45 0 +1453 23 46 0 +1454 23 47 0 +1455 23 48 0 +1456 23 49 0 +1457 23 50 0 +1458 23 51 0 +1459 23 52 0 +1460 23 53 0 +1461 23 54 0 +1462 23 55 0 +1463 23 56 0 +1464 23 57 0 +1465 23 58 0 +1466 23 59 0 +1467 23 60 0 +1468 23 61 0 +1469 23 62 0 +1470 23 63 0 +1471 23 64 0 +1472 24 1 0 +1473 24 2 0 +1474 24 3 0 +1475 24 4 0 +1476 24 5 0 +1477 24 6 0 +1478 24 7 0 +1479 24 8 0 +1480 24 9 0 +1481 24 10 0 +1482 24 11 0 +1483 24 12 0 +1484 24 13 0 +1485 24 14 0 +1486 24 15 0 +1487 24 16 0 +1488 24 17 0 +1489 24 18 0 +1490 24 19 0 +1491 24 20 0 +1492 24 21 0 +1493 24 22 0 +1494 24 23 0 +1495 24 24 0 +1496 24 25 0 +1497 24 26 0 +1498 24 27 0 +1499 24 28 0 +1500 24 29 0 +1501 24 30 0 +1502 24 31 0 +1503 24 32 0 +1504 24 33 0 +1505 24 34 0 +1506 24 35 0 +1507 24 36 0 +1508 24 37 0 +1509 24 38 0 +1510 24 39 0 +1511 24 40 0 +1512 24 41 0 +1513 24 42 0 +1514 24 43 0 +1515 24 44 0 +1516 24 45 0 +1517 24 46 0 +1518 24 47 0 +1519 24 48 0 +1520 24 49 0 +1521 24 50 0 +1522 24 51 0 +1523 24 52 0 +1524 24 53 0 +1525 24 54 0 +1526 24 55 0 +1527 24 56 0 +1528 24 57 0 +1529 24 58 0 +1530 24 59 0 +1531 24 60 0 +1532 24 61 0 +1533 24 62 0 +1534 24 63 0 +1535 24 64 0 +1536 25 1 0 +1537 25 2 0 +1538 25 3 0 +1539 25 4 0 +1540 25 5 0 +1541 25 6 0 +1542 25 7 0 +1543 25 8 0 +1544 25 9 0 +1545 25 10 0 +1546 25 11 0 +1547 25 12 0 +1548 25 13 0 +1549 25 14 0 +1550 25 15 0 +1551 25 16 0 +1552 25 17 0 +1553 25 18 0 +1554 25 19 0 +1555 25 20 0 +1556 25 21 0 +1557 25 22 0 +1558 25 23 0 +1559 25 24 0 +1560 25 25 0 +1561 25 26 0 +1562 25 27 0 +1563 25 28 0 +1564 25 29 0 +1565 25 30 0 +1566 25 31 0 +1567 25 32 0 +1568 25 33 0 +1569 25 34 0 +1570 25 35 0 +1571 25 36 0 +1572 25 37 0 +1573 25 38 0 +1574 25 39 0 +1575 25 40 0 +1576 25 41 0 +1577 25 42 0 +1578 25 43 0 +1579 25 44 0 +1580 25 45 0 +1581 25 46 0 +1582 25 47 0 +1583 25 48 0 +1584 25 49 0 +1585 25 50 0 +1586 25 51 0 +1587 25 52 0 +1588 25 53 0 +1589 25 54 0 +1590 25 55 0 +1591 25 56 0 +1592 25 57 0 +1593 25 58 0 +1594 25 59 0 +1595 25 60 0 +1596 25 61 0 +1597 25 62 0 +1598 25 63 0 +1599 25 64 0 +1600 26 1 0 +1601 26 2 0 +1602 26 3 0 +1603 26 4 0 +1604 26 5 0 +1605 26 6 0 +1606 26 7 0 +1607 26 8 0 +1608 26 9 0 +1609 26 10 0 +1610 26 11 0 +1611 26 12 0 +1612 26 13 0 +1613 26 14 0 +1614 26 15 0 +1615 26 16 0 +1616 26 17 0 +1617 26 18 0 +1618 26 19 0 +1619 26 20 0 +1620 26 21 0 +1621 26 22 0 +1622 26 23 0 +1623 26 24 0 +1624 26 25 0 +1625 26 26 0 +1626 26 27 0 +1627 26 28 0 +1628 26 29 0 +1629 26 30 0 +1630 26 31 0 +1631 26 32 0 +1632 26 33 0 +1633 26 34 0 +1634 26 35 0 +1635 26 36 0 +1636 26 37 0 +1637 26 38 0 +1638 26 39 0 +1639 26 40 0 +1640 26 41 0 +1641 26 42 0 +1642 26 43 0 +1643 26 44 0 +1644 26 45 0 +1645 26 46 0 +1646 26 47 0 +1647 26 48 0 +1648 26 49 0 +1649 26 50 0 +1650 26 51 0 +1651 26 52 0 +1652 26 53 0 +1653 26 54 0 +1654 26 55 0 +1655 26 56 0 +1656 26 57 0 +1657 26 58 0 +1658 26 59 0 +1659 26 60 0 +1660 26 61 0 +1661 26 62 0 +1662 26 63 0 +1663 26 64 0 +1664 27 1 0 +1665 27 2 0 +1666 27 3 0 +1667 27 4 0 +1668 27 5 0 +1669 27 6 0 +1670 27 7 0 +1671 27 8 0 +1672 27 9 0 +1673 27 10 0 +1674 27 11 0 +1675 27 12 0 +1676 27 13 0 +1677 27 14 0 +1678 27 15 0 +1679 27 16 0 +1680 27 17 0 +1681 27 18 0 +1682 27 19 0 +1683 27 20 0 +1684 27 21 0 +1685 27 22 0 +1686 27 23 0 +1687 27 24 0 +1688 27 25 0 +1689 27 26 0 +1690 27 27 0 +1691 27 28 0 +1692 27 29 0 +1693 27 30 0 +1694 27 31 0 +1695 27 32 0 +1696 27 33 0 +1697 27 34 0 +1698 27 35 0 +1699 27 36 0 +1700 27 37 0 +1701 27 38 0 +1702 27 39 0 +1703 27 40 0 +1704 27 41 0 +1705 27 42 0 +1706 27 43 0 +1707 27 44 0 +1708 27 45 0 +1709 27 46 0 +1710 27 47 0 +1711 27 48 0 +1712 27 49 0 +1713 27 50 0 +1714 27 51 0 +1715 27 52 0 +1716 27 53 0 +1717 27 54 0 +1718 27 55 0 +1719 27 56 0 +1720 27 57 0 +1721 27 58 0 +1722 27 59 0 +1723 27 60 0 +1724 27 61 0 +1725 27 62 0 +1726 27 63 0 +1727 27 64 0 +1728 28 1 0 +1729 28 2 0 +1730 28 3 0 +1731 28 4 0 +1732 28 5 0 +1733 28 6 0 +1734 28 7 0 +1735 28 8 0 +1736 28 9 0 +1737 28 10 0 +1738 28 11 0 +1739 28 12 0 +1740 28 13 0 +1741 28 14 0 +1742 28 15 0 +1743 28 16 0 +1744 28 17 0 +1745 28 18 0 +1746 28 19 0 +1747 28 20 0 +1748 28 21 0 +1749 28 22 0 +1750 28 23 0 +1751 28 24 0 +1752 28 25 0 +1753 28 26 0 +1754 28 27 0 +1755 28 28 0 +1756 28 29 0 +1757 28 30 0 +1758 28 31 0 +1759 28 32 0 +1760 28 33 0 +1761 28 34 0 +1762 28 35 0 +1763 28 36 0 +1764 28 37 0 +1765 28 38 0 +1766 28 39 0 +1767 28 40 0 +1768 28 41 0 +1769 28 42 0 +1770 28 43 0 +1771 28 44 0 +1772 28 45 0 +1773 28 46 0 +1774 28 47 0 +1775 28 48 0 +1776 28 49 0 +1777 28 50 0 +1778 28 51 0 +1779 28 52 0 +1780 28 53 0 +1781 28 54 0 +1782 28 55 0 +1783 28 56 0 +1784 28 57 0 +1785 28 58 0 +1786 28 59 0 +1787 28 60 0 +1788 28 61 0 +1789 28 62 0 +1790 28 63 0 +1791 28 64 0 +1792 29 1 0 +1793 29 2 0 +1794 29 3 0 +1795 29 4 0 +1796 29 5 0 +1797 29 6 0 +1798 29 7 0 +1799 29 8 0 +1800 29 9 0 +1801 29 10 0 +1802 29 11 0 +1803 29 12 0 +1804 29 13 0 +1805 29 14 0 +1806 29 15 0 +1807 29 16 0 +1808 29 17 0 +1809 29 18 0 +1810 29 19 0 +1811 29 20 0 +1812 29 21 0 +1813 29 22 0 +1814 29 23 0 +1815 29 24 0 +1816 29 25 0 +1817 29 26 0 +1818 29 27 0 +1819 29 28 0 +1820 29 29 0 +1821 29 30 0 +1822 29 31 0 +1823 29 32 0 +1824 29 33 0 +1825 29 34 0 +1826 29 35 0 +1827 29 36 0 +1828 29 37 0 +1829 29 38 0 +1830 29 39 0 +1831 29 40 0 +1832 29 41 0 +1833 29 42 0 +1834 29 43 0 +1835 29 44 0 +1836 29 45 0 +1837 29 46 0 +1838 29 47 0 +1839 29 48 0 +1840 29 49 0 +1841 29 50 0 +1842 29 51 0 +1843 29 52 0 +1844 29 53 0 +1845 29 54 0 +1846 29 55 0 +1847 29 56 0 +1848 29 57 0 +1849 29 58 0 +1850 29 59 0 +1851 29 60 0 +1852 29 61 0 +1853 29 62 0 +1854 29 63 0 +1855 29 64 0 +1856 30 1 0 +1857 30 2 0 +1858 30 3 0 +1859 30 4 0 +1860 30 5 0 +1861 30 6 0 +1862 30 7 0 +1863 30 8 0 +1864 30 9 0 +1865 30 10 0 +1866 30 11 0 +1867 30 12 0 +1868 30 13 0 +1869 30 14 0 +1870 30 15 0 +1871 30 16 0 +1872 30 17 0 +1873 30 18 0 +1874 30 19 0 +1875 30 20 0 +1876 30 21 0 +1877 30 22 0 +1878 30 23 0 +1879 30 24 0 +1880 30 25 0 +1881 30 26 0 +1882 30 27 0 +1883 30 28 0 +1884 30 29 0 +1885 30 30 0 +1886 30 31 0 +1887 30 32 0 +1888 30 33 0 +1889 30 34 0 +1890 30 35 0 +1891 30 36 0 +1892 30 37 0 +1893 30 38 0 +1894 30 39 0 +1895 30 40 0 +1896 30 41 0 +1897 30 42 0 +1898 30 43 0 +1899 30 44 0 +1900 30 45 0 +1901 30 46 0 +1902 30 47 0 +1903 30 48 0 +1904 30 49 0 +1905 30 50 0 +1906 30 51 0 +1907 30 52 0 +1908 30 53 0 +1909 30 54 0 +1910 30 55 0 +1911 30 56 0 +1912 30 57 0 +1913 30 58 0 +1914 30 59 0 +1915 30 60 0 +1916 30 61 0 +1917 30 62 0 +1918 30 63 0 +1919 30 64 0 +1920 31 1 0 +1921 31 2 0 +1922 31 3 0 +1923 31 4 0 +1924 31 5 0 +1925 31 6 0 +1926 31 7 0 +1927 31 8 0 +1928 31 9 0 +1929 31 10 0 +1930 31 11 0 +1931 31 12 0 +1932 31 13 0 +1933 31 14 0 +1934 31 15 0 +1935 31 16 0 +1936 31 17 0 +1937 31 18 0 +1938 31 19 0 +1939 31 20 0 +1940 31 21 0 +1941 31 22 0 +1942 31 23 0 +1943 31 24 0 +1944 31 25 0 +1945 31 26 0 +1946 31 27 0 +1947 31 28 0 +1948 31 29 0 +1949 31 30 0 +1950 31 31 0 +1951 31 32 0 +1952 31 33 0 +1953 31 34 0 +1954 31 35 0 +1955 31 36 0 +1956 31 37 0 +1957 31 38 0 +1958 31 39 0 +1959 31 40 0 +1960 31 41 0 +1961 31 42 0 +1962 31 43 0 +1963 31 44 0 +1964 31 45 0 +1965 31 46 0 +1966 31 47 0 +1967 31 48 0 +1968 31 49 0 +1969 31 50 0 +1970 31 51 0 +1971 31 52 0 +1972 31 53 0 +1973 31 54 0 +1974 31 55 0 +1975 31 56 0 +1976 31 57 0 +1977 31 58 0 +1978 31 59 0 +1979 31 60 0 +1980 31 61 0 +1981 31 62 0 +1982 31 63 0 +1983 31 64 0 +1984 32 1 0 +1985 32 2 0 +1986 32 3 0 +1987 32 4 0 +1988 32 5 0 +1989 32 6 0 +1990 32 7 0 +1991 32 8 0 +1992 32 9 0 +1993 32 10 0 +1994 32 11 0 +1995 32 12 0 +1996 32 13 0 +1997 32 14 0 +1998 32 15 0 +1999 32 16 0 +2000 32 17 0 +2001 32 18 0 +2002 32 19 0 +2003 32 20 0 +2004 32 21 0 +2005 32 22 0 +2006 32 23 0 +2007 32 24 0 +2008 32 25 0 +2009 32 26 0 +2010 32 27 0 +2011 32 28 0 +2012 32 29 0 +2013 32 30 0 +2014 32 31 0 +2015 32 32 0 +2016 32 33 0 +2017 32 34 0 +2018 32 35 0 +2019 32 36 0 +2020 32 37 0 +2021 32 38 0 +2022 32 39 0 +2023 32 40 0 +2024 32 41 0 +2025 32 42 0 +2026 32 43 0 +2027 32 44 0 +2028 32 45 0 +2029 32 46 0 +2030 32 47 0 +2031 32 48 0 +2032 32 49 0 +2033 32 50 0 +2034 32 51 0 +2035 32 52 0 +2036 32 53 0 +2037 32 54 0 +2038 32 55 0 +2039 32 56 0 +2040 32 57 0 +2041 32 58 0 +2042 32 59 0 +2043 32 60 0 +2044 32 61 0 +2045 32 62 0 +2046 32 63 0 +2047 32 64 0 +2048 33 1 0 +2049 33 2 0 +2050 33 3 0 +2051 33 4 0 +2052 33 5 0 +2053 33 6 0 +2054 33 7 0 +2055 33 8 0 +2056 33 9 0 +2057 33 10 0 +2058 33 11 0 +2059 33 12 0 +2060 33 13 0 +2061 33 14 0 +2062 33 15 0 +2063 33 16 0 +2064 33 17 0 +2065 33 18 0 +2066 33 19 0 +2067 33 20 0 +2068 33 21 0 +2069 33 22 0 +2070 33 23 0 +2071 33 24 0 +2072 33 25 0 +2073 33 26 0 +2074 33 27 0 +2075 33 28 0 +2076 33 29 0 +2077 33 30 0 +2078 33 31 0 +2079 33 32 0 +2080 33 33 0 +2081 33 34 0 +2082 33 35 0 +2083 33 36 0 +2084 33 37 0 +2085 33 38 0 +2086 33 39 0 +2087 33 40 0 +2088 33 41 0 +2089 33 42 0 +2090 33 43 0 +2091 33 44 0 +2092 33 45 0 +2093 33 46 0 +2094 33 47 0 +2095 33 48 0 +2096 33 49 0 +2097 33 50 0 +2098 33 51 0 +2099 33 52 0 +2100 33 53 0 +2101 33 54 0 +2102 33 55 0 +2103 33 56 0 +2104 33 57 0 +2105 33 58 0 +2106 33 59 0 +2107 33 60 0 +2108 33 61 0 +2109 33 62 0 +2110 33 63 0 +2111 33 64 0 +2112 34 1 0 +2113 34 2 0 +2114 34 3 0 +2115 34 4 0 +2116 34 5 0 +2117 34 6 0 +2118 34 7 0 +2119 34 8 0 +2120 34 9 0 +2121 34 10 0 +2122 34 11 0 +2123 34 12 0 +2124 34 13 0 +2125 34 14 0 +2126 34 15 0 +2127 34 16 0 +2128 34 17 0 +2129 34 18 0 +2130 34 19 0 +2131 34 20 0 +2132 34 21 0 +2133 34 22 0 +2134 34 23 0 +2135 34 24 0 +2136 34 25 0 +2137 34 26 0 +2138 34 27 0 +2139 34 28 0 +2140 34 29 0 +2141 34 30 0 +2142 34 31 0 +2143 34 32 0 +2144 34 33 0 +2145 34 34 0 +2146 34 35 0 +2147 34 36 0 +2148 34 37 0 +2149 34 38 0 +2150 34 39 0 +2151 34 40 0 +2152 34 41 0 +2153 34 42 0 +2154 34 43 0 +2155 34 44 0 +2156 34 45 0 +2157 34 46 0 +2158 34 47 0 +2159 34 48 0 +2160 34 49 0 +2161 34 50 0 +2162 34 51 0 +2163 34 52 0 +2164 34 53 0 +2165 34 54 0 +2166 34 55 0 +2167 34 56 0 +2168 34 57 0 +2169 34 58 0 +2170 34 59 0 +2171 34 60 0 +2172 34 61 0 +2173 34 62 0 +2174 34 63 0 +2175 34 64 0 +2176 35 1 0 +2177 35 2 0 +2178 35 3 0 +2179 35 4 0 +2180 35 5 0 +2181 35 6 0 +2182 35 7 0 +2183 35 8 0 +2184 35 9 0 +2185 35 10 0 +2186 35 11 0 +2187 35 12 0 +2188 35 13 0 +2189 35 14 0 +2190 35 15 0 +2191 35 16 0 +2192 35 17 0 +2193 35 18 0 +2194 35 19 0 +2195 35 20 0 +2196 35 21 0 +2197 35 22 0 +2198 35 23 0 +2199 35 24 0 +2200 35 25 0 +2201 35 26 0 +2202 35 27 0 +2203 35 28 0 +2204 35 29 0 +2205 35 30 0 +2206 35 31 0 +2207 35 32 0 +2208 35 33 0 +2209 35 34 0 +2210 35 35 0 +2211 35 36 0 +2212 35 37 0 +2213 35 38 0 +2214 35 39 0 +2215 35 40 0 +2216 35 41 0 +2217 35 42 0 +2218 35 43 0 +2219 35 44 0 +2220 35 45 0 +2221 35 46 0 +2222 35 47 0 +2223 35 48 0 +2224 35 49 0 +2225 35 50 0 +2226 35 51 0 +2227 35 52 0 +2228 35 53 0 +2229 35 54 0 +2230 35 55 0 +2231 35 56 0 +2232 35 57 0 +2233 35 58 0 +2234 35 59 0 +2235 35 60 0 +2236 35 61 0 +2237 35 62 0 +2238 35 63 0 +2239 35 64 0 +2240 36 1 0 +2241 36 2 0 +2242 36 3 0 +2243 36 4 0 +2244 36 5 0 +2245 36 6 0 +2246 36 7 0 +2247 36 8 0 +2248 36 9 0 +2249 36 10 0 +2250 36 11 0 +2251 36 12 0 +2252 36 13 0 +2253 36 14 0 +2254 36 15 0 +2255 36 16 0 +2256 36 17 0 +2257 36 18 0 +2258 36 19 0 +2259 36 20 0 +2260 36 21 0 +2261 36 22 0 +2262 36 23 0 +2263 36 24 0 +2264 36 25 0 +2265 36 26 0 +2266 36 27 0 +2267 36 28 0 +2268 36 29 0 +2269 36 30 0 +2270 36 31 0 +2271 36 32 0 +2272 36 33 0 +2273 36 34 0 +2274 36 35 0 +2275 36 36 0 +2276 36 37 0 +2277 36 38 0 +2278 36 39 0 +2279 36 40 0 +2280 36 41 0 +2281 36 42 0 +2282 36 43 0 +2283 36 44 0 +2284 36 45 0 +2285 36 46 0 +2286 36 47 0 +2287 36 48 0 +2288 36 49 0 +2289 36 50 0 +2290 36 51 0 +2291 36 52 0 +2292 36 53 0 +2293 36 54 0 +2294 36 55 0 +2295 36 56 0 +2296 36 57 0 +2297 36 58 0 +2298 36 59 0 +2299 36 60 0 +2300 36 61 0 +2301 36 62 0 +2302 36 63 0 +2303 36 64 0 +2304 37 1 0 +2305 37 2 0 +2306 37 3 0 +2307 37 4 0 +2308 37 5 0 +2309 37 6 0 +2310 37 7 0 +2311 37 8 0 +2312 37 9 0 +2313 37 10 0 +2314 37 11 0 +2315 37 12 0 +2316 37 13 0 +2317 37 14 0 +2318 37 15 0 +2319 37 16 0 +2320 37 17 0 +2321 37 18 0 +2322 37 19 0 +2323 37 20 0 +2324 37 21 0 +2325 37 22 0 +2326 37 23 0 +2327 37 24 0 +2328 37 25 0 +2329 37 26 0 +2330 37 27 0 +2331 37 28 0 +2332 37 29 0 +2333 37 30 0 +2334 37 31 0 +2335 37 32 0 +2336 37 33 0 +2337 37 34 0 +2338 37 35 0 +2339 37 36 0 +2340 37 37 0 +2341 37 38 0 +2342 37 39 0 +2343 37 40 0 +2344 37 41 0 +2345 37 42 0 +2346 37 43 0 +2347 37 44 0 +2348 37 45 0 +2349 37 46 0 +2350 37 47 0 +2351 37 48 0 +2352 37 49 0 +2353 37 50 0 +2354 37 51 0 +2355 37 52 0 +2356 37 53 0 +2357 37 54 0 +2358 37 55 0 +2359 37 56 0 +2360 37 57 0 +2361 37 58 0 +2362 37 59 0 +2363 37 60 0 +2364 37 61 0 +2365 37 62 0 +2366 37 63 0 +2367 37 64 0 +2368 38 1 0 +2369 38 2 0 +2370 38 3 0 +2371 38 4 0 +2372 38 5 0 +2373 38 6 0 +2374 38 7 0 +2375 38 8 0 +2376 38 9 0 +2377 38 10 0 +2378 38 11 0 +2379 38 12 0 +2380 38 13 0 +2381 38 14 0 +2382 38 15 0 +2383 38 16 0 +2384 38 17 0 +2385 38 18 0 +2386 38 19 0 +2387 38 20 0 +2388 38 21 0 +2389 38 22 0 +2390 38 23 0 +2391 38 24 0 +2392 38 25 0 +2393 38 26 0 +2394 38 27 0 +2395 38 28 0 +2396 38 29 0 +2397 38 30 0 +2398 38 31 0 +2399 38 32 0 +2400 38 33 0 +2401 38 34 0 +2402 38 35 0 +2403 38 36 0 +2404 38 37 0 +2405 38 38 0 +2406 38 39 0 +2407 38 40 0 +2408 38 41 0 +2409 38 42 0 +2410 38 43 0 +2411 38 44 0 +2412 38 45 0 +2413 38 46 0 +2414 38 47 0 +2415 38 48 0 +2416 38 49 0 +2417 38 50 0 +2418 38 51 0 +2419 38 52 0 +2420 38 53 0 +2421 38 54 0 +2422 38 55 0 +2423 38 56 0 +2424 38 57 0 +2425 38 58 0 +2426 38 59 0 +2427 38 60 0 +2428 38 61 0 +2429 38 62 0 +2430 38 63 0 +2431 38 64 0 +2432 39 1 0 +2433 39 2 0 +2434 39 3 0 +2435 39 4 0 +2436 39 5 0 +2437 39 6 0 +2438 39 7 0 +2439 39 8 0 +2440 39 9 0 +2441 39 10 0 +2442 39 11 0 +2443 39 12 0 +2444 39 13 0 +2445 39 14 0 +2446 39 15 0 +2447 39 16 0 +2448 39 17 0 +2449 39 18 0 +2450 39 19 0 +2451 39 20 0 +2452 39 21 0 +2453 39 22 0 +2454 39 23 0 +2455 39 24 0 +2456 39 25 0 +2457 39 26 0 +2458 39 27 0 +2459 39 28 0 +2460 39 29 0 +2461 39 30 0 +2462 39 31 0 +2463 39 32 0 +2464 39 33 0 +2465 39 34 0 +2466 39 35 0 +2467 39 36 0 +2468 39 37 0 +2469 39 38 0 +2470 39 39 0 +2471 39 40 0 +2472 39 41 0 +2473 39 42 0 +2474 39 43 0 +2475 39 44 0 +2476 39 45 0 +2477 39 46 0 +2478 39 47 0 +2479 39 48 0 +2480 39 49 0 +2481 39 50 0 +2482 39 51 0 +2483 39 52 0 +2484 39 53 0 +2485 39 54 0 +2486 39 55 0 +2487 39 56 0 +2488 39 57 0 +2489 39 58 0 +2490 39 59 0 +2491 39 60 0 +2492 39 61 0 +2493 39 62 0 +2494 39 63 0 +2495 39 64 0 +2496 40 1 0 +2497 40 2 0 +2498 40 3 0 +2499 40 4 0 +2500 40 5 0 +2501 40 6 0 +2502 40 7 0 +2503 40 8 0 +2504 40 9 0 +2505 40 10 0 +2506 40 11 0 +2507 40 12 0 +2508 40 13 0 +2509 40 14 0 +2510 40 15 0 +2511 40 16 0 +2512 40 17 0 +2513 40 18 0 +2514 40 19 0 +2515 40 20 0 +2516 40 21 0 +2517 40 22 0 +2518 40 23 0 +2519 40 24 0 +2520 40 25 0 +2521 40 26 0 +2522 40 27 0 +2523 40 28 0 +2524 40 29 0 +2525 40 30 0 +2526 40 31 0 +2527 40 32 0 +2528 40 33 0 +2529 40 34 0 +2530 40 35 0 +2531 40 36 0 +2532 40 37 0 +2533 40 38 0 +2534 40 39 0 +2535 40 40 0 +2536 40 41 0 +2537 40 42 0 +2538 40 43 0 +2539 40 44 0 +2540 40 45 0 +2541 40 46 0 +2542 40 47 0 +2543 40 48 0 +2544 40 49 0 +2545 40 50 0 +2546 40 51 0 +2547 40 52 0 +2548 40 53 0 +2549 40 54 0 +2550 40 55 0 +2551 40 56 0 +2552 40 57 0 +2553 40 58 0 +2554 40 59 0 +2555 40 60 0 +2556 40 61 0 +2557 40 62 0 +2558 40 63 0 +2559 40 64 0 +2560 41 1 0 +2561 41 2 0 +2562 41 3 0 +2563 41 4 0 +2564 41 5 0 +2565 41 6 0 +2566 41 7 0 +2567 41 8 0 +2568 41 9 0 +2569 41 10 0 +2570 41 11 0 +2571 41 12 0 +2572 41 13 0 +2573 41 14 0 +2574 41 15 0 +2575 41 16 0 +2576 41 17 0 +2577 41 18 0 +2578 41 19 0 +2579 41 20 0 +2580 41 21 0 +2581 41 22 0 +2582 41 23 0 +2583 41 24 0 +2584 41 25 0 +2585 41 26 0 +2586 41 27 0 +2587 41 28 0 +2588 41 29 0 +2589 41 30 0 +2590 41 31 0 +2591 41 32 0 +2592 41 33 0 +2593 41 34 0 +2594 41 35 0 +2595 41 36 0 +2596 41 37 0 +2597 41 38 0 +2598 41 39 0 +2599 41 40 0 +2600 41 41 0 +2601 41 42 0 +2602 41 43 0 +2603 41 44 0 +2604 41 45 0 +2605 41 46 0 +2606 41 47 0 +2607 41 48 0 +2608 41 49 0 +2609 41 50 0 +2610 41 51 0 +2611 41 52 0 +2612 41 53 0 +2613 41 54 0 +2614 41 55 0 +2615 41 56 0 +2616 41 57 0 +2617 41 58 0 +2618 41 59 0 +2619 41 60 0 +2620 41 61 0 +2621 41 62 0 +2622 41 63 0 +2623 41 64 0 +2624 42 1 0 +2625 42 2 0 +2626 42 3 0 +2627 42 4 0 +2628 42 5 0 +2629 42 6 0 +2630 42 7 0 +2631 42 8 0 +2632 42 9 0 +2633 42 10 0 +2634 42 11 0 +2635 42 12 0 +2636 42 13 0 +2637 42 14 0 +2638 42 15 0 +2639 42 16 0 +2640 42 17 0 +2641 42 18 0 +2642 42 19 0 +2643 42 20 0 +2644 42 21 0 +2645 42 22 0 +2646 42 23 0 +2647 42 24 0 +2648 42 25 0 +2649 42 26 0 +2650 42 27 0 +2651 42 28 0 +2652 42 29 0 +2653 42 30 0 +2654 42 31 0 +2655 42 32 0 +2656 42 33 0 +2657 42 34 0 +2658 42 35 0 +2659 42 36 0 +2660 42 37 0 +2661 42 38 0 +2662 42 39 0 +2663 42 40 0 +2664 42 41 0 +2665 42 42 0 +2666 42 43 0 +2667 42 44 0 +2668 42 45 0 +2669 42 46 0 +2670 42 47 0 +2671 42 48 0 +2672 42 49 0 +2673 42 50 0 +2674 42 51 0 +2675 42 52 0 +2676 42 53 0 +2677 42 54 0 +2678 42 55 0 +2679 42 56 0 +2680 42 57 0 +2681 42 58 0 +2682 42 59 0 +2683 42 60 0 +2684 42 61 0 +2685 42 62 0 +2686 42 63 0 +2687 42 64 0 +2688 43 1 0 +2689 43 2 0 +2690 43 3 0 +2691 43 4 0 +2692 43 5 0 +2693 43 6 0 +2694 43 7 0 +2695 43 8 0 +2696 43 9 0 +2697 43 10 0 +2698 43 11 0 +2699 43 12 0 +2700 43 13 0 +2701 43 14 0 +2702 43 15 0 +2703 43 16 0 +2704 43 17 0 +2705 43 18 0 +2706 43 19 0 +2707 43 20 0 +2708 43 21 0 +2709 43 22 0 +2710 43 23 0 +2711 43 24 0 +2712 43 25 0 +2713 43 26 0 +2714 43 27 0 +2715 43 28 0 +2716 43 29 0 +2717 43 30 0 +2718 43 31 0 +2719 43 32 0 +2720 43 33 0 +2721 43 34 0 +2722 43 35 0 +2723 43 36 0 +2724 43 37 0 +2725 43 38 0 +2726 43 39 0 +2727 43 40 0 +2728 43 41 0 +2729 43 42 0 +2730 43 43 0 +2731 43 44 0 +2732 43 45 0 +2733 43 46 0 +2734 43 47 0 +2735 43 48 0 +2736 43 49 0 +2737 43 50 0 +2738 43 51 0 +2739 43 52 0 +2740 43 53 0 +2741 43 54 0 +2742 43 55 0 +2743 43 56 0 +2744 43 57 0 +2745 43 58 0 +2746 43 59 0 +2747 43 60 0 +2748 43 61 0 +2749 43 62 0 +2750 43 63 0 +2751 43 64 0 +2752 44 1 0 +2753 44 2 0 +2754 44 3 0 +2755 44 4 0 +2756 44 5 0 +2757 44 6 0 +2758 44 7 0 +2759 44 8 0 +2760 44 9 0 +2761 44 10 0 +2762 44 11 0 +2763 44 12 0 +2764 44 13 0 +2765 44 14 0 +2766 44 15 0 +2767 44 16 0 +2768 44 17 0 +2769 44 18 0 +2770 44 19 0 +2771 44 20 0 +2772 44 21 0 +2773 44 22 0 +2774 44 23 0 +2775 44 24 0 +2776 44 25 0 +2777 44 26 0 +2778 44 27 0 +2779 44 28 0 +2780 44 29 0 +2781 44 30 0 +2782 44 31 0 +2783 44 32 0 +2784 44 33 0 +2785 44 34 0 +2786 44 35 0 +2787 44 36 0 +2788 44 37 0 +2789 44 38 0 +2790 44 39 0 +2791 44 40 0 +2792 44 41 0 +2793 44 42 0 +2794 44 43 0 +2795 44 44 0 +2796 44 45 0 +2797 44 46 0 +2798 44 47 0 +2799 44 48 0 +2800 44 49 0 +2801 44 50 0 +2802 44 51 0 +2803 44 52 0 +2804 44 53 0 +2805 44 54 0 +2806 44 55 0 +2807 44 56 0 +2808 44 57 0 +2809 44 58 0 +2810 44 59 0 +2811 44 60 0 +2812 44 61 0 +2813 44 62 0 +2814 44 63 0 +2815 44 64 0 +2816 45 1 0 +2817 45 2 0 +2818 45 3 0 +2819 45 4 0 +2820 45 5 0 +2821 45 6 0 +2822 45 7 0 +2823 45 8 0 +2824 45 9 0 +2825 45 10 0 +2826 45 11 0 +2827 45 12 0 +2828 45 13 0 +2829 45 14 0 +2830 45 15 0 +2831 45 16 0 +2832 45 17 0 +2833 45 18 0 +2834 45 19 0 +2835 45 20 0 +2836 45 21 0 +2837 45 22 0 +2838 45 23 0 +2839 45 24 0 +2840 45 25 0 +2841 45 26 0 +2842 45 27 0 +2843 45 28 0 +2844 45 29 0 +2845 45 30 0 +2846 45 31 0 +2847 45 32 0 +2848 45 33 0 +2849 45 34 0 +2850 45 35 0 +2851 45 36 0 +2852 45 37 0 +2853 45 38 0 +2854 45 39 0 +2855 45 40 0 +2856 45 41 0 +2857 45 42 0 +2858 45 43 0 +2859 45 44 0 +2860 45 45 0 +2861 45 46 0 +2862 45 47 0 +2863 45 48 0 +2864 45 49 0 +2865 45 50 0 +2866 45 51 0 +2867 45 52 0 +2868 45 53 0 +2869 45 54 0 +2870 45 55 0 +2871 45 56 0 +2872 45 57 0 +2873 45 58 0 +2874 45 59 0 +2875 45 60 0 +2876 45 61 0 +2877 45 62 0 +2878 45 63 0 +2879 45 64 0 +2880 46 1 0 +2881 46 2 0 +2882 46 3 0 +2883 46 4 0 +2884 46 5 0 +2885 46 6 0 +2886 46 7 0 +2887 46 8 0 +2888 46 9 0 +2889 46 10 0 +2890 46 11 0 +2891 46 12 0 +2892 46 13 0 +2893 46 14 0 +2894 46 15 0 +2895 46 16 0 +2896 46 17 0 +2897 46 18 0 +2898 46 19 0 +2899 46 20 0 +2900 46 21 0 +2901 46 22 0 +2902 46 23 0 +2903 46 24 0 +2904 46 25 0 +2905 46 26 0 +2906 46 27 0 +2907 46 28 0 +2908 46 29 0 +2909 46 30 0 +2910 46 31 0 +2911 46 32 0 +2912 46 33 0 +2913 46 34 0 +2914 46 35 0 +2915 46 36 0 +2916 46 37 0 +2917 46 38 0 +2918 46 39 0 +2919 46 40 0 +2920 46 41 0 +2921 46 42 0 +2922 46 43 0 +2923 46 44 0 +2924 46 45 0 +2925 46 46 0 +2926 46 47 0 +2927 46 48 0 +2928 46 49 0 +2929 46 50 0 +2930 46 51 0 +2931 46 52 0 +2932 46 53 0 +2933 46 54 0 +2934 46 55 0 +2935 46 56 0 +2936 46 57 0 +2937 46 58 0 +2938 46 59 0 +2939 46 60 0 +2940 46 61 0 +2941 46 62 0 +2942 46 63 0 +2943 46 64 0 +2944 47 1 0 +2945 47 2 0 +2946 47 3 0 +2947 47 4 0 +2948 47 5 0 +2949 47 6 0 +2950 47 7 0 +2951 47 8 0 +2952 47 9 0 +2953 47 10 0 +2954 47 11 0 +2955 47 12 0 +2956 47 13 0 +2957 47 14 0 +2958 47 15 0 +2959 47 16 0 +2960 47 17 0 +2961 47 18 0 +2962 47 19 0 +2963 47 20 0 +2964 47 21 0 +2965 47 22 0 +2966 47 23 0 +2967 47 24 0 +2968 47 25 0 +2969 47 26 0 +2970 47 27 0 +2971 47 28 0 +2972 47 29 0 +2973 47 30 0 +2974 47 31 0 +2975 47 32 0 +2976 47 33 0 +2977 47 34 0 +2978 47 35 0 +2979 47 36 0 +2980 47 37 0 +2981 47 38 0 +2982 47 39 0 +2983 47 40 0 +2984 47 41 0 +2985 47 42 0 +2986 47 43 0 +2987 47 44 0 +2988 47 45 0 +2989 47 46 0 +2990 47 47 0 +2991 47 48 0 +2992 47 49 0 +2993 47 50 0 +2994 47 51 0 +2995 47 52 0 +2996 47 53 0 +2997 47 54 0 +2998 47 55 0 +2999 47 56 0 +3000 47 57 0 +3001 47 58 0 +3002 47 59 0 +3003 47 60 0 +3004 47 61 0 +3005 47 62 0 +3006 47 63 0 +3007 47 64 0 +3008 48 1 0 +3009 48 2 0 +3010 48 3 0 +3011 48 4 0 +3012 48 5 0 +3013 48 6 0 +3014 48 7 0 +3015 48 8 0 +3016 48 9 0 +3017 48 10 0 +3018 48 11 0 +3019 48 12 0 +3020 48 13 0 +3021 48 14 0 +3022 48 15 0 +3023 48 16 0 +3024 48 17 0 +3025 48 18 0 +3026 48 19 0 +3027 48 20 0 +3028 48 21 0 +3029 48 22 0 +3030 48 23 0 +3031 48 24 0 +3032 48 25 0 +3033 48 26 0 +3034 48 27 0 +3035 48 28 0 +3036 48 29 0 +3037 48 30 0 +3038 48 31 0 +3039 48 32 0 +3040 48 33 0 +3041 48 34 0 +3042 48 35 0 +3043 48 36 0 +3044 48 37 0 +3045 48 38 0 +3046 48 39 0 +3047 48 40 0 +3048 48 41 0 +3049 48 42 0 +3050 48 43 0 +3051 48 44 0 +3052 48 45 0 +3053 48 46 0 +3054 48 47 0 +3055 48 48 0 +3056 48 49 0 +3057 48 50 0 +3058 48 51 0 +3059 48 52 0 +3060 48 53 0 +3061 48 54 0 +3062 48 55 0 +3063 48 56 0 +3064 48 57 0 +3065 48 58 0 +3066 48 59 0 +3067 48 60 0 +3068 48 61 0 +3069 48 62 0 +3070 48 63 0 +3071 48 64 0 +3072 49 1 0 +3073 49 2 0 +3074 49 3 0 +3075 49 4 0 +3076 49 5 0 +3077 49 6 0 +3078 49 7 0 +3079 49 8 0 +3080 49 9 0 +3081 49 10 0 +3082 49 11 0 +3083 49 12 0 +3084 49 13 0 +3085 49 14 0 +3086 49 15 0 +3087 49 16 0 +3088 49 17 0 +3089 49 18 0 +3090 49 19 0 +3091 49 20 0 +3092 49 21 0 +3093 49 22 0 +3094 49 23 0 +3095 49 24 0 +3096 49 25 0 +3097 49 26 0 +3098 49 27 0 +3099 49 28 0 +3100 49 29 0 +3101 49 30 0 +3102 49 31 0 +3103 49 32 0 +3104 49 33 0 +3105 49 34 0 +3106 49 35 0 +3107 49 36 0 +3108 49 37 0 +3109 49 38 0 +3110 49 39 0 +3111 49 40 0 +3112 49 41 0 +3113 49 42 0 +3114 49 43 0 +3115 49 44 0 +3116 49 45 0 +3117 49 46 0 +3118 49 47 0 +3119 49 48 0 +3120 49 49 0 +3121 49 50 0 +3122 49 51 0 +3123 49 52 0 +3124 49 53 0 +3125 49 54 0 +3126 49 55 0 +3127 49 56 0 +3128 49 57 0 +3129 49 58 0 +3130 49 59 0 +3131 49 60 0 +3132 49 61 0 +3133 49 62 0 +3134 49 63 0 +3135 49 64 0 +3136 50 1 0 +3137 50 2 0 +3138 50 3 0 +3139 50 4 0 +3140 50 5 0 +3141 50 6 0 +3142 50 7 0 +3143 50 8 0 +3144 50 9 0 +3145 50 10 0 +3146 50 11 0 +3147 50 12 0 +3148 50 13 0 +3149 50 14 0 +3150 50 15 0 +3151 50 16 0 +3152 50 17 0 +3153 50 18 0 +3154 50 19 0 +3155 50 20 0 +3156 50 21 0 +3157 50 22 0 +3158 50 23 0 +3159 50 24 0 +3160 50 25 0 +3161 50 26 0 +3162 50 27 0 +3163 50 28 0 +3164 50 29 0 +3165 50 30 0 +3166 50 31 0 +3167 50 32 0 +3168 50 33 0 +3169 50 34 0 +3170 50 35 0 +3171 50 36 0 +3172 50 37 0 +3173 50 38 0 +3174 50 39 0 +3175 50 40 0 +3176 50 41 0 +3177 50 42 0 +3178 50 43 0 +3179 50 44 0 +3180 50 45 0 +3181 50 46 0 +3182 50 47 0 +3183 50 48 0 +3184 50 49 0 +3185 50 50 0 +3186 50 51 0 +3187 50 52 0 +3188 50 53 0 +3189 50 54 0 +3190 50 55 0 +3191 50 56 0 +3192 50 57 0 +3193 50 58 0 +3194 50 59 0 +3195 50 60 0 +3196 50 61 0 +3197 50 62 0 +3198 50 63 0 +3199 50 64 0 +3200 51 1 0 +3201 51 2 0 +3202 51 3 0 +3203 51 4 0 +3204 51 5 0 +3205 51 6 0 +3206 51 7 0 +3207 51 8 0 +3208 51 9 0 +3209 51 10 0 +3210 51 11 0 +3211 51 12 0 +3212 51 13 0 +3213 51 14 0 +3214 51 15 0 +3215 51 16 0 +3216 51 17 0 +3217 51 18 0 +3218 51 19 0 +3219 51 20 0 +3220 51 21 0 +3221 51 22 0 +3222 51 23 0 +3223 51 24 0 +3224 51 25 0 +3225 51 26 0 +3226 51 27 0 +3227 51 28 0 +3228 51 29 0 +3229 51 30 0 +3230 51 31 0 +3231 51 32 0 +3232 51 33 0 +3233 51 34 0 +3234 51 35 0 +3235 51 36 0 +3236 51 37 0 +3237 51 38 0 +3238 51 39 0 +3239 51 40 0 +3240 51 41 0 +3241 51 42 0 +3242 51 43 0 +3243 51 44 0 +3244 51 45 0 +3245 51 46 0 +3246 51 47 0 +3247 51 48 0 +3248 51 49 0 +3249 51 50 0 +3250 51 51 0 +3251 51 52 0 +3252 51 53 0 +3253 51 54 0 +3254 51 55 0 +3255 51 56 0 +3256 51 57 0 +3257 51 58 0 +3258 51 59 0 +3259 51 60 0 +3260 51 61 0 +3261 51 62 0 +3262 51 63 0 +3263 51 64 0 +3264 52 1 0 +3265 52 2 0 +3266 52 3 0 +3267 52 4 0 +3268 52 5 0 +3269 52 6 0 +3270 52 7 0 +3271 52 8 0 +3272 52 9 0 +3273 52 10 0 +3274 52 11 0 +3275 52 12 0 +3276 52 13 0 +3277 52 14 0 +3278 52 15 0 +3279 52 16 0 +3280 52 17 0 +3281 52 18 0 +3282 52 19 0 +3283 52 20 0 +3284 52 21 0 +3285 52 22 0 +3286 52 23 0 +3287 52 24 0 +3288 52 25 0 +3289 52 26 0 +3290 52 27 0 +3291 52 28 0 +3292 52 29 0 +3293 52 30 0 +3294 52 31 0 +3295 52 32 0 +3296 52 33 0 +3297 52 34 0 +3298 52 35 0 +3299 52 36 0 +3300 52 37 0 +3301 52 38 0 +3302 52 39 0 +3303 52 40 0 +3304 52 41 0 +3305 52 42 0 +3306 52 43 0 +3307 52 44 0 +3308 52 45 0 +3309 52 46 0 +3310 52 47 0 +3311 52 48 0 +3312 52 49 0 +3313 52 50 0 +3314 52 51 0 +3315 52 52 0 +3316 52 53 0 +3317 52 54 0 +3318 52 55 0 +3319 52 56 0 +3320 52 57 0 +3321 52 58 0 +3322 52 59 0 +3323 52 60 0 +3324 52 61 0 +3325 52 62 0 +3326 52 63 0 +3327 52 64 0 +3328 53 1 0 +3329 53 2 0 +3330 53 3 0 +3331 53 4 0 +3332 53 5 0 +3333 53 6 0 +3334 53 7 0 +3335 53 8 0 +3336 53 9 0 +3337 53 10 0 +3338 53 11 0 +3339 53 12 0 +3340 53 13 0 +3341 53 14 0 +3342 53 15 0 +3343 53 16 0 +3344 53 17 0 +3345 53 18 0 +3346 53 19 0 +3347 53 20 0 +3348 53 21 0 +3349 53 22 0 +3350 53 23 0 +3351 53 24 0 +3352 53 25 0 +3353 53 26 0 +3354 53 27 0 +3355 53 28 0 +3356 53 29 0 +3357 53 30 0 +3358 53 31 0 +3359 53 32 0 +3360 53 33 0 +3361 53 34 0 +3362 53 35 0 +3363 53 36 0 +3364 53 37 0 +3365 53 38 0 +3366 53 39 0 +3367 53 40 0 +3368 53 41 0 +3369 53 42 0 +3370 53 43 0 +3371 53 44 0 +3372 53 45 0 +3373 53 46 0 +3374 53 47 0 +3375 53 48 0 +3376 53 49 0 +3377 53 50 0 +3378 53 51 0 +3379 53 52 0 +3380 53 53 0 +3381 53 54 0 +3382 53 55 0 +3383 53 56 0 +3384 53 57 0 +3385 53 58 0 +3386 53 59 0 +3387 53 60 0 +3388 53 61 0 +3389 53 62 0 +3390 53 63 0 +3391 53 64 0 +3392 54 1 0 +3393 54 2 0 +3394 54 3 0 +3395 54 4 0 +3396 54 5 0 +3397 54 6 0 +3398 54 7 0 +3399 54 8 0 +3400 54 9 0 +3401 54 10 0 +3402 54 11 0 +3403 54 12 0 +3404 54 13 0 +3405 54 14 0 +3406 54 15 0 +3407 54 16 0 +3408 54 17 0 +3409 54 18 0 +3410 54 19 0 +3411 54 20 0 +3412 54 21 0 +3413 54 22 0 +3414 54 23 0 +3415 54 24 0 +3416 54 25 0 +3417 54 26 0 +3418 54 27 0 +3419 54 28 0 +3420 54 29 0 +3421 54 30 0 +3422 54 31 0 +3423 54 32 0 +3424 54 33 0 +3425 54 34 0 +3426 54 35 0 +3427 54 36 0 +3428 54 37 0 +3429 54 38 0 +3430 54 39 0 +3431 54 40 0 +3432 54 41 0 +3433 54 42 0 +3434 54 43 0 +3435 54 44 0 +3436 54 45 0 +3437 54 46 0 +3438 54 47 0 +3439 54 48 0 +3440 54 49 0 +3441 54 50 0 +3442 54 51 0 +3443 54 52 0 +3444 54 53 0 +3445 54 54 0 +3446 54 55 0 +3447 54 56 0 +3448 54 57 0 +3449 54 58 0 +3450 54 59 0 +3451 54 60 0 +3452 54 61 0 +3453 54 62 0 +3454 54 63 0 +3455 54 64 0 +3456 55 1 0 +3457 55 2 0 +3458 55 3 0 +3459 55 4 0 +3460 55 5 0 +3461 55 6 0 +3462 55 7 0 +3463 55 8 0 +3464 55 9 0 +3465 55 10 0 +3466 55 11 0 +3467 55 12 0 +3468 55 13 0 +3469 55 14 0 +3470 55 15 0 +3471 55 16 0 +3472 55 17 0 +3473 55 18 0 +3474 55 19 0 +3475 55 20 0 +3476 55 21 0 +3477 55 22 0 +3478 55 23 0 +3479 55 24 0 +3480 55 25 0 +3481 55 26 0 +3482 55 27 0 +3483 55 28 0 +3484 55 29 0 +3485 55 30 0 +3486 55 31 0 +3487 55 32 0 +3488 55 33 0 +3489 55 34 0 +3490 55 35 0 +3491 55 36 0 +3492 55 37 0 +3493 55 38 0 +3494 55 39 0 +3495 55 40 0 +3496 55 41 0 +3497 55 42 0 +3498 55 43 0 +3499 55 44 0 +3500 55 45 0 +3501 55 46 0 +3502 55 47 0 +3503 55 48 0 +3504 55 49 0 +3505 55 50 0 +3506 55 51 0 +3507 55 52 0 +3508 55 53 0 +3509 55 54 0 +3510 55 55 0 +3511 55 56 0 +3512 55 57 0 +3513 55 58 0 +3514 55 59 0 +3515 55 60 0 +3516 55 61 0 +3517 55 62 0 +3518 55 63 0 +3519 55 64 0 +3520 56 1 0 +3521 56 2 0 +3522 56 3 0 +3523 56 4 0 +3524 56 5 0 +3525 56 6 0 +3526 56 7 0 +3527 56 8 0 +3528 56 9 0 +3529 56 10 0 +3530 56 11 0 +3531 56 12 0 +3532 56 13 0 +3533 56 14 0 +3534 56 15 0 +3535 56 16 0 +3536 56 17 0 +3537 56 18 0 +3538 56 19 0 +3539 56 20 0 +3540 56 21 0 +3541 56 22 0 +3542 56 23 0 +3543 56 24 0 +3544 56 25 0 +3545 56 26 0 +3546 56 27 0 +3547 56 28 0 +3548 56 29 0 +3549 56 30 0 +3550 56 31 0 +3551 56 32 0 +3552 56 33 0 +3553 56 34 0 +3554 56 35 0 +3555 56 36 0 +3556 56 37 0 +3557 56 38 0 +3558 56 39 0 +3559 56 40 0 +3560 56 41 0 +3561 56 42 0 +3562 56 43 0 +3563 56 44 0 +3564 56 45 0 +3565 56 46 0 +3566 56 47 0 +3567 56 48 0 +3568 56 49 0 +3569 56 50 0 +3570 56 51 0 +3571 56 52 0 +3572 56 53 0 +3573 56 54 0 +3574 56 55 0 +3575 56 56 0 +3576 56 57 0 +3577 56 58 0 +3578 56 59 0 +3579 56 60 0 +3580 56 61 0 +3581 56 62 0 +3582 56 63 0 +3583 56 64 0 +3584 57 1 0 +3585 57 2 0 +3586 57 3 0 +3587 57 4 0 +3588 57 5 0 +3589 57 6 0 +3590 57 7 0 +3591 57 8 0 +3592 57 9 0 +3593 57 10 0 +3594 57 11 0 +3595 57 12 0 +3596 57 13 0 +3597 57 14 0 +3598 57 15 0 +3599 57 16 0 +3600 57 17 0 +3601 57 18 0 +3602 57 19 0 +3603 57 20 0 +3604 57 21 0 +3605 57 22 0 +3606 57 23 0 +3607 57 24 0 +3608 57 25 0 +3609 57 26 0 +3610 57 27 0 +3611 57 28 0 +3612 57 29 0 +3613 57 30 0 +3614 57 31 0 +3615 57 32 0 +3616 57 33 0 +3617 57 34 0 +3618 57 35 0 +3619 57 36 0 +3620 57 37 0 +3621 57 38 0 +3622 57 39 0 +3623 57 40 0 +3624 57 41 0 +3625 57 42 0 +3626 57 43 0 +3627 57 44 0 +3628 57 45 0 +3629 57 46 0 +3630 57 47 0 +3631 57 48 0 +3632 57 49 0 +3633 57 50 0 +3634 57 51 0 +3635 57 52 0 +3636 57 53 0 +3637 57 54 0 +3638 57 55 0 +3639 57 56 0 +3640 57 57 0 +3641 57 58 0 +3642 57 59 0 +3643 57 60 0 +3644 57 61 0 +3645 57 62 0 +3646 57 63 0 +3647 57 64 0 +3648 58 1 0 +3649 58 2 0 +3650 58 3 0 +3651 58 4 0 +3652 58 5 0 +3653 58 6 0 +3654 58 7 0 +3655 58 8 0 +3656 58 9 0 +3657 58 10 0 +3658 58 11 0 +3659 58 12 0 +3660 58 13 0 +3661 58 14 0 +3662 58 15 0 +3663 58 16 0 +3664 58 17 0 +3665 58 18 0 +3666 58 19 0 +3667 58 20 0 +3668 58 21 0 +3669 58 22 0 +3670 58 23 0 +3671 58 24 0 +3672 58 25 0 +3673 58 26 0 +3674 58 27 0 +3675 58 28 0 +3676 58 29 0 +3677 58 30 0 +3678 58 31 0 +3679 58 32 0 +3680 58 33 0 +3681 58 34 0 +3682 58 35 0 +3683 58 36 0 +3684 58 37 0 +3685 58 38 0 +3686 58 39 0 +3687 58 40 0 +3688 58 41 0 +3689 58 42 0 +3690 58 43 0 +3691 58 44 0 +3692 58 45 0 +3693 58 46 0 +3694 58 47 0 +3695 58 48 0 +3696 58 49 0 +3697 58 50 0 +3698 58 51 0 +3699 58 52 0 +3700 58 53 0 +3701 58 54 0 +3702 58 55 0 +3703 58 56 0 +3704 58 57 0 +3705 58 58 0 +3706 58 59 0 +3707 58 60 0 +3708 58 61 0 +3709 58 62 0 +3710 58 63 0 +3711 58 64 0 +3712 59 1 0 +3713 59 2 0 +3714 59 3 0 +3715 59 4 0 +3716 59 5 0 +3717 59 6 0 +3718 59 7 0 +3719 59 8 0 +3720 59 9 0 +3721 59 10 0 +3722 59 11 0 +3723 59 12 0 +3724 59 13 0 +3725 59 14 0 +3726 59 15 0 +3727 59 16 0 +3728 59 17 0 +3729 59 18 0 +3730 59 19 0 +3731 59 20 0 +3732 59 21 0 +3733 59 22 0 +3734 59 23 0 +3735 59 24 0 +3736 59 25 0 +3737 59 26 0 +3738 59 27 0 +3739 59 28 0 +3740 59 29 0 +3741 59 30 0 +3742 59 31 0 +3743 59 32 0 +3744 59 33 0 +3745 59 34 0 +3746 59 35 0 +3747 59 36 0 +3748 59 37 0 +3749 59 38 0 +3750 59 39 0 +3751 59 40 0 +3752 59 41 0 +3753 59 42 0 +3754 59 43 0 +3755 59 44 0 +3756 59 45 0 +3757 59 46 0 +3758 59 47 0 +3759 59 48 0 +3760 59 49 0 +3761 59 50 0 +3762 59 51 0 +3763 59 52 0 +3764 59 53 0 +3765 59 54 0 +3766 59 55 0 +3767 59 56 0 +3768 59 57 0 +3769 59 58 0 +3770 59 59 0 +3771 59 60 0 +3772 59 61 0 +3773 59 62 0 +3774 59 63 0 +3775 59 64 0 +3776 60 1 0 +3777 60 2 0 +3778 60 3 0 +3779 60 4 0 +3780 60 5 0 +3781 60 6 0 +3782 60 7 0 +3783 60 8 0 +3784 60 9 0 +3785 60 10 0 +3786 60 11 0 +3787 60 12 0 +3788 60 13 0 +3789 60 14 0 +3790 60 15 0 +3791 60 16 0 +3792 60 17 0 +3793 60 18 0 +3794 60 19 0 +3795 60 20 0 +3796 60 21 0 +3797 60 22 0 +3798 60 23 0 +3799 60 24 0 +3800 60 25 0 +3801 60 26 0 +3802 60 27 0 +3803 60 28 0 +3804 60 29 0 +3805 60 30 0 +3806 60 31 0 +3807 60 32 0 +3808 60 33 0 +3809 60 34 0 +3810 60 35 0 +3811 60 36 0 +3812 60 37 0 +3813 60 38 0 +3814 60 39 0 +3815 60 40 0 +3816 60 41 0 +3817 60 42 0 +3818 60 43 0 +3819 60 44 0 +3820 60 45 0 +3821 60 46 0 +3822 60 47 0 +3823 60 48 0 +3824 60 49 0 +3825 60 50 0 +3826 60 51 0 +3827 60 52 0 +3828 60 53 0 +3829 60 54 0 +3830 60 55 0 +3831 60 56 0 +3832 60 57 0 +3833 60 58 0 +3834 60 59 0 +3835 60 60 0 +3836 60 61 0 +3837 60 62 0 +3838 60 63 0 +3839 60 64 0 +3840 61 1 0 +3841 61 2 0 +3842 61 3 0 +3843 61 4 0 +3844 61 5 0 +3845 61 6 0 +3846 61 7 0 +3847 61 8 0 +3848 61 9 0 +3849 61 10 0 +3850 61 11 0 +3851 61 12 0 +3852 61 13 0 +3853 61 14 0 +3854 61 15 0 +3855 61 16 0 +3856 61 17 0 +3857 61 18 0 +3858 61 19 0 +3859 61 20 0 +3860 61 21 0 +3861 61 22 0 +3862 61 23 0 +3863 61 24 0 +3864 61 25 0 +3865 61 26 0 +3866 61 27 0 +3867 61 28 0 +3868 61 29 0 +3869 61 30 0 +3870 61 31 0 +3871 61 32 0 +3872 61 33 0 +3873 61 34 0 +3874 61 35 0 +3875 61 36 0 +3876 61 37 0 +3877 61 38 0 +3878 61 39 0 +3879 61 40 0 +3880 61 41 0 +3881 61 42 0 +3882 61 43 0 +3883 61 44 0 +3884 61 45 0 +3885 61 46 0 +3886 61 47 0 +3887 61 48 0 +3888 61 49 0 +3889 61 50 0 +3890 61 51 0 +3891 61 52 0 +3892 61 53 0 +3893 61 54 0 +3894 61 55 0 +3895 61 56 0 +3896 61 57 0 +3897 61 58 0 +3898 61 59 0 +3899 61 60 0 +3900 61 61 0 +3901 61 62 0 +3902 61 63 0 +3903 61 64 0 +3904 62 1 0 +3905 62 2 0 +3906 62 3 0 +3907 62 4 0 +3908 62 5 0 +3909 62 6 0 +3910 62 7 0 +3911 62 8 0 +3912 62 9 0 +3913 62 10 0 +3914 62 11 0 +3915 62 12 0 +3916 62 13 0 +3917 62 14 0 +3918 62 15 0 +3919 62 16 0 +3920 62 17 0 +3921 62 18 0 +3922 62 19 0 +3923 62 20 0 +3924 62 21 0 +3925 62 22 0 +3926 62 23 0 +3927 62 24 0 +3928 62 25 0 +3929 62 26 0 +3930 62 27 0 +3931 62 28 0 +3932 62 29 0 +3933 62 30 0 +3934 62 31 0 +3935 62 32 0 +3936 62 33 0 +3937 62 34 0 +3938 62 35 0 +3939 62 36 0 +3940 62 37 0 +3941 62 38 0 +3942 62 39 0 +3943 62 40 0 +3944 62 41 0 +3945 62 42 0 +3946 62 43 0 +3947 62 44 0 +3948 62 45 0 +3949 62 46 0 +3950 62 47 0 +3951 62 48 0 +3952 62 49 0 +3953 62 50 0 +3954 62 51 0 +3955 62 52 0 +3956 62 53 0 +3957 62 54 0 +3958 62 55 0 +3959 62 56 0 +3960 62 57 0 +3961 62 58 0 +3962 62 59 0 +3963 62 60 0 +3964 62 61 0 +3965 62 62 0 +3966 62 63 0 +3967 62 64 0 +3968 63 1 0 +3969 63 2 0 +3970 63 3 0 +3971 63 4 0 +3972 63 5 0 +3973 63 6 0 +3974 63 7 0 +3975 63 8 0 +3976 63 9 0 +3977 63 10 0 +3978 63 11 0 +3979 63 12 0 +3980 63 13 0 +3981 63 14 0 +3982 63 15 0 +3983 63 16 0 +3984 63 17 0 +3985 63 18 0 +3986 63 19 0 +3987 63 20 0 +3988 63 21 0 +3989 63 22 0 +3990 63 23 0 +3991 63 24 0 +3992 63 25 0 +3993 63 26 0 +3994 63 27 0 +3995 63 28 0 +3996 63 29 0 +3997 63 30 0 +3998 63 31 0 +3999 63 32 0 +4000 63 33 0 +4001 63 34 0 +4002 63 35 0 +4003 63 36 0 +4004 63 37 0 +4005 63 38 0 +4006 63 39 0 +4007 63 40 0 +4008 63 41 0 +4009 63 42 0 +4010 63 43 0 +4011 63 44 0 +4012 63 45 0 +4013 63 46 0 +4014 63 47 0 +4015 63 48 0 +4016 63 49 0 +4017 63 50 0 +4018 63 51 0 +4019 63 52 0 +4020 63 53 0 +4021 63 54 0 +4022 63 55 0 +4023 63 56 0 +4024 63 57 0 +4025 63 58 0 +4026 63 59 0 +4027 63 60 0 +4028 63 61 0 +4029 63 62 0 +4030 63 63 0 +4031 63 64 0 +4032 64 1 0 +4033 64 2 0 +4034 64 3 0 +4035 64 4 0 +4036 64 5 0 +4037 64 6 0 +4038 64 7 0 +4039 64 8 0 +4040 64 9 0 +4041 64 10 0 +4042 64 11 0 +4043 64 12 0 +4044 64 13 0 +4045 64 14 0 +4046 64 15 0 +4047 64 16 0 +4048 64 17 0 +4049 64 18 0 +4050 64 19 0 +4051 64 20 0 +4052 64 21 0 +4053 64 22 0 +4054 64 23 0 +4055 64 24 0 +4056 64 25 0 +4057 64 26 0 +4058 64 27 0 +4059 64 28 0 +4060 64 29 0 +4061 64 30 0 +4062 64 31 0 +4063 64 32 0 +4064 64 33 0 +4065 64 34 0 +4066 64 35 0 +4067 64 36 0 +4068 64 37 0 +4069 64 38 0 +4070 64 39 0 +4071 64 40 0 +4072 64 41 0 +4073 64 42 0 +4074 64 43 0 +4075 64 44 0 +4076 64 45 0 +4077 64 46 0 +4078 64 47 0 +4079 64 48 0 +4080 64 49 0 +4081 64 50 0 +4082 64 51 0 +4083 64 52 0 +4084 64 53 0 +4085 64 54 0 +4086 64 55 0 +4087 64 56 0 +4088 64 57 0 +4089 64 58 0 +4090 64 59 0 +4091 64 60 0 +4092 64 61 0 +4093 64 62 0 +4094 64 63 0 +4095 64 64 0 +4096 65 1 0 +4097 65 2 0 +4098 65 3 0 +4099 65 4 0 +4100 65 5 0 +4101 65 6 0 +4102 65 7 0 +4103 65 8 0 +4104 65 9 0 +4105 65 10 0 +4106 65 11 0 +4107 65 12 0 +4108 65 13 0 +4109 65 14 0 +4110 65 15 0 +4111 65 16 0 +4112 65 17 0 +4113 65 18 0 +4114 65 19 0 +4115 65 20 0 +4116 65 21 0 +4117 65 22 0 +4118 65 23 0 +4119 65 24 0 +4120 65 25 0 +4121 65 26 0 +4122 65 27 0 +4123 65 28 0 +4124 65 29 0 +4125 65 30 0 +4126 65 31 0 +4127 65 32 0 +4128 65 33 0 +4129 65 34 0 +4130 65 35 0 +4131 65 36 0 +4132 65 37 0 +4133 65 38 0 +4134 65 39 0 +4135 65 40 0 +4136 65 41 0 +4137 65 42 0 +4138 65 43 0 +4139 65 44 0 +4140 65 45 0 +4141 65 46 0 +4142 65 47 0 +4143 65 48 0 +4144 65 49 0 +4145 65 50 0 +4146 65 51 0 +4147 65 52 0 +4148 65 53 0 +4149 65 54 0 +4150 65 55 0 +4151 65 56 0 +4152 65 57 0 +4153 65 58 0 +4154 65 59 0 +4155 65 60 0 +4156 65 61 0 +4157 65 62 0 +4158 65 63 0 +4159 65 64 0 +4160 66 1 0 +4161 66 2 0 +4162 66 3 0 +4163 66 4 0 +4164 66 5 0 +4165 66 6 0 +4166 66 7 0 +4167 66 8 0 +4168 66 9 0 +4169 66 10 0 +4170 66 11 0 +4171 66 12 0 +4172 66 13 0 +4173 66 14 0 +4174 66 15 0 +4175 66 16 0 +4176 66 17 0 +4177 66 18 0 +4178 66 19 0 +4179 66 20 0 +4180 66 21 0 +4181 66 22 0 +4182 66 23 0 +4183 66 24 0 +4184 66 25 0 +4185 66 26 0 +4186 66 27 0 +4187 66 28 0 +4188 66 29 0 +4189 66 30 0 +4190 66 31 0 +4191 66 32 0 +4192 66 33 0 +4193 66 34 0 +4194 66 35 0 +4195 66 36 0 +4196 66 37 0 +4197 66 38 0 +4198 66 39 0 +4199 66 40 0 +4200 66 41 0 +4201 66 42 0 +4202 66 43 0 +4203 66 44 0 +4204 66 45 0 +4205 66 46 0 +4206 66 47 0 +4207 66 48 0 +4208 66 49 0 +4209 66 50 0 +4210 66 51 0 +4211 66 52 0 +4212 66 53 0 +4213 66 54 0 +4214 66 55 0 +4215 66 56 0 +4216 66 57 0 +4217 66 58 0 +4218 66 59 0 +4219 66 60 0 +4220 66 61 0 +4221 66 62 0 +4222 66 63 0 +4223 66 64 0 +4224 67 1 0 +4225 67 2 0 +4226 67 3 0 +4227 67 4 0 +4228 67 5 0 +4229 67 6 0 +4230 67 7 0 +4231 67 8 0 +4232 67 9 0 +4233 67 10 0 +4234 67 11 0 +4235 67 12 0 +4236 67 13 0 +4237 67 14 0 +4238 67 15 0 +4239 67 16 0 +4240 67 17 0 +4241 67 18 0 +4242 67 19 0 +4243 67 20 0 +4244 67 21 0 +4245 67 22 0 +4246 67 23 0 +4247 67 24 0 +4248 67 25 0 +4249 67 26 0 +4250 67 27 0 +4251 67 28 0 +4252 67 29 0 +4253 67 30 0 +4254 67 31 0 +4255 67 32 0 +4256 67 33 0 +4257 67 34 0 +4258 67 35 0 +4259 67 36 0 +4260 67 37 0 +4261 67 38 0 +4262 67 39 0 +4263 67 40 0 +4264 67 41 0 +4265 67 42 0 +4266 67 43 0 +4267 67 44 0 +4268 67 45 0 +4269 67 46 0 +4270 67 47 0 +4271 67 48 0 +4272 67 49 0 +4273 67 50 0 +4274 67 51 0 +4275 67 52 0 +4276 67 53 0 +4277 67 54 0 +4278 67 55 0 +4279 67 56 0 +4280 67 57 0 +4281 67 58 0 +4282 67 59 0 +4283 67 60 0 +4284 67 61 0 +4285 67 62 0 +4286 67 63 0 +4287 67 64 0 +4288 68 1 0 +4289 68 2 0 +4290 68 3 0 +4291 68 4 0 +4292 68 5 0 +4293 68 6 0 +4294 68 7 0 +4295 68 8 0 +4296 68 9 0 +4297 68 10 0 +4298 68 11 0 +4299 68 12 0 +4300 68 13 0 +4301 68 14 0 +4302 68 15 0 +4303 68 16 0 +4304 68 17 0 +4305 68 18 0 +4306 68 19 0 +4307 68 20 0 +4308 68 21 0 +4309 68 22 0 +4310 68 23 0 +4311 68 24 0 +4312 68 25 0 +4313 68 26 0 +4314 68 27 0 +4315 68 28 0 +4316 68 29 0 +4317 68 30 0 +4318 68 31 0 +4319 68 32 0 +4320 68 33 0 +4321 68 34 0 +4322 68 35 0 +4323 68 36 0 +4324 68 37 0 +4325 68 38 0 +4326 68 39 0 +4327 68 40 0 +4328 68 41 0 +4329 68 42 0 +4330 68 43 0 +4331 68 44 0 +4332 68 45 0 +4333 68 46 0 +4334 68 47 0 +4335 68 48 0 +4336 68 49 0 +4337 68 50 0 +4338 68 51 0 +4339 68 52 0 +4340 68 53 0 +4341 68 54 0 +4342 68 55 0 +4343 68 56 0 +4344 68 57 0 +4345 68 58 0 +4346 68 59 0 +4347 68 60 0 +4348 68 61 0 +4349 68 62 0 +4350 68 63 0 +4351 68 64 0 +4352 69 1 0 +4353 69 2 0 +4354 69 3 0 +4355 69 4 0 +4356 69 5 0 +4357 69 6 0 +4358 69 7 0 +4359 69 8 0 +4360 69 9 0 +4361 69 10 0 +4362 69 11 0 +4363 69 12 0 +4364 69 13 0 +4365 69 14 0 +4366 69 15 0 +4367 69 16 0 +4368 69 17 0 +4369 69 18 0 +4370 69 19 0 +4371 69 20 0 +4372 69 21 0 +4373 69 22 0 +4374 69 23 0 +4375 69 24 0 +4376 69 25 0 +4377 69 26 0 +4378 69 27 0 +4379 69 28 0 +4380 69 29 0 +4381 69 30 0 +4382 69 31 0 +4383 69 32 0 +4384 69 33 0 +4385 69 34 0 +4386 69 35 0 +4387 69 36 0 +4388 69 37 0 +4389 69 38 0 +4390 69 39 0 +4391 69 40 0 +4392 69 41 0 +4393 69 42 0 +4394 69 43 0 +4395 69 44 0 +4396 69 45 0 +4397 69 46 0 +4398 69 47 0 +4399 69 48 0 +4400 69 49 0 +4401 69 50 0 +4402 69 51 0 +4403 69 52 0 +4404 69 53 0 +4405 69 54 0 +4406 69 55 0 +4407 69 56 0 +4408 69 57 0 +4409 69 58 0 +4410 69 59 0 +4411 69 60 0 +4412 69 61 0 +4413 69 62 0 +4414 69 63 0 +4415 69 64 0 +4416 70 1 0 +4417 70 2 0 +4418 70 3 0 +4419 70 4 0 +4420 70 5 0 +4421 70 6 0 +4422 70 7 0 +4423 70 8 0 +4424 70 9 0 +4425 70 10 0 +4426 70 11 0 +4427 70 12 0 +4428 70 13 0 +4429 70 14 0 +4430 70 15 0 +4431 70 16 0 +4432 70 17 0 +4433 70 18 0 +4434 70 19 0 +4435 70 20 0 +4436 70 21 0 +4437 70 22 0 +4438 70 23 0 +4439 70 24 0 +4440 70 25 0 +4441 70 26 0 +4442 70 27 0 +4443 70 28 0 +4444 70 29 0 +4445 70 30 0 +4446 70 31 0 +4447 70 32 0 +4448 70 33 0 +4449 70 34 0 +4450 70 35 0 +4451 70 36 0 +4452 70 37 0 +4453 70 38 0 +4454 70 39 0 +4455 70 40 0 +4456 70 41 0 +4457 70 42 0 +4458 70 43 0 +4459 70 44 0 +4460 70 45 0 +4461 70 46 0 +4462 70 47 0 +4463 70 48 0 +4464 70 49 0 +4465 70 50 0 +4466 70 51 0 +4467 70 52 0 +4468 70 53 0 +4469 70 54 0 +4470 70 55 0 +4471 70 56 0 +4472 70 57 0 +4473 70 58 0 +4474 70 59 0 +4475 70 60 0 +4476 70 61 0 +4477 70 62 0 +4478 70 63 0 +4479 70 64 0 +4480 71 1 0 +4481 71 2 0 +4482 71 3 0 +4483 71 4 0 +4484 71 5 0 +4485 71 6 0 +4486 71 7 0 +4487 71 8 0 +4488 71 9 0 +4489 71 10 0 +4490 71 11 0 +4491 71 12 0 +4492 71 13 0 +4493 71 14 0 +4494 71 15 0 +4495 71 16 0 +4496 71 17 0 +4497 71 18 0 +4498 71 19 0 +4499 71 20 0 +4500 71 21 0 +4501 71 22 0 +4502 71 23 0 +4503 71 24 0 +4504 71 25 0 +4505 71 26 0 +4506 71 27 0 +4507 71 28 0 +4508 71 29 0 +4509 71 30 0 +4510 71 31 0 +4511 71 32 0 +4512 71 33 0 +4513 71 34 0 +4514 71 35 0 +4515 71 36 0 +4516 71 37 0 +4517 71 38 0 +4518 71 39 0 +4519 71 40 0 +4520 71 41 0 +4521 71 42 0 +4522 71 43 0 +4523 71 44 0 +4524 71 45 0 +4525 71 46 0 +4526 71 47 0 +4527 71 48 0 +4528 71 49 0 +4529 71 50 0 +4530 71 51 0 +4531 71 52 0 +4532 71 53 0 +4533 71 54 0 +4534 71 55 0 +4535 71 56 0 +4536 71 57 0 +4537 71 58 0 +4538 71 59 0 +4539 71 60 0 +4540 71 61 0 +4541 71 62 0 +4542 71 63 0 +4543 71 64 0 +4544 72 1 0 +4545 72 2 0 +4546 72 3 0 +4547 72 4 0 +4548 72 5 0 +4549 72 6 0 +4550 72 7 0 +4551 72 8 0 +4552 72 9 0 +4553 72 10 0 +4554 72 11 0 +4555 72 12 0 +4556 72 13 0 +4557 72 14 0 +4558 72 15 0 +4559 72 16 0 +4560 72 17 0 +4561 72 18 0 +4562 72 19 0 +4563 72 20 0 +4564 72 21 0 +4565 72 22 0 +4566 72 23 0 +4567 72 24 0 +4568 72 25 0 +4569 72 26 0 +4570 72 27 0 +4571 72 28 0 +4572 72 29 0 +4573 72 30 0 +4574 72 31 0 +4575 72 32 0 +4576 72 33 0 +4577 72 34 0 +4578 72 35 0 +4579 72 36 0 +4580 72 37 0 +4581 72 38 0 +4582 72 39 0 +4583 72 40 0 +4584 72 41 0 +4585 72 42 0 +4586 72 43 0 +4587 72 44 0 +4588 72 45 0 +4589 72 46 0 +4590 72 47 0 +4591 72 48 0 +4592 72 49 0 +4593 72 50 0 +4594 72 51 0 +4595 72 52 0 +4596 72 53 0 +4597 72 54 0 +4598 72 55 0 +4599 72 56 0 +4600 72 57 0 +4601 72 58 0 +4602 72 59 0 +4603 72 60 0 +4604 72 61 0 +4605 72 62 0 +4606 72 63 0 +4607 72 64 0 +4608 73 1 0 +4609 73 2 0 +4610 73 3 0 +4611 73 4 0 +4612 73 5 0 +4613 73 6 0 +4614 73 7 0 +4615 73 8 0 +4616 73 9 0 +4617 73 10 0 +4618 73 11 0 +4619 73 12 0 +4620 73 13 0 +4621 73 14 0 +4622 73 15 0 +4623 73 16 0 +4624 73 17 0 +4625 73 18 0 +4626 73 19 0 +4627 73 20 0 +4628 73 21 0 +4629 73 22 0 +4630 73 23 0 +4631 73 24 0 +4632 73 25 0 +4633 73 26 0 +4634 73 27 0 +4635 73 28 0 +4636 73 29 0 +4637 73 30 0 +4638 73 31 0 +4639 73 32 0 +4640 73 33 0 +4641 73 34 0 +4642 73 35 0 +4643 73 36 0 +4644 73 37 0 +4645 73 38 0 +4646 73 39 0 +4647 73 40 0 +4648 73 41 0 +4649 73 42 0 +4650 73 43 0 +4651 73 44 0 +4652 73 45 0 +4653 73 46 0 +4654 73 47 0 +4655 73 48 0 +4656 73 49 0 +4657 73 50 0 +4658 73 51 0 +4659 73 52 0 +4660 73 53 0 +4661 73 54 0 +4662 73 55 0 +4663 73 56 0 +4664 73 57 0 +4665 73 58 0 +4666 73 59 0 +4667 73 60 0 +4668 73 61 0 +4669 73 62 0 +4670 73 63 0 +4671 73 64 0 +4672 74 1 0 +4673 74 2 0 +4674 74 3 0 +4675 74 4 0 +4676 74 5 0 +4677 74 6 0 +4678 74 7 0 +4679 74 8 0 +4680 74 9 0 +4681 74 10 0 +4682 74 11 0 +4683 74 12 0 +4684 74 13 0 +4685 74 14 0 +4686 74 15 0 +4687 74 16 0 +4688 74 17 0 +4689 74 18 0 +4690 74 19 0 +4691 74 20 0 +4692 74 21 0 +4693 74 22 0 +4694 74 23 0 +4695 74 24 0 +4696 74 25 0 +4697 74 26 0 +4698 74 27 0 +4699 74 28 0 +4700 74 29 0 +4701 74 30 0 +4702 74 31 0 +4703 74 32 0 +4704 74 33 0 +4705 74 34 0 +4706 74 35 0 +4707 74 36 0 +4708 74 37 0 +4709 74 38 0 +4710 74 39 0 +4711 74 40 0 +4712 74 41 0 +4713 74 42 0 +4714 74 43 0 +4715 74 44 0 +4716 74 45 0 +4717 74 46 0 +4718 74 47 0 +4719 74 48 0 +4720 74 49 0 +4721 74 50 0 +4722 74 51 0 +4723 74 52 0 +4724 74 53 0 +4725 74 54 0 +4726 74 55 0 +4727 74 56 0 +4728 74 57 0 +4729 74 58 0 +4730 74 59 0 +4731 74 60 0 +4732 74 61 0 +4733 74 62 0 +4734 74 63 0 +4735 74 64 0 +4736 75 1 0 +4737 75 2 0 +4738 75 3 0 +4739 75 4 0 +4740 75 5 0 +4741 75 6 0 +4742 75 7 0 +4743 75 8 0 +4744 75 9 0 +4745 75 10 0 +4746 75 11 0 +4747 75 12 0 +4748 75 13 0 +4749 75 14 0 +4750 75 15 0 +4751 75 16 0 +4752 75 17 0 +4753 75 18 0 +4754 75 19 0 +4755 75 20 0 +4756 75 21 0 +4757 75 22 0 +4758 75 23 0 +4759 75 24 0 +4760 75 25 0 +4761 75 26 0 +4762 75 27 0 +4763 75 28 0 +4764 75 29 0 +4765 75 30 0 +4766 75 31 0 +4767 75 32 0 +4768 75 33 0 +4769 75 34 0 +4770 75 35 0 +4771 75 36 0 +4772 75 37 0 +4773 75 38 0 +4774 75 39 0 +4775 75 40 0 +4776 75 41 0 +4777 75 42 0 +4778 75 43 0 +4779 75 44 0 +4780 75 45 0 +4781 75 46 0 +4782 75 47 0 +4783 75 48 0 +4784 75 49 0 +4785 75 50 0 +4786 75 51 0 +4787 75 52 0 +4788 75 53 0 +4789 75 54 0 +4790 75 55 0 +4791 75 56 0 +4792 75 57 0 +4793 75 58 0 +4794 75 59 0 +4795 75 60 0 +4796 75 61 0 +4797 75 62 0 +4798 75 63 0 +4799 75 64 0 +4800 76 1 0 +4801 76 2 0 +4802 76 3 0 +4803 76 4 0 +4804 76 5 0 +4805 76 6 0 +4806 76 7 0 +4807 76 8 0 +4808 76 9 0 +4809 76 10 0 +4810 76 11 0 +4811 76 12 0 +4812 76 13 0 +4813 76 14 0 +4814 76 15 0 +4815 76 16 0 +4816 76 17 0 +4817 76 18 0 +4818 76 19 0 +4819 76 20 0 +4820 76 21 0 +4821 76 22 0 +4822 76 23 0 +4823 76 24 0 +4824 76 25 0 +4825 76 26 0 +4826 76 27 0 +4827 76 28 0 +4828 76 29 0 +4829 76 30 0 +4830 76 31 0 +4831 76 32 0 +4832 76 33 0 +4833 76 34 0 +4834 76 35 0 +4835 76 36 0 +4836 76 37 0 +4837 76 38 0 +4838 76 39 0 +4839 76 40 0 +4840 76 41 0 +4841 76 42 0 +4842 76 43 0 +4843 76 44 0 +4844 76 45 0 +4845 76 46 0 +4846 76 47 0 +4847 76 48 0 +4848 76 49 0 +4849 76 50 0 +4850 76 51 0 +4851 76 52 0 +4852 76 53 0 +4853 76 54 0 +4854 76 55 0 +4855 76 56 0 +4856 76 57 0 +4857 76 58 0 +4858 76 59 0 +4859 76 60 0 +4860 76 61 0 +4861 76 62 0 +4862 76 63 0 +4863 76 64 0 +4864 77 1 0 +4865 77 2 0 +4866 77 3 0 +4867 77 4 0 +4868 77 5 0 +4869 77 6 0 +4870 77 7 0 +4871 77 8 0 +4872 77 9 0 +4873 77 10 0 +4874 77 11 0 +4875 77 12 0 +4876 77 13 0 +4877 77 14 0 +4878 77 15 0 +4879 77 16 0 +4880 77 17 0 +4881 77 18 0 +4882 77 19 0 +4883 77 20 0 +4884 77 21 0 +4885 77 22 0 +4886 77 23 0 +4887 77 24 0 +4888 77 25 0 +4889 77 26 0 +4890 77 27 0 +4891 77 28 0 +4892 77 29 0 +4893 77 30 0 +4894 77 31 0 +4895 77 32 0 +4896 77 33 0 +4897 77 34 0 +4898 77 35 0 +4899 77 36 0 +4900 77 37 0 +4901 77 38 0 +4902 77 39 0 +4903 77 40 0 +4904 77 41 0 +4905 77 42 0 +4906 77 43 0 +4907 77 44 0 +4908 77 45 0 +4909 77 46 0 +4910 77 47 0 +4911 77 48 0 +4912 77 49 0 +4913 77 50 0 +4914 77 51 0 +4915 77 52 0 +4916 77 53 0 +4917 77 54 0 +4918 77 55 0 +4919 77 56 0 +4920 77 57 0 +4921 77 58 0 +4922 77 59 0 +4923 77 60 0 +4924 77 61 0 +4925 77 62 0 +4926 77 63 0 +4927 77 64 0 +4928 78 1 0 +4929 78 2 0 +4930 78 3 0 +4931 78 4 0 +4932 78 5 0 +4933 78 6 0 +4934 78 7 0 +4935 78 8 0 +4936 78 9 0 +4937 78 10 0 +4938 78 11 0 +4939 78 12 0 +4940 78 13 0 +4941 78 14 0 +4942 78 15 0 +4943 78 16 0 +4944 78 17 0 +4945 78 18 0 +4946 78 19 0 +4947 78 20 0 +4948 78 21 0 +4949 78 22 0 +4950 78 23 0 +4951 78 24 0 +4952 78 25 0 +4953 78 26 0 +4954 78 27 0 +4955 78 28 0 +4956 78 29 0 +4957 78 30 0 +4958 78 31 0 +4959 78 32 0 +4960 78 33 0 +4961 78 34 0 +4962 78 35 0 +4963 78 36 0 +4964 78 37 0 +4965 78 38 0 +4966 78 39 0 +4967 78 40 0 +4968 78 41 0 +4969 78 42 0 +4970 78 43 0 +4971 78 44 0 +4972 78 45 0 +4973 78 46 0 +4974 78 47 0 +4975 78 48 0 +4976 78 49 0 +4977 78 50 0 +4978 78 51 0 +4979 78 52 0 +4980 78 53 0 +4981 78 54 0 +4982 78 55 0 +4983 78 56 0 +4984 78 57 0 +4985 78 58 0 +4986 78 59 0 +4987 78 60 0 +4988 78 61 0 +4989 78 62 0 +4990 78 63 0 +4991 78 64 0 +4992 79 1 0 +4993 79 2 0 +4994 79 3 0 +4995 79 4 0 +4996 79 5 0 +4997 79 6 0 +4998 79 7 0 +4999 79 8 0 +5000 79 9 0 +5001 79 10 0 +5002 79 11 0 +5003 79 12 0 +5004 79 13 0 +5005 79 14 0 +5006 79 15 0 +5007 79 16 0 +5008 79 17 0 +5009 79 18 0 +5010 79 19 0 +5011 79 20 0 +5012 79 21 0 +5013 79 22 0 +5014 79 23 0 +5015 79 24 0 +5016 79 25 0 +5017 79 26 0 +5018 79 27 0 +5019 79 28 0 +5020 79 29 0 +5021 79 30 0 +5022 79 31 0 +5023 79 32 0 +5024 79 33 0 +5025 79 34 0 +5026 79 35 0 +5027 79 36 0 +5028 79 37 0 +5029 79 38 0 +5030 79 39 0 +5031 79 40 0 +5032 79 41 0 +5033 79 42 0 +5034 79 43 0 +5035 79 44 0 +5036 79 45 0 +5037 79 46 0 +5038 79 47 0 +5039 79 48 0 +5040 79 49 0 +5041 79 50 0 +5042 79 51 0 +5043 79 52 0 +5044 79 53 0 +5045 79 54 0 +5046 79 55 0 +5047 79 56 0 +5048 79 57 0 +5049 79 58 0 +5050 79 59 0 +5051 79 60 0 +5052 79 61 0 +5053 79 62 0 +5054 79 63 0 +5055 79 64 0 +5056 80 1 0 +5057 80 2 0 +5058 80 3 0 +5059 80 4 0 +5060 80 5 0 +5061 80 6 0 +5062 80 7 0 +5063 80 8 0 +5064 80 9 0 +5065 80 10 0 +5066 80 11 0 +5067 80 12 0 +5068 80 13 0 +5069 80 14 0 +5070 80 15 0 +5071 80 16 0 +5072 80 17 0 +5073 80 18 0 +5074 80 19 0 +5075 80 20 0 +5076 80 21 0 +5077 80 22 0 +5078 80 23 0 +5079 80 24 0 +5080 80 25 0 +5081 80 26 0 +5082 80 27 0 +5083 80 28 0 +5084 80 29 0 +5085 80 30 0 +5086 80 31 0 +5087 80 32 0 +5088 80 33 0 +5089 80 34 0 +5090 80 35 0 +5091 80 36 0 +5092 80 37 0 +5093 80 38 0 +5094 80 39 0 +5095 80 40 0 +5096 80 41 0 +5097 80 42 0 +5098 80 43 0 +5099 80 44 0 +5100 80 45 0 +5101 80 46 0 +5102 80 47 0 +5103 80 48 0 +5104 80 49 0 +5105 80 50 0 +5106 80 51 0 +5107 80 52 0 +5108 80 53 0 +5109 80 54 0 +5110 80 55 0 +5111 80 56 0 +5112 80 57 0 +5113 80 58 0 +5114 80 59 0 +5115 80 60 0 +5116 80 61 0 +5117 80 62 0 +5118 80 63 0 +5119 80 64 0 +5120 81 1 30120.8 180730 180746 +5121 81 2 0 +5122 81 3 9261.27 180714 +5123 81 4 6022.89 180714 180826 +5124 81 5 11169.1 180731 180747 180795 +5125 81 6 10675 180763 +5126 81 7 5365.95 180779 +5127 81 8 9435.42 180715 180811 +5128 81 9 27946 180716 180812 +5129 81 10 6032.22 180716 180764 +5130 81 11 4694.83 180748 +5131 81 12 12174.3 180732 180780 +5132 81 13 15098.6 180733 180749 +5133 81 14 335.897 180765 +5134 81 15 161.351 180797 +5135 81 16 13110.4 180717 +5136 81 17 37069.5 180718 +5137 81 18 0 +5138 81 19 8734.19 180750 +5139 81 20 41547.9 180734 180750 180782 +5140 81 21 18065 180719 180751 180782 +5141 81 22 1892.83 180719 +5142 81 23 4336.25 180735 +5143 81 24 286.21 180815 +5144 81 25 15668.2 180736 180816 +5145 81 26 3353.28 180736 +5146 81 27 0 +5147 81 28 2855.34 180720 180752 +5148 81 29 8712.28 180721 +5149 81 30 0 +5150 81 31 0 +5151 81 32 0 +5152 81 33 0 +5153 81 34 0 +5154 81 35 4726.87 180706 +5155 81 36 0 +5156 81 37 4808.8 180723 +5157 81 38 0 +5158 81 39 0 +5159 81 40 5915.45 180707 +5160 81 41 1571.8 180708 +5161 81 42 0 +5162 81 43 0 +5163 81 44 0 +5164 81 45 7488.14 180725 +5165 81 46 0 +5166 81 47 0 +5167 81 48 23782.8 180709 +5168 81 49 9003.43 180710 +5169 81 50 0 +5170 81 51 0 +5171 81 52 4955.42 180726 180742 +5172 81 53 8001.93 180711 180774 +5173 81 54 10210 180711 +5174 81 55 0 +5175 81 56 7313.36 180727 180807 +5176 81 57 4799.6 180728 180808 +5177 81 58 15687.5 180728 +5178 81 59 1341.25 180760 +5179 81 60 47025 180712 180744 +5180 81 61 6053.17 180713 180825 +5181 81 62 17581 180761 +5182 81 63 14128.5 180777 +5183 81 64 34505.7 180729 180745 +5184 82 1 371577 180730 180746 180810 180858 180874 180890 180905 180954 180970 180985 181738 181753 181754 +5185 82 2 285063 180762 180794 180810 180938 180954 181722 +5186 82 3 120665 180714 180778 180906 180922 181002 181018 181786 +5187 82 4 101480 180714 180826 180842 180906 180986 181002 181770 +5188 82 5 224193 180731 180747 180795 180842 180891 180923 180971 180986 181019 181770 181787 +5189 82 6 215839 180763 180827 180859 180875 180891 180939 180971 181755 181787 +5190 82 7 195136 180779 180843 180875 180907 180939 180955 181003 181739 181819 +5191 82 8 136538 180715 180811 180843 180907 180908 180955 180987 181723 181803 +5192 82 9 126713 180716 180811 180812 180908 180924 180987 180988 181740 181820 +5193 82 10 268050 180764 180844 180860 180892 180924 180972 181772 +5194 82 11 181136 180748 180828 180876 180892 180956 180972 181724 181836 +5195 82 12 314516 180732 180748 180780 180796 180876 180940 180956 181004 181724 181756 181788 +5196 82 13 128986 180733 180749 180765 180796 180845 180877 180940 180957 180973 181741 181757 +5197 82 14 167976 180765 180781 180813 180893 180909 180973 181757 +5198 82 15 217725 180797 180813 180861 180909 180925 181725 +5199 82 16 102343 180717 180797 180829 180925 180941 181725 +5200 82 17 161064 180718 180814 180846 180926 180942 181726 +5201 82 18 110541 180814 180830 180862 180910 180926 +5202 82 19 159485 180750 180766 180798 180878 180894 180910 180974 181758 +5203 82 20 147320 180734 180750 180782 180878 180927 180958 181742 +5204 82 21 237839 180719 180751 180782 180863 180927 180943 181743 181759 +5205 82 22 260400 180719 180783 180799 180831 180863 180879 180943 180959 181743 181839 +5206 82 23 251430 180735 180767 180815 180831 180847 180879 180895 180959 181775 +5207 82 24 163499 180735 180815 180816 180895 180911 180975 180992 181727 181728 181823 +5208 82 25 181223 180736 180816 180848 180911 180912 180960 180992 181728 181744 +5209 82 26 150794 180736 180784 180848 180880 180944 180960 +5210 82 27 206662 180720 180768 180832 180864 180896 180944 180976 181760 +5211 82 28 181661 180720 180721 180752 180800 180849 180896 180928 181009 181777 +5212 82 29 217812 180721 180833 180849 180929 181009 181025 181777 +5213 82 30 147029 180769 180801 180929 180945 +5214 82 31 206100 180785 180801 180817 180865 180961 180977 181761 +5215 82 32 297422 180737 180753 180817 180881 180882 180897 180913 180962 180977 180993 +5216 82 33 269769 180722 180738 180802 180850 180866 180882 180946 180962 +5217 82 34 208242 180754 180770 180786 180802 180914 180930 180946 +5218 82 35 115535 180706 180770 180898 180914 +5219 82 36 80580.9 180706 180739 180818 180834 180898 180915 180978 181762 +5220 82 37 226425 180723 180739 180787 180834 180883 180915 +5221 82 38 183199 180755 180819 180851 180867 180883 180931 180963 +5222 82 39 138198 180771 180835 180867 180899 180931 180947 181731 +5223 82 40 224215 180707 180803 180835 180899 180916 180979 181715 +5224 82 41 117020 180708 180803 180804 180900 180916 181732 +5225 82 42 179823 180708 180756 180836 180852 180884 180900 180964 +5226 82 43 139472 180740 180820 180836 180868 180884 180948 181716 +5227 82 44 296483 180724 180740 180772 180788 180868 180932 180948 181716 181748 +5228 82 45 251422 180725 180741 180788 180837 180869 180932 180949 181733 +5229 82 46 230867 180757 180773 180805 180869 180885 180901 +5230 82 47 103749 180789 180805 180853 180901 180917 +5231 82 48 198720 180709 180789 180821 180917 180933 181717 +5232 82 49 105019 180710 180806 180838 180918 180934 181718 +5233 82 50 101726 180806 180822 180854 180902 180918 181718 +5234 82 51 163052 180742 180758 180790 180822 180886 180902 +5235 82 52 111038 180726 180742 180774 180870 180886 180919 180950 181734 +5236 82 53 217842 180711 180743 180774 180855 180919 180935 181735 181751 +5237 82 54 157992 180711 180775 180791 180855 180871 180935 181735 +5238 82 55 240459 180727 180759 180823 180839 180871 180903 180951 181767 +5239 82 56 170575 180727 180807 180887 180903 180967 181719 181815 +5240 82 57 137435 180728 180808 180840 180887 180904 180984 181720 181736 +5241 82 58 122657 180728 180776 180840 180872 180904 180936 180952 181736 +5242 82 59 169624 180760 180824 180856 180872 180888 180936 180968 181752 +5243 82 60 265999 180712 180744 180760 180792 180841 180888 180920 180968 181784 +5244 82 61 178144 180713 180825 180841 180920 180921 181001 181017 181769 +5245 82 62 102289 180761 180793 180921 180937 181017 181785 +5246 82 63 199822 180777 180793 180809 180857 180937 180953 180969 181721 +5247 82 64 258647 180729 180745 180809 180873 180889 180905 180969 180985 181721 181737 181753 +5248 83 1 350078 180954 180970 180985 181050 181066 181081 181738 181753 181754 181817 181818 182222 182270 +5249 83 2 231542 180938 180954 181034 181050 181114 181722 181754 181802 181818 181866 182254 182270 +5250 83 3 99592.7 181002 181018 181034 181098 181114 181786 181802 181850 181866 182238 182254 +5251 83 4 95072 180986 181002 181051 181082 181770 181786 181834 181850 182223 182238 +5252 83 5 125186 180923 180971 180986 181019 181051 181099 181131 181770 181787 181834 181835 182223 182255 +5253 83 6 182243 180939 180971 181003 181019 181067 181099 181755 181787 181819 181835 182255 +5254 83 7 246055 180955 181003 181035 181067 181083 181147 181739 181803 181819 181867 182239 +5255 83 8 139156 180955 180987 181035 181052 181115 181723 181740 181771 181803 181851 182224 182239 +5256 83 9 180244 180908 180987 180988 181036 181052 181100 181740 181771 181820 181851 181868 182224 +5257 83 10 145136 180972 180988 181036 181084 181100 181772 181804 181820 181868 181884 182224 +5258 83 11 211091 180956 180972 181020 181068 181084 181724 181804 181836 181852 181884 182240 182256 +5259 83 12 138840 180940 181004 181037 181068 181116 181724 181741 181756 181788 181821 181852 182240 +5260 83 13 141139 180957 180973 181037 181053 181741 181757 181821 181837 182257 +5261 83 14 221395 180973 180989 181053 181069 181757 181773 181837 182257 182273 +5262 83 15 243903 180909 180925 180989 181005 181069 181085 181725 181773 181789 182225 +5263 83 16 189950 180925 180941 181005 181021 181101 181725 181789 181805 181806 182225 182241 182242 +5264 83 17 239248 180926 180942 181006 181022 181086 181726 181790 181806 182226 182242 +5265 83 18 117393 180910 180926 180990 181006 181070 181086 181774 181790 182226 +5266 83 19 130538 180974 180990 181054 181070 181758 181774 181838 182258 182274 +5267 83 20 129092 180927 180958 180974 180991 181038 181054 181742 181758 181791 181822 181838 182258 +5268 83 21 192538 180927 180943 180991 181007 181055 181103 181743 181759 181791 181822 181839 181855 +5269 83 22 203822 180943 180959 181007 181071 181743 181807 181839 181887 182243 +5270 83 23 238337 180895 180959 180975 181023 181087 181775 181807 181823 181871 +5271 83 24 285590 180911 180975 180992 181039 181727 181728 181808 181823 181856 182227 +5272 83 25 178083 180912 180960 180992 181040 181120 181728 181744 181776 181808 181856 +5273 83 26 211484 180944 180960 181008 181072 181088 181744 181776 181824 181872 182228 +5274 83 27 214989 180944 180976 181008 181024 181072 181104 181760 181792 181824 181840 182244 +5275 83 28 109340 180928 180976 181009 181024 181056 181777 181792 181841 +5276 83 29 159559 181009 181025 181056 181105 181777 181793 181841 181857 182245 +5277 83 30 122816 180945 180961 181025 181041 181057 181121 181793 181809 181857 +5278 83 31 119379 180961 180977 181057 181073 181745 181761 181809 181825 +5279 83 32 229831 180962 180977 180993 181058 181073 181089 181729 181730 181745 181810 181825 182229 +5280 83 33 224846 180946 180962 181042 181058 181730 181746 181810 182214 +5281 83 34 184341 180930 180946 181026 181042 181714 181794 +5282 83 35 113196 180914 180994 181010 181074 181090 181778 181842 182230 +5283 83 36 158477 180978 180994 181043 181074 181762 181778 181826 181842 182230 +5284 83 37 146616 180915 180963 180978 181011 181043 181762 181779 181826 +5285 83 38 138955 180931 180963 180995 181059 181091 181747 181779 181811 181827 182247 +5286 83 39 161530 180931 180947 180995 181027 181075 181731 181795 181811 181859 182231 +5287 83 40 223812 180899 180947 180979 181027 181044 181107 181715 181732 181763 181795 181843 +5288 83 41 251305 180916 180979 180980 181044 181732 181763 181812 181843 182216 +5289 83 42 232815 180900 180964 180980 181028 181764 181796 181812 181860 +5290 83 43 233535 180884 180948 180964 181012 181076 181716 181796 181828 181876 +5291 83 44 274142 180932 180948 180996 181029 181060 181716 181748 181780 181813 181828 181844 182232 +5292 83 45 179568 180932 180949 180965 181029 181045 181733 181749 181780 181813 182249 +5293 83 46 82350 180885 180901 180965 180981 181045 181061 181749 181765 +5294 83 47 176084 180901 180917 180981 180997 181717 181765 181781 182217 +5295 83 48 163058 180917 180933 180997 181013 181717 181781 181797 182217 182233 +5296 83 49 256709 180918 180934 180998 181014 181718 181782 181797 181798 182218 182234 +5297 83 50 225226 180902 180918 180982 180998 181718 181766 181782 182218 +5298 83 51 188276 180886 180902 180966 180982 181046 181062 181750 181766 +5299 83 52 163873 180950 180966 181030 181046 181734 181750 181814 182250 +5300 83 53 161694 180919 180983 181030 181047 181734 181735 181751 181783 181814 181847 +5301 83 54 121666 180871 180935 180951 180999 181047 181063 181735 181799 181831 181847 181879 182235 +5302 83 55 289457 180903 180951 180967 180999 181015 181063 181767 181799 181815 181831 181863 181879 182235 +5303 83 56 225784 180887 180967 180984 181015 181031 181079 181719 181720 181815 181848 181863 182219 +5304 83 57 223442 180904 180952 180984 181031 181032 181112 181720 181736 181800 181815 181848 182219 +5305 83 58 174974 180952 181000 181032 181080 181736 181768 181800 181816 181864 182220 +5306 83 59 113883 180936 180968 181000 181064 181096 181752 181784 181816 181832 182220 182236 +5307 83 60 95580.4 180920 180968 181016 181048 181096 181769 181784 181832 181833 182236 +5308 83 61 184469 181001 181017 181048 181097 181769 181833 181849 182237 +5309 83 62 111283 181017 181033 181097 181113 181785 181849 182237 +5310 83 63 220714 180953 180969 181049 181065 181129 181721 181801 181865 182253 +5311 83 64 275038 180969 180985 181065 181081 181721 181737 181753 181817 182221 182269 +5312 84 1 203386 181130 181146 181161 181210 181226 181241 181881 181882 181930 182222 182270 +5313 84 2 151978 181114 181130 181194 181210 181866 181882 181914 181930 182254 182270 +5314 84 3 154213 181098 181114 181178 181194 181850 181866 181898 181914 182238 182254 182286 +5315 84 4 124907 181051 181082 181098 181131 181162 181178 181834 181850 181883 181898 182223 182238 182286 182287 +5316 84 5 130468 181099 181131 181162 181211 181835 181883 181931 182223 182255 182287 +5317 84 6 222687 181067 181099 181147 181179 181835 181899 182255 +5318 84 7 162891 181083 181147 181163 181195 181867 181899 181915 181963 182239 182271 182303 +5319 84 8 116712 181083 181115 181163 181227 181851 181867 181915 181947 182224 182239 182271 +5320 84 9 202634 181052 181100 181115 181164 181851 181868 181900 182224 182271 182272 +5321 84 10 187575 181036 181084 181100 181148 181212 181868 181884 181900 181948 182224 182256 182272 +5322 84 11 145987 181068 181084 181132 181148 181196 181852 181884 181916 182240 182256 182288 +5323 84 12 152441 181068 181116 181132 181180 181821 181852 181916 181932 182240 182256 182305 +5324 84 13 163645 181053 181116 181117 181180 181181 181821 181837 181901 181932 182257 182305 +5325 84 14 248913 181053 181069 181117 181133 181773 181837 181853 182257 182273 +5326 84 15 125012 181069 181085 181149 181773 181789 181853 181869 182225 182273 182289 +5327 84 16 215014 181101 181165 181805 181806 181885 181886 182225 182241 182242 182289 +5328 84 17 271231 181086 181102 181150 181166 181790 181806 181870 181886 182226 182242 182290 +5329 84 18 196956 181070 181086 181134 181150 181774 181790 181854 181870 182226 182274 182290 +5330 84 19 159809 181054 181070 181118 181134 181774 181838 181854 182258 182274 +5331 84 20 146819 181038 181054 181103 181118 181167 181182 181822 181838 181902 181935 182258 182259 182306 +5332 84 21 174956 181055 181103 181119 181167 181822 181855 181919 181935 182243 182259 182306 +5333 84 22 253738 181055 181071 181119 181135 181183 181839 181855 181887 181919 182243 182259 182275 +5334 84 23 187972 181023 181071 181087 181135 181151 181871 181887 181903 181951 182227 182243 182275 +5335 84 24 173293 181039 181087 181120 181151 181856 181871 181903 182227 182260 182275 +5336 84 25 107747 181040 181088 181120 181168 181808 181856 181872 181920 182227 182228 182260 +5337 84 26 161930 181072 181088 181152 181168 181200 181824 181872 181904 181920 182228 182260 182292 +5338 84 27 137803 181072 181104 181152 181184 181824 181840 181904 182228 182244 +5339 84 28 127757 181056 181104 181136 181185 181216 181840 181841 181888 181936 182244 182276 +5340 84 29 170108 181056 181105 181121 181185 181201 181841 181857 181888 181905 182245 182276 182293 +5341 84 30 141677 181121 181137 181201 181217 181857 181873 181905 181921 182245 182261 +5342 84 31 196049 181073 181137 181153 181809 181825 181873 181889 182261 182277 +5343 84 32 211885 181058 181073 181089 181138 181153 181169 181810 181825 181874 181889 182229 182277 +5344 84 33 188302 181042 181058 181122 181138 181810 181874 182214 182262 +5345 84 34 116954 181026 181042 181106 181122 181794 181858 182246 +5346 84 35 142613 181074 181090 181106 181170 181186 181842 181858 181890 182230 182246 +5347 84 36 216509 181043 181074 181123 181154 181826 181842 181875 181890 182215 182230 182279 +5348 84 37 156097 181043 181091 181123 181171 181779 181826 181827 181875 181891 182215 182247 182279 +5349 84 38 213472 181059 181091 181139 181171 181811 181827 181859 181891 182247 +5350 84 39 244920 181059 181075 181139 181155 181187 181795 181811 181859 181891 181907 182231 182263 +5351 84 40 184104 181027 181075 181107 181155 181795 181843 181859 181907 182216 182231 182263 +5352 84 41 179443 181044 181092 181107 181156 181812 181843 181860 181892 182216 182264 +5353 84 42 176142 181028 181076 181092 181140 181860 181876 181892 181940 182216 182248 182264 +5354 84 43 126143 181012 181060 181076 181124 181140 181828 181844 181876 181908 182232 182248 +5355 84 44 202259 181060 181108 181124 181172 181813 181844 181908 181924 182232 182248 182297 +5356 84 45 181082 181029 181045 181108 181109 181813 181829 182232 182249 182297 +5357 84 46 123725 181045 181061 181109 181125 181749 181765 181829 181845 182249 182265 +5358 84 47 134587 181061 181077 181125 181141 181765 181781 181845 181861 182217 182265 182281 +5359 84 48 267762 181013 181077 181093 181141 181157 181781 181797 181861 181877 182217 182233 182281 +5360 84 49 213486 181014 181094 181158 181797 181798 181877 181878 182218 182234 182281 182282 +5361 84 50 185267 181062 181078 181142 181766 181782 181846 181862 182218 182266 182282 +5362 84 51 182853 181046 181062 181110 181126 181750 181766 181830 181846 182250 182266 +5363 84 52 192344 181030 181046 181095 181110 181814 181830 182250 182298 +5364 84 53 150645 181047 181095 181111 181159 181814 181847 181911 181927 182251 182298 +5365 84 54 107534 180999 181047 181063 181111 181175 181831 181847 181879 181911 182235 182251 +5366 84 55 123567 181015 181063 181079 181127 181863 181879 181895 181943 182235 182267 +5367 84 56 143292 181031 181079 181112 181143 181848 181863 181895 182219 182267 +5368 84 57 127392 181032 181112 181143 181160 181224 181800 181848 181895 181912 181944 182219 182220 182252 +5369 84 58 169646 181080 181144 181160 181192 181864 181896 181912 182220 182252 182284 +5370 84 59 195647 181064 181096 181144 181176 181816 181832 181864 181896 182220 182236 +5371 84 60 173899 181096 181128 181176 181208 181832 181880 181896 181928 182236 182268 +5372 84 61 126401 181048 181097 181128 181177 181833 181849 181880 181897 182237 182268 182285 +5373 84 62 118565 181097 181113 181129 181193 181209 181849 181865 181897 181913 182237 182253 182285 +5374 84 63 83568.9 181129 181145 181209 181225 181865 181913 182253 +5375 84 64 242868 181145 181161 181225 181241 181881 181929 182221 182269 +5376 85 1 169666 181226 181241 181290 181305 181929 181930 181977 181978 182270 182318 +5377 85 2 96762.3 181194 181210 181258 181274 181914 181930 181962 181978 182254 182270 182302 182318 +5378 85 3 104325 181178 181194 181242 181258 181898 181914 181946 181962 182286 182302 +5379 85 4 138260 181162 181178 181242 181243 181898 181931 181946 182286 182287 +5380 85 5 118377 181211 181243 181291 181323 181931 181946 181979 182286 182287 182319 +5381 85 6 148694 181179 181211 181259 181291 181899 181931 181963 181979 182255 182287 182303 182319 +5382 85 7 150051 181195 181259 181275 181307 181915 181963 181995 182271 182303 +5383 85 8 88424.5 181163 181195 181227 181275 181915 181947 181995 182271 182303 182304 182335 +5384 85 9 118810 181164 181212 181227 181260 181900 181947 181948 181980 182272 182304 +5385 85 10 152503 181148 181196 181212 181244 181260 181948 181964 181980 182272 182288 182304 +5386 85 11 162163 181196 181228 181244 181276 181916 181932 181964 181996 182256 182288 +5387 85 12 139051 181180 181228 181245 181901 181932 181996 182288 182305 182320 +5388 85 13 87249 181181 181197 181245 181261 181901 181917 182305 182321 +5389 85 14 90272.2 181133 181197 181213 181853 181917 181933 182273 182321 +5390 85 15 98414.1 181149 181213 181229 181869 181933 181949 182273 182289 182321 182337 +5391 85 16 136746 181165 181229 181885 181886 181949 181950 182289 182337 +5392 85 17 155599 181150 181166 181214 181230 181870 181886 181934 181950 182290 182338 +5393 85 18 116599 181134 181150 181198 181214 181854 181870 181918 181934 182274 182290 182322 182338 +5394 85 19 108266 181134 181182 181198 181854 181902 181918 182274 182306 182322 +5395 85 20 96493.3 181167 181182 181246 181902 181935 182306 +5396 85 21 102456 181119 181167 181183 181215 181919 181935 181999 182259 182291 182306 182323 +5397 85 22 189033 181135 181183 181215 181231 181919 181951 181967 181999 182243 182259 182291 +5398 85 23 164917 181135 181199 181231 181247 181951 181967 181983 182275 182291 182307 +5399 85 24 132175 181151 181199 181232 181247 181903 181951 181952 181983 182260 182275 182307 +5400 85 25 96790.2 181168 181200 181232 181280 181920 181952 182000 182260 182292 182307 +5401 85 26 142908 181152 181184 181200 181264 181280 181904 181920 181968 182000 182228 182260 182292 +5402 85 27 171136 181184 181216 181264 181296 181904 181936 181968 181984 182244 182276 182292 182308 +5403 85 28 184076 181136 181185 181216 181248 181888 181936 181953 182276 182293 182308 +5404 85 29 125121 181185 181201 181248 181265 181888 181905 181953 182245 182276 182293 +5405 85 30 128628 181201 181217 181265 181281 181905 181921 181953 181969 182245 182261 182293 182309 +5406 85 31 146576 181217 181233 181921 181937 182261 182277 182309 182325 +5407 85 32 62497.4 181218 181249 181874 181889 181922 181937 182277 182325 +5408 85 33 77342.2 181202 181218 181874 181922 182262 182310 +5409 85 34 111872 181186 181202 181906 181922 182246 182262 182294 182310 +5410 85 35 123438 181170 181186 181234 181250 181890 181906 181938 181954 182230 182246 182278 182294 +5411 85 36 131701 181154 181170 181234 181235 181875 181890 181923 181938 182230 182278 182279 +5412 85 37 183226 181123 181203 181235 181875 181923 182247 182279 182311 +5413 85 38 151455 181171 181203 181251 181283 181891 181923 181955 181971 182247 182279 182295 182311 +5414 85 39 128707 181139 181155 181187 181251 181267 181891 181907 181955 181987 182231 182263 182295 +5415 85 40 135089 181155 181187 181219 181267 181907 181939 182263 182296 +5416 85 41 130592 181156 181204 181219 181252 181892 181939 181940 181972 182216 182263 182264 182296 +5417 85 42 127869 181140 181204 181236 181940 181956 182248 182264 182280 +5418 85 43 87304.5 181124 181140 181188 181220 181236 181876 181908 181956 181988 182248 182280 +5419 85 44 147609 181124 181172 181220 181908 181924 182232 182280 182297 +5420 85 45 169086 181109 181172 181173 181237 181829 181893 181924 182297 +5421 85 46 89358.4 181109 181125 181173 181189 181829 181845 181893 181909 182249 182265 182297 182313 +5422 85 47 84158.3 181125 181141 181189 181205 181845 181861 181909 181925 182265 182281 182313 182329 +5423 85 48 170226 181141 181157 181205 181221 181861 181877 181925 181941 182281 182329 +5424 85 49 156794 181158 181222 181877 181878 181941 181942 182281 182282 182329 182330 +5425 85 50 90935.2 181142 181206 181222 181862 181926 181942 182266 182282 182314 182330 +5426 85 51 82875.8 181126 181190 181206 181846 181910 181926 182250 182266 182314 +5427 85 52 125258 181110 181174 181190 181238 181830 181894 181910 182250 182298 182314 +5428 85 53 152653 181159 181174 181207 181238 181894 181927 182251 182298 182315 +5429 85 54 127841 181111 181175 181207 181223 181911 181927 181959 181991 182235 182251 182283 +5430 85 55 151604 181127 181175 181191 181223 181943 181959 182267 182283 +5431 85 56 119333 181143 181191 181224 181239 181895 181943 181944 181975 182267 182299 +5432 85 57 104627 181160 181224 181272 181912 181944 182252 182299 +5433 85 58 118544 181160 181192 181256 181272 181912 181944 181960 181992 182252 182284 +5434 85 59 91258.3 181176 181208 181256 181288 181896 181928 181960 181976 182268 182284 182300 +5435 85 60 93040.8 181208 181240 181288 181928 181976 182236 182268 182300 +5436 85 61 66031.9 181177 181193 181240 181257 181880 181897 181928 181945 182268 182285 +5437 85 62 98155.5 181193 181209 181257 181273 181897 181913 181945 181961 182285 182301 +5438 85 63 148741 181209 181225 181273 181289 181913 181929 181961 181977 182253 182269 182301 182317 +5439 85 64 155313 181225 181241 181289 181305 181929 181977 182269 182317 +5440 86 1 160770 181290 181305 181354 181369 181977 181978 182026 182318 182366 +5441 86 2 105608 181274 181338 181962 181978 182010 182026 182302 182318 182350 182366 +5442 86 3 73259.8 181242 181258 181322 181946 181962 182010 182302 182350 +5443 86 4 126395 181242 181306 181323 181946 181994 182286 182334 +5444 86 5 112217 181291 181323 181979 181994 182319 182334 +5445 86 6 100504 181259 181291 181339 181371 181963 181979 182011 182319 182351 +5446 86 7 140462 181307 181339 181995 182011 182303 182319 182335 182351 +5447 86 8 84620.2 181275 181292 181307 181355 181947 181980 181995 182027 182304 182335 +5448 86 9 63823.8 181260 181292 181308 181356 181980 182012 182304 182335 182336 +5449 86 10 120938 181244 181308 181964 182012 182288 182336 +5450 86 11 74812.2 181244 181276 181340 181964 181996 182028 182288 182320 182336 182352 +5451 86 12 133068 181228 181245 181276 181324 181965 181996 182320 +5452 86 13 94170.4 181245 181261 181309 181324 181901 181917 181965 181981 182320 182321 182353 +5453 86 14 76153.3 181261 181277 181309 181917 181933 181981 181997 182321 182353 +5454 86 15 102580 181213 181229 181277 181293 181933 181949 181997 182013 182321 182337 182353 182369 +5455 86 16 64683.1 181229 181293 181949 181950 182013 182014 182337 182369 +5456 86 17 111830 181230 181294 181950 182014 182338 182370 +5457 86 18 127434 181214 181278 181934 181998 182322 182338 182354 182370 +5458 86 19 29273 181262 181310 181918 181982 182322 182354 +5459 86 20 97723.6 181246 181262 181310 181311 181902 181966 181982 182306 182323 182354 +5460 86 21 130157 181215 181246 181263 181311 181966 181999 182291 182323 +5461 86 22 124921 181231 181263 181295 181327 181967 181999 182015 182031 182291 182339 +5462 86 23 89248.5 181231 181247 181295 181967 181983 182015 182291 182307 182339 +5463 86 24 69279.1 181247 181279 181343 181983 182307 182324 182339 +5464 86 25 100825 181279 181280 181312 181360 181952 181983 182000 182032 182292 182307 182324 +5465 86 26 114000 181264 181312 181344 181968 182000 182016 182292 182308 182324 182340 +5466 86 27 107986 181264 181296 181328 181344 181968 181984 182016 182308 +5467 86 28 120918 181248 181296 181328 181936 181953 181984 182001 182293 182308 182341 +5468 86 29 130439 181248 181265 181329 181953 182001 182293 182341 +5469 86 30 154375 181265 181281 181345 181953 181969 182017 182309 182357 +5470 86 31 114739 181297 181969 181985 182309 182325 182357 +5471 86 32 108139 181282 181313 181970 181985 182325 +5472 86 33 136570 181266 181282 181970 182310 +5473 86 34 114673 181250 181266 181954 181970 182294 182310 182342 +5474 86 35 134260 181234 181250 181298 181314 181938 181954 181986 182002 182278 182294 182326 182342 +5475 86 36 94462.7 181234 181235 181298 181315 181938 181986 182278 182326 +5476 86 37 89203.6 181235 181283 181315 181923 181971 181986 182279 182311 182326 +5477 86 38 90267.1 181251 181283 181331 181955 181971 182003 182295 182311 +5478 86 39 125429 181251 181267 181299 181955 181987 182295 182327 +5479 86 40 143776 181219 181267 181299 181300 181939 181972 181987 182019 182295 182296 182327 +5480 86 41 126622 181252 181284 181300 181972 182296 182328 +5481 86 42 119382 181204 181236 181252 181284 181940 181956 181972 182004 182264 182280 182296 182328 +5482 86 43 108346 181220 181236 181268 181284 181956 181988 182004 182280 182328 +5483 86 44 95744 181220 181237 181268 181316 181924 181957 181988 182280 182312 +5484 86 45 110332 181237 181253 181316 181893 181957 181973 182297 182312 182345 +5485 86 46 57114.1 181189 181253 181909 181973 182313 182345 +5486 86 47 133426 181205 181269 181925 181989 182313 182329 182345 182361 +5487 86 48 66916.7 181221 181285 181941 182329 +5488 86 49 105682 181222 181286 181941 181942 182329 182330 +5489 86 50 110423 181206 181222 181270 181286 181926 181942 181990 182314 182330 182346 182362 +5490 86 51 64643.2 181190 181206 181254 181270 181910 181926 181974 181990 182314 182346 +5491 86 52 94083.7 181238 181254 181303 181894 181910 181958 181974 182298 182314 182315 182346 +5492 86 53 122634 181207 181238 181255 181303 181894 181958 181991 182315 +5493 86 54 106679 181207 181223 181255 181319 181959 181991 182023 182283 182315 182331 +5494 86 55 71549.7 181223 181287 181959 182007 182283 182331 +5495 86 56 38108.9 181239 181271 181287 181335 181975 182007 182299 182331 +5496 86 57 95353.7 181239 181271 181272 181352 181944 181975 181992 182024 182299 182316 +5497 86 58 72841.4 181272 181304 181992 182284 182316 +5498 86 59 85020.8 181256 181288 181304 181336 181960 181976 181992 182008 182284 182300 182332 +5499 86 60 110426 181288 181320 181976 181993 182300 182333 +5500 86 61 90163.8 181240 181257 181320 181321 181945 181993 182285 182333 +5501 86 62 123182 181257 181273 181321 181337 181945 181961 181993 182009 182285 182301 182333 182349 +5502 86 63 120958 181273 181289 181337 181353 181961 181977 182009 182025 182301 182317 182349 182365 +5503 86 64 133603 181289 181305 181353 181369 181977 182025 182317 182365 +5504 87 1 65782.5 181354 181369 182025 182026 182366 +5505 87 2 98345.4 181338 181354 181402 182010 182026 182350 182366 +5506 87 3 93511.6 181322 181338 181386 181402 182010 182042 182350 +5507 87 4 87842.1 181306 181322 181370 181386 181994 182010 182042 182043 182334 182350 182367 +5508 87 5 86413.8 181306 181370 181371 181994 182011 182043 182319 182334 182367 +5509 87 6 65719.5 181339 181371 181387 181403 182011 182043 182059 182319 182351 182367 +5510 87 7 50199.3 181339 181355 181387 182011 182027 182059 182335 182351 +5511 87 8 66538 181355 181404 182027 182044 182335 182351 182368 +5512 87 9 85053.5 181292 181356 181404 182012 182027 182044 182335 182336 182368 +5513 87 10 64777.6 181308 181340 181356 181388 182012 182028 182044 182076 182336 182352 182368 +5514 87 11 47152.7 181340 181372 181388 182028 182060 182336 182352 +5515 87 12 77596.1 181324 181372 181965 182060 182320 182352 +5516 87 13 53692.6 181309 181324 181357 181965 181981 182029 182320 182353 182385 +5517 87 14 59641 181309 181325 181981 181997 182353 182385 +5518 87 15 68273.2 181277 181293 181325 181341 181997 182013 182369 +5519 87 16 33236.8 181293 181341 182013 182014 182369 +5520 87 17 99844.7 181294 181342 182014 182370 +5521 87 18 56524.7 181278 181326 181998 182354 182370 +5522 87 19 46533.7 181310 181326 181982 181998 182354 182386 +5523 87 20 67507.7 181310 181311 181358 181359 181966 181982 182030 182063 182323 182354 182355 182386 +5524 87 21 74124.1 181263 181311 181327 181359 181966 181999 182031 182063 182323 182355 +5525 87 22 56211.7 181327 181375 182031 182339 182355 +5526 87 23 107790 181295 181343 181375 182015 182031 182047 182339 182371 +5527 87 24 100209 181279 181343 181360 181391 181983 182015 182032 182047 182324 182339 182371 +5528 87 25 92083.9 181360 182032 182324 182340 +5529 87 26 64780.8 181312 181344 181360 181392 182000 182016 182032 182064 182324 182340 +5530 87 27 72406.4 181344 181376 182016 182048 182308 182340 182356 +5531 87 28 85338.4 181328 181329 181376 181393 181984 182001 182016 182048 182308 182341 182356 +5532 87 29 108011 181329 181345 181393 181409 182001 182017 182048 182049 182341 182357 +5533 87 30 88542.1 181345 181361 182017 182357 +5534 87 31 134456 181361 181377 182017 182033 182357 182373 +5535 87 32 87775.6 181346 181377 181970 181985 182018 182033 182373 +5536 87 33 104929 181346 181970 182018 182358 +5537 87 34 137081 181314 181330 182002 182018 182342 182358 +5538 87 35 63474.3 181314 182002 182342 +5539 87 36 62120.2 181298 181362 181986 182035 182326 182342 +5540 87 37 117556 181315 181362 181363 181971 181986 182003 182035 182311 182326 182359 +5541 87 38 89676.6 181331 181363 182003 182311 182343 +5542 87 39 87553.7 181299 181331 181347 181379 181987 182003 182019 182051 182327 182343 +5543 87 40 41938.1 181300 181347 182019 182327 +5544 87 41 112091 181300 181348 181396 181972 182004 182019 182036 182296 182327 182328 182360 +5545 87 42 110566 181284 181332 181348 181380 182004 182020 182328 +5546 87 43 86228.3 181268 181332 181988 182020 182312 182328 182344 +5547 87 44 50303.9 181268 181316 181332 181364 181957 181988 182020 182052 182312 182344 +5548 87 45 56073.3 181301 181316 181364 181957 181973 182312 182344 182345 +5549 87 46 64796.6 181253 181269 181301 181317 181973 181989 182345 +5550 87 47 78569.4 181269 181317 181989 182345 182361 +5551 87 48 77407.6 181285 181333 182005 182361 +5552 87 49 45150.4 181286 181334 182005 182006 182361 182362 +5553 87 50 45092.1 181270 181286 181318 181334 181990 182006 182362 +5554 87 51 57712.9 181254 181270 181302 181318 181974 181990 182346 +5555 87 52 86604.9 181302 181303 181350 181958 181974 182315 182346 182378 +5556 87 53 77505.9 181303 181351 181958 182055 182315 182347 +5557 87 54 59866.1 181255 181319 181351 181991 182023 182055 182315 182331 182347 +5558 87 55 43929.7 181287 181319 181335 181367 182007 182023 182331 182347 +5559 87 56 72402.4 181271 181335 181383 181975 182007 182024 182039 182316 182331 182363 +5560 87 57 90091.7 181271 181352 181383 182024 182039 182316 182363 +5561 87 58 84738.1 181304 181336 181352 181384 181992 182008 182024 182056 182316 182332 +5562 87 59 86773.2 181336 181368 181384 182008 182056 182300 182332 +5563 87 60 96505.8 181320 181368 181385 181993 182008 182040 182300 182332 182333 182348 +5564 87 61 53404.5 181321 181385 181993 182040 182333 182348 182349 +5565 87 62 120129 181337 181401 182009 182041 182349 +5566 87 63 125912 181337 181353 181417 182009 182025 182349 182365 +5567 87 64 100734 181369 182025 182365 +5568 88 1 85778.3 181418 181433 182057 182058 182366 182398 +5569 88 2 83723.5 181402 181418 182042 182058 182350 182366 182398 +5570 88 3 73214 181386 181402 182042 182350 182382 +5571 88 4 63858.3 181370 181386 181434 181435 182042 182043 182074 182075 182367 182382 +5572 88 5 68422.7 181370 181371 181403 181435 182043 182075 182367 +5573 88 6 95628.9 181403 182059 182075 182351 182367 +5574 88 7 50956.7 181387 181403 181419 181451 182059 182091 182351 182383 +5575 88 8 95430.1 181387 181404 181419 182044 182059 182091 182368 182383 +5576 88 9 85811.2 181404 181436 182044 182076 182368 +5577 88 10 80889.7 181388 181436 182028 182076 182368 182384 +5578 88 11 58950.2 181388 181420 182028 182060 182076 182092 182352 182384 +5579 88 12 50963.7 181357 181372 181405 181420 182029 182060 182352 182385 +5580 88 13 75759.6 181357 181405 182029 182385 +5581 88 14 66820.6 181357 181373 182029 182045 182385 182401 +5582 88 15 77702.4 181325 181341 181373 181389 181997 182013 182045 182061 182401 +5583 88 16 65127.4 181341 181389 182013 182014 182061 182062 182369 182401 +5584 88 17 53527.3 181342 181390 182014 182062 182370 182402 +5585 88 18 36410.8 181326 181374 181390 181998 182046 182062 182386 182402 +5586 88 19 45589.2 181358 181374 182030 182046 182386 +5587 88 20 65926.3 181358 181359 181406 182030 182063 182355 182386 +5588 88 21 57473.6 181359 181407 182063 182355 +5589 88 22 41439.1 181375 181407 182031 182063 182079 182095 182355 182387 +5590 88 23 46731.9 181343 181375 181423 182031 182047 182079 182371 182387 +5591 88 24 49996.1 181391 181423 182047 182371 +5592 88 25 49834.1 181360 181391 181392 181424 182032 182047 182064 182096 182340 182371 182372 +5593 88 26 21519.8 181392 181408 182064 182340 182372 +5594 88 27 22026.4 181376 181408 182016 182048 182064 182080 182340 182356 +5595 88 28 28285.2 181376 181393 181440 182048 182080 182356 +5596 88 29 62672.8 181393 181409 182048 182049 182341 182356 182357 182389 +5597 88 30 84759 181409 181425 182049 182357 182389 +5598 88 31 68188 181361 181377 181425 181441 182017 182033 182049 182065 182357 182373 182405 +5599 88 32 55269.9 181346 181377 181410 181441 182018 182033 182050 182065 182373 +5600 88 33 74068 181346 181410 182018 182050 182358 +5601 88 34 84549.4 181330 181394 182002 182018 182034 182050 182342 182358 182374 182390 +5602 88 35 79240.8 181378 181394 182034 182342 182374 +5603 88 36 87909.2 181362 181378 182034 182035 182326 182342 182359 182374 +5604 88 37 102066 181362 181363 181395 181427 182035 182067 182359 +5605 88 38 83983.8 181363 181379 181395 182003 182051 182067 182343 182359 +5606 88 39 103204 181379 182051 182343 182375 +5607 88 40 66586.6 181347 181379 181396 181411 182019 182036 182051 182083 182327 182343 182360 182375 +5608 88 41 47443.9 181348 181396 181428 182036 182360 +5609 88 42 102284 181348 181380 181428 182020 182036 182068 182328 182360 182376 +5610 88 43 71703.9 181332 181364 181380 181412 182020 182052 182068 182344 182376 +5611 88 44 29923.9 181364 181412 182052 182344 +5612 88 45 65166.6 181349 181364 182021 182052 182344 182377 +5613 88 46 62091.7 181301 181317 181349 181365 181973 181989 182021 182037 182345 182377 +5614 88 47 77779.1 181317 181365 181381 181989 182037 182053 182345 182361 182377 182393 +5615 88 48 96206.3 181333 181381 182005 182053 182361 182393 +5616 88 49 39455.7 181334 181382 182005 182006 182053 182054 182361 182362 182393 182394 +5617 88 50 48979.7 181318 181334 181366 181382 181990 182006 182038 182054 182362 182394 +5618 88 51 64127.6 181302 181318 181350 181366 181974 181990 182022 182038 182346 182378 182394 +5619 88 52 96696 181350 182022 182378 +5620 88 53 53631.5 181350 181351 181399 182022 182055 182347 182378 +5621 88 54 50544.3 181319 181351 181367 181399 182023 182055 182087 182347 182379 +5622 88 55 69693.4 181367 181415 182023 182071 182331 182347 182363 182379 +5623 88 56 90340.6 181335 181367 181383 181415 182039 182071 182363 +5624 88 57 114882 181352 181383 181416 182024 182039 182088 182363 182364 +5625 88 58 69942.8 181384 181416 182056 182088 182332 182364 +5626 88 59 51402 181384 181400 182056 182072 182332 182348 +5627 88 60 45609.7 181368 181385 181400 181432 182040 182072 182348 +5628 88 61 59458.8 181385 181401 181432 181449 182040 182041 182072 182073 182348 182381 +5629 88 62 112872 181401 181417 182041 182349 182381 +5630 88 63 64511.4 181417 182041 182057 182349 182365 182381 182397 +5631 88 64 71646.2 181433 182057 182365 182397 +5632 89 1 115983 181418 181433 181466 181481 182057 182058 182089 182090 182398 +5633 89 2 76194.3 181402 181418 181450 181466 182058 182090 182398 +5634 89 3 73596 181434 181450 182074 182382 182398 +5635 89 4 52054 181434 182074 182382 +5636 89 5 47941.3 181434 181435 181467 182074 182075 182107 182367 182382 182399 +5637 89 6 51388.9 181403 181435 181451 181467 182075 182107 182367 182399 +5638 89 7 60738.4 181419 181451 182091 182107 182383 182399 +5639 89 8 58719.4 181419 181451 181468 182091 182108 182383 +5640 89 9 41940.8 181436 181468 182076 182108 182368 182383 182384 182400 +5641 89 10 67202.3 181436 181452 181468 182076 182092 182108 182384 182400 +5642 89 11 78713.8 181420 181452 182092 182384 +5643 89 12 65165.3 181405 181420 181484 182029 182077 182092 182384 182417 +5644 89 13 83503.6 181405 181421 182029 182077 182093 182385 182417 +5645 89 14 59002.9 181373 181421 182045 182093 182385 182401 182417 182433 +5646 89 15 68629.2 181373 181389 181421 181437 182045 182061 182401 182433 +5647 89 16 63805.9 181389 181437 182061 182062 182401 +5648 89 17 61635.8 181390 181438 182062 182402 +5649 89 18 42215.6 181374 181390 181422 181438 182046 182062 182402 182434 +5650 89 19 51560.1 181374 181406 181422 182030 182046 182094 182386 182418 +5651 89 20 79257.4 181406 182030 182078 182386 182418 +5652 89 21 51638.3 181406 181407 181439 182063 182078 182095 182387 182418 +5653 89 22 69391.7 181407 181423 181439 182079 182095 182387 +5654 89 23 34887.9 181423 181455 182079 182111 182371 182387 182403 +5655 89 24 52101.3 181423 181424 181455 182047 182079 182096 182111 182371 182372 +5656 89 25 35543 181424 181456 182096 182372 +5657 89 26 36801.5 181408 181424 181456 182064 182096 182112 182340 182372 182388 +5658 89 27 25908.1 181408 181440 181456 181472 182080 182112 182356 182388 +5659 89 28 24268.3 181440 181457 182080 182081 182356 182389 +5660 89 29 46603.7 181409 181457 182049 182081 182389 +5661 89 30 59417.9 181409 181425 181457 181473 182049 182081 182389 182405 +5662 89 31 37743.2 181425 181441 181473 181489 182065 182097 182405 +5663 89 32 55915.5 181410 181441 181458 181489 182050 182065 182082 182097 182405 +5664 89 33 66718 181410 181458 182050 182082 182390 +5665 89 34 52103.5 181394 181442 182034 182050 182066 182082 182374 182390 +5666 89 35 45651 181378 181394 181426 181442 182034 182066 182374 +5667 89 36 37960.7 181378 181426 181427 182034 182066 182067 182359 182374 +5668 89 37 52212 181427 182067 182359 +5669 89 38 44157 181395 181427 181443 182051 182067 182099 182343 182359 182391 +5670 89 39 65168 181395 181411 181443 182051 182083 182343 182375 182391 +5671 89 40 88540.2 181411 182083 182375 +5672 89 41 77019.1 181396 181428 181460 182036 182068 182100 182360 182375 +5673 89 42 92480.1 181428 182068 182360 182376 +5674 89 43 84407.5 181380 181412 181444 182052 182068 182084 182376 +5675 89 44 59133.8 181397 181412 182021 182052 182069 182084 182344 182376 182377 182409 +5676 89 45 94658.8 181349 181397 182021 182069 182377 182409 +5677 89 46 70537 181349 181365 181397 181413 182021 182037 182377 +5678 89 47 72151.2 181365 181381 181413 181429 182037 182053 182393 +5679 89 48 69906.6 181381 181429 182053 182393 +5680 89 49 37816.3 181382 181430 182053 182054 182393 182394 +5681 89 50 48199.4 181366 181382 181414 181430 182038 182054 182394 +5682 89 51 55929 181366 181414 182038 182378 182394 +5683 89 52 59037.8 181350 181398 181414 182022 182038 182070 182378 182410 +5684 89 53 41761.9 181398 181399 182022 182055 182070 182087 182347 182378 182379 182410 +5685 89 54 42320.4 181399 181431 182055 182087 182379 +5686 89 55 53698.8 181415 181431 182071 182087 182379 +5687 89 56 56192.5 181415 181447 182071 182103 182363 182364 182379 182395 +5688 89 57 54519.7 181416 181447 182088 182103 182364 +5689 89 58 48107.8 181416 181448 182088 182364 182380 +5690 89 59 38764.3 181400 181448 181464 182056 182072 182088 182104 182348 182364 182380 +5691 89 60 33355 181432 181464 182072 182104 182348 182380 +5692 89 61 54839.4 181432 181449 182072 182073 182348 182381 +5693 89 62 66137 181449 181465 182073 182381 +5694 89 63 54968.2 181417 181465 182041 182057 182073 182089 182381 182397 +5695 89 64 78756.9 181433 181481 182057 182089 182397 +5696 90 1 63617.4 181466 181481 182089 182090 182398 182430 +5697 90 2 78809.1 181450 181466 181498 181514 182090 182122 182398 182430 +5698 90 3 62960.6 181450 181498 182074 182090 182106 182122 182382 182398 182414 182430 +5699 90 4 60919.7 181434 181482 182074 182106 182382 182414 +5700 90 5 45427.9 181467 181482 182106 182107 182399 182414 +5701 90 6 32231.5 181467 182107 182399 +5702 90 7 40674.2 181451 181483 181499 182091 182107 182123 182399 +5703 90 8 29542.2 181468 181483 182108 182383 182400 +5704 90 9 26287.5 181468 181483 181500 182108 182124 182400 +5705 90 10 41875.8 181452 181500 182092 182124 182384 182400 +5706 90 11 40693.4 181452 181484 181500 182077 182092 182124 182384 182400 182416 182417 +5707 90 12 43923.4 181484 182077 182417 +5708 90 13 41328 181421 181453 181484 182077 182093 182417 +5709 90 14 42463.5 181421 181453 182093 182417 182433 +5710 90 15 37026.9 181421 181437 181469 182093 182109 182433 +5711 90 16 37743.5 181437 181469 182109 182110 182433 +5712 90 17 53065 181438 181470 182110 182434 +5713 90 18 37642.4 181422 181438 181454 181470 182094 182110 182434 +5714 90 19 35565.1 181422 181454 182094 182418 182434 +5715 90 20 64841.9 181406 181471 182078 182418 +5716 90 21 67473.5 181439 181471 182078 182095 182387 182418 +5717 90 22 39917 181439 181487 182095 182127 182387 182403 +5718 90 23 30255.7 181439 181455 181487 182095 182111 182127 182387 182403 +5719 90 24 56652.9 181455 181488 182111 182372 182403 +5720 90 25 33663.7 181455 181456 181488 182096 182111 182372 +5721 90 26 38892.9 181456 181472 181488 182096 182112 182128 182388 +5722 90 27 51527.6 181472 182112 182388 +5723 90 28 53175.4 181440 181457 181472 181505 182080 182081 182112 182113 182388 182389 182421 +5724 90 29 59301.9 181457 181505 182081 182113 182389 182421 +5725 90 30 49510.8 181473 182081 182097 182389 182405 182421 +5726 90 31 57141.7 181473 181489 182097 182405 +5727 90 32 45727.8 181458 181489 182082 182097 182405 +5728 90 33 43303.4 181458 182082 182390 +5729 90 34 81111.5 181442 181458 182082 182390 +5730 90 35 40322.7 181426 181442 182066 182374 182406 +5731 90 36 34718.9 181426 181474 182066 182098 182374 182406 +5732 90 37 46803.3 181427 181459 182067 182099 182359 182391 182406 +5733 90 38 43950.1 181443 181459 182099 182391 +5734 90 39 44142.3 181443 181475 182083 182099 182100 182375 182391 +5735 90 40 60627.8 181411 181443 181460 181475 182083 182100 182375 +5736 90 41 72601.4 181460 182100 182375 182392 +5737 90 42 56323.3 181428 181444 181460 181492 182068 182084 182100 182116 182376 182392 +5738 90 43 48394.8 181444 182084 182376 +5739 90 44 64188.9 181397 181444 181476 182069 182084 182376 182409 +5740 90 45 65136.7 181397 181476 182069 182409 +5741 90 46 61188.6 181413 181445 182037 182085 182409 182425 +5742 90 47 54672.5 181413 181429 182037 182053 182085 182101 182393 182425 +5743 90 48 54161.5 181429 182053 182101 182393 182425 +5744 90 49 55194.4 181430 182053 182054 182101 182102 182393 182394 182425 182426 +5745 90 50 46058.5 181414 181430 182038 182054 182102 182394 182426 +5746 90 51 35073.2 181414 181446 182038 182086 182410 182426 +5747 90 52 31885.3 181398 181414 181446 181463 182070 182086 182410 +5748 90 53 33534.1 181398 181463 182070 182410 +5749 90 54 32084.2 181431 181463 182070 182087 182379 182410 +5750 90 55 48976.4 181431 181479 182087 182119 182379 182395 +5751 90 56 53644.9 181447 181479 182103 182119 182395 +5752 90 57 32552.1 181447 181480 182103 182364 182395 +5753 90 58 29592.4 181448 181480 182088 182103 182104 182120 182364 182380 +5754 90 59 30968.4 181448 181464 182104 182380 +5755 90 60 31684.2 181464 182104 182380 182413 +5756 90 61 67413.4 181449 181497 182073 182105 182381 182413 +5757 90 62 57620.5 181449 181465 181497 181513 182073 182105 182381 182413 +5758 90 63 74181.8 181465 181481 181513 181529 182089 182121 182397 182429 +5759 90 64 38665.2 181481 182089 182397 182429 +5760 91 1 49368.1 181514 181529 182121 182122 182430 +5761 91 2 26475.7 181498 181514 182122 182430 +5762 91 3 37253.4 181498 182106 182122 182414 182430 +5763 91 4 48353.7 181482 181498 182106 182414 +5764 91 5 45884 181482 181515 182106 182139 182414 +5765 91 6 26954.7 181467 181499 182107 182123 182399 182414 +5766 91 7 30923.1 181483 181499 182123 182399 182415 +5767 91 8 25814 181483 181532 182108 182123 182155 182400 182415 +5768 91 9 27933.8 181500 181532 182124 182400 182415 +5769 91 10 26109.5 181500 181532 182124 182400 +5770 91 11 40434.9 181500 181516 182124 182140 182400 182416 +5771 91 12 42621.4 181484 181516 182077 182140 182416 182417 +5772 91 13 29741.6 181453 181485 182093 182125 182416 182417 +5773 91 14 32008.1 181453 182093 182433 182449 +5774 91 15 21305.6 181469 182109 182433 +5775 91 16 17903.9 181469 182109 182110 182433 +5776 91 17 22050.8 181470 182110 182434 +5777 91 18 19377.4 181454 181470 182094 182110 182434 +5778 91 19 18250 181454 182094 182418 182419 182434 +5779 91 20 40862.2 181454 181471 181486 181503 182078 182094 182126 182143 182418 182419 +5780 91 21 60909.5 181471 181503 182078 182143 182418 182419 +5781 91 22 24303.3 181487 181503 182127 182143 182403 182419 +5782 91 23 11633.2 181487 181519 182127 182403 +5783 91 24 21485 181487 181488 181519 182111 182127 182403 182404 +5784 91 25 22479.9 181488 182111 182128 182388 182403 182404 +5785 91 26 24484.2 181488 181504 182128 182388 182404 +5786 91 27 38339.8 181472 181504 182112 182128 182388 182421 +5787 91 28 55510.6 181505 182113 182421 +5788 91 29 55631 181505 181521 182113 182421 +5789 91 30 29153.5 181521 182113 182129 182421 182437 +5790 91 31 34600.5 181521 181537 182097 182129 182437 +5791 91 32 43155.4 181458 181489 181506 181537 182082 182097 182114 182129 182437 +5792 91 33 30381.8 181458 181506 182082 182114 182422 +5793 91 34 40000.8 181490 181506 182082 182114 182422 +5794 91 35 51811.7 181474 181490 182098 182406 +5795 91 36 28848.8 181474 182098 182406 +5796 91 37 28664.1 181459 181474 182098 182099 182391 182406 +5797 91 38 36131.1 181459 181491 182099 182115 182391 +5798 91 39 36931.7 181475 181491 182115 182391 182407 +5799 91 40 35321.7 181475 182100 182115 182375 182392 182407 +5800 91 41 28650.8 181460 181475 181492 181524 182100 182116 182392 +5801 91 42 20200.6 181492 182116 182392 +5802 91 43 28910.2 181444 181492 181508 182084 182116 182132 182392 182408 +5803 91 44 46836.7 181476 181508 182069 182132 182408 182409 +5804 91 45 43371.1 181445 181476 182069 182085 182409 +5805 91 46 37076.4 181445 182085 182409 182425 +5806 91 47 39752 181445 181461 182085 182101 182425 +5807 91 48 32168.1 181461 182101 182425 +5808 91 49 43288.3 181462 182101 182102 182425 182426 +5809 91 50 40357.1 181462 182102 182426 +5810 91 51 26463.2 181446 182086 182426 +5811 91 52 24047.3 181446 182086 182410 +5812 91 53 32228 181463 181495 182070 182135 182410 182411 +5813 91 54 39279.2 181463 181479 181495 182070 182119 182135 182395 182411 +5814 91 55 34952.1 181479 182119 182395 +5815 91 56 35161.5 181479 181511 182119 182395 +5816 91 57 25833.5 181480 181511 182103 182119 182120 182395 182396 +5817 91 58 27853.1 181480 181496 182120 182380 182396 +5818 91 59 31170.4 181464 181496 182104 182120 182380 +5819 91 60 37884.5 181464 181496 181497 181512 182104 182105 182120 182136 182380 182413 +5820 91 61 52997 181497 182105 182413 +5821 91 62 53673.7 181497 181513 182105 182413 +5822 91 63 57046.5 181513 181529 182121 182429 +5823 91 64 53306.4 181529 182121 182429 +5824 92 1 23259.8 181514 181529 181546 181561 182121 182122 182137 182138 182430 +5825 92 2 9659.48 181514 181546 182122 182138 182430 +5826 92 3 29138 181498 181530 182106 182122 182138 182139 182414 182430 +5827 92 4 48495 181515 181530 182139 182414 +5828 92 5 51961.9 181515 182139 182414 182431 +5829 92 6 36508.1 181499 181515 182123 182139 182415 182431 +5830 92 7 29597.3 181499 181531 182123 182155 182415 +5831 92 8 35741.3 181531 181532 182155 182415 +5832 92 9 24618.2 181532 182124 182155 182400 182415 +5833 92 10 40105.8 181532 181548 182124 182140 182400 182416 182432 +5834 92 11 39847.9 181516 181548 182140 182416 +5835 92 12 30656.6 181485 181516 182125 182140 182416 +5836 92 13 10096.1 181485 182125 182416 182449 +5837 92 14 12180.3 181485 181501 182125 182141 182449 +5838 92 15 16795.5 181501 182109 182141 182449 +5839 92 16 23112.8 181469 181501 182109 182110 182141 182142 182449 +5840 92 17 43844.8 181470 181502 182110 182142 182450 +5841 92 18 32380.5 181486 181502 182110 182126 182142 182450 +5842 92 19 43585.7 181486 182126 182419 182450 +5843 92 20 31965.1 181486 181503 182126 182143 182419 +5844 92 21 48246.5 181503 182143 182419 +5845 92 22 27016 181487 181503 181535 182127 182143 182419 +5846 92 23 24523.6 181519 181535 182127 182143 182403 182404 182419 +5847 92 24 28507.1 181519 182127 182160 182403 182404 +5848 92 25 28960.4 181488 181504 181519 181536 182128 182160 182404 +5849 92 26 17500.8 181504 182128 182404 +5850 92 27 29097.5 181504 181520 182128 182144 182388 182404 182420 182421 +5851 92 28 43828.3 181505 181520 182113 182144 182421 +5852 92 29 46166 181505 181520 181521 181553 182113 182144 182421 +5853 92 30 29679.9 181521 182113 182129 182421 182437 +5854 92 31 22782.7 181537 182129 182437 +5855 92 32 27266.8 181506 181537 182114 182129 182437 +5856 92 33 14798.2 181506 182114 182422 +5857 92 34 21307.4 181490 181506 182114 182422 +5858 92 35 46707.1 181490 182098 182114 182406 182422 +5859 92 36 39871 181474 181507 181522 182098 182131 182406 +5860 92 37 46739.4 181474 181507 182098 182131 182406 +5861 92 38 17032.9 181491 182115 182391 182407 +5862 92 39 20834.9 181491 182115 182407 +5863 92 40 41063.3 181475 181523 181524 182115 182147 182407 +5864 92 41 33097.6 181524 182116 182147 182392 182407 +5865 92 42 27884.2 181492 181524 181540 182116 182132 182392 182408 +5866 92 43 26116.5 181492 181508 182116 182132 182408 +5867 92 44 31680.1 181508 182132 182408 +5868 92 45 19333.5 181477 181508 182117 182132 182408 +5869 92 46 32321.3 181445 181477 182085 182117 182408 182425 182441 +5870 92 47 37664.2 181445 181461 181493 182085 182101 182133 182425 182441 +5871 92 48 40501.8 181461 181493 182101 182133 182425 182441 +5872 92 49 47933.7 181462 181494 182101 182102 182133 182134 182425 182426 182441 182442 +5873 92 50 34922.9 181462 181494 182102 182134 182426 182442 +5874 92 51 33345.4 181446 181478 181494 182086 182118 182134 182426 182442 +5875 92 52 20950 181478 182118 182411 182442 +5876 92 53 33336.3 181478 181495 182118 182135 182411 +5877 92 54 35874 181495 182135 182411 +5878 92 55 29410.3 181479 181495 181511 181527 182119 182135 182395 182411 +5879 92 56 27811.3 181511 182119 182152 182395 182396 +5880 92 57 18720.1 181511 181528 182152 182396 +5881 92 58 26974.4 181496 181528 182120 182152 182396 +5882 92 59 27024.2 181496 182120 182396 +5883 92 60 51429.1 181512 182136 182412 182413 +5884 92 61 49956.4 181512 181545 182136 182413 +5885 92 62 36598.4 181513 181545 182105 182121 182136 182137 182413 182429 +5886 92 63 25361.8 181513 181529 181545 181561 182121 182137 182429 +5887 92 64 27428.7 181529 181561 182121 182137 182429 +5888 93 1 14707 181546 181561 182137 182138 182430 182446 +5889 93 2 5199.05 181546 182138 182430 182446 +5890 93 3 18573 181530 182138 182430 182446 +5891 93 4 35201.7 181530 182139 182431 182446 +5892 93 5 35790.3 181515 181563 182139 182431 +5893 93 6 41589 181515 181547 181563 182139 182171 182431 +5894 93 7 41122.3 181531 181547 182155 182171 182415 182431 +5895 93 8 34970 181531 182155 182415 +5896 93 9 33842 181531 181532 181564 182155 182156 182415 182432 +5897 93 10 31416.3 181548 182156 182432 +5898 93 11 34967 181548 182140 182156 182416 182432 +5899 93 12 65534.1 181517 181548 182125 182140 182416 +5900 93 13 41520.3 181485 181517 181533 182125 182416 182449 +5901 93 14 24372 181485 181501 181533 182125 182141 182449 +5902 93 15 16069.4 181501 182141 182449 +5903 93 16 10454.6 181501 182141 182142 182449 +5904 93 17 26755.5 181502 182142 182450 +5905 93 18 29175.4 181502 182142 182450 +5906 93 19 50037.2 181486 181534 182126 182450 +5907 93 20 52548.3 181486 181518 181534 182126 182419 +5908 93 21 37610.9 181518 181535 182143 182419 +5909 93 22 19833.7 181535 182143 182159 182419 182435 +5910 93 23 23655.5 181519 181535 182159 182160 182404 182435 +5911 93 24 25599.1 181519 181536 181551 182160 182404 +5912 93 25 30579.3 181536 182160 182404 +5913 93 26 32107.3 181504 181536 181552 182128 182160 182176 182404 182420 +5914 93 27 40836.3 181520 181552 182144 182420 +5915 93 28 23764.9 181520 182144 182420 +5916 93 29 44350.9 181553 182144 182420 182421 182453 +5917 93 30 32009.1 181553 182145 182437 +5918 93 31 22178.8 181569 182145 182437 +5919 93 32 28893.7 181538 181569 182130 182145 182437 +5920 93 33 19259.9 181538 182130 182422 +5921 93 34 26146.1 181522 181538 182130 182422 +5922 93 35 34524.9 181522 182130 182131 182406 182422 +5923 93 36 43787.1 181507 181522 182131 182406 182423 +5924 93 37 34150.7 181507 182131 182423 +5925 93 38 54734.5 181491 181507 181539 182115 182131 182407 182423 +5926 93 39 35960.4 181491 181523 182115 182147 182407 +5927 93 40 34861.9 181523 181524 182147 182407 +5928 93 41 26523.6 181524 182147 182407 +5929 93 42 32222.9 181524 181540 182116 182132 182147 182148 182407 182408 182424 +5930 93 43 35976.1 181540 182132 182408 +5931 93 44 28446.1 181508 181509 181540 182132 182408 +5932 93 45 22190.2 181477 181509 182117 182408 +5933 93 46 29775.2 181477 182117 182441 +5934 93 47 40944.6 181493 182133 182441 +5935 93 48 31911.5 181493 182133 182441 +5936 93 49 25073.8 181494 182133 182134 182441 182442 +5937 93 50 32081.4 181494 182134 182442 +5938 93 51 36969 181478 181494 182118 182134 182442 +5939 93 52 31053.1 181478 181510 181526 182118 182411 182442 +5940 93 53 45208.1 181478 181495 181510 182118 182135 182411 +5941 93 54 23507.7 181527 182135 182411 +5942 93 55 23913.3 181527 182135 182151 182411 182427 +5943 93 56 17272.7 181511 181527 181543 182151 182152 182396 182427 +5944 93 57 18889 181511 181528 182152 182396 +5945 93 58 25124.3 181528 182152 182396 +5946 93 59 40952 181512 181528 181544 182136 182152 182168 182396 182412 +5947 93 60 30828.5 181512 181560 182136 182412 +5948 93 61 35103 181512 181545 182136 182412 +5949 93 62 19547.4 181545 182136 182137 182412 182429 182445 +5950 93 63 19772.2 181545 181561 182137 182429 182445 +5951 93 64 26586.8 181561 182137 182429 182445 +5952 94 1 6897.53 181546 181561 182137 182138 182446 +5953 94 2 9259.06 181546 181594 182138 182154 182446 +5954 94 3 25758.3 181530 181546 181578 181594 182138 182154 182446 +5955 94 4 34471.1 181530 181562 181578 182138 182154 182171 182431 182446 +5956 94 5 59442.7 181562 181563 182171 182431 +5957 94 6 56554.3 181547 181563 181579 181595 182171 182431 +5958 94 7 63806.1 181547 181579 182171 182431 +5959 94 8 42010.5 181531 181579 181596 182155 182156 182415 182432 +5960 94 9 82720.5 181564 181596 182156 182432 +5961 94 10 80848 181548 181564 181580 182156 182432 +5962 94 11 36397.8 181548 181580 181581 182156 182172 182432 +5963 94 12 74769.1 181517 181581 182125 182172 182432 +5964 94 13 81458.2 181517 181533 181597 182125 182172 182449 182464 +5965 94 14 74990.9 181533 181549 181597 182141 182449 182464 +5966 94 15 65510.3 181549 181565 182141 182449 +5967 94 16 47027.5 181565 182141 182142 182449 +5968 94 17 76408.5 181566 182142 182450 +5969 94 18 22808.7 181550 182142 182450 +5970 94 19 55426.9 181534 181550 181598 182126 182450 182465 +5971 94 20 78346.9 181518 181534 181582 181598 182126 182175 182419 182435 182450 182465 +5972 94 21 50110.4 181518 181535 181582 182126 182159 182175 182435 +5973 94 22 23563.6 181535 181567 182159 182435 +5974 94 23 74926.6 181535 181551 181567 182159 182435 +5975 94 24 61581.3 181536 181551 181583 182159 182160 182404 182435 +5976 94 25 23698.2 181536 181600 182160 182404 +5977 94 26 31876.7 181552 181600 182176 182420 +5978 94 27 45095.6 181552 181568 182176 182420 +5979 94 28 44920.4 181520 181553 181568 181584 182144 182176 182420 +5980 94 29 31728.4 181553 181584 181585 182144 182145 182420 182453 +5981 94 30 28966.8 181553 181569 182145 182453 +5982 94 31 19570 181569 182145 182453 +5983 94 32 11433.2 181538 181569 182130 182145 182453 +5984 94 33 8118.99 181538 182130 182438 +5985 94 34 16421.1 181538 182130 182438 +5986 94 35 37437.7 181522 182130 182438 +5987 94 36 59285.2 181522 181554 181570 182131 182423 +5988 94 37 65416.9 181507 181554 181555 182131 182163 182423 +5989 94 38 55799.6 181539 181555 182163 182423 +5990 94 39 57696.8 181523 181539 181571 182147 182163 182407 182423 +5991 94 40 23343 181523 182147 182407 +5992 94 41 56630.9 181523 181556 181588 182147 182148 182407 182424 +5993 94 42 50706.9 181540 181556 181572 182148 182424 +5994 94 43 19765.7 181540 182148 182424 +5995 94 44 53527 181509 181540 181573 182117 182132 182164 182408 182424 +5996 94 45 29353.3 181509 181525 181573 182117 182408 182441 +5997 94 46 23549.5 181477 181525 181541 182117 182441 +5998 94 47 52787.9 181493 181541 182133 182441 +5999 94 48 30014.3 181493 181557 182133 182441 +6000 94 49 55205.6 181494 181558 182133 182134 182441 182442 +6001 94 50 54792.9 181494 181542 181558 182134 182442 +6002 94 51 49687.6 181494 181526 181542 182134 182442 +6003 94 52 68532.4 181510 181526 181590 182118 182442 +6004 94 53 65859.5 181510 181574 182118 182167 182411 182427 +6005 94 54 24841.5 181527 181574 182151 182167 182427 +6006 94 55 42637.8 181527 181543 181559 182151 182427 +6007 94 56 73829.5 181543 181575 182151 182427 +6008 94 57 28127.5 181528 181575 182151 182152 182396 182427 +6009 94 58 22955.3 181528 181544 181592 182152 182168 182396 182412 +6010 94 59 34974.6 181544 181560 181592 181608 182168 182412 +6011 94 60 30671.8 181560 181576 182168 182412 +6012 94 61 54943.6 181545 181576 181577 182136 182168 182412 +6013 94 62 23947.5 181545 181577 182137 182153 182445 +6014 94 63 30966.4 181561 181593 182137 182153 182445 +6015 94 64 12211 181561 182137 182445 +6016 95 1 36531.6 181609 181610 182153 182154 182446 +6017 95 2 27434.8 181594 181610 182154 182446 +6018 95 3 43460.7 181578 181594 182154 182446 +6019 95 4 46842.9 181562 181578 181626 181627 182154 182171 182446 +6020 95 5 46659.3 181562 181595 181627 182171 182431 +6021 95 6 30929.3 181595 182171 182431 182447 +6022 95 7 55969.7 181579 181595 181611 181643 182171 182187 182188 182447 +6023 95 8 54622.1 181596 181611 182188 182447 +6024 95 9 57965.2 181596 181628 182156 182188 182432 +6025 95 10 49990 181580 181628 182156 182432 +6026 95 11 54403.6 181580 181612 182172 182432 +6027 95 12 50890.7 181581 181597 181612 181645 182172 182432 182464 +6028 95 13 65014.8 181597 181645 182172 182464 +6029 95 14 24437 181597 181613 182157 182464 +6030 95 15 29332 181565 181613 181629 182157 182173 182464 +6031 95 16 39588.5 181565 181629 182173 182464 +6032 95 17 54715.7 181566 181630 182174 182465 +6033 95 18 30414.6 181550 181614 181630 182158 182174 182465 +6034 95 19 55730.9 181598 181614 182158 182175 182465 +6035 95 20 72920.5 181582 181598 181646 182175 182435 182465 +6036 95 21 25302.3 181582 181599 182175 182435 +6037 95 22 37127.3 181567 181599 182159 182175 182435 +6038 95 23 46702.1 181551 181567 181615 182159 182435 +6039 95 24 26068.5 181583 181615 182159 182435 +6040 95 25 34633.2 181583 181600 181632 182176 182192 182420 182436 +6041 95 26 33688.2 181600 181616 181632 182176 182192 182420 182436 +6042 95 27 52863.4 181568 181616 182176 182420 +6043 95 28 30175 181568 181584 181648 182176 182420 +6044 95 29 25182.2 181584 181585 182161 182176 182453 +6045 95 30 34084.5 181585 181601 182161 182453 +6046 95 31 46522.5 181569 181601 181617 182145 182161 182453 +6047 95 32 54038.6 181538 181569 181602 181617 182130 182145 182146 182161 182453 +6048 95 33 26881.2 181538 181602 182130 182146 182438 +6049 95 34 28041.7 181538 181586 182130 182146 182438 +6050 95 35 66606.8 181570 181586 182146 182438 +6051 95 36 68276.2 181554 181570 182163 182423 182438 +6052 95 37 57090.6 181554 181555 181587 181619 182163 182423 +6053 95 38 62058.5 181555 181571 181587 182163 182423 +6054 95 39 71037.3 181571 181603 182163 182423 182439 +6055 95 40 70876.3 181523 181571 181588 181603 182147 182148 182180 182407 182424 +6056 95 41 58208.8 181556 181588 181620 182148 182424 +6057 95 42 57346.8 181556 181572 181620 182148 182424 +6058 95 43 56059.7 181540 181572 181573 181604 182148 182164 182424 +6059 95 44 58516 181573 181604 182164 182424 +6060 95 45 30858.4 181573 181589 182164 182424 182457 +6061 95 46 40001.1 181525 181541 181589 181605 182117 182149 182164 182457 +6062 95 47 62347.9 181541 181605 181621 182133 182149 182441 182457 +6063 95 48 26218.7 181557 181621 182133 182165 182441 182457 +6064 95 49 78752.5 181558 181622 182133 182134 182165 182166 182441 182442 182457 182458 +6065 95 50 74470.1 181542 181558 181606 181622 182134 182150 182166 182442 182458 +6066 95 51 62937 181542 181590 181606 182134 182150 182458 +6067 95 52 53696 181590 182167 182458 +6068 95 53 46131.7 181574 181590 181591 181638 182167 182427 182458 +6069 95 54 26013.3 181559 181574 181591 182167 182427 +6070 95 55 22537.6 181559 181607 182151 182427 +6071 95 56 45238.6 181543 181559 181575 181607 182151 182427 +6072 95 57 54927.8 181575 181624 182151 182184 182427 182428 +6073 95 58 18391.4 181592 181624 182168 182184 182428 +6074 95 59 59996.5 181592 181608 182168 182412 +6075 95 60 55129.8 181560 181576 181608 181640 182168 182412 +6076 95 61 43556.3 181576 181577 181625 181640 182168 182412 182445 +6077 95 62 27214.3 181577 181593 182153 182445 +6078 95 63 61847 181593 182153 182445 +6079 95 64 41365 181609 182153 182445 +6080 96 1 54646.3 181609 181610 181657 181658 182153 182154 182446 +6081 96 2 26977.3 181610 181642 181658 182154 182446 +6082 96 3 39012.7 181626 181642 182154 182446 182461 +6083 96 4 40784.5 181626 182154 182446 +6084 96 5 40840.8 181626 181627 181659 182171 182431 +6085 96 6 45010.7 181595 181627 181643 181659 182187 182200 182447 182462 +6086 96 7 71991.7 181643 182187 182188 182447 182448 +6087 96 8 69103.2 181611 181643 181660 182187 182188 182447 182448 +6088 96 9 34650.9 181628 181660 182188 182201 182448 +6089 96 10 32648.2 181628 181644 181660 182156 182172 182201 182432 182463 +6090 96 11 47688 181612 181644 182172 182432 +6091 96 12 29459.4 181612 181645 181676 182172 182464 +6092 96 13 25612.2 181645 181661 182172 182189 182464 +6093 96 14 35732.9 181613 181661 182157 182189 182464 +6094 96 15 28497.4 181613 181629 181661 181677 182157 182173 182464 +6095 96 16 18047.5 181629 181677 182173 182464 +6096 96 17 28163.3 181630 181678 182174 182465 +6097 96 18 38826.4 181614 181630 181662 181678 182158 182174 182465 +6098 96 19 48731.4 181614 181646 181662 182158 182175 182190 182465 +6099 96 20 43214.7 181646 182175 182465 +6100 96 21 22415 181599 181631 181646 181663 182175 182435 +6101 96 22 47847.9 181599 181615 181631 182159 182175 182435 +6102 96 23 33060.5 181615 181647 182159 182435 182451 +6103 96 24 18026.5 181615 181632 181647 182191 182192 182436 +6104 96 25 37602.3 181632 181664 182191 182192 182436 +6105 96 26 57929.2 181616 181664 182192 182205 182436 +6106 96 27 43579.4 181616 181648 181664 181680 182176 182205 182420 182452 +6107 96 28 34902.4 181633 181648 182176 182420 182452 +6108 96 29 45971.4 181633 182161 182453 +6109 96 30 35077 181585 181601 181633 181649 182161 182453 +6110 96 31 38065.9 181601 181617 181649 181665 182161 182453 +6111 96 32 70807 181602 181617 181650 181665 182146 182161 182453 +6112 96 33 37129.3 181602 181650 182146 182438 +6113 96 34 26067.4 181586 181634 182146 182438 +6114 96 35 37634.3 181570 181586 181618 181634 182146 182438 +6115 96 36 20508.5 181618 181619 182146 182163 182423 182438 +6116 96 37 18708.4 181619 182163 182423 +6117 96 38 46517.4 181587 181619 181635 182163 182423 182439 +6118 96 39 58335.3 181587 181603 181635 182179 182180 182439 +6119 96 40 69743.1 181603 182179 182180 182439 182440 +6120 96 41 41401 181588 181620 181652 182148 182180 182424 182440 +6121 96 42 13891.6 181620 182148 182424 +6122 96 43 48492.5 181572 181604 181636 182148 182164 182424 +6123 96 44 25275.7 181604 181637 182164 182424 +6124 96 45 39562.8 181589 181637 182164 182457 +6125 96 46 60520.2 181589 181605 181637 181653 182149 182164 182457 +6126 96 47 52574 181605 181621 181653 181669 182149 182165 182457 +6127 96 48 20829.2 181621 181669 182165 182457 +6128 96 49 48570.7 181622 181670 182165 182166 182457 182458 +6129 96 50 61586.5 181606 181622 181654 181670 182150 182166 182458 +6130 96 51 47981.8 181606 181654 182150 182458 +6131 96 52 39570.5 181590 181638 181654 182150 182167 182458 +6132 96 53 29889.7 181591 181638 182167 182458 +6133 96 54 15470.9 181591 181623 182167 182427 +6134 96 55 17229.9 181607 181623 182151 182167 182427 182443 +6135 96 56 18718.9 181607 181639 182151 182183 182427 182428 +6136 96 57 29447.4 181624 181639 182183 182184 182428 +6137 96 58 42029.4 181624 181656 182184 182428 +6138 96 59 43149.1 181608 181656 181672 182184 182199 182428 182444 +6139 96 60 28051 181640 181672 182168 182199 182412 182444 +6140 96 61 29841.5 181625 181640 182153 182168 182412 182444 182445 +6141 96 62 29250.8 181625 181641 182153 182445 +6142 96 63 18212 181593 181641 182153 182445 +6143 96 64 41855.5 181609 181657 182153 182445 +6144 97 1 44272.4 181657 181658 181705 181706 182153 182154 182186 182446 +6145 97 2 43097.7 181642 181658 181690 181706 182154 182186 182461 +6146 97 3 30435 181642 181690 182154 182170 182186 182461 +6147 97 4 14006.8 181626 181674 182170 182461 +6148 97 5 19020.7 181659 181674 182170 182200 182462 +6149 97 6 37086.8 181659 182187 182200 182462 +6150 97 7 35361.3 181643 181675 182187 182200 182210 182447 182448 182462 +6151 97 8 33267.7 181660 181675 181691 182187 182188 182201 182210 182448 +6152 97 9 46186.1 181660 181675 181692 182201 182448 182463 +6153 97 10 47946 181644 181692 182201 182448 182463 +6154 97 11 30674.9 181644 181676 181692 182172 182211 182463 +6155 97 12 40028.6 181676 181708 182172 182211 182463 182464 +6156 97 13 37908.8 181661 181676 181693 182172 182189 182464 +6157 97 14 44233.5 181661 181693 182189 182464 +6158 97 15 26522.8 181661 181677 181709 182189 182202 182464 +6159 97 16 23087.2 181677 181709 182202 182203 182464 +6160 97 17 36110.3 181678 181710 182203 182465 +6161 97 18 32028 181662 181678 181694 181710 182190 182203 182465 +6162 97 19 43901.1 181662 181694 182190 182465 +6163 97 20 17979.8 181646 181663 182175 182465 +6164 97 21 25976.5 181631 181663 182175 182212 182435 182451 182465 +6165 97 22 49082.5 181631 181679 182175 182204 182451 +6166 97 23 39163.1 181631 181647 181679 182191 182204 182451 +6167 97 24 21094.7 181647 181696 182191 182204 182436 182451 182466 +6168 97 25 40699.4 181647 181664 181696 182191 182436 182466 +6169 97 26 50261.2 181664 181680 181696 182192 182205 182213 182436 182452 182466 +6170 97 27 52131.2 181680 182205 182452 +6171 97 28 61571.5 181633 181680 181681 182161 182177 182205 182452 182453 +6172 97 29 55961.5 181633 181681 182161 182177 182452 182453 182467 +6173 97 30 26271.3 181649 181697 182161 182177 182453 182467 +6174 97 31 49230.9 181649 181665 182161 182453 182467 +6175 97 32 68822.5 181650 181665 182146 182161 182453 +6176 97 33 45009.3 181650 182146 182438 182454 +6177 97 34 43500.3 181634 181650 182146 182438 182454 +6178 97 35 36183.3 181618 181634 181666 182146 182438 182454 +6179 97 36 28770.5 181618 181666 182146 182162 182438 182455 +6180 97 37 46949.2 181619 181651 181666 182162 182163 182194 182423 182455 +6181 97 38 59314.8 181635 181651 182179 182194 182439 182455 +6182 97 39 40911.7 181635 181667 182179 182194 182439 182440 +6183 97 40 52736.6 181603 181635 181652 181667 182179 182180 182439 182440 +6184 97 41 57597.8 181652 182195 182440 +6185 97 42 53957.8 181620 181636 181652 181684 182148 182164 182195 182424 182440 182456 +6186 97 43 49301.4 181636 182164 182195 182424 182456 +6187 97 44 26469.6 181636 181668 182164 182424 182456 182457 +6188 97 45 28324.4 181637 181668 182164 182181 182457 +6189 97 46 51061.5 181653 181685 182181 182457 +6190 97 47 40193.3 181653 181669 182149 182165 182181 182196 182457 +6191 97 48 40627.2 181669 182165 182196 182457 +6192 97 49 37872.4 181670 182165 182166 182197 182457 182458 +6193 97 50 36455.9 181654 181670 182150 182166 182182 182197 182458 +6194 97 51 27288.9 181654 181686 182182 182458 +6195 97 52 31390.8 181638 181654 181655 181686 182167 182182 182458 +6196 97 53 39876.2 181655 182167 182458 +6197 97 54 32252 181623 181655 181671 182167 182208 182443 182458 +6198 97 55 50104.7 181623 181671 182167 182198 182427 182443 +6199 97 56 44149.1 181639 181671 182183 182198 182443 +6200 97 57 35167.7 181639 181688 182183 182428 182459 +6201 97 58 41617.5 181656 181688 182183 182184 182199 182209 182428 182459 +6202 97 59 42813.6 181656 181672 181704 182199 182209 182444 182459 +6203 97 60 37677.8 181672 181673 182169 182199 182444 +6204 97 61 49104.4 181625 181673 182169 182444 +6205 97 62 43877.2 181625 181641 181673 181689 182153 182169 182460 +6206 97 63 38285.6 181641 181657 181689 181705 182153 182185 182460 +6207 97 64 35332.2 181657 181705 182153 182445 182460 +6208 98 1 28093.8 181705 181706 182185 182186 +6209 98 2 28411.1 181690 181706 182186 182461 +6210 98 3 29272.3 181690 182170 182186 182461 +6211 98 4 12009.9 181674 181690 182170 182461 +6212 98 5 23262.6 181674 181707 182170 182200 182462 +6213 98 6 27326.1 181659 181707 182200 182210 182462 +6214 98 7 18769.9 181675 181691 182210 182462 +6215 98 8 31214.5 181675 181691 182210 182448 +6216 98 9 14292.2 181691 181692 182201 182448 182463 +6217 98 10 22969.9 181692 182201 182463 +6218 98 11 17514.5 181692 181708 182211 182463 +6219 98 12 21269.8 181676 181708 182211 182463 +6220 98 13 29130.2 181693 181708 182189 182211 +6221 98 14 32657.9 181693 182189 182464 +6222 98 15 35292 181709 182202 182464 +6223 98 16 30670.2 181709 182202 182203 182464 +6224 98 17 48207.3 181710 182203 182465 +6225 98 18 37009.9 181694 181710 182190 182203 182465 +6226 98 19 34450.2 181694 181711 182190 182465 +6227 98 20 26603.4 181663 181694 181711 182175 182190 182212 +6228 98 21 14266.2 181663 181711 182212 182451 +6229 98 22 36069.9 181679 181695 182204 182212 182451 +6230 98 23 50418.7 181679 181695 182204 182451 182466 +6231 98 24 45468 181695 181696 182191 182204 182451 182466 +6232 98 25 34928.7 181696 182191 182213 182466 +6233 98 26 29523.1 181696 181712 182213 182452 182466 +6234 98 27 40213.3 181680 181712 182205 182213 182452 +6235 98 28 46122.5 181681 182177 182452 +6236 98 29 46125.6 181681 181697 182177 182467 +6237 98 30 27912.4 181697 182177 182193 182467 +6238 98 31 20228.9 181697 181713 182193 182467 +6239 98 32 20655.6 181698 181713 182178 182193 +6240 98 33 21884.2 181698 182178 182454 +6241 98 34 43236 181682 181698 182178 182454 +6242 98 35 43973.5 181682 182162 182454 +6243 98 36 35332.8 181666 182162 +6244 98 37 50025.5 181651 181666 181699 182162 182194 182455 +6245 98 38 41224.4 181651 181699 182179 182194 182455 +6246 98 39 30225.7 181667 181683 182179 182194 182206 182439 182440 182455 +6247 98 40 30177.1 181667 181683 182195 182206 182440 +6248 98 41 28708.2 181652 181667 181684 182195 182440 182456 +6249 98 42 34148.7 181684 182195 182440 182456 +6250 98 43 26534 181684 182207 182456 +6251 98 44 48074.9 181668 181700 182164 182207 182456 182457 +6252 98 45 38449.6 181668 181685 181700 182164 182181 182207 182457 +6253 98 46 42345 181685 182181 182457 +6254 98 47 33943.1 181685 181701 182181 182196 182457 +6255 98 48 20940.1 181701 182196 182457 +6256 98 49 28088 181702 182197 182457 182458 +6257 98 50 26453.2 181702 182197 182458 +6258 98 51 17019.1 181686 182182 182458 +6259 98 52 26569 181686 181703 182182 182208 182458 +6260 98 53 52688.7 181655 181703 182167 182208 182458 +6261 98 54 18557.6 181671 182208 182443 +6262 98 55 50995.7 181671 181687 182198 182443 +6263 98 56 63742.3 181671 181687 182198 182443 182459 +6264 98 57 44290 181687 181688 182183 182198 182209 182459 +6265 98 58 38846.5 181688 181704 182209 182444 182459 +6266 98 59 45087.1 181672 181704 182199 182209 182444 182459 +6267 98 60 27542.8 181672 181673 181704 182169 182199 182209 182444 +6268 98 61 44098.2 181673 182169 182444 182460 +6269 98 62 53194.3 181689 182169 182460 +6270 98 63 42679.2 181689 181705 182185 182460 +6271 98 64 32032.2 181705 182185 182460 +6272 99 1 12892 181705 181706 182185 182186 +6273 99 2 8101.27 181706 182186 182461 +6274 99 3 11264.8 181690 182170 182186 182461 +6275 99 4 319.175 182461 +6276 99 5 12288 181707 182462 +6277 99 6 19358.1 181707 182210 182462 +6278 99 7 11314.8 182210 +6279 99 8 10125.2 181691 182210 +6280 99 9 0 +6281 99 10 1798.42 182211 182463 +6282 99 11 6717.9 181708 182211 182463 +6283 99 12 8230.69 181708 182211 +6284 99 13 0 +6285 99 14 0 +6286 99 15 0 +6287 99 16 1872.39 182202 182203 +6288 99 17 5637.23 181710 182203 +6289 99 18 0 +6290 99 19 0 +6291 99 20 15571.2 181711 182212 +6292 99 21 12006.6 181711 182212 +6293 99 22 7658.15 182212 182451 +6294 99 23 34980.1 181695 182204 182451 +6295 99 24 31420.1 181695 182204 182466 +6296 99 25 17575 182213 182466 +6297 99 26 7951.68 181712 182213 +6298 99 27 7357.76 181712 182213 182452 +6299 99 28 1173.02 182452 +6300 99 29 16012.7 181681 181697 182177 182467 +6301 99 30 22630 181697 182177 182193 182467 +6302 99 31 13024.4 181713 182193 182467 +6303 99 32 20655.6 181698 181713 182178 182193 +6304 99 33 21884.2 181698 182178 182454 +6305 99 34 29089 181682 181698 182178 182454 +6306 99 35 40594.8 181682 182162 182178 182454 +6307 99 36 15883.5 181666 182162 182454 +6308 99 37 14820.4 181699 182162 182194 182455 +6309 99 38 22487.9 181699 182194 182206 182455 +6310 99 39 16036.9 181683 182206 182455 +6311 99 40 14848.3 181667 181683 182206 182440 +6312 99 41 8936.73 181683 182195 182206 182440 +6313 99 42 12863.3 181684 182195 182456 +6314 99 43 31012.3 181700 182207 182456 +6315 99 44 47837.9 181700 182207 182456 +6316 99 45 20583.5 181700 182207 +6317 99 46 18351.3 181685 182181 +6318 99 47 10383.4 181685 181701 182196 182457 +6319 99 48 13006.8 181701 182196 182457 +6320 99 49 12913.8 181702 182197 182457 182458 +6321 99 50 9368.39 181702 182197 182458 +6322 99 51 6146.84 181686 182182 +6323 99 52 15453 181703 +6324 99 53 34361 181703 182208 +6325 99 54 22219.2 181703 182208 182443 +6326 99 55 19659.9 181687 182198 182208 182443 +6327 99 56 42564.4 181687 182198 +6328 99 57 21874.1 181687 182198 182459 +6329 99 58 13899.7 182209 182459 +6330 99 59 21882.2 181704 182209 +6331 99 60 3200.27 181704 182444 +6332 99 61 2209.84 182460 +6333 99 62 12126.6 181689 182185 182460 +6334 99 63 24015.6 181689 181705 182185 182460 +6335 99 64 11496.4 181705 182185 +6336 100 1 0 +6337 100 2 0 +6338 100 3 0 +6339 100 4 0 +6340 100 5 0 +6341 100 6 0 +6342 100 7 0 +6343 100 8 0 +6344 100 9 0 +6345 100 10 0 +6346 100 11 0 +6347 100 12 0 +6348 100 13 0 +6349 100 14 0 +6350 100 15 0 +6351 100 16 0 +6352 100 17 0 +6353 100 18 0 +6354 100 19 0 +6355 100 20 0 +6356 100 21 1625.87 182212 +6357 100 22 0 +6358 100 23 0 +6359 100 24 0 +6360 100 25 2771.4 182466 +6361 100 26 0 +6362 100 27 0 +6363 100 28 0 +6364 100 29 0 +6365 100 30 0 +6366 100 31 494.4 182467 +6367 100 32 0 +6368 100 33 0 +6369 100 34 1333.29 182454 +6370 100 35 0 +6371 100 36 0 +6372 100 37 4492.55 181699 182455 +6373 100 38 5069.67 181699 182206 +6374 100 39 4653.07 182206 +6375 100 40 3231.94 181683 182206 +6376 100 41 0 +6377 100 42 0 +6378 100 43 4839.63 182207 182456 +6379 100 44 13769.4 181700 182207 +6380 100 45 4887.4 181700 +6381 100 46 0 +6382 100 47 0 +6383 100 48 0 +6384 100 49 0 +6385 100 50 0 +6386 100 51 0 +6387 100 52 5150.99 181703 +6388 100 53 9454.02 181703 182208 +6389 100 54 2151.52 182208 +6390 100 55 0 +6391 100 56 0 +6392 100 57 0 +6393 100 58 0 +6394 100 59 0 +6395 100 60 0 +6396 100 61 0 +6397 100 62 0 +6398 100 63 0 +6399 100 64 0 +AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 1 events processed so far <<<=== +/home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root Info Database being retired... +Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC +/home/sss/atlas/DBRelease/current/poolcond/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root Info Database being retired... +Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A +Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] +ApplicationMgr INFO Application Manager Stopped successfully +AthAlgSeq INFO Finalizing AthAlgSeq... +AthOutSeq INFO Finalizing AthOutSeq... +AthRegSeq INFO Finalizing AthRegSeq... +AthMasterSeq INFO Finalizing AthMasterSeq... +IdDictDetDescrCnv INFO in finalize +IOVDbSvc INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 (( 0.30 ))s +IOVDbSvc INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 (( 0.00 ))s +IOVDbSvc INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 (( 0.00 ))s +IOVDbSvc INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 (( 0.00 ))s +IOVDbSvc INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 (( 0.00 ))s +IOVDbSvc INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 (( 0.02 ))s +IOVDbSvc WARNING Folder /LAR/Identifier/LArTTCellMapAtlas is requested but no data retrieved +IOVDbSvc INFO Total payload read from COOL: 538 bytes in (( 0.32 ))s +IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s +IOVDbSvc INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 0.32 ))s +IOVDbSvc INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 1 nFolders: 3 ReadTime: (( 0.00 ))s +AthDictLoaderSvc INFO in finalize... +ToolSvc INFO Removing all tools created by ToolSvc +*****Chrono***** INFO **************************************************************************************************** +*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) +*****Chrono***** INFO **************************************************************************************************** +cObjR_ALL INFO Time User : Tot= 0.51 [s] Ave/Min/Max=0.255(+-0.235)/ 0.02/ 0.49 [s] #= 2 +cObj_ALL INFO Time User : Tot= 0.55 [s] Ave/Min/Max=0.275(+-0.235)/ 0.04/ 0.51 [s] #= 2 +ChronoStatSvc INFO Time User : Tot= 3.88 [s] #= 1 +*****Chrono***** INFO **************************************************************************************************** +ChronoStatSvc.f... INFO Service finalized successfully +ApplicationMgr INFO Application Manager Finalized successfully +ApplicationMgr INFO Application Manager Terminated successfully +Py:Athena INFO leaving with code 0: "successful run" +CoralApplication Info Delete the COOL CoralApplication... +CoralApplication Info Delete the COOL database service +RalDatabaseSvc Info Delete the RalDatabaseSvc... +RalDatabaseSvc Info Purge the connection pool +RalDatabaseSvc Info Reset the ICS pointer +RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE +CoralApplication Info Delete the CORAL connection service +CoralApplication Info Delete the COOL CoralApplication... DONE +CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt b/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt index d5c1184e437bad1a3060e568a79ce3acb670e10f..ac2e49e5c10a27ba69085ee1294b54e9e03dd115 100644 --- a/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt +++ b/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt @@ -9,7 +9,6 @@ atlas_subdir( LArConditionsTest ) atlas_depends_on_subdirs( PUBLIC Calorimeter/CaloInterface Control/AthenaBaseComps - Control/MinimalRunTime Control/StoreGate DetectorDescription/Identifier GaudiKernel @@ -64,6 +63,7 @@ function (larconditions_run_test testName) atlas_add_test( ${testName} SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/larconditions_${testName}.sh ENVIRONMENT PATH=${CMAKE_CURRENT_SOURCE_DIR}/test:$ENV{PATH} + ATLAS_REFERENCE_TAG=LArConditionsTest/LArConditionsTest-01-00-00 PROPERTIES TIMEOUT 300 ) if( ARG_DEPENDS ) diff --git a/LArCalorimeter/LArTest/LArConditionsTest/test/post.sh b/LArCalorimeter/LArTest/LArConditionsTest/test/post.sh index 62f6cd29dddd49267a09c505a594450aae0a8869..0f892b5f625e2be014622baba5570c8b13ca8e9f 100755 --- a/LArCalorimeter/LArTest/LArConditionsTest/test/post.sh +++ b/LArCalorimeter/LArTest/LArConditionsTest/test/post.sh @@ -28,6 +28,31 @@ fi echo "[92;1m post.sh> OK: ${test} exited normally. Output is in $joblog [m" fi reflog=../share/${test}.ref + + # If we can't find the reference file, maybe it's located outside + # the repo. With the switch to git, we have to fall back + # to stone knives and bearskins to manage versioning of these files. + # ATLAS_REFERENCE_TAG should be a string of the form PACKAGE/VERSION. + # We first look for it in DATAPATH. If we don't find it, + # we then look under ATLAS_REFERENCE_TAG, which falls back + # to an afs path if it's not found. + # Isn't this so much easier than svn? + if [ \( ! -r $reflog \) -a "$ATLAS_REFERENCE_TAG" != "" ]; then + # Look for the file in DATAPATH. + # We have to look for the directory, not the file itself, + # since get_files is hardcoded not to look more than two + # levels down. + get_files -data -symlink $ATLAS_REFERENCE_TAG > /dev/null + reflog=`basename $ATLAS_REFERENCE_TAG`/${test}.ref + if [ ! -r $reflog ]; then + testdata=$ATLAS_REFERENCE_DATA + if [ "$testdata" = "" ]; then + testdata=/afs/cern.ch/atlas/maxidisk/d33/referencefiles + fi + reflog=$testdata/$ATLAS_REFERENCE_TAG/${test}.ref + fi + fi + if [ -r $reflog ] then # If select string is non-zero, use it for the comparison, diff --git a/MagneticField/MagFieldServices/src/AtlasFieldSvc.cxx b/MagneticField/MagFieldServices/src/AtlasFieldSvc.cxx index ee1a1deaeea6ccde983c960a176cfa515c7ed834..3f3c615b3264bfcb289e2fb71151ff767f33e4a5 100644 --- a/MagneticField/MagFieldServices/src/AtlasFieldSvc.cxx +++ b/MagneticField/MagFieldServices/src/AtlasFieldSvc.cxx @@ -31,10 +31,6 @@ #include "TFile.h" #include "TTree.h" -namespace { - inline double atan2fast(double y, double x); -} - /** Constructor **/ MagField::AtlasFieldSvc::AtlasFieldSvc(const std::string& name,ISvcLocator* svc) : AthService(name,svc), @@ -438,8 +434,8 @@ void MagField::AtlasFieldSvc::getField(const double *xyz, double *bxyz, double * const double &x(xyz[0]); const double &y(xyz[1]); const double &z(xyz[2]); - double r = sqrt(x * x + y * y); - double phi = atan2fast(y, x); + double r = std::sqrt(x * x + y * y); + double phi = std::atan2(y, x); // test if the cache is valid if (!m_cache.inside(z, r, phi)) { @@ -1420,60 +1416,3 @@ int MagField::AtlasFieldSvc::memSize() const return size; } -// -// Fast (less accurate) atan2() -// -namespace { - -double atan2fast(double y, double x) -{ - const double halfpi(M_PI / 2.); - const double sixthpi(M_PI / 6.); - const double tansixthpi(tan(M_PI / 6.)); - const double tantwelfthpi(tan(M_PI / 12.)); - - bool complement(false); - bool sign(false); - bool region(false); - - // test zeros - if (y == 0.0) return 0.0; - if (x == 0.0) return halfpi; - - // normalize range to -pi/12 to pi/12 - double z = y / x; - if (z < 0) { - z = -z; - sign = true; - } - if (z > 1.0) { - z = 1.0 / z; - complement = true; - } - if (z > tantwelfthpi) { - z = (z - tansixthpi) / (1 + tansixthpi * z); - region = true; - } - - // compute approximate atan - const double c1 = 1.6867629106; - const double c2 = 0.4378497304; - const double c3 = 1.6867633134; - - double zz = z * z; - double v = (z * (c1 + zz * c2) / (c3 + zz)); - - // go back to the original range - if (region) v += sixthpi; - if (complement) v = halfpi - v; - if (sign) v = -v; - if (x < 0.0) { - if (v < 0.0) v += M_PI; - else v -= M_PI; - } - - return v; -} - -} - diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt index 56288f7d98c2528bca39a6fd33de27739a22560f..ea674e1dc9362b499de752f1c333fed0e44bda28 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt +++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt @@ -72,8 +72,12 @@ endif() find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) - run_tpcnv_test( MuonEventTPCnv_17.0.0 ESD-17.0.0 ) - run_tpcnv_test( MuonEventTPCnv_20.1.7.2 ESD-20.1.7.2 ) + set( MUONEVENTATHENAPOOL_REFERENCE_TAG + MuonEventAthenaPoolReference-01-00-00 ) + run_tpcnv_test( MuonEventTPCnv_17.0.0 ESD-17.0.0 + REFERENCE_TAG ${MUONEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( MuonEventTPCnv_20.1.7.2 ESD-20.1.7.2 + REFERENCE_TAG ${MUONEVENTATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) endif() diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternFinderTool.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternFinderTool.h index b688c910ca4af82c093c611133f209b93d44a54b..99d8371f9871ddb9d75893cb73f49f9de9f7bed7 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternFinderTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternFinderTool.h @@ -87,7 +87,7 @@ namespace Muon { private: /** record patterncollection to storegate or deletes collection when m_recordAllOutput is false */ - void record( const MuonPrdPatternCollection* patCol, std::string location ) const; + void record(const MuonPrdPatternCollection* patCol, const SG::WriteHandleKey<MuonPrdPatternCollection>& key ) const; /** convert and add rpc preprawdata collection (1 chamber) */ @@ -207,6 +207,10 @@ namespace Muon { TH1F* m_weighthistogramtgc; /** csc histogram */ TH1F* m_weighthistogramcsc; + + SG::WriteHandleKey<MuonPrdPatternCollection> m_CosmicPhiPatternsKey; + SG::WriteHandleKey<MuonPrdPatternCollection> m_CosmicEtaPatternsKey; + SG::WriteHandleKey<MuonPrdPatternCollection> m_COMBINED_PATTERNSKey; }; } diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonLayerHoughTool.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonLayerHoughTool.h index df1ed340fb985457d495fc7b45703bd4582ed192..269b1811ba5ef3d015a1f6fdbc3f4d66ac05b97d 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonLayerHoughTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonLayerHoughTool.h @@ -32,7 +32,8 @@ #include "GaudiKernel/IIncidentListener.h" #include "GeoPrimitives/GeoPrimitives.h" #include "MuonDetDescrUtils/MuonSectorMapping.h" - +#include "xAODTruth/TruthParticleContainer.h" +#include "xAODMuon/MuonSegmentContainer.h" class IIncidentSvc; @@ -51,6 +52,8 @@ namespace MuonHough { class HitDebugInfo; } + + static const InterfaceID IID_MuonLayerHoughTool("Muon::MuonLayerHoughTool",1,0); namespace Muon { @@ -264,8 +267,9 @@ namespace Muon { TTree* m_tree; mutable MuonHough::HitNtuple* m_ntuple; - std::vector< std::string > m_truthNames; - mutable std::vector< const PRD_MultiTruthCollection* > m_truthCollections; + SG::ReadHandleKeyArray< PRD_MultiTruthCollection > m_truthNames; + SG::ReadHandleKey<xAOD::TruthParticleContainer> m_MuonTruthParticlesKey; + SG::ReadHandleKey<xAOD::MuonSegmentContainer> m_MuonTruthSegmentsKey; mutable std::set<Identifier> m_truthHits; mutable std::set<Identifier> m_foundTruthHits; diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternFinderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternFinderTool.cxx index 2b96806389d8fdc9de6b0b1b6885d2c010fc7bd8..ff916af1fdbda540bf7b9d0e4eed2dac3ba1716e 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternFinderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternFinderTool.cxx @@ -75,7 +75,10 @@ namespace Muon { m_summary(false), m_recordAllOutput(false), m_cscAssoOutputLocation("MuonPatCscSegAssMap"), - m_phietahitassociation(0) + m_phietahitassociation(0), + m_CosmicPhiPatternsKey("CosmicPhiPatterns"), + m_CosmicEtaPatternsKey("CosmicEtaPatterns"), + m_COMBINED_PATTERNSKey("COMBINED_PATTERNS") { declareInterface<IMuonHoughPatternFinderTool>(this); @@ -96,10 +99,14 @@ namespace Muon { declareProperty("ShowerSkipping",m_showerskip); declareProperty("ShowerSkipPercentage",m_showerskipperc); - declareProperty("PatCscSegAssMapOutputLocation",m_cscAssoOutputLocation); + declareProperty("PatCscSegAssMapOutputLocation",m_cscAssoOutputLocation);//Not used declareProperty("UseHistos",m_use_histos); declareProperty("DoSummary",m_summary); declareProperty("RecordAll",m_recordAllOutput); + + declareProperty("CosmicPhiKey", m_CosmicPhiPatternsKey); + declareProperty("CosmicEtaPatterns", m_CosmicEtaPatternsKey); + declareProperty("COMBINED_PATTERNS", m_COMBINED_PATTERNSKey); } MuonHoughPatternFinderTool::~MuonHoughPatternFinderTool() @@ -198,6 +205,15 @@ namespace Muon { m_phietahitassociation = new std::map<const Trk::PrepRawData*, std::set<const Trk::PrepRawData*,Muon::IdentifierPrdLess> >; + if(!m_recordAllOutput){ //Nullify unused output + m_CosmicPhiPatternsKey = ""; + m_CosmicEtaPatternsKey = ""; + m_COMBINED_PATTERNSKey = ""; + } + ATH_CHECK( m_CosmicPhiPatternsKey.initialize() ); + ATH_CHECK( m_CosmicEtaPatternsKey.initialize() ); + ATH_CHECK( m_COMBINED_PATTERNSKey.initialize() ); + ATH_MSG_VERBOSE ("End of Initializing"); return StatusCode::SUCCESS; } @@ -313,9 +329,9 @@ namespace Muon { combinedpatterns = new MuonPrdPatternCollection(); } - record( phipatterns, "CosmicPhiPatterns" ); - record( etapatterns, "CosmicEtaPatterns" ); - record( combinedpatterns, "COMBINED_PATTERNS" ); + record( phipatterns, m_CosmicPhiPatternsKey ); + record( etapatterns, m_CosmicEtaPatternsKey ); + record( combinedpatterns, m_COMBINED_PATTERNSKey ); if( patterncombinations ) storeCscAssMap( patterncombinations ); @@ -523,7 +539,7 @@ namespace Muon { } // getAllHits - void MuonHoughPatternFinderTool::record( const MuonPrdPatternCollection* patCol, std::string location ) const { + void MuonHoughPatternFinderTool::record( const MuonPrdPatternCollection* patCol, const SG::WriteHandleKey<MuonPrdPatternCollection> &key ) const { if( !patCol ) { ATH_MSG_WARNING ("Zero pointer, could not save patterns!!! "); @@ -532,18 +548,19 @@ namespace Muon { // check whether we are writing patterns to storegate, if not delete pattern if( !m_recordAllOutput ){ - ATH_MSG_DEBUG ("Deleted patterns: " << patCol->size() << " at " << location); + ATH_MSG_DEBUG ("Deleted patterns: " << patCol->size() << " at " << key.key()); // since patCol Datavector, it owns (by defaults its elements) delete patCol; } else { - StatusCode sc = evtStore()->record(patCol, location); + SG::WriteHandle<MuonPrdPatternCollection> handle(key); + StatusCode sc = handle.record(std::unique_ptr<MuonPrdPatternCollection>(const_cast<MuonPrdPatternCollection*> (patCol))); if ( sc.isFailure() ){ - ATH_MSG_WARNING ("Could not save patterns at " << location); + ATH_MSG_WARNING ("Could not save patterns at " << key.key()); } else{ - ATH_MSG_DEBUG ("Saved patterns: " << patCol->size() << " at " << location); + ATH_MSG_DEBUG ("Saved patterns: " << patCol->size() << " at " << key.key()); } } } diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.cxx index dfd8fe9dcec5ca76a5b4bcecbc7232b70384ae45..45b2467b0384f497d7ebf150fffb571bc2547ed8 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.cxx @@ -15,20 +15,26 @@ MuonLayerHoughAlg::MuonLayerHoughAlg(const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name,pSvcLocator), + m_keyTgc("TGC_Measurements"), + m_keyRpc( "RPC_Measurements"), + m_keyCsc("CSC_Clusters"), + m_keyMdt("MDT_DriftCircles"), + m_keysTgc("STGC_Measurements"), + m_keyMM("MM_Measurements"), m_combis("MuonLayerHoughCombis"), m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"), m_layerTool("Muon::MuonLayerHoughTool/MuonLayerHoughTool") { - declareProperty("CscPrepDataContainer", m_keyCsc = "CSC_Clusters"); - declareProperty("MdtPrepDataContainer", m_keyMdt = "MDT_DriftCircles"); - declareProperty("RpcPrepDataContainer", m_keyRpc = "RPC_Measurements"); - declareProperty("TgcPrepDataContainer", m_keyTgc = "TGC_Measurements"); - declareProperty("TgcPrepDataContainerPriorBC", m_keyTgcPriorBC = "TGC_MeasurementsPriorBC"); - declareProperty("TgcPrepDataContainerNextBC", m_keyTgcNextBC = "TGC_MeasurementsNextBC"); - declareProperty("sTgcPrepDataContainer", m_keysTgc = "STGC_Measurements"); - declareProperty("MMPrepDataContainer", m_keyMM = "MM_Measurements"); + declareProperty("CscPrepDataContainer", m_keyCsc); + declareProperty("MdtPrepDataContainer", m_keyMdt); + declareProperty("RpcPrepDataContainer", m_keyRpc); + declareProperty("TgcPrepDataContainer", m_keyTgc); + declareProperty("TgcPrepDataContainerPriorBC", m_keyTgcPriorBC = "TGC_MeasurementsPriorBC");//unused + declareProperty("TgcPrepDataContainerNextBC", m_keyTgcNextBC = "TGC_MeasurementsNextBC");//unused + declareProperty("sTgcPrepDataContainer", m_keysTgc); + declareProperty("MMPrepDataContainer", m_keyMM); declareProperty("PrintSummary", m_printSummary = false ); - + declareProperty("MuonPatternCombinationCollection", m_combis); declareProperty("MuonLayerScanTool", m_layerTool ); } @@ -41,47 +47,41 @@ StatusCode MuonLayerHoughAlg::initialize() ATH_CHECK( m_layerTool.retrieve() ); ATH_CHECK( m_printer.retrieve() ); + ATH_CHECK( m_keyRpc.initialize() ); + ATH_CHECK( m_keyMdt.initialize() ); + ATH_CHECK( m_keyTgc.initialize() ); + ATH_CHECK( m_keyCsc.initialize() ); + ATH_CHECK( m_keysTgc.initialize()); + ATH_CHECK( m_keyMM.initialize() ); + ATH_CHECK( m_combis.initialize() ); + return StatusCode::SUCCESS; } + + StatusCode MuonLayerHoughAlg::execute() { - const Muon::RpcPrepDataContainer* rpcPrds = 0; - if( evtStore()->contains<Muon::RpcPrepDataContainer>(m_keyRpc) && evtStore()->retrieve(rpcPrds,m_keyRpc).isFailure()) { - ATH_MSG_WARNING("Cannot retrieve RpcPrepDataContainer " << m_keyRpc ); - } - const Muon::MdtPrepDataContainer* mdtPrds = 0; - if( evtStore()->contains<Muon::MdtPrepDataContainer>(m_keyMdt) && evtStore()->retrieve(mdtPrds,m_keyMdt).isFailure()) { - ATH_MSG_WARNING("Cannot retrieve MdtPrepDataContainer " << m_keyMdt ); - } - const Muon::TgcPrepDataContainer* tgcPrds = 0; - if( evtStore()->contains<Muon::TgcPrepDataContainer>(m_keyTgc) && evtStore()->retrieve(tgcPrds,m_keyTgc).isFailure()) { - ATH_MSG_WARNING("Cannot retrieve TgcPrepDataContainer " << m_keyTgc ); - } - const Muon::CscPrepDataContainer* cscPrds = 0; - if( evtStore()->contains<Muon::CscPrepDataContainer>(m_keyCsc) && evtStore()->retrieve(cscPrds,m_keyCsc).isFailure()) { - ATH_MSG_WARNING("Cannot retrieve CscPrepDataContainer " << m_keyCsc ); - } - const Muon::sTgcPrepDataContainer* stgcPrds = 0; - if( evtStore()->contains<Muon::sTgcPrepDataContainer>(m_keysTgc) && evtStore()->retrieve(stgcPrds,m_keysTgc).isFailure()) { - ATH_MSG_WARNING("Cannot retrieve sTgcPrepDataContainer " << m_keysTgc ); - } - const Muon::MMPrepDataContainer* mmPrds = 0; - if( evtStore()->contains<Muon::MMPrepDataContainer>(m_keyMM) && evtStore()->retrieve(mmPrds,m_keyMM).isFailure()) { - ATH_MSG_WARNING("Cannot retrieve MmPrepDataContainer " << m_keyMM ); - } + const Muon::RpcPrepDataContainer* rpcPrds = GetObject(m_keyRpc); + const Muon::MdtPrepDataContainer* mdtPrds = GetObject(m_keyMdt); + const Muon::TgcPrepDataContainer* tgcPrds = GetObject(m_keyTgc); + const Muon::CscPrepDataContainer* cscPrds = GetObject(m_keyCsc); + const Muon::sTgcPrepDataContainer* stgcPrds = GetObject(m_keysTgc); + const Muon::MMPrepDataContainer* mmPrds =GetObject(m_keyMM);; ATH_MSG_VERBOSE("calling layer tool "); - MuonPatternCombinationCollection* combis = m_layerTool->analyse(mdtPrds,cscPrds,tgcPrds,rpcPrds,stgcPrds,mmPrds); + std::unique_ptr<MuonPatternCombinationCollection> combis(m_layerTool->analyse(mdtPrds,cscPrds,tgcPrds,rpcPrds,stgcPrds,mmPrds)); if( combis ){ - if (evtStore()->record(combis,"MuonLayerHoughCombis").isFailure()) { + + SG::WriteHandle<MuonPatternCombinationCollection> Handle(m_combis); + if (Handle.record(std::move(combis)).isFailure()) { ATH_MSG_WARNING("Failed to record MuonPatternCombinationCollection at MuonLayerHoughCombis"); }else{ - ATH_MSG_DEBUG("Recorded MuonPatternCombinationCollection at MuonLayerHoughCombis: size " << combis->size()); + ATH_MSG_DEBUG("Recorded MuonPatternCombinationCollection at MuonLayerHoughCombis: size " << Handle->size()); if( m_printSummary || msgLvl(MSG::DEBUG) ){ - msg() << msg().level() << "Number of MuonPatternCombinations " << combis->size() << std::endl << m_printer->print(*combis) << endmsg; + msg() << msg().level() << "Number of MuonPatternCombinations " << Handle->size() << std::endl << m_printer->print(*Handle) << endmsg; } } } @@ -98,3 +98,4 @@ StatusCode MuonLayerHoughAlg::finalize() return AthAlgorithm::finalize(); } + diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.h index 150ad3b5880ef6b6005a2e3fe9c759ed0acecc12..3c06e081605a6b92618591dae8ed2b00a4dca2a2 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.h +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.h @@ -20,27 +20,41 @@ class MuonLayerHoughAlg : public AthAlgorithm virtual ~MuonLayerHoughAlg(); - virtual StatusCode initialize(); - virtual StatusCode execute(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; private: + template<class T> + const T* GetObject(SG::ReadHandleKey<T> &key); - /** storegate location of the MuonPrepDataContainer for all four technologies */ - std::string m_keyTgc; - std::string m_keyTgcPriorBC; - std::string m_keyTgcNextBC; - std::string m_keyRpc; - std::string m_keyCsc; - std::string m_keyMdt; - std::string m_keysTgc; - std::string m_keyMM; + /** storegate location of the MuonPrepDataContainer for all four technologies */ + SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_keyTgc; + std::string m_keyTgcPriorBC;//unused + std::string m_keyTgcNextBC;//unused + SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_keyRpc; + SG::ReadHandleKey<Muon::CscPrepDataContainer> m_keyCsc; + SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_keyMdt; + SG::ReadHandleKey<Muon::sTgcPrepDataContainer> m_keysTgc; + SG::ReadHandleKey<Muon::MMPrepDataContainer> m_keyMM; + + SG::WriteHandleKey<MuonPatternCombinationCollection> m_combis; ToolHandle<Muon::MuonEDMPrinterTool> m_printer; ToolHandle<Muon::MuonLayerHoughTool> m_layerTool; bool m_printSummary; }; +template<class T> +const T* MuonLayerHoughAlg::GetObject(SG::ReadHandleKey<T> &key){ + SG::ReadHandle<T> handle( key); + if( handle.isPresent() && !handle.isValid()) { + ATH_MSG_WARNING("MuonLayerHoughAlg Cannot retrieve " << handle.key() ); + return nullptr; + } + return handle.cptr(); +} + #endif diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx index a64d1316388f554ef1b110635ed4661c477f0c76..2d8a4cee94e5862b6a949215192a1d4658d15b3d 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx @@ -18,7 +18,6 @@ #include "CxxUtils/sincos.h" #include "xAODTruth/TruthParticle.h" #include "xAODTruth/TruthParticleContainer.h" -#include "xAODTruth/TruthParticleAuxContainer.h" #include "xAODMuon/MuonSegmentContainer.h" namespace Muon { @@ -29,6 +28,9 @@ namespace Muon { m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"), m_truthSummaryTool("Muon::MuonTruthSummaryTool/MuonTruthSummaryTool"), m_detMgr(0), + m_truthNames{}, + m_MuonTruthParticlesKey("MuonTruthParticles"), + m_MuonTruthSegmentsKey("MuonTruthSegments"), m_ntechnologies(4), m_incidentSvc("IncidentSvc",name) { @@ -49,7 +51,8 @@ namespace Muon { declareProperty("UseSeeds",m_useSeeds = true ); declareProperty("DoParabolicExtrapolation",m_doParabolicExtrapolation = true ); declareProperty("ExtrapolationDistance",m_extrapolationDistance = 1500. ); - + declareProperty("MuonTruthParticlesKey", m_MuonTruthParticlesKey); + declareProperty("MuonTruthSegmentsKey", m_MuonTruthSegmentsKey); } MuonLayerHoughTool::~MuonLayerHoughTool() @@ -91,16 +94,20 @@ namespace Muon { initializeSectorMapping(); - if( m_truthNames.empty() ){ + if( m_truthNames.empty() && !m_doTruth ){ std::string postfix = "_TruthMap"; std::string allNames(""); for( unsigned int tech=0; tech<m_ntechnologies;++tech ){ - m_truthNames.push_back( std::string(m_idHelper->mdtIdHelper().technologyString(tech)) + postfix ); + std::string thisname = std::string(m_idHelper->mdtIdHelper().technologyString(tech)) + postfix; + m_truthNames.emplace_back( thisname ); allNames += " "; - allNames += m_truthNames.back(); + allNames += thisname; } ATH_MSG_DEBUG("TruthMaps " << allNames ); } + if(!m_doTruth){ m_truthNames.clear(); } //Nullify if not using collections + + ATH_CHECK( m_truthNames.initialize() ); // initialize cuts, if only one cut, use make_pair to avoid compiler issues, format is (position, cut) m_selectors.resize(MuonStationIndex::ChIndexMax); @@ -179,22 +186,11 @@ namespace Muon { } void MuonLayerHoughTool::getTruth() const { - m_truthCollections.clear(); - m_truthCollections.resize(m_ntechnologies,0); - for( unsigned int i=0; i<m_truthNames.size(); ++i ){ - const std::string name = m_truthNames[i]; - if( !evtStore()->contains<PRD_MultiTruthCollection>(name) ) continue; - - if( evtStore()->retrieve(m_truthCollections[i], name).isFailure() ) { - ATH_MSG_WARNING( "PRD_MultiTruthCollection " << name << " NOT found"); - continue; - } - ATH_MSG_DEBUG( "PRD_MultiTruthCollection " << name << " found " << m_truthCollections[i]->size()); - } + if(m_ntuple){ - const xAOD::TruthParticleContainer* truthMuons = evtStore()->tryConstRetrieve< xAOD::TruthParticleContainer >("MuonTruthParticles"); - if (truthMuons) { + SG::ReadHandle<xAOD::TruthParticleContainer> truthMuons(m_MuonTruthParticlesKey); + if (truthMuons.isValid()) { ATH_MSG_DEBUG("Retrieved truth muons " << truthMuons->size()); int nmuons = 0; for (const auto truthMu: *truthMuons){ @@ -215,9 +211,8 @@ namespace Muon { ++nmuons; } m_ntuple->nmuons = nmuons; - - const xAOD::MuonSegmentContainer* truthSegments = evtStore()->tryConstRetrieve< xAOD::MuonSegmentContainer >("MuonTruthSegments"); - if (truthSegments) { + SG::ReadHandle<xAOD::MuonSegmentContainer> truthSegments(m_MuonTruthSegmentsKey); + if (truthSegments.isValid()) { ATH_MSG_DEBUG("Retrieved truth Segments " << truthSegments->size()); int nsegs = 0; for (const auto truthSeg: *truthSegments){ @@ -1859,7 +1854,7 @@ namespace Muon { void MuonLayerHoughTool::fill( const MdtPrepDataCollection& mdts, MuonLayerHoughTool::HitVec& hits ) const { if( mdts.empty() ) return; - + auto truthCollections = m_truthNames.makeHandles(); Identifier chid = mdts.identify(); MuonStationIndex::DetectorRegionIndex region = m_idHelper->regionIndex(chid); MuonStationIndex::LayerIndex layer = m_idHelper->layerIndex(chid); @@ -1890,7 +1885,7 @@ namespace Muon { debug->time = prd.tdc(); debug->r = prd.localPosition()[Trk::locR]; - if( technology < m_truthCollections.size() ) matchTruth(*m_truthCollections[technology],id,*debug); + if( technology < truthCollections.size() ) matchTruth(*truthCollections[technology],id,*debug); MuonHough::Hit* hit = new MuonHough::Hit(sublayer,x,ymin,ymax,1.,debug,&prd); hits.push_back(hit); } @@ -1906,7 +1901,7 @@ namespace Muon { void MuonLayerHoughTool::fill( const RpcPrepDataCollection& rpcs, MuonLayerHoughTool::HitVec& hits, MuonLayerHoughTool::PhiHitVec& phiHits ) const { if( rpcs.empty() ) return; - + auto truthCollections = m_truthNames.makeHandles(); Identifier chid = rpcs.identify(); unsigned int technology = m_idHelper->technologyIndex(chid); MuonStationIndex::LayerIndex layer = m_idHelper->layerIndex(chid); @@ -1937,7 +1932,7 @@ namespace Muon { debug->isEtaPhi = (neta && nphi); debug->trigConfirm = 1; debug->time = prd.time(); - if( technology < m_truthCollections.size() ) matchTruth(*m_truthCollections[technology],id,*debug); + if( technology < truthCollections.size() ) matchTruth(*truthCollections[technology],id,*debug); float weight = (neta && nphi) ? 2 : 1; if( m_idHelper->rpcIdHelper().measuresPhi(id) ) { @@ -1964,7 +1959,7 @@ namespace Muon { void MuonLayerHoughTool::fill( const MMPrepDataCollection& mms, MuonLayerHoughTool::HitVec& hits ) const { if( mms.empty() ) return; - + auto truthCollections = m_truthNames.makeHandles(); Identifier chid = mms.identify(); MuonStationIndex::DetectorRegionIndex region = m_idHelper->regionIndex(chid); MuonStationIndex::LayerIndex layer = m_idHelper->layerIndex(chid); @@ -1987,7 +1982,7 @@ namespace Muon { float ymax = y + stripCor; MuonHough::HitDebugInfo* debug = new MuonHough::HitDebugInfo(technology,sector,region,layer,sublayer); debug->r = stripCor; - if( technology < m_truthCollections.size() ) matchTruth(*m_truthCollections[technology],id,*debug); + if( technology < truthCollections.size() ) matchTruth(*truthCollections[technology],id,*debug); MuonHough::Hit* hit = new MuonHough::Hit(sublayer,x,ymin,ymax,1.,debug,&prd); hits.push_back(hit); @@ -1997,7 +1992,7 @@ namespace Muon { void MuonLayerHoughTool::fill( const sTgcPrepDataCollection& stgcs, MuonLayerHoughTool::HitVec& hits, MuonLayerHoughTool::PhiHitVec& phiHits, int selectedSector ) const { if( stgcs.empty() ) return; - + auto truthCollections = m_truthNames.makeHandles(); Identifier chid = stgcs.identify(); MuonStationIndex::DetectorRegionIndex region = m_idHelper->regionIndex(chid); MuonStationIndex::LayerIndex layer = m_idHelper->layerIndex(chid); @@ -2024,7 +2019,7 @@ namespace Muon { debug->isEtaPhi = 1; debug->trigConfirm = (prd.getBcBitMap() & sTgcPrepData::BCBIT_CURRENT) == sTgcPrepData::BCBIT_CURRENT; debug->time = prd.getBcBitMap(); - if( technology < m_truthCollections.size() ) matchTruth(*m_truthCollections[technology],id,*debug); + if( technology < truthCollections.size() ) matchTruth(*truthCollections[technology],id,*debug); if( m_idHelper->stgcIdHelper().channelType(id) == 1 ) { float x = prd.globalPosition().z(); @@ -2122,7 +2117,7 @@ namespace Muon { } return; } - + auto truthCollections = m_truthNames.makeHandles(); std::vector<int> sectors; getSectors(clustering.clusters3D.front(),sectors); unsigned int technology = m_idHelper->technologyIndex(chid); @@ -2164,7 +2159,7 @@ namespace Muon { debug->clusterLayers = cl.etaCluster.layers(); debug->isEtaPhi = cl.phiCluster.layers(); debug->time = cl.etaCluster.hitList.front()->getBcBitMap(); - if( technology < m_truthCollections.size() ) matchTruth(*m_truthCollections[technology],id,*debug); + if( technology < truthCollections.size() ) matchTruth(*truthCollections[technology],id,*debug); MuonHough::HitDebugInfo* phiDebug = new MuonHough::HitDebugInfo(*debug); phiDebug->clusterSize = cl.phiCluster.hitList.size(); diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py index 306d008d81183adc21b9ab4a344d5b42b17041eb..71b00adde351ecf4c0aee45dccaabf9a6ae2ffe1 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py @@ -2,6 +2,7 @@ from MuonRecExample.MuonRecFlags import muonRecFlags from RecExConfig.RecFlags import rec from RecExConfig.RecAlgsFlags import recAlgs from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +from MuonRecExample.MuonStandaloneFlags import muonStandaloneFlags ## flag to set number of events to be processed EvtMax = -1 @@ -24,15 +25,7 @@ from MuonRecExample.MuonRecUtils import assertCastorStager,hasJobPropertyBeenSet # Input #-------------------------------------------------------------------------------- athenaCommonFlags.FilesInput = [ -"root://eosatlas//eos/atlas/user/j/jomeyer/mc12_8TeV.129681.PowhegPythia8_AU2CT10_Zmumu_DiLeptonFilter/RDO_20131115/Zmumu_devval_20131115.0001.rdo.pool.root", -"root://eosatlas//eos/atlas/user/j/jomeyer/mc12_8TeV.129681.PowhegPythia8_AU2CT10_Zmumu_DiLeptonFilter/RDO_20131115/Zmumu_devval_20131115.0002.rdo.pool.root", -"root://eosatlas//eos/atlas/user/j/jomeyer/mc12_8TeV.129681.PowhegPythia8_AU2CT10_Zmumu_DiLeptonFilter/RDO_20131115/Zmumu_devval_20131115.0003.rdo.pool.root", -"root://eosatlas//eos/atlas/user/j/jomeyer/mc12_8TeV.129681.PowhegPythia8_AU2CT10_Zmumu_DiLeptonFilter/RDO_20131115/Zmumu_devval_20131115.0004.rdo.pool.root", -"root://eosatlas//eos/atlas/user/j/jomeyer/mc12_8TeV.129681.PowhegPythia8_AU2CT10_Zmumu_DiLeptonFilter/RDO_20131115/Zmumu_devval_20131115.0005.rdo.pool.root", -"root://eosatlas//eos/atlas/user/j/jomeyer/mc12_8TeV.129681.PowhegPythia8_AU2CT10_Zmumu_DiLeptonFilter/RDO_20131115/Zmumu_devval_20131115.0006.rdo.pool.root", -"root://eosatlas//eos/atlas/user/j/jomeyer/mc12_8TeV.129681.PowhegPythia8_AU2CT10_Zmumu_DiLeptonFilter/RDO_20131115/Zmumu_devval_20131115.0007.rdo.pool.root", -"root://eosatlas//eos/atlas/user/j/jomeyer/mc12_8TeV.129681.PowhegPythia8_AU2CT10_Zmumu_DiLeptonFilter/RDO_20131115/Zmumu_devval_20131115.0008.rdo.pool.root", -"root://eosatlas//eos/atlas/user/j/jomeyer/mc12_8TeV.129681.PowhegPythia8_AU2CT10_Zmumu_DiLeptonFilter/RDO_20131115/Zmumu_devval_20131115.0009.rdo.pool.root" +"root://eosatlas///eos/atlas/atlasdatadisk/rucio/valid1/18/60/RDO_TRIG.10625506._000001.pool.root.1" ] if not hasJobPropertyBeenSet(athenaCommonFlags.FilesInput): diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.cxx index 1e7c2ea8bc6052ad80e24d3f8c57f9bd30f6b4d7..224a83c94c4f334b8e64c291f7a7252a7eabf881 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.cxx @@ -59,6 +59,10 @@ Muon::MooSegmentCombinationFinder::MooSegmentCombinationFinder(const std::string m_segmentCombinationCleaner("Muon::MuonSegmentCombinationCleanerTool/MuonSegmentCombinationCleanerTool"), m_overlapRemovalTool("Muon::MuonSegmentOverlapRemovalTool/MuonSegmentOverlapRemovalTool"), m_segmentSelector("Muon::MuonSegmentSelectionTool/MuonSegmentSelectionTool"), + m_csc2dLocation("Csc2dSegmentCombinations"), + m_csc4dLocation("Csc4dSegmentCombinations"), + m_mdtSegmentCombinationLocation("MdtSegmentCombinations"), + m_curvedCombinationLocation("CurvedSegmentCombinations"), m_nevents(0), m_ncsc2SegmentCombinations(0), m_ncsc4SegmentCombinations(0), @@ -71,6 +75,7 @@ Muon::MooSegmentCombinationFinder::MooSegmentCombinationFinder(const std::string m_nsegmentsCurved(0), m_nremovedSegments(0), m_nremovedBadSegments(0) + { declareInterface<IMooSegmentCombinationFinder>(this); @@ -91,10 +96,10 @@ Muon::MooSegmentCombinationFinder::MooSegmentCombinationFinder(const std::string declareProperty("DoSegmentCombinationCleaning", m_doSegmentCombinationCleaning = true ); declareProperty("WriteIntermediateResults", m_writeAll = false ); - declareProperty("Csc2dSegmentCombinationLocation", m_csc2dLocation = "Csc2dSegmentCombinations" ); - declareProperty("Csc4dSegmentCombinationLocation", m_csc4dLocation = "Csc4dSegmentCombinations" ); - declareProperty("MdtSegmentCombinationLocation", m_mdtSegmentCombinationLocation = "MdtSegmentCombinations" ); - declareProperty("CurvedSegmentCombinationLocation", m_curvedCombinationLocation = "CurvedSegmentCombinations" ); + declareProperty("Csc2dSegmentCombinationLocation", m_csc2dLocation ); + declareProperty("Csc4dSegmentCombinationLocation", m_csc4dLocation ); + declareProperty("MdtSegmentCombinationLocation", m_mdtSegmentCombinationLocation); + declareProperty("CurvedSegmentCombinationLocation", m_curvedCombinationLocation); declareProperty("CloneSegments", m_cloneSegments = false ); } @@ -184,7 +189,12 @@ Muon::MooSegmentCombinationFinder::initialize() } } } - + + ATH_CHECK( m_csc2dLocation.initialize() ); + ATH_CHECK( m_csc4dLocation.initialize() ); + ATH_CHECK( m_mdtSegmentCombinationLocation.initialize() ); + ATH_CHECK( m_curvedCombinationLocation.initialize() ); + return StatusCode::SUCCESS; } @@ -384,7 +394,7 @@ Muon::MooSegmentCombinationFinder::findSegments( const std::vector<const MdtPrep } void -Muon::MooSegmentCombinationFinder::postProcess( const MuonSegmentCombinationCollection* col, bool write, std::string colLocation ) { +Muon::MooSegmentCombinationFinder::postProcess( MuonSegmentCombinationCollection* col, bool write, SG::WriteHandleKey<MuonSegmentCombinationCollection> &colLocation ) { if( !write ) { // hack to remove old combies before deleting them const IMuonPatternSegmentAssociationTool::AssociationMap& assMap = m_assocTool->map(); @@ -401,12 +411,13 @@ Muon::MooSegmentCombinationFinder::postProcess( const MuonSegmentCombinationCol } if( !col ) col = new MuonSegmentCombinationCollection(); - - if( evtStore()->record(col,colLocation).isSuccess() ){ + + SG::WriteHandle<MuonSegmentCombinationCollection> handle(colLocation); + if( handle.record(std::unique_ptr<MuonSegmentCombinationCollection> (col)).isSuccess() ){ ATH_MSG_VERBOSE("stored MuonSegmentCombinationCollection " << col->size() - << " at " << colLocation); + << " at " << colLocation.key()); }else{ - ATH_MSG_ERROR("Failed to store MuonSegmentCombinationCollection at " << colLocation); + ATH_MSG_ERROR("Failed to store MuonSegmentCombinationCollection at " << colLocation.key()); } } diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.h index fab9ff42845b32043eba67d4afc93c2a8275aac2..7dbfb7457d9a48ef816d4cf078c65be0b0f81ba1 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentCombinationFinder.h @@ -82,8 +82,7 @@ namespace Muon void printSummary( std::string stageTag, const Trk::SegmentCollection* col ) const; /** helper functions to write out intermediate results */ - void postProcess( const MuonSegmentCombinationCollection* col, bool write, std::string colLocation ); - void postProcess( const MuonPatternCombinationCollection* col, bool write, std::string colLocation ); + void postProcess( MuonSegmentCombinationCollection* col, bool write, SG::WriteHandleKey<MuonSegmentCombinationCollection> &colLocation ); /** extract a segment collection from a segment combination collection */ void extractSegmentCollection( const MuonSegmentCombinationCollection& combiCol, Trk::SegmentCollection& segments ) const; @@ -128,10 +127,10 @@ namespace Muon ToolHandle<IMuonSegmentSelectionTool> m_segmentSelector; bool m_writeAll; - std::string m_csc2dLocation; - std::string m_csc4dLocation; - std::string m_mdtSegmentCombinationLocation; - std::string m_curvedCombinationLocation; + SG::WriteHandleKey<MuonSegmentCombinationCollection> m_csc2dLocation; + SG::WriteHandleKey<MuonSegmentCombinationCollection> m_csc4dLocation; + SG::WriteHandleKey<MuonSegmentCombinationCollection> m_mdtSegmentCombinationLocation; + SG::WriteHandleKey<MuonSegmentCombinationCollection> m_curvedCombinationLocation; bool m_cloneSegments; /** counters */ diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx index cf21f16cf1730103d65c94650130170cb8331687..f8d4d32711eee85e050f39da175b73f2fa700348 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx @@ -18,6 +18,15 @@ MooSegmentFinderAlg::MooSegmentFinderAlg(const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name,pSvcLocator), + m_keyTgc("TGC_Measurements"), + m_keyTgcPriorBC( "TGC_MeasurementsPriorBC"), + m_keyTgcNextBC("TGC_MeasurementsNextBC"), + m_keyRpc("RPC_Measurements"), + m_keyCsc( "CSC_Clusters"), + m_keyMdt("MDT_DriftCircles"), + m_patternCombiLocation("MuonHoughPatternCombinations"), + m_segmentLocation("MooreSegments"), + m_segmentCombiLocation("MooreSegmentCombinations"), m_segmentFinder("Muon::MooSegmentCombinationFinder/MooSegmentCombinationFinder"), m_assocTool("Muon::MuonPatternSegmentAssociationTool/MuonPatternSegmentAssociationTool"), m_clusterSegMaker("Muon::MuonClusterSegmentFinder/MuonClusterSegmentFinder") @@ -33,16 +42,16 @@ MooSegmentFinderAlg::MooSegmentFinderAlg(const std::string& name, ISvcLocator* p declareProperty("doRPCClust",m_doRPCClust = false); - declareProperty("CscPrepDataContainer", m_keyCsc = "CSC_Clusters"); - declareProperty("MdtPrepDataContainer", m_keyMdt = "MDT_DriftCircles"); - declareProperty("RpcPrepDataContainer", m_keyRpc = "RPC_Measurements"); - declareProperty("TgcPrepDataContainer", m_keyTgc = "TGC_Measurements"); - declareProperty("TgcPrepDataContainerPriorBC", m_keyTgcPriorBC = "TGC_MeasurementsPriorBC"); - declareProperty("TgcPrepDataContainerNextBC", m_keyTgcNextBC = "TGC_MeasurementsNextBC"); + declareProperty("CscPrepDataContainer", m_keyCsc); + declareProperty("MdtPrepDataContainer", m_keyMdt); + declareProperty("RpcPrepDataContainer", m_keyRpc); + declareProperty("TgcPrepDataContainer", m_keyTgc); + declareProperty("TgcPrepDataContainerPriorBC", m_keyTgcPriorBC); + declareProperty("TgcPrepDataContainerNextBC", m_keyTgcNextBC); - declareProperty("MuonPatternCombinationLocation", m_patternCombiLocation = "MuonHoughPatternCombinations" ); - declareProperty("MuonSegmentOutputLocation", m_segmentLocation = "MooreSegments"); - declareProperty("MuonSegmentCombinationOutputLocation",m_segmentCombiLocation = "MooreSegmentCombinations"); + declareProperty("MuonPatternCombinationLocation", m_patternCombiLocation); + declareProperty("MuonSegmentOutputLocation", m_segmentLocation ); + declareProperty("MuonSegmentCombinationOutputLocation",m_segmentCombiLocation); declareProperty("SegmentFinder", m_segmentFinder ); declareProperty("MuonClusterSegmentFinderTool",m_clusterSegMaker); @@ -72,10 +81,33 @@ StatusCode MooSegmentFinderAlg::initialize() ATH_MSG_FATAL("Could not get " << m_assocTool); return StatusCode::FAILURE; } + + //Nullify key from scheduler if not needed + if (!m_useMdt) m_keyMdt = ""; + if (!m_useCsc) m_keyCsc = ""; + if (!m_useRpc) m_keyRpc = ""; + if (!m_useTgcPriorBC) m_keyTgcPriorBC = ""; + if (!m_useTgcNextBC) m_keyTgcNextBC = ""; + if (!m_useTgc) m_keyTgc = ""; + + // Only initialise the keys we need. + if (m_useCsc) ATH_CHECK( m_keyCsc.initialize() ); + if (m_useMdt) ATH_CHECK( m_keyMdt.initialize() ); + if (m_useRpc) ATH_CHECK( m_keyRpc.initialize() ); + if (m_useTgc) ATH_CHECK( m_keyTgc.initialize() ); + if (m_useTgcPriorBC) ATH_CHECK( m_keyTgcPriorBC.initialize() ); + if (m_useTgcNextBC) ATH_CHECK( m_keyTgcNextBC.initialize() ); + + ATH_CHECK( m_patternCombiLocation.initialize() ); + ATH_CHECK( m_segmentLocation.initialize() ); + ATH_CHECK( m_segmentCombiLocation.initialize() ); return StatusCode::SUCCESS; } + + + StatusCode MooSegmentFinderAlg::execute() { @@ -98,18 +130,19 @@ StatusCode MooSegmentFinderAlg::execute() std::vector<const Muon::MuonSegment*>* segs(NULL); if (m_doTGCClust || m_doRPCClust) segs = m_clusterSegMaker->getClusterSegments(m_doTGCClust,m_doRPCClust); - const MuonSegmentCombinationCollection* segmentCombinations = output ? output->segmentCombinations : 0; + MuonSegmentCombinationCollection* segmentCombinations = output ? const_cast<MuonSegmentCombinationCollection*>(output->segmentCombinations) : 0; if( !segmentCombinations ) segmentCombinations = new MuonSegmentCombinationCollection(); - if( segmentCombinations ) { - if( evtStore()->record(segmentCombinations,m_segmentCombiLocation).isSuccess() ){ - ATH_MSG_VERBOSE("stored MuonSegmentCombinationCollection " << segmentCombinations->size() - << " at " << m_segmentCombiLocation); - }else{ - ATH_MSG_ERROR("Failed to store MuonSegmentCombinationCollection at " << m_segmentCombiLocation); - } + + SG::WriteHandle<MuonSegmentCombinationCollection> segCombiHandle(m_segmentCombiLocation); + if( segCombiHandle.record(std::unique_ptr<MuonSegmentCombinationCollection > (segmentCombinations)).isSuccess() ){ + ATH_MSG_VERBOSE("stored MuonSegmentCombinationCollection " << segmentCombinations->size() + << " at " << m_segmentCombiLocation.key()); + }else{ + ATH_MSG_ERROR("Failed to store MuonSegmentCombinationCollection at " << m_segmentCombiLocation.key()); } + //FIXME FIX CONST_CASTS LATER Trk::SegmentCollection* segmentCollection = output ? const_cast<Trk::SegmentCollection*>(output->segmentCollection) : 0; if( !segmentCollection ) segmentCollection = new Trk::SegmentCollection(); @@ -123,21 +156,25 @@ StatusCode MooSegmentFinderAlg::execute() delete segs; } - if (evtStore()->record(segmentCollection,m_segmentLocation).isSuccess() ){ - ATH_MSG_VERBOSE("stored MuonSegmentCollection at " << m_segmentLocation + SG::WriteHandle<Trk::SegmentCollection> segHandle(m_segmentLocation); + + if (segHandle.record(std::unique_ptr<Trk::SegmentCollection>(segmentCollection)).isSuccess() ){ + ATH_MSG_VERBOSE("stored MuonSegmentCollection at " << m_segmentLocation.key() << " size " << segmentCollection->size()); }else{ ATH_MSG_ERROR("Failed to store MuonSegmentCollection "); } - const MuonPatternCombinationCollection* patternCombinations = output ? output->patternCombinations : 0; + MuonPatternCombinationCollection* patternCombinations = output ? const_cast<MuonPatternCombinationCollection*>(output->patternCombinations) : 0; if( !patternCombinations ) patternCombinations = new MuonPatternCombinationCollection(); - if( evtStore()->record(patternCombinations,m_patternCombiLocation).isSuccess() ){ + SG::WriteHandle<MuonPatternCombinationCollection> patHandle(m_patternCombiLocation); + + if( patHandle.record(std::unique_ptr<MuonPatternCombinationCollection>(patternCombinations)).isSuccess() ){ ATH_MSG_VERBOSE("stored MuonPatternCombinationCollection " << patternCombinations->size() - << " at " << m_patternCombiLocation); + << " at " << m_patternCombiLocation.key()); }else{ - ATH_MSG_ERROR("Failed to store MuonPatternCombinationCollection at " << m_patternCombiLocation); + ATH_MSG_ERROR("Failed to store MuonPatternCombinationCollection at " << m_patternCombiLocation.key()); } delete output; @@ -151,146 +188,5 @@ StatusCode MooSegmentFinderAlg::finalize() return AthAlgorithm::finalize(); } -void MooSegmentFinderAlg::retrieveCollections( std::vector<const Muon::RpcPrepDataCollection*>& cols, std::string key ) { - - const Muon::RpcPrepDataContainer* rpcPrds = 0; - StatusCode sc = evtStore()->retrieve(rpcPrds,key); - if (sc.isFailure()) { - ATH_MSG_VERBOSE("Cannot retrieve RpcPrepDataContainer " << key << " accessing via collections "); - - // Access by Collection - const DataHandle<Muon::RpcPrepDataCollection> collection; - const DataHandle<Muon::RpcPrepDataCollection> lastColl; - - if (evtStore()->retrieve(collection,lastColl).isSuccess()) { - ATH_MSG_VERBOSE("collections retrieved"); - for ( ; collection != lastColl ; ++collection ) { - if( collection->empty() ) continue; - cols.push_back( &*collection ); - } - }else{ - ATH_MSG_VERBOSE("Cannot retrieve RpcPrepDataCollections using DataHandle"); - } - }else{ - - - Muon::RpcPrepDataContainer::const_iterator it = rpcPrds->begin(); - Muon::RpcPrepDataContainer::const_iterator it_end = rpcPrds->end(); - for( ; it!=it_end; ++it ) { - // skip empty collections - if( (*it)->empty() ) continue; - cols.push_back( *it ) ; - } - ATH_MSG_VERBOSE("Retrieved RpcPrepDataContainer " << cols.size()); - } -} - -void MooSegmentFinderAlg::retrieveCollections( std::vector<const Muon::TgcPrepDataCollection*>& cols, std::string key ) { - - const Muon::TgcPrepDataContainer* tgcPrds = 0; - StatusCode sc = evtStore()->retrieve(tgcPrds,key); - - if (sc.isFailure()) { - ATH_MSG_VERBOSE("Cannot retrieve TgcPrepDataContainer " << key << " accessing via collections "); - - // Access by Collection - const DataHandle<Muon::TgcPrepDataCollection> collection; - const DataHandle<Muon::TgcPrepDataCollection> lastColl; - - if (evtStore()->retrieve(collection,lastColl).isSuccess()) { - ATH_MSG_VERBOSE("collections retrieved"); - for ( ; collection != lastColl ; ++collection ) { - if( collection->empty() ) continue; - cols.push_back( &*collection ); - - } - }else{ - ATH_MSG_VERBOSE("Cannot retrieve TgcPrepDataCollections using DataHandle"); - } - }else{ - - - Muon::TgcPrepDataContainer::const_iterator it = tgcPrds->begin(); - Muon::TgcPrepDataContainer::const_iterator it_end = tgcPrds->end(); - for( ; it!=it_end; ++it ) { - // skip empty collections - if( (*it)->empty() ) continue; - cols.push_back( *it ); - } - - ATH_MSG_VERBOSE("Retrieved TgcPrepDataContainer " << cols.size()); - - } -} - -void MooSegmentFinderAlg::retrieveCollections( std::vector<const Muon::MdtPrepDataCollection*>& cols, std::string key ) { - const Muon::MdtPrepDataContainer* mdtPrds = 0; - StatusCode sc = evtStore()->retrieve(mdtPrds,key); - - - if (sc.isFailure()) { - ATH_MSG_VERBOSE("Cannot retrieve MdtPrepDataContainer " << key << " accessing via collections "); - - // Access by Collection - const DataHandle<Muon::MdtPrepDataCollection> collection; - const DataHandle<Muon::MdtPrepDataCollection> lastColl; - - if (evtStore()->retrieve(collection,lastColl).isSuccess()) { - ATH_MSG_VERBOSE("collections retrieved"); - for ( ; collection != lastColl ; ++collection ) { - if( collection->empty() ) continue; - cols.push_back( &*collection ); - } - }else{ - ATH_MSG_VERBOSE("Cannot retrieve MdtPrepDataCollections using DataHandle"); - } - }else{ - - - Muon::MdtPrepDataContainer::const_iterator it = mdtPrds->begin(); - Muon::MdtPrepDataContainer::const_iterator it_end = mdtPrds->end(); - for( ; it!=it_end; ++it ) { - // skip empty collections - if( (*it)->empty() ) continue; - cols.push_back( *it ); - } - ATH_MSG_VERBOSE("Retrieved MdtPrepDataContainer " << cols.size()); - - } -} - - -void MooSegmentFinderAlg::retrieveCollections( std::vector<const Muon::CscPrepDataCollection*>& cols, std::string key ) { - const Muon::CscPrepDataContainer* cscPrds = 0; - StatusCode sc = evtStore()->retrieve(cscPrds,key); - if (sc.isFailure()) { - ATH_MSG_VERBOSE("Cannot retrieve CscPrepDataContainer " << key << " accessing via collections "); - - // Access by Collection - const DataHandle<Muon::CscPrepDataCollection> collection; - const DataHandle<Muon::CscPrepDataCollection> lastColl; - - if (evtStore()->retrieve(collection,lastColl).isSuccess()) { - ATH_MSG_VERBOSE("collections retrieved"); - for ( ; collection != lastColl ; ++collection ) { - if( collection->empty() ) continue; - cols.push_back( &*collection ); - } - }else{ - ATH_MSG_VERBOSE("Cannot retrieve CscPrepDataCollections using DataHandle"); - } - }else{ - - - Muon::CscPrepDataContainer::const_iterator it = cscPrds->begin(); - Muon::CscPrepDataContainer::const_iterator it_end = cscPrds->end(); - for( ; it!=it_end; ++it ) { - // skip empty collections - if( (*it)->empty() ) continue; - cols.push_back( *it ); - } - ATH_MSG_VERBOSE("Retrieved CscPrepDataContainer " << cols.size()); - } -} diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.h index 489ac06b993377a10227be35027003c395f02dc3..7945446dfae567e9a577a5f9a49a4fef469889d6 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.h @@ -15,7 +15,8 @@ #include "MuonSegment/MuonSegmentCombinationCollection.h" #include "TrkSegment/SegmentCollection.h" - +#include "MuonPrepRawData/MuonPrepDataContainer.h" +#include "MuonPattern/MuonPatternCombinationCollection.h" class MsgStream; class StoreGateSvc; @@ -32,17 +33,13 @@ class MooSegmentFinderAlg : public AthAlgorithm virtual ~MooSegmentFinderAlg(); - virtual StatusCode initialize(); - virtual StatusCode execute(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; private: - - /** retrieve collections from storegate */ - void retrieveCollections( std::vector<const Muon::TgcPrepDataCollection*>& cols, std::string key ); - void retrieveCollections( std::vector<const Muon::RpcPrepDataCollection*>& cols, std::string key ); - void retrieveCollections( std::vector<const Muon::CscPrepDataCollection*>& cols, std::string key ); - void retrieveCollections( std::vector<const Muon::MdtPrepDataCollection*>& cols, std::string key ); + template<class T, class Y> + void retrieveCollections( std::vector<const T*>& cols, SG::ReadHandleKey<Y>& key ); /** extract segments from a MuonSegmentCombinationCollection */ Trk::SegmentCollection* extractSegmentCollection( const MuonSegmentCombinationCollection& segmentCombinations ) const; @@ -60,16 +57,16 @@ class MooSegmentFinderAlg : public AthAlgorithm bool m_doRPCClust; /** storegate location of the MuonPrepDataContainer for all four technologies */ - std::string m_keyTgc; - std::string m_keyTgcPriorBC; - std::string m_keyTgcNextBC; - std::string m_keyRpc; - std::string m_keyCsc; - std::string m_keyMdt; + SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_keyTgc; + SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_keyTgcPriorBC; + SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_keyTgcNextBC; + SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_keyRpc; + SG::ReadHandleKey<Muon::CscPrepDataContainer> m_keyCsc; + SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_keyMdt; - std::string m_patternCombiLocation; - std::string m_segmentLocation; - std::string m_segmentCombiLocation; + SG::WriteHandleKey<MuonPatternCombinationCollection> m_patternCombiLocation; + SG::WriteHandleKey<Trk::SegmentCollection> m_segmentLocation; + SG::WriteHandleKey<MuonSegmentCombinationCollection> m_segmentCombiLocation; ToolHandle<Muon::IMooSegmentCombinationFinder> m_segmentFinder; //<! pointer to the segment finder ToolHandle<Muon::IMuonPatternSegmentAssociationTool> m_assocTool; @@ -77,5 +74,20 @@ class MooSegmentFinderAlg : public AthAlgorithm }; +template <class T, class Y> +void MooSegmentFinderAlg::retrieveCollections( std::vector<const T*>& cols, SG::ReadHandleKey<Y>& key ) { + + SG::ReadHandle<Y> cscPrds (key); + if (cscPrds.isValid()==false) { + ATH_MSG_ERROR("Cannot retrieve Container " << key.key() << " accessing via collections "); + + }else{ + const Y* ptr = cscPrds.cptr(); + cols.reserve(cols.size()+ptr->size()); + for(auto p : *ptr) if(!p->empty()) cols.push_back(p); + ATH_MSG_VERBOSE("Retrieved " << cscPrds.key() << " Container " << cols.size()); + } +} + #endif diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.cxx index c80ef22503e623595791035c41bb7742ec463b6f..de5c9edb15667e7f7b97e0d9be54bb6dbed82ef3 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.cxx @@ -36,7 +36,10 @@ MuonSegmentFinderAlg::MuonSegmentFinderAlg(const std::string& name, ISvcLocator* m_clusterSegMakerNSW("Muon::MuonClusterSegmentFinderTool/MuonClusterSegmentFinderTool"), m_truthSummaryTool("Muon::MuonTruthSummaryTool/MuonTruthSummaryTool"), m_csc2dSegmentFinder("Csc2dSegmentMaker/Csc2dSegmentMaker"), - m_csc4dSegmentFinder("Csc4dSegmentMaker/Csc4dSegmentMaker") + m_csc4dSegmentFinder("Csc4dSegmentMaker/Csc4dSegmentMaker"), + m_segmentCollectionKey("MuonSegments"), + m_cscPrdsKey("CSC_Clusters"), + m_patternCollKey("MuonLayerHoughCombis") { //tools declareProperty("EDMPrinter", m_printer); @@ -52,10 +55,12 @@ MuonSegmentFinderAlg::MuonSegmentFinderAlg(const std::string& name, ISvcLocator* declareProperty("PrintSummary",m_printSummary = false); declareProperty("MuonClusterSegmentFinder",m_clusterSegMaker); // - declareProperty("SegmentCollectionName",m_segmentCollectionName="MuonSegments"); + declareProperty("SegmentCollectionName", m_segmentCollectionKey); declareProperty("UseNSWMode",m_useNSWMode = false); declareProperty("doTGCClust",m_doTGCClust = false); declareProperty("doRPCClust",m_doRPCClust = false); + declareProperty("CSC_clusterkey", m_cscPrdsKey); + declareProperty("MuonLayerHoughCombisKey", m_patternCollKey); } @@ -119,20 +124,25 @@ StatusCode MuonSegmentFinderAlg::initialize() return StatusCode::FAILURE; } + ATH_CHECK( m_segmentCollectionKey.initialize() ); + ATH_CHECK( m_cscPrdsKey.initialize() ); + ATH_CHECK( m_patternCollKey.initialize() ); + + return StatusCode::SUCCESS; } StatusCode MuonSegmentFinderAlg::execute() { - + // vector to hold segments std::vector<const Muon::MuonSegment*> segs; //check for the Muon Layer Hough storegate container if( evtStore()->contains<MuonPatternCombinationCollection>("MuonLayerHoughCombis") ) { - - MuonPatternCombinationCollection* patternColl = 0; - if(evtStore()->retrieve(patternColl,"MuonLayerHoughCombis").isFailure()) { + + SG::ReadHandle<MuonPatternCombinationCollection> patternColl(m_patternCollKey); + if(!patternColl.isValid()) { ATH_MSG_FATAL( "Could not to retrieve the PatternCombinations from StoreGate" ); return StatusCode::FAILURE; } @@ -158,7 +168,7 @@ StatusCode MuonSegmentFinderAlg::execute() std::vector<const Muon::MuonSegment*> resolvedSegments = m_segmentOverlapRemovalTool->removeDuplicates(segs); //create a new SG container to store the segments - Trk::SegmentCollection* segmentCollection = new Trk::SegmentCollection(); + std::unique_ptr<Trk::SegmentCollection> segmentCollection = std::unique_ptr<Trk::SegmentCollection>( new Trk::SegmentCollection()); segmentCollection->reserve(resolvedSegments.size()); for( std::vector<const Muon::MuonSegment*>::iterator sit = resolvedSegments.begin(); sit!=resolvedSegments.end();++sit ){ segmentCollection->push_back( const_cast<Muon::MuonSegment*>(*sit) ); @@ -177,9 +187,10 @@ StatusCode MuonSegmentFinderAlg::execute() if( !m_csc2dSegmentFinder.empty() && !m_csc4dSegmentFinder.empty() ){ std::vector<const Muon::CscPrepDataCollection*> cscCols; - const Muon::CscPrepDataContainer* cscPrds = 0; - StatusCode sc = evtStore()->retrieve(cscPrds,"CSC_Clusters"); - if (sc.isSuccess() && cscPrds) { + + SG::ReadHandle<Muon::CscPrepDataContainer> cscPrds(m_cscPrdsKey); + + if (cscPrds.isValid()) { Muon::CscPrepDataContainer::const_iterator it = cscPrds->begin(); Muon::CscPrepDataContainer::const_iterator it_end = cscPrds->end(); @@ -231,9 +242,10 @@ StatusCode MuonSegmentFinderAlg::execute() if( m_printSummary || msgLvl(MSG::DEBUG) ){ msg() << msg().level() << "Number of segments found " << resolvedSegments.size() << std::endl << m_printer->print(resolvedSegments) << endmsg; } + SG::WriteHandle<Trk::SegmentCollection> handle(m_segmentCollectionKey); //Add the segments to store gate - if(evtStore()->record(segmentCollection,m_segmentCollectionName).isFailure()) { + if(handle.record(std::move(segmentCollection)).isFailure()) { ATH_MSG_FATAL( "Could not add the Trk::SegmentCollection to StoreGate" ); return StatusCode::FAILURE; } diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h index e117ad16cb6fdba537603495204a619170579f8f..4dcd8ae3174f2d10dd973d64b0bbc25abf39b31f 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h @@ -44,9 +44,9 @@ class MuonSegmentFinderAlg : public AthAlgorithm virtual ~MuonSegmentFinderAlg(); - virtual StatusCode initialize(); - virtual StatusCode execute(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; private: @@ -64,8 +64,11 @@ class MuonSegmentFinderAlg : public AthAlgorithm ToolHandle<ICscSegmentFinder> m_csc2dSegmentFinder; ToolHandle<ICscSegmentFinder> m_csc4dSegmentFinder; - std::string m_segmentCollectionName; - + + SG::WriteHandleKey<Trk::SegmentCollection> m_segmentCollectionKey; + SG::ReadHandleKey<Muon::CscPrepDataContainer> m_cscPrdsKey; + SG::ReadHandleKey<MuonPatternCombinationCollection> m_patternCollKey; + void createSegmentsWithMDTs(const Muon::MuonPatternCombination* patt,std::vector<const Muon::MuonSegment*>& segs ); void createSegmentsFromClusters(const Muon::MuonPatternCombination* patt,std::vector<const Muon::MuonSegment*>& segs); diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/NSWSectorRoadFinderAlg.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/NSWSectorRoadFinderAlg.cxx index c30a355840a3ab893d799a7a4ee25b4f027a8085..548e1d1eb4619e117a0c013d25412821c3c73239 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/NSWSectorRoadFinderAlg.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/NSWSectorRoadFinderAlg.cxx @@ -5,16 +5,19 @@ #include "NSWSectorRoadFinderAlg.h" #include "TrkParameters/TrackParameters.h" #include "MuonReadoutGeometry/MuonReadoutElement.h" -#include "MuonPattern/MuonPatternCombinationCollection.h" + #include "MuonPattern/MuonPatternCombination.h" NSWSectorRoadFinderAlg::NSWSectorRoadFinderAlg(const std::string& name, ISvcLocator* pSvcLocator): - AthAlgorithm(name,pSvcLocator) + AthAlgorithm(name,pSvcLocator), + m_keysTgc("STGC_Measurements"), + m_keyMM("MM_Measurements"), + m_patternLocation("NSWPatternCombinations") { - declareProperty("MMPrepDataContainer", m_keyMM = "MM_Measurements"); - declareProperty("sTgcPrepDataContainer", m_keysTgc = "STGC_Measurements"); + declareProperty("MMPrepDataContainer", m_keyMM); + declareProperty("sTgcPrepDataContainer", m_keysTgc); // - declareProperty("PatternOutputLocation",m_patternLocation="NSWPatternCombinations"); + declareProperty("PatternOutputLocation",m_patternLocation); } NSWSectorRoadFinderAlg::~NSWSectorRoadFinderAlg() @@ -31,27 +34,31 @@ StatusCode NSWSectorRoadFinderAlg::initialize() ATH_MSG_ERROR("Could not retrieve " << m_idHelper); return StatusCode::FAILURE; } + + ATH_CHECK( m_keysTgc.initialize() ); + ATH_CHECK( m_keyMM.initialize() ); + ATH_CHECK( m_patternLocation.initialize() ); return StatusCode::SUCCESS; } StatusCode NSWSectorRoadFinderAlg::execute() { - - const Muon::sTgcPrepDataContainer* stgcPrds = 0; - if (evtStore()->retrieve(stgcPrds,m_keysTgc).isFailure()) { - ATH_MSG_WARNING("Cannot retrieve sTgcPrepDataContainer " << m_keysTgc << " accessing via collections "); + SG::ReadHandle< Muon::sTgcPrepDataContainer> stgcPrds(m_keysTgc); + if (!stgcPrds.isValid()) { + ATH_MSG_WARNING("Cannot retrieve sTgcPrepDataContainer " << m_keysTgc.key() << " accessing via collections "); } - const Muon::MMPrepDataContainer* mmPrds = 0; - if (evtStore()->retrieve(mmPrds,m_keyMM).isFailure()) { - ATH_MSG_WARNING("Cannot retrieve MMPrepDataContainer " << m_keyMM << " accessing via collections "); + + SG::ReadHandle< Muon::MMPrepDataContainer> mmPrds(m_keyMM); + if (!mmPrds.isValid()) { + ATH_MSG_WARNING("Cannot retrieve MMPrepDataContainer " << m_keyMM.key() << " accessing via collections "); } - if( !stgcPrds && !mmPrds ) return StatusCode::SUCCESS; - MuonPatternCombinationCollection* patterns = new MuonPatternCombinationCollection(); + if( !stgcPrds.isValid() && !mmPrds.isValid() ) return StatusCode::SUCCESS; + std::unique_ptr<MuonPatternCombinationCollection> patterns(new MuonPatternCombinationCollection()); for( int si=1;si<=16;++si ){ std::vector< Muon::MuonPatternChamberIntersect > chamberData; - if( mmPrds ) addContainerToMuonPatternCombination(*mmPrds,chamberData,si); - if( stgcPrds ) addContainerToMuonPatternCombination(*stgcPrds,chamberData,si); + if( mmPrds.isValid() ) addContainerToMuonPatternCombination(*mmPrds,chamberData,si); + if( stgcPrds.isValid() ) addContainerToMuonPatternCombination(*stgcPrds,chamberData,si); if( !chamberData.empty() ){ patterns->push_back( new Muon::MuonPatternCombination( new Trk::Perigee(chamberData.front().intersectPosition(), chamberData.front().intersectDirection(), @@ -61,10 +68,11 @@ StatusCode NSWSectorRoadFinderAlg::execute() ATH_MSG_VERBOSE("sector " << si << " chambers with hits " << chamberData.size() ); } } - if( evtStore()->record(patterns,m_patternLocation).isSuccess() ){ - ATH_MSG_VERBOSE("stored MuonPatternCombinationCollection " << patterns->size() << " at " << m_patternLocation); + SG::WriteHandle<MuonPatternCombinationCollection> writehandle(m_patternLocation); + if( writehandle.record(std::move(patterns)).isSuccess() ){ + ATH_MSG_VERBOSE("stored MuonPatternCombinationCollection " << patterns->size() << " at " << m_patternLocation.key()); }else{ - ATH_MSG_ERROR("Failed to store MuonPatternCombinationCollection at " << m_patternLocation); + ATH_MSG_ERROR("Failed to store MuonPatternCombinationCollection at " << m_patternLocation.key()); } return StatusCode::SUCCESS; diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/NSWSectorRoadFinderAlg.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/NSWSectorRoadFinderAlg.h index 928eca0ba886835d07045f8efcde925e7e2b8c1c..2eb74d0c6eb7b6d71e11d2b1c0fd228c6309b18a 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/NSWSectorRoadFinderAlg.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/NSWSectorRoadFinderAlg.h @@ -14,7 +14,7 @@ #include "MuonPrepRawData/sTgcPrepDataCollection.h" #include "MuonIdHelpers/MuonIdHelperTool.h" #include "MuonPattern/MuonPatternChamberIntersect.h" - +#include "MuonPattern/MuonPatternCombinationCollection.h" class NSWSectorRoadFinderAlg : public AthAlgorithm { @@ -23,9 +23,9 @@ class NSWSectorRoadFinderAlg : public AthAlgorithm virtual ~NSWSectorRoadFinderAlg(); - virtual StatusCode initialize(); - virtual StatusCode execute(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; private: @@ -55,9 +55,9 @@ class NSWSectorRoadFinderAlg : public AthAlgorithm ToolHandle<Muon::MuonIdHelperTool> m_idHelper; /** storegate location of the MuonPrepDataContainer for all four technologies */ - std::string m_keysTgc; - std::string m_keyMM; - std::string m_patternLocation; + SG::ReadHandleKey<Muon::sTgcPrepDataContainer> m_keysTgc; + SG::ReadHandleKey<Muon::MMPrepDataContainer> m_keyMM; + SG::WriteHandleKey<MuonPatternCombinationCollection> m_patternLocation; }; diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/MuonSegmentTrackMaker/MuPatTrackBuilder.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/MuonSegmentTrackMaker/MuPatTrackBuilder.h index 026a3373179fd662dccb6faed7e319dfc572f4b7..ec3ca0245223b23041759ddcf9caed314c0ba675 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/MuonSegmentTrackMaker/MuPatTrackBuilder.h +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/MuonSegmentTrackMaker/MuPatTrackBuilder.h @@ -9,6 +9,8 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" +#include "TrkSegment/SegmentCollection.h" +#include "TrkTrack/TrackCollection.h" namespace Muon { class IMuonTrackFinder; @@ -33,11 +35,11 @@ class MuPatTrackBuilder : public AthAlgorithm private: - std::string m_segmentLocation; //!< Location of input MuonSegmentCombination collection - std::string m_spectroTrackLocation; //!< Track output location for tracks strictly in MS - std::string m_spectroPartiLocation; //!< Track output location for track particles (strictly in MS) - std::string m_extrapTrackLocation; //!< Output location for back-extrapolated tracks - std::string m_extrapPartiLocation; //!< Output location for back-extrapolated particles + SG::ReadHandleKey<Trk::SegmentCollection> m_segmentKey; //!< Key of input MuonSegmentCombination collection + SG::WriteHandleKey<TrackCollection> m_spectroTrackKey; //!< Track output Key for tracks strictly in MS + SG::WriteHandleKey<TrackCollection> m_spectroPartiKey; //!< Track output Key for track particles (strictly in MS) + SG::WriteHandleKey<TrackCollection> m_extrapTrackKey; //!< Output Key for back-extrapolated tracks + SG::WriteHandleKey<TrackCollection> m_extrapPartiKey; //!< Output Key for back-extrapolated particles ToolHandle<Muon::IMuonTrackFinder> m_trackMaker; //!< Actual tool to do the track finding // ToolHandle<IMuonboyToParticleTool> m_convTool; //!< Tool for converting from tracks to track particles (acts as a flag) diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/MuonSegmentTrackMaker/MuonCombiTrackBuilder.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/MuonSegmentTrackMaker/MuonCombiTrackBuilder.h index c365ffa3f6c66896f2c43319ad75c18c33041f53..960ef651d26d835170299595ab719cba04862e96 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/MuonSegmentTrackMaker/MuonCombiTrackBuilder.h +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/MuonSegmentTrackMaker/MuonCombiTrackBuilder.h @@ -9,6 +9,8 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" +#include "MuonSegment/MuonSegmentCombinationCollection.h" +#include "TrkTrack/TrackCollection.h" namespace Muon { class IMuonCombiTrackMaker; @@ -28,8 +30,8 @@ class MuonCombiTrackBuilder : public AthAlgorithm private: - std::string m_segmentCombiLocation; //!< Location of input MuonSegmentCombination collection - std::string m_trackLocation; //!< Location of the track output location + SG::ReadHandle<MuonSegmentCombinationCollection> m_segmentCombiLocation; //!< Location of input MuonSegmentCombination collection + SG::WriteHandle<TrackCollection> m_trackLocation; //!< Location of the track output location // member set by Joboptions ToolHandle<Muon::IMuonCombiTrackMaker> m_trackMaker; diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuPatTrackBuilder.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuPatTrackBuilder.cxx index 7b02353506b98e680f43a48b9791934af0b60e81..aad805e9df8e0f35e3c8198326cb1ffdd7cedaac 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuPatTrackBuilder.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuPatTrackBuilder.cxx @@ -14,30 +14,25 @@ #include "TrkTrack/TrackStateOnSurface.h" #include "Particle/TrackParticleContainer.h" -//#include "MboyEDMToolInterfaces/IMuonboyToParticleTool.h" -//#include "MboyAthToolInterfaces/IMuonBackTracker.h" - #include <vector> using namespace Muon; MuPatTrackBuilder::MuPatTrackBuilder(const std::string& name, ISvcLocator* pSvcLocator) - : AthAlgorithm(name,pSvcLocator) - , m_trackMaker("Muon::MuonTrackFinder/MuonTrackSteering") -// , m_convTool("") -// , p_IMuonBackTracker("") - , m_helper("Muon::MuonEDMHelperTool/MuonEDMHelperTool") + : AthAlgorithm(name,pSvcLocator), + m_segmentKey("MooreSegments"), + m_spectroTrackKey("MuonSpectrometerTracks"), + m_spectroPartiKey("MuonSpectrometerParticles"), + m_extrapPartiKey("ExtrapolatedMuonSpectrometerParticles"), + m_trackMaker("Muon::MuonTrackFinder/MuonTrackSteering"), + m_helper("Muon::MuonEDMHelperTool/MuonEDMHelperTool") { - // MoMu location segments (per chamner) + // MoMu Key segments (per chamber) declareProperty("TrackSteering",m_trackMaker); - declareProperty("MuonSegmentCollection", m_segmentLocation = "MooreSegments"); - declareProperty("SpectrometerTrackOutputLocation", m_spectroTrackLocation = "MuonSpectrometerTracks"); - declareProperty("SpectrometerParticleOutputLocation", m_spectroPartiLocation = "MuonSpectrometerParticles"); - declareProperty("ExtrapolatedTrackOutputLocation", m_extrapTrackLocation = "" ); - // set to "ExtrapolatedMuonSpectrometerTracks" for muonboy-like convention); - declareProperty("ExtrapolatedParticleOutputLocation", m_extrapPartiLocation = "ExtrapolatedMuonSpectrometerParticles"); -// declareProperty("TrackToParticleTool", m_convTool); -// declareProperty("MuonBackTracker", p_IMuonBackTracker); + declareProperty("MuonSegmentCollection", m_segmentKey); + declareProperty("SpectrometerTrackOutputLocation", m_spectroTrackKey); + declareProperty("SpectrometerParticleOutputLocation", m_spectroPartiKey); + declareProperty("ExtrapolatedParticleOutputLocation", m_extrapPartiKey); } MuPatTrackBuilder::~MuPatTrackBuilder() @@ -54,24 +49,10 @@ StatusCode MuPatTrackBuilder::initialize() return StatusCode::FAILURE; } if( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << "Retrieved " << m_trackMaker << endmsg; - -/* if (!m_convTool.empty()) { - if (m_convTool.retrieve().isFailure()){ - ATH_MSG_FATAL ("Could not get track converter " << m_convTool << ". STACO will have problems."); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG ("Retrieved " << m_convTool); - } - } - - if (!p_IMuonBackTracker.empty()) { - if (p_IMuonBackTracker.retrieve().isFailure()){ - ATH_MSG_FATAL ("Could not get track converter " << p_IMuonBackTracker << ". STACO will have problems."); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG ("Retrieved " << p_IMuonBackTracker); - } - }*/ + + ATH_CHECK( m_segmentKey.initialize() ); + ATH_CHECK( m_spectroTrackKey.initialize() ); + ATH_CHECK( m_spectroPartiKey.initialize() ); return StatusCode::SUCCESS; } @@ -80,104 +61,41 @@ StatusCode MuPatTrackBuilder::execute() { typedef std::vector<const Muon::MuonSegment*> MuonSegmentCollection; - const DataHandle<Trk::SegmentCollection> segCol; - if (evtStore()->retrieve(segCol,m_segmentLocation).isFailure() ) { - msg(MSG::WARNING) << "Could not find MuonSegmentCollection at " << m_segmentLocation <<endmsg; + SG::ReadHandle<Trk::SegmentCollection> segmentColl (m_segmentKey); + if (!segmentColl.isValid() ) { + msg(MSG::WARNING) << "Could not find MuonSegmentCollection at " << segmentColl.name() <<endmsg; return StatusCode::RECOVERABLE; } - if( !segCol ) { - msg(MSG::WARNING) << "Obtained zero pointer for MuonSegmentCollection at " << m_segmentLocation <<endmsg; + if( !segmentColl.cptr() ) { + msg(MSG::WARNING) << "Obtained zero pointer for MuonSegmentCollection at " << segmentColl.name() <<endmsg; return StatusCode::RECOVERABLE; } - if( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << "Retrieved MuonSegmentCollection " << segCol->size() << endmsg; + if( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << "Retrieved MuonSegmentCollection " << segmentColl->size() << endmsg; MuonSegmentCollection msc; - msc.reserve(segCol->size()); - for (unsigned int i=0;i<segCol->size();++i){ - if (!segCol->at(i)) continue; - const Muon::MuonSegment * ms = dynamic_cast<const Muon::MuonSegment*>(segCol->at(i)); + msc.reserve(segmentColl->size()); + for (unsigned int i=0;i<segmentColl->size();++i){ + if (!segmentColl->at(i)) continue; + const Muon::MuonSegment * ms = dynamic_cast<const Muon::MuonSegment*>(segmentColl->at(i)); if (ms) msc.push_back( ms ); } - if (msc.size() != segCol->size()){ - msg(MSG::WARNING) << "Input segment collection (size " << segCol->size() << ") and translated MuonSegment collection (size " + if (msc.size() != segmentColl->size()){ + msg(MSG::WARNING) << "Input segment collection (size " << segmentColl->size() << ") and translated MuonSegment collection (size " << msc.size() << ") are not the same size." << endmsg; } TrackCollection * newtracks = m_trackMaker->find(msc); if (!newtracks) newtracks = new TrackCollection(); - if (m_extrapTrackLocation == ""){ - - // Record the track collection for a track builder reporting params only in MS - // - if (evtStore()->record(newtracks,m_spectroTrackLocation,false).isFailure()){ - msg(MSG::WARNING) << "New Track Container " << m_spectroTrackLocation << " could not be recorded in StoreGate !" << endmsg; - delete newtracks; - return StatusCode::RECOVERABLE; - } - if( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << "TrackCollection '" << m_spectroTrackLocation << "' recorded in storegate, ntracks: " << newtracks->size() << endmsg; - - // how about particle making here??? - - } else { - - // Record two track collections, with and without extrapolated parameters - if (evtStore()->record(newtracks,m_spectroTrackLocation,false).isFailure()){ - msg(MSG::WARNING) << "New Track Container " << m_spectroTrackLocation << " could not be recorded in StoreGate !" << endmsg; - delete newtracks; - return StatusCode::RECOVERABLE; - } - ATH_MSG_DEBUG ("TrackCollection '" << m_spectroTrackLocation << "' recorded in storegate, ntracks: " << newtracks->size()); - - // Make track particles out of it and re-record -/* if (!m_convTool.empty()) { - Rec::TrackParticleContainer * recpart = new Rec::TrackParticleContainer(); - if (newtracks->empty() || m_convTool->convertCollection( newtracks , recpart ).isSuccess() ){ - ATH_MSG_DEBUG ("Sucessfully converted first track collection to track particles, "<< - "now have container of size "<<recpart->size()); - evtStore()->record(recpart,m_spectroPartiLocation,false).ignore(); - } else { - ATH_MSG_DEBUG ("Could not convert first track collection to track particles!"); - delete recpart; - } - } - - // BackTrack - TrackCollection * BkTk_TrackCollection = new TrackCollection(); - for (unsigned int tk=0;tk<newtracks->size();++tk){ - if ( !newtracks->at(tk) ) continue; - Trk::Track* pTrack = (*newtracks)[tk] ; - Trk::Track* BkTk_pTrack = p_IMuonBackTracker->MuonBackTrack(pTrack) ; - if (BkTk_pTrack){ - BkTk_TrackCollection->push_back( BkTk_pTrack ); - }else{ - ATH_MSG_WARNING("Failed to create MS only track, copying track at IP "); - BkTk_TrackCollection->push_back( new Trk::Track(*(*newtracks)[tk]) ); - } - } - if (evtStore()->record(BkTk_TrackCollection,m_extrapTrackLocation,false).isFailure()){ - msg(MSG::WARNING) << "New Track Container " << m_extrapTrackLocation << " could not be recorded in StoreGate !" << endmsg; - delete BkTk_TrackCollection; + SG::WriteHandle<TrackCollection> spectroTracks(m_spectroTrackKey); + if (spectroTracks.record(std::unique_ptr<TrackCollection>(newtracks)).isFailure()){ + ATH_MSG_WARNING( "New Track Container " << spectroTracks.name() << " could not be recorded in StoreGate !"); return StatusCode::RECOVERABLE; - } - if( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << "TrackCollection '" << m_extrapTrackLocation << "' recorded in storegate, ntracks: " << BkTk_TrackCollection->size() << endmsg; - - // Make track particles out of that and re-record - if (!m_convTool.empty()) { - Rec::TrackParticleContainer * BkTk_TrackParticleContainer = new Rec::TrackParticleContainer(); - if (BkTk_TrackCollection->empty() || m_convTool->convertCollection( BkTk_TrackCollection , BkTk_TrackParticleContainer ).isSuccess() ){ - ATH_MSG_DEBUG ("Sucessfully converted modified track collection to track particles, "<< - "now have container of size "<<BkTk_TrackParticleContainer->size()); - evtStore()->record(BkTk_TrackParticleContainer,m_extrapPartiLocation,false).ignore(); - } else { - ATH_MSG_DEBUG ("Could not convert first track collection to track particles!"); - delete BkTk_TrackParticleContainer; - } - }*/ } + ATH_MSG_DEBUG ("TrackCollection '" << m_spectroTrackKey.key() << "' recorded in storegate, ntracks: " << newtracks->size()); return StatusCode::SUCCESS; } // execute diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuonCombiTrackBuilder.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuonCombiTrackBuilder.cxx index cf6bb6096f48d15a8ad0387881e7bbda426bb4ac..20393fd58f0e5ca5a59dd43d975b8e34d4780ecc 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuonCombiTrackBuilder.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuonCombiTrackBuilder.cxx @@ -5,20 +5,21 @@ #include "MuonSegmentTrackMaker/MuonCombiTrackBuilder.h" #include "MuonRecToolInterfaces/IMuonCombiTrackMaker.h" -#include "MuonSegment/MuonSegmentCombinationCollection.h" #include "StoreGate/DataHandle.h" -#include "TrkTrack/TrackCollection.h" +#include <memory> using namespace Muon; MuonCombiTrackBuilder::MuonCombiTrackBuilder(const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name,pSvcLocator), + m_segmentCombiLocation("MooreSegmentCombinations"), + m_trackLocation("MooreTracks"), m_trackMaker("Muon::MuonCombiTrackMaker/MuonCombiTrackMaker") { // MoMu location segments (per chamner) + declareProperty("MuonSegmentCombinationInputLocation",m_segmentCombiLocation ); + declareProperty("TrackOutputLocation",m_trackLocation ); declareProperty("TrackSteering",m_trackMaker); - declareProperty("MuonSegmentCombinationInputLocation",m_segmentCombiLocation = "MooreSegmentCombinations"); - declareProperty("TrackOutputLocation",m_trackLocation = "MooreTracks"); } MuonCombiTrackBuilder::~MuonCombiTrackBuilder() @@ -33,31 +34,33 @@ StatusCode MuonCombiTrackBuilder::initialize() } msg(MSG::INFO) << "Retrieved " << m_trackMaker << endmsg; + ATH_CHECK( m_segmentCombiLocation.initialize() ); + ATH_CHECK( m_trackLocation.initialize() ); + return StatusCode::SUCCESS; } StatusCode MuonCombiTrackBuilder::execute() { - const DataHandle<MuonSegmentCombinationCollection> combiCol; - if (evtStore()->retrieve(combiCol,m_segmentCombiLocation).isFailure() ) { - msg(MSG::WARNING) << " Could not find MuonSegmentCombinationCollection at " << m_segmentCombiLocation <<endmsg; + if (!m_segmentCombiLocation.isValid() ) { + msg(MSG::WARNING) << " Could not find MuonSegmentCombinationCollection at " << m_segmentCombiLocation.name() <<endmsg; return StatusCode::RECOVERABLE; } - if( !combiCol ) { + if( !m_segmentCombiLocation.cptr() ) { msg(MSG::WARNING) << " Obtained zero pointer for MuonSegmentCombinationCollection at " << m_segmentCombiLocation <<endmsg; return StatusCode::RECOVERABLE; } - if( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << " Retrieved MuonSegmentCombinationCollection " << combiCol->size() << endmsg; - - TrackCollection* newtracks = m_trackMaker->find(*combiCol); + if( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << " Retrieved MuonSegmentCombinationCollection " << m_segmentCombiLocation->size() << endmsg; + TrackCollection* newtracks = m_trackMaker->find(*m_segmentCombiLocation); + // create dummy track collection if( !newtracks ) newtracks = new TrackCollection(); - if (evtStore()->record(newtracks,m_trackLocation,false).isFailure()){ + if (m_trackLocation.record(std::unique_ptr<TrackCollection>(newtracks)).isFailure()){ msg(MSG::WARNING) << "New Track Container could not be recorded in StoreGate !" << endmsg; delete newtracks; return StatusCode::RECOVERABLE; @@ -72,3 +75,5 @@ StatusCode MuonCombiTrackBuilder::finalize() return StatusCode::SUCCESS; } + + diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx b/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx index 9377ce255c91ea26a25fc5356560fc83b3089b75..2ce589d548f62e515ef2ba91010c00db7c6db7ca 100644 --- a/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx +++ b/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx @@ -253,12 +253,12 @@ namespace CP { } // rejection muons with out-of-bounds hits - uint8_t m_combinedTrackOutBoundsPrecisionHits; - if(!mu.summaryValue(m_combinedTrackOutBoundsPrecisionHits, xAOD::MuonSummaryType::combinedTrackOutBoundsPrecisionHits)) { + uint8_t combinedTrackOutBoundsPrecisionHits; + if(!mu.summaryValue(combinedTrackOutBoundsPrecisionHits, xAOD::MuonSummaryType::combinedTrackOutBoundsPrecisionHits)) { ATH_MSG_VERBOSE("getQuality - # of out-of-bounds hits missing in combined muon! Aborting."); return xAOD::Muon::VeryLoose; } - if (m_combinedTrackOutBoundsPrecisionHits>0){ + if (combinedTrackOutBoundsPrecisionHits>0){ return xAOD::Muon::VeryLoose; } @@ -540,12 +540,12 @@ namespace CP { if( mu.author()==xAOD::Muon::STACO ) return false; // :: Reject muons with out-of-bounds hits - uint8_t m_combinedTrackOutBoundsPrecisionHits; - if(!mu.summaryValue(m_combinedTrackOutBoundsPrecisionHits, xAOD::MuonSummaryType::combinedTrackOutBoundsPrecisionHits)) { + uint8_t combinedTrackOutBoundsPrecisionHits; + if(!mu.summaryValue(combinedTrackOutBoundsPrecisionHits, xAOD::MuonSummaryType::combinedTrackOutBoundsPrecisionHits)) { ATH_MSG_VERBOSE("getQuality - # of out-of-bounds hits missing in combined muon! Aborting."); return false; } - if (m_combinedTrackOutBoundsPrecisionHits>0){ + if (combinedTrackOutBoundsPrecisionHits>0){ return false; } diff --git a/Reconstruction/Jet/JetEventAthenaPool/CMakeLists.txt b/Reconstruction/Jet/JetEventAthenaPool/CMakeLists.txt index a4dd641f8b0acd2f3f53bf06e3c955068187ead7..6ffca028b1fbaa89d1e33486abae6e5b6a32390b 100644 --- a/Reconstruction/Jet/JetEventAthenaPool/CMakeLists.txt +++ b/Reconstruction/Jet/JetEventAthenaPool/CMakeLists.txt @@ -35,9 +35,14 @@ endif() find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) - run_tpcnv_test( JetTPCnv_15.9.0.5 AOD-15.9.0.5-full ) - run_tpcnv_test( JetTPCnv_17.0.0 AOD-17.0.0-full ) - run_tpcnv_test( JetTPCnv_17.2.8 AOD-17.2.8-full ) + set( JETEVENTATHENAPOOL_REFERENCE_TAG + JetEventAthenaPoolReference-01-00-00 ) + run_tpcnv_test( JetTPCnv_15.9.0.5 AOD-15.9.0.5-full + REFERENCE_TAG ${JETEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( JetTPCnv_17.0.0 AOD-17.0.0-full + REFERENCE_TAG ${JETEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( JetTPCnv_17.2.8 AOD-17.2.8-full + REFERENCE_TAG ${JETEVENTATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) endif() diff --git a/Reconstruction/Jet/JetRec/JetRec/JetModifiedMassDrop.h b/Reconstruction/Jet/JetRec/JetRec/JetModifiedMassDrop.h index f32c5471a6c1271fafaf2527d4ed71137b69787b..c4f826f5756e233c58275996d3eade5beedd0a44 100644 --- a/Reconstruction/Jet/JetRec/JetRec/JetModifiedMassDrop.h +++ b/Reconstruction/Jet/JetRec/JetRec/JetModifiedMassDrop.h @@ -78,9 +78,6 @@ private: // data // Recursion choice, larger_pt or larger_mt, default is larger_pt int m_recursion; - JetRecGroomingParams::SymmetryMeasure test_sym; - JetRecGroomingParams::RecursionChoice test_rec; - ToolHandle<IJetFromPseudojet> m_bld; // Tool to build jets. }; diff --git a/Reconstruction/Jet/JetSimTools/Root/JetTruthParticleSelectorTool.cxx b/Reconstruction/Jet/JetSimTools/Root/JetTruthParticleSelectorTool.cxx index 98b325c1bce1fdbec3eb34e46cce43eea7731fe4..ab0cdc45a5f91b3caaa5982eb1d29fb14d971c1c 100644 --- a/Reconstruction/Jet/JetSimTools/Root/JetTruthParticleSelectorTool.cxx +++ b/Reconstruction/Jet/JetSimTools/Root/JetTruthParticleSelectorTool.cxx @@ -193,12 +193,7 @@ JetTruthParticleSelectorTool::JetTruthParticleSelectorTool(const std::string& n) declareProperty("useChargedParticlesOnly", m_useOnlyCharged); declareProperty("MakeListOfStableParticles", m_listPDGofStables); - - - declareProperty("useChargedParticlesOnly", m_useOnlyCharged); declareProperty("SelectionMode", m_selectionModeName); - - } JetTruthParticleSelectorTool::~JetTruthParticleSelectorTool() diff --git a/Reconstruction/MET/METReconstruction/CMakeLists.txt b/Reconstruction/MET/METReconstruction/CMakeLists.txt index d9e10e17453c45e054a939406746d5f1c8418fab..d93af02cbfa894442c68019e847cb0c33df01073 100644 --- a/Reconstruction/MET/METReconstruction/CMakeLists.txt +++ b/Reconstruction/MET/METReconstruction/CMakeLists.txt @@ -26,6 +26,7 @@ atlas_depends_on_subdirs( PUBLIC Reconstruction/PFlow/PFlowUtils Reconstruction/RecoTools/CaloClusterMatching Reconstruction/RecoTools/RecoToolInterfaces + PhysicsAnalysis/AnalysisCommon/PATCore Calorimeter/CaloEvent Control/AthContainers Control/AthenaBaseComps @@ -43,7 +44,7 @@ include_directories(src) atlas_add_component( METReconstruction Root/*.cxx src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools FourMomUtils xAODCaloEvent xAODEgamma xAODJet xAODMissingET xAODMuon xAODPFlow xAODTracking xAODTruth GaudiKernel RecoToolInterfaces CaloEvent AthContainers AthenaBaseComps EventPrimitives xAODTau TruthUtils ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools FourMomUtils xAODCaloEvent xAODEgamma xAODJet xAODMissingET xAODMuon xAODPFlow xAODTracking xAODTruth GaudiKernel RecoToolInterfaces CaloEvent AthContainers AthenaBaseComps EventPrimitives xAODTau TruthUtils PATCoreLib ) atlas_add_dictionary( METReconstructionDict METReconstruction/METReconstructionAthDict.h diff --git a/Reconstruction/RecAthenaPool/CMakeLists.txt b/Reconstruction/RecAthenaPool/CMakeLists.txt index efe5dc72c78871ded94f58c717174fd86c9417ae..fd50ced5b68e643c0cff56837636281140985c28 100644 --- a/Reconstruction/RecAthenaPool/CMakeLists.txt +++ b/Reconstruction/RecAthenaPool/CMakeLists.txt @@ -39,10 +39,16 @@ endif() find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) - run_tpcnv_test( RecTPCnv_15.0.0 AOD-15.0.0-full ) - run_tpcnv_test( RecTPCnv_15.6.1 AOD-15.6.1-full ) - run_tpcnv_test( RecTPCnv_17.0.6 AOD-17.0.6-full ) - run_tpcnv_test( RecTPCnv_18.0.0 AOD-18.0.0-full ) + set( RECATHENAPOOL_REFERENCE_TAG + RecAthenaPoolReference-01-00-00 ) + run_tpcnv_test( RecTPCnv_15.0.0 AOD-15.0.0-full + REFERENCE_TAG ${RECATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( RecTPCnv_15.6.1 AOD-15.6.1-full + REFERENCE_TAG ${RECATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( RecTPCnv_17.0.6 AOD-17.0.6-full + REFERENCE_TAG ${RECATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( RecTPCnv_18.0.0 AOD-18.0.0-full + REFERENCE_TAG ${RECATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) endif() diff --git a/Reconstruction/RecAthenaPool/share/RecTPCnv_15.0.0.ref b/Reconstruction/RecAthenaPool/share/RecTPCnv_15.0.0.ref deleted file mode 100644 index eba80dde1e470f73082f123feba74624b0a9bf50..0000000000000000000000000000000000000000 --- a/Reconstruction/RecAthenaPool/share/RecTPCnv_15.0.0.ref +++ /dev/null @@ -1,761 +0,0 @@ -Mon Apr 18 20:57:29 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "RecAthenaPool/RecTPCnv_15.0.0_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 2.73 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 20:58:12 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSig_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigHypoContainer_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigHypo_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigElemStore_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigHypoKine_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigObjContainer_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigObject_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p1 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] F8217C77-45A8-820F-6D1F-3BF0879A4DEE -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root File version:52200 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] F8217C77-45A8-820F-6D1F-3BF0879A4DEE -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 54C1827D-740E-DE11-83C7-000423D9A21A -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root File version:52200 -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Found 8 metadata containers in input file, 0 will be used -IOVDbSvc INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found. -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-00 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-02-01-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-00, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2676 64.1319 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7032 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.506 136.131 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 13460Kb Time = 0.41S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-DC3-07 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-DC3-07, Name: DC3, Layout: Final, Code Version: 3.06.00, Description: DC3 Geometry -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 14336Kb Time = 0.26S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-R13-02 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x2bf2220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-R13-02, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 22200Kb Time = 0.3S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.05S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-02-01-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-02-01-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-02-01-00> default MuonVersion is <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.01.Initial> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.01.Initial> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-02-01-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ASZT table in Oracle -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 21 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 4 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 215 -MuGM:ProcPosition INFO *** N. of stations described in mysql 220 -MuGM:ProcPosition INFO *** N. of types 28 size of jtypvec 28 -MuGM:ProcPosition INFO *** : 220 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1678 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-02-01-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.01.Initial -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1678 child volumes -MuGM:MuonFactory INFO *** 1670 independent elements and -MuGM:MuonFactory INFO *** 11928 elements cloned or shared -MuGM:MuonFactory INFO *** 215 kinds of stations -MuGM:MuonFactory INFO *** 1678 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1678 MuonStations -MuGM:MuonFactory INFO *** 2168 MDT Readout Elements 1108 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1678 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1678/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 18400Kb Time = 1.55S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 0Kb Time = 0S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16138 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 54C1827D-740E-DE11-83C7-000423D9A21A -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 54C1827D-740E-DE11-83C7-000423D9A21A -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root File version:52200 -PoolSvc INFO Failed to find container POOLContainer(DataHeader) to create POOL collection. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 5200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-SIM-00-00-00 set from input file -IOVDbSvc INFO TagInfo override for tag TrtStrawStatus-02 in folder /TRT/Cond/Status -IOVDbSvc INFO TagInfo override for tag TrtStrawStatusPermanent-01 in folder /TRT/Cond/StatusPermanent -ClassIDSvc INFO getRegistryEntries: read 739 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetAlign_CSC_02 for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTAlign_CSC_01 for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -AthenaEventLoopMgr INFO ===>>> start processing event #30002, run #5200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 160 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 24 CLIDRegistry entries for module ALL -AthenaEventLoopMgr INFO ===>>> done processing event #30002, run #5200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #30004, run #5200 1 events processed so far <<<=== -VxContainerCnv INFO VxContainerCnv::initialize() - INFO MVFVxContainerCnv::initialize() -VxContainerCnv INFO VxContainerCnv: MVFVxCandidate converter=0x3af2b600 -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 2288 CLIDRegistry entries for module ALL -AthenaEventLoopMgr INFO ===>>> done processing event #30004, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30009, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30009, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30010, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30010, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30012, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30012, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30013, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30013, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30014, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30014, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30018, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30018, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30020, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30020, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30022, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30022, run #5200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 54C1827D-740E-DE11-83C7-000423D9A21A -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.47 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.36 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.36 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.46 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.40 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6370 (( 0.17 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.41 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.30 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Total payload read from COOL: 30482 bytes in (( 2.94 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 1.19 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 1.75 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 1 [ms] #= 1 -ChronoStatSvc INFO Time User : Tot= 22 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Reconstruction/RecAthenaPool/share/RecTPCnv_15.6.1.ref b/Reconstruction/RecAthenaPool/share/RecTPCnv_15.6.1.ref deleted file mode 100644 index 060cd413567c419566f71dca2ab1f35e472f4593..0000000000000000000000000000000000000000 --- a/Reconstruction/RecAthenaPool/share/RecTPCnv_15.6.1.ref +++ /dev/null @@ -1,762 +0,0 @@ -Mon Apr 18 21:01:45 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "RecAthenaPool/RecTPCnv_15.6.1_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 2.69 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 21:02:30 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class ElementLink<TrigEMClusterContainer,DataProxyStorage<TrigEMClusterContainer>,ForwardIndexingPolicy<TrigEMClusterContainer> > is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataProxyStorage<TrigEMClusterContainer> is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataProxyStorageBase is available -TClass::Init:0: RuntimeWarning: no dictionary for class ForwardIndexingPolicy<TrigEMClusterContainer> is available -TClass::Init:0: RuntimeWarning: no dictionary for class SG::DataProxyStorageData is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D8082A98-D5D1-C8AA-515E-A1664D0973C7 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root File version:52200 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D8082A98-D5D1-C8AA-515E-A1664D0973C7 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] A8FF4423-D9C7-DE11-916A-000423D98A24 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root File version:52200 -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Folder /TagInfo will be taken from file metadata -IOVDbSvc INFO Found 12 metadata containers in input file, 1 will be used -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.6.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.6.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.6.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.6.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -IOVDbSvc INFO Added taginfo remove for /TagInfo -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.6.1-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.6.1-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-00 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-02-01-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-00, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2676 64.1319 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7032 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.506 136.131 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 4244Kb Time = 0.37S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-DC3-07 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-DC3-07, Name: DC3, Layout: Final, Code Version: 3.06.00, Description: DC3 Geometry -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 0Kb Time = 0.21S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-R13-02 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x13ac220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-R13-02, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 11264Kb Time = 0.3S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.05S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-02-01-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-02-01-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-02-01-00> default MuonVersion is <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.01.Initial> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.01.Initial> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-02-01-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ASZT table in Oracle -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 21 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 4 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 215 -MuGM:ProcPosition INFO *** N. of stations described in mysql 220 -MuGM:ProcPosition INFO *** N. of types 28 size of jtypvec 28 -MuGM:ProcPosition INFO *** : 220 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1678 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-02-01-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.01.Initial -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1678 child volumes -MuGM:MuonFactory INFO *** 1670 independent elements and -MuGM:MuonFactory INFO *** 11928 elements cloned or shared -MuGM:MuonFactory INFO *** 215 kinds of stations -MuGM:MuonFactory INFO *** 1678 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1678 MuonStations -MuGM:MuonFactory INFO *** 2168 MDT Readout Elements 1108 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1678 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1678/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 19424Kb Time = 1.37S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 0Kb Time = 0S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16226 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] A8FF4423-D9C7-DE11-916A-000423D98A24 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] A8FF4423-D9C7-DE11-916A-000423D98A24 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root File version:52200 -PoolSvc INFO Failed to find container POOLContainer(DataHeader) to create POOL collection. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -ClassIDSvc INFO getRegistryEntries: read 703 CLIDRegistry entries for module ALL -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 5200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-SIM-00-00-00 set from input file -IOVDbSvc INFO TagInfo override for tag TrtStrawStatus-02 in folder /TRT/Cond/Status -IOVDbSvc INFO TagInfo override for tag TrtStrawStatusPerm-02_test in folder /TRT/Cond/StatusPermanent -ClassIDSvc INFO getRegistryEntries: read 36 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.6.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.6.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetAlign_CSC_02 for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.6.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_15.6.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTAlign_CSC_01 for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -AthenaEventLoopMgr INFO ===>>> start processing event #30002, run #5200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 160 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 24 CLIDRegistry entries for module ALL -AthenaEventLoopMgr INFO ===>>> done processing event #30002, run #5200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #30004, run #5200 1 events processed so far <<<=== -VxContainerCnv INFO VxContainerCnv::initialize() - INFO MVFVxContainerCnv::initialize() -VxContainerCnv INFO VxContainerCnv: MVFVxCandidate converter=0x3f301b80 -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 2288 CLIDRegistry entries for module ALL -AthenaEventLoopMgr INFO ===>>> done processing event #30004, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30009, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30009, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30010, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30010, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30012, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30012, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30013, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30013, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30014, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30014, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30018, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30018, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30020, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30020, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30022, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30022, run #5200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.1/AOD-15.6.1-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] A8FF4423-D9C7-DE11-916A-000423D98A24 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.10 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.03 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.03 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.57 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.03 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6370 (( 0.02 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.03 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.02 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Folder /TagInfo (AttrListColl) db-read 0/2 objs/chan/bytes 2/0/0 (( 0.00 ))s -IOVDbSvc INFO Total payload read from COOL: 30482 bytes in (( 0.83 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 0.17 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 0.67 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 0 [us] #= 1 -ChronoStatSvc INFO Time User : Tot= 28.8 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Reconstruction/RecAthenaPool/share/RecTPCnv_17.0.6.ref b/Reconstruction/RecAthenaPool/share/RecTPCnv_17.0.6.ref deleted file mode 100644 index 0afcd8fbc8ec81b55ce9f0f2bdb1e3b4f81ae551..0000000000000000000000000000000000000000 --- a/Reconstruction/RecAthenaPool/share/RecTPCnv_17.0.6.ref +++ /dev/null @@ -1,770 +0,0 @@ -Mon Apr 18 20:55:17 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "RecAthenaPool/RecTPCnv_17.0.6_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 5.22 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 20:56:11 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p2 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] CF0F2652-6BBA-09A4-ED4F-4F2091F1A6A4 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root File version:52800 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] CF0F2652-6BBA-09A4-ED4F-4F2091F1A6A4 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 28DA6945-4CE8-E011-A394-003048F0E7AE -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root File version:52800 -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Folder /TagInfo will be taken from file metadata -IOVDbSvc INFO Found 15 metadata containers in input file, 1 will be used -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_17.0.6-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_17.0.6-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_17.0.6-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_17.0.6-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -IOVDbSvc INFO Added taginfo remove for /TagInfo -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_17.0.6-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_17.0.6-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-00 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-02-01-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-00, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2676 64.1319 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7032 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.506 136.131 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 14484Kb Time = 0.37S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-DC3-07 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-DC3-07, Name: DC3, Layout: Final, Code Version: 3.06.00, Description: DC3 Geometry -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 14336Kb Time = 0.22S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-R13-02 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x217c220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-R13-02, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 22200Kb Time = 0.25S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.04S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-02-01-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-02-01-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-02-01-00> default MuonVersion is <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.01.Initial> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.01.Initial> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-02-01-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ASZT table in Oracle -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 21 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 4 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 215 -MuGM:ProcPosition INFO *** N. of stations described in mysql 220 -MuGM:ProcPosition INFO *** N. of types 28 size of jtypvec 28 -MuGM:ProcPosition INFO *** : 220 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1678 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-02-01-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.01.Initial -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1678 child volumes -MuGM:MuonFactory INFO *** 1670 independent elements and -MuGM:MuonFactory INFO *** 11928 elements cloned or shared -MuGM:MuonFactory INFO *** 215 kinds of stations -MuGM:MuonFactory INFO *** 1678 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1678 MuonStations -MuGM:MuonFactory INFO *** 2168 MDT Readout Elements 1108 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1678 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1678/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 18400Kb Time = 1.41S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 1024Kb Time = 0.01S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16593 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 28DA6945-4CE8-E011-A394-003048F0E7AE -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 28DA6945-4CE8-E011-A394-003048F0E7AE -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root File version:52800 -PoolSvc INFO Failed to find container POOLContainer(DataHeader) to create POOL collection. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -ClassIDSvc INFO getRegistryEntries: read 703 CLIDRegistry entries for module ALL -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 105200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-DR-BS7T-ANom-11 set from input file -ClassIDSvc INFO getRegistryEntries: read 36 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_17.0.6-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_17.0.6-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to InDetAlign_Nominal for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_17.0.6-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/RecAthenaPool/run/RecTPCnv_17.0.6-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TRTAlign_Nominal for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusTemporaryEmpty for folder /TRT/Cond/Status -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusPermanentAllBoardsBarrelIndividual for folder /TRT/Cond/StatusPermanent -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 8E91164C-1E3C-DB11-8CAB-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -GeoModelSvc WARNING *** *** Geometry configured through jobOptions does not match TagInfo tags! *** *** -GeoModelSvc INFO ** Job Option configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-02-01-00 -GeoModelSvc INFO * InDet tag: -GeoModelSvc INFO * Pixel tag: -GeoModelSvc INFO * SCT tag: -GeoModelSvc INFO * TRT tag: -GeoModelSvc INFO * LAr tag: -GeoModelSvc INFO * Tile tag: -GeoModelSvc INFO * Muon tag: -GeoModelSvc INFO * Calo tag: -GeoModelSvc INFO * MagField tag: -GeoModelSvc INFO * CavernInfra tag: -GeoModelSvc INFO * ForwardDetectors tag: -GeoModelSvc INFO ** TAG INFO configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-10-00-00 -AthenaEventLoopMgr INFO ===>>> start processing event #1, run #105200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 160 CLIDRegistry entries for module ALL -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 2845 CLIDRegistry entries for module ALL -VxContainerCnv INFO VxContainerCnv::initialize() - INFO MVFVxContainerCnv::initialize() -VxContainerCnv INFO VxContainerCnv: MVFVxCandidate converter=0x3a767600 -ClassIDSvc INFO getRegistryEntries: read 53 CLIDRegistry entries for module ALL -AthenaEventLoopMgr INFO ===>>> done processing event #1, run #105200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 8E91164C-1E3C-DB11-8CAB-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #2, run #105200 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #2, run #105200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #3, run #105200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #3, run #105200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #4, run #105200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #4, run #105200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #5, run #105200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #5, run #105200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #6, run #105200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #6, run #105200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #7, run #105200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #7, run #105200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #8, run #105200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #8, run #105200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #9, run #105200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #9, run #105200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #10, run #105200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #10, run #105200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.0.6/AOD-17.0.6-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 28DA6945-4CE8-E011-A394-003048F0E7AE -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.68 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.39 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.53 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.66 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.43 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 36/36/6732 (( 0.58 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.45 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.53 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Folder /TagInfo (AttrListColl) db-read 0/2 objs/chan/bytes 2/0/0 (( 0.00 ))s -IOVDbSvc INFO Total payload read from COOL: 30844 bytes in (( 4.24 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 1.59 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 2.65 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 0 [us] #= 1 -ChronoStatSvc INFO Time User : Tot= 27.8 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Reconstruction/TrackParticleTruthAthenaPool/CMakeLists.txt b/Reconstruction/TrackParticleTruthAthenaPool/CMakeLists.txt index 1747f2ac317a4ea66e0c1f5caab1853208714f10..6737e174e7c75cddf7b9fc7c47cf4951fc687c89 100644 --- a/Reconstruction/TrackParticleTruthAthenaPool/CMakeLists.txt +++ b/Reconstruction/TrackParticleTruthAthenaPool/CMakeLists.txt @@ -33,7 +33,10 @@ endif() find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) - run_tpcnv_test( TrackParticleTruthTPCnv_18.0.0 AOD-18.0.0-full ) + set( TRACKPARTICLETRUTHATHENAPOOL_REFERENCE_TAG + TrackParticleTruthAthenaPoolReference-01-00-00 ) + run_tpcnv_test( TrackParticleTruthTPCnv_18.0.0 AOD-18.0.0-full + REFERENCE_TAG ${TRACKPARTICLETRUTHATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) endif() diff --git a/Reconstruction/TrackParticleTruthAthenaPool/share/AOD-18.0.0-full.pool.root.ref b/Reconstruction/TrackParticleTruthAthenaPool/share/AOD-18.0.0-full.pool.root.ref deleted file mode 100644 index cadb19175a13c87a0d9ec97bb2e9ef8c1245f72e..0000000000000000000000000000000000000000 --- a/Reconstruction/TrackParticleTruthAthenaPool/share/AOD-18.0.0-full.pool.root.ref +++ /dev/null @@ -1,1063 +0,0 @@ -Event index 0 ---> RefittedExtrapolatedMuonSpectrometerParticlesTruth - True ---> CombinedFitMuonParticlesTruth - True - 62 1.000000 (46006.447015 0.400906 1.489257 105.658363) - 57 1.000000 (49919.673182 -0.160864 -2.281654 105.658363) - 0 0.000000 (no part) ---> MuGirlRefittedTrackParticlesTruth - True - 62 1.000000 (46006.447015 0.400906 1.489257 105.658363) - 62 1.000000 (46006.447015 0.400906 1.489257 105.658363) - 0 0.000000 (no part) - 0 0.000000 (no part) ---> StatCombinedMuonParticlesTruth - True - 0 0.000000 (no part) - 499 1.000000 (4141.515909 0.125832 0.585110 105.660004) - 62 1.000000 (46006.447015 0.400906 1.489257 105.658363) ---> ExtrapolatedMuonSpectrometerParticlesTruth - True - 62 1.000000 (46006.447015 0.400906 1.489257 105.658363) - 57 1.000000 (49919.673182 -0.160864 -2.281654 105.658363) - 0 0.000000 (no part) ---> GSFTrackParticleTruthCollection - True - 299 0.990654 (4016.875787 -1.902883 -2.470855 139.570007) - 470 1.000000 (2151.993407 1.262789 2.873042 139.570007) - 504 1.000000 (3203.433758 0.049428 0.587563 139.570007) - 200059 0.923077 (3105.069594 1.226226 2.665936 139.570007) ---> TrackParticleTruthCollection - True - 307 1.000000 (1154.114976 -2.339303 -2.535624 139.570007) - 213 1.000000 (9703.773944 -2.318094 -2.962029 139.570007) - 230 0.990909 (1585.347623 0.284177 -0.735694 139.570007) - 62 1.000000 (46006.447015 0.400906 1.489257 105.658363) - 302 1.000000 (1168.564355 -2.094230 -2.863314 139.570007) - 212 1.000000 (1053.484323 -2.214373 -2.910208 139.570007) - 320 1.000000 (998.451557 1.015518 1.449106 139.570007) - 319 1.000000 (483.929495 0.321926 0.718130 139.570007) - 303 1.000000 (407.111277 -2.431722 -2.515326 139.570007) - 228 1.000000 (982.450740 0.142203 0.113576 139.570007) - 205 1.000000 (2237.755266 -1.382253 -2.804038 139.570007) - 365 0.977778 (3884.560726 0.175267 0.492024 139.570007) - 187 1.000000 (481.072418 0.612455 0.768703 139.570007) - 469 0.980769 (3754.923760 1.180007 2.686208 139.570007) - 207 1.000000 (3271.162339 -1.759155 -2.353413 139.570007) - 351 1.000000 (421.762369 -1.558341 -0.716490 139.570007) - 394 1.000000 (535.536937 -0.559295 3.139997 139.570007) - 224 0.990291 (568.276975 1.644649 2.440368 938.270020) - 222 1.000000 (515.728520 0.883354 -0.005219 139.570007) - 348 1.000000 (1207.438314 -2.476040 2.594687 938.270020) - 294 1.000000 (575.779902 -1.580467 -2.809603 139.570007) - 423 0.896907 (446.187379 0.492194 2.804824 139.570007) - 200212 1.000000 (434.922721 -2.007602 -2.598926 0.510999) - 295 1.000000 (2187.422057 -1.693606 -2.656492 139.570007) - 299 0.990654 (4016.875787 -1.902883 -2.470855 139.570007) - 190 1.000000 (929.276462 1.102953 1.319144 139.570007) - 470 1.000000 (2151.993407 1.262789 2.873042 139.570007) - 57 1.000000 (49919.673182 -0.160864 -2.281654 105.658363) - 231 1.000000 (2057.478955 -0.213747 -0.429675 139.570007) - 200304 1.000000 (572.776092 -0.137928 -1.967709 0.510999) - 504 1.000000 (3203.433758 0.049428 0.587563 139.570007) - 316 1.000000 (4855.031099 1.436718 2.478376 105.660004) - 188 0.916667 (642.283194 1.725396 0.771486 139.570007) - 499 1.000000 (4141.515909 0.125832 0.585110 105.660004) - 200486 0.800000 (664.228960 -2.531264 -0.793138 938.272034) - 200037 0.986667 (6973.016867 0.065054 0.469683 139.570007) - 225 1.000000 (827.985141 1.947444 1.593708 938.270020) - 247 1.000000 (324.072649 -2.213879 2.343098 139.570007) - 200288 0.714286 (397.099103 -1.637845 -2.520722 0.510999) - 200458 0.985507 (1650.137060 0.202319 0.564171 139.570007) - 200059 0.923077 (3105.069594 1.226226 2.665936 139.570007) - 200582 0.928571 (633.213417 -1.610669 -2.814314 0.510999) - - -Event index 1 ---> RefittedExtrapolatedMuonSpectrometerParticlesTruth - True ---> CombinedFitMuonParticlesTruth - True - 520 1.000000 (6086.024724 -0.753767 -1.913527 105.660004) ---> MuGirlRefittedTrackParticlesTruth - True - 0 0.000000 (no part) - 0 0.000000 (no part) ---> StatCombinedMuonParticlesTruth - True - 520 1.000000 (6086.024724 -0.753767 -1.913527 105.660004) - 488 1.000000 (2893.611617 -2.696351 2.308324 105.660004) ---> ExtrapolatedMuonSpectrometerParticlesTruth - True - 488 1.000000 (2893.611617 -2.696351 2.308324 105.660004) - 520 1.000000 (6086.024724 -0.753767 -1.913527 105.660004) ---> GSFTrackParticleTruthCollection - True - 200188 0.990991 (7163.427862 -0.646743 1.521254 0.510999) - 451 1.000000 (7860.571145 -0.655316 1.532211 139.570007) - 238 1.000000 (4713.147899 -1.724102 0.420544 139.570007) - 450 1.000000 (25447.161083 -0.619130 1.505829 493.679993) - 423 1.000000 (6564.358148 -0.679785 1.574851 139.570007) - 200187 1.000000 (1093.523746 -0.646784 1.520671 0.510999) - 372 0.714286 (3138.007803 0.619211 -0.452446 938.270020) - 236 1.000000 (4286.981222 -1.769605 0.337821 139.570007) - 200040 0.976744 (970.330623 -0.807085 -1.977934 139.570007) - 200011 1.000000 (1788.254562 -0.770546 -2.037521 0.510999) - 516 1.000000 (1291.534227 -0.807501 -2.056986 139.570007) - 289 0.987654 (4129.561552 0.642112 -0.388813 938.270020) - 200012 0.990196 (3065.613657 -0.771684 -2.036897 0.510999) - 200433 0.985714 (3779.213675 -0.652527 1.508034 139.570007) - 200494 1.000000 (1570.524956 -1.850732 0.238790 0.510999) ---> TrackParticleTruthCollection - True - 271 1.000000 (30145.816050 -2.139266 -0.946103 105.659889) - 200188 0.990991 (7163.427862 -0.646743 1.521254 0.510999) - 291 1.000000 (1298.921583 0.205864 -0.728665 139.570007) - 451 1.000000 (7860.571145 -0.655316 1.532211 139.570007) - 238 1.000000 (4713.147899 -1.724102 0.420544 139.570007) - 410 1.000000 (943.331625 -1.710780 0.258765 139.570007) - 450 1.000000 (25447.161083 -0.619130 1.505829 493.679993) - 287 1.000000 (5116.505535 0.682323 -0.473852 938.270020) - 200371 1.000000 (569.702619 -1.671669 0.619299 139.570007) - 350 1.000000 (1542.657637 -2.463655 2.970461 139.570007) - 423 1.000000 (6564.358148 -0.679785 1.574851 139.570007) - 406 1.000000 (1191.884521 -1.675967 -0.299778 139.570007) - 517 0.980392 (1401.754409 -0.724924 -2.066810 139.570007) - 322 0.988764 (984.672160 -0.888361 -2.096221 139.570007) - 401 1.000000 (1030.172337 -1.788240 -2.825253 493.679993) - 207 1.000000 (573.179252 -0.069638 -0.471299 139.570007) - 393 1.000000 (1514.237201 -0.524734 2.169688 139.570007) - 225 1.000000 (2994.339386 -2.013960 -2.946482 493.679993) - 323 1.000000 (510.472118 -1.539319 -0.701307 139.569992) - 319 1.000000 (4816.391766 -0.899625 -2.045443 938.270020) - 520 1.000000 (6086.024724 -0.753767 -1.913527 105.660004) - 334 1.000000 (2059.363747 -1.784147 0.537650 139.570007) - 298 0.956522 (956.639095 -0.871614 -1.899704 139.570007) - 200351 0.956522 (1139.155156 0.669754 -0.354717 139.570007) - 200187 1.000000 (1093.523746 -0.646784 1.520671 0.510999) - 191 1.000000 (671.622144 0.303042 2.971047 139.570007) - 295 1.000000 (825.195488 0.129947 -0.593220 493.679993) - 200764 0.775281 (1940.481111 -0.898647 -1.579623 493.677002) - 346 1.000000 (507.971841 1.878332 -2.282875 493.679993) - 233 1.000000 (561.389648 -1.072528 0.254929 139.570007) - 399 1.000000 (535.825216 -2.260870 1.601219 139.570007) - 372 0.714286 (3138.007803 0.619211 -0.452446 938.270020) - 236 1.000000 (4286.981222 -1.769605 0.337821 139.570007) - 304 1.000000 (514.038741 -0.026025 0.460902 139.570007) - 200040 0.976744 (970.330623 -0.807085 -1.977934 139.570007) - 409 1.000000 (1601.159982 -1.992703 0.455688 139.570007) - 200011 1.000000 (1788.254562 -0.770546 -2.037521 0.510999) - 516 1.000000 (1291.534227 -0.807501 -2.056986 139.570007) - 294 1.000000 (882.872680 -0.492497 -1.791231 139.570007) - 391 1.000000 (912.302118 -0.282626 1.334657 139.570007) - 289 0.987654 (4129.561552 0.642112 -0.388813 938.270020) - 192 1.000000 (3462.128659 0.109106 2.153667 139.570007) - 227 0.988372 (1373.379825 -1.061476 -2.174486 493.679993) - 200024 0.864865 (514.186744 -0.779440 -2.016755 0.510999) - 200350 1.000000 (5426.606471 0.681084 -0.459136 938.272034) - 200012 0.990196 (3065.613657 -0.771684 -2.036897 0.510999) - 200440 1.000000 (626.118337 -2.438254 -2.956852 139.570007) - 237 0.800000 (1746.657101 -1.510653 0.575238 139.570007) - 200263 1.000000 (1179.953391 0.493594 -0.353266 0.510999) - 200019 0.868421 (942.454119 -0.772972 -2.027857 0.510999) - 200433 0.985714 (3779.213675 -0.652527 1.508034 139.570007) - 200028 0.636364 (3457.333701 -0.780057 -2.035516 0.510999) - 200720 1.000000 (2004.549699 -1.319270 0.636399 139.570007) - 200494 1.000000 (1570.524956 -1.850732 0.238790 0.510999) - 200493 0.964286 (1463.434064 -1.851012 0.239843 0.510999) - - -Event index 2 ---> RefittedExtrapolatedMuonSpectrometerParticlesTruth - True ---> CombinedFitMuonParticlesTruth - True - 200056 1.000000 (7391.285712 -0.508232 -0.533424 105.658401) ---> MuGirlRefittedTrackParticlesTruth - True - 0 0.000000 (no part) ---> StatCombinedMuonParticlesTruth - True - 0 0.000000 (no part) ---> ExtrapolatedMuonSpectrometerParticlesTruth - True - 200056 1.000000 (7391.285712 -0.508232 -0.533424 105.658401) ---> GSFTrackParticleTruthCollection - True - 44 1.000000 (32492.993988 1.039511 2.209623 0.514559) - 699 1.000000 (2851.681106 -0.544950 -0.380568 938.270020) - 1015 1.000000 (3479.987463 -0.722974 -0.344974 139.570007) - 1000 1.000000 (12576.419874 -0.672697 -0.219066 139.570007) - 863 0.928571 (4018.458145 0.304202 0.074839 139.570007) - 200323 1.000000 (1525.058740 0.241359 0.122741 0.510999) ---> TrackParticleTruthCollection - True - 584 1.000000 (16357.214660 -0.231996 -2.700006 105.660225) - 611 1.000000 (8329.348679 -1.364622 0.092954 938.270020) - 740 1.000000 (505.483627 -1.706094 -3.076625 938.270020) - 866 1.000000 (3749.958764 -1.944966 2.491484 139.570007) - 44 1.000000 (32492.993988 1.039511 2.209623 0.514559) - 414 0.991870 (1433.425412 -1.365766 -0.405731 938.270020) - 699 1.000000 (2851.681106 -0.544950 -0.380568 938.270020) - 446 1.000000 (1005.475202 1.460736 -0.813160 139.570007) - 417 1.000000 (1271.409868 -0.986714 0.074198 938.270020) - 872 1.000000 (1503.463853 2.149430 -2.969569 139.570007) - 1042 1.000000 (2619.027189 -2.155933 -0.785418 139.570007) - 1038 1.000000 (2351.049845 -1.838900 -0.829034 139.570007) - 410 0.991597 (589.842952 -1.994950 0.111249 139.570007) - 1034 0.893617 (1005.110089 -2.026552 -0.936810 139.570007) - 610 1.000000 (581.864199 -2.081835 -0.000095 139.570007) - 639 1.000000 (1467.724294 -2.152715 2.757712 139.570007) - 704 0.980392 (973.445066 -0.170962 -1.591056 139.570007) - 682 1.000000 (1172.080447 0.906235 1.587497 139.570007) - 613 1.000000 (2660.343795 -0.817321 0.113947 938.270020) - 725 1.000000 (731.342743 -0.986094 0.999980 139.570007) - 754 0.991071 (999.315162 -0.442141 -0.937552 493.679993) - 1015 1.000000 (3479.987463 -0.722974 -0.344974 139.570007) - 412 0.991525 (1130.503144 -1.680190 -0.262548 139.570007) - 200056 0.901961 (7391.285712 -0.508232 -0.533424 105.658401) - 416 1.000000 (2132.788419 -0.895843 0.091344 938.270020) - 532 1.000000 (663.601673 -1.522908 -0.461504 139.570007) - 421 1.000000 (2990.728755 -0.424473 -1.502203 139.570007) - 775 0.989247 (530.823346 1.971442 -1.164672 139.570007) - 1014 1.000000 (1610.521631 -0.427455 -0.318904 139.570007) - 862 0.736842 (1139.731595 0.362400 0.395037 139.570007) - 406 1.000000 (1474.834189 -1.931294 -0.370594 139.570007) - 640 1.000000 (1172.752701 -1.796286 2.346083 139.570007) - 734 1.000000 (465.664529 -0.353364 -1.886779 139.570007) - 445 1.000000 (967.680653 2.009755 -0.597280 139.570007) - 702 1.000000 (469.777357 -0.269692 -0.402755 139.570007) - 728 1.000000 (714.654811 -1.205561 -1.991215 139.570007) - 711 1.000000 (763.409817 -0.254957 -2.090930 938.270020) - 497 1.000000 (444.763523 0.617621 0.579040 493.679993) - 703 1.000000 (443.792161 -0.687419 -0.600039 139.570007) - 418 1.000000 (629.585876 -0.411344 -0.869322 938.270020) - 697 0.990000 (4394.010674 -0.646213 -0.455239 938.270020) - 200979 1.000000 (582.125871 0.599469 -1.909764 938.272034) - 405 0.964706 (1235.150400 -1.950939 -1.162017 139.570007) - 477 1.000000 (1435.613499 -0.177037 -2.381945 938.270020) - 657 1.000000 (679.965785 2.255747 2.519772 493.679993) - 1000 1.000000 (12576.419874 -0.672697 -0.219066 139.570007) - 614 1.000000 (1778.185073 -0.724390 0.120057 139.570007) - 552 1.000000 (739.390667 -0.387744 2.437638 139.570007) - 495 1.000000 (606.321297 -0.013036 -1.536661 139.570007) - 200435 1.000000 (459.632588 -2.325743 1.420149 139.570007) - 1040 1.000000 (1355.619300 -1.350041 -0.375295 105.660004) - 200317 0.989796 (500.709759 0.335235 0.348790 139.570007) - 863 0.928571 (4018.458145 0.304202 0.074839 139.570007) - 201581 1.000000 (481.284741 -1.027767 -0.539045 938.272034) - 696 1.000000 (464.153404 -2.630241 -0.206236 139.570007) - 201644 1.000000 (910.335769 -0.208403 -1.089420 139.570007) - 748 1.000000 (1118.720162 1.081862 0.510357 493.679993) - 200001 0.978947 (2075.496276 -1.947576 -0.310823 139.570007) - 201320 0.871795 (412.244162 1.420630 0.463695 139.570007) - 200002 1.000000 (2962.031321 -1.809717 -0.219090 139.570007) - 201217 1.000000 (2421.570550 -1.417240 0.011510 139.570007) - 200323 1.000000 (1525.058740 0.241359 0.122741 0.510999) - 200742 1.000000 (no part) - 0 0.818182 (no part) - - -Event index 3 ---> RefittedExtrapolatedMuonSpectrometerParticlesTruth - True ---> CombinedFitMuonParticlesTruth - True ---> MuGirlRefittedTrackParticlesTruth - True ---> StatCombinedMuonParticlesTruth - True ---> ExtrapolatedMuonSpectrometerParticlesTruth - True ---> GSFTrackParticleTruthCollection - True - 58 0.991228 (104903.459933 0.032547 -1.157430 0.511002) - 479 0.992126 (11033.802191 -0.363742 2.345030 139.570007) - 273 0.991803 (9600.145714 -0.175823 1.567664 139.570007) - 387 1.000000 (8761.504546 0.007581 1.855926 139.570007) - 641 1.000000 (17775.261822 -0.347656 -1.305311 0.511000) - 276 1.000000 (3313.075692 -0.069424 1.555402 139.570007) - 671 0.990826 (3695.949043 -0.617054 1.812130 139.570007) - 549 1.000000 (4493.631838 -0.693682 1.770633 139.570007) - 480 0.990476 (1440.140496 -0.467375 2.061353 139.570007) - 666 1.000000 (10649.935776 -0.703753 1.695312 139.570007) - 439 1.000000 (8831.786094 -0.616721 -3.013132 139.570007) - 670 1.000000 (4624.703905 -0.669051 1.812935 139.570007) - 429 1.000000 (8396.655604 -0.377025 2.337404 938.270020) - 390 1.000000 (6845.205493 -0.046164 1.890923 139.570007) - 391 0.961165 (3033.901882 -0.008365 1.740078 139.570007) - 200577 1.000000 (939.288238 -0.396665 -1.303623 0.510999) - 382 1.000000 (3227.090194 -0.793015 2.001750 139.570007) - 552 1.000000 (1501.092565 -0.380405 2.145929 139.570007) - 270 0.979592 (3024.421976 -0.160548 1.739352 139.570007) - 313 1.000000 (18315.336681 -0.454534 -2.546831 493.679993) - 448 1.000000 (9919.479686 -0.492838 -2.540353 493.679993) - 272 1.000000 (7247.374497 -0.052351 1.645648 139.570007) - 629 1.000000 (25610.475598 -0.359589 -1.274334 139.570007) - 639 1.000000 (12987.221958 -0.353124 -1.264817 139.570007) - 636 0.989011 (15364.718294 -0.382224 -1.330249 139.570007) - 200036 1.000000 (5020.461071 -0.347868 -1.307840 0.510999) - 200001 1.000000 (12050.405540 -0.674861 1.748139 0.510999) - 200750 1.000000 (3358.898769 -0.082877 1.636051 0.510999) - 200157 0.500000 (2852.117749 -0.818403 2.012675 0.510999) ---> TrackParticleTruthCollection - True - 58 0.991228 (104903.459933 0.032547 -1.157430 0.511002) - 479 0.992126 (11033.802191 -0.363742 2.345030 139.570007) - 344 1.000000 (620.378593 -2.384240 0.040679 938.270020) - 273 0.991803 (9600.145714 -0.175823 1.567664 139.570007) - 664 0.983051 (4910.305759 -0.609517 1.740679 493.679993) - 663 0.991304 (17499.055039 -0.602626 1.773698 493.679993) - 387 1.000000 (8761.504546 0.007581 1.855926 139.570007) - 641 1.000000 (17775.261822 -0.347656 -1.305311 0.511000) - 276 1.000000 (3313.075692 -0.069424 1.555402 139.570007) - 267 1.000000 (1370.447554 -0.738523 1.785960 139.570007) - 350 1.000000 (3039.040775 -0.984477 1.821419 493.679993) - 254 1.000000 (1573.940846 0.782642 1.592399 139.570007) - 559 1.000000 (2441.041036 -0.739586 -2.964336 139.570007) - 671 0.990826 (3695.949043 -0.617054 1.812130 139.570007) - 549 1.000000 (4493.631838 -0.693682 1.770633 139.570007) - 424 1.000000 (1293.833277 -0.673011 1.571273 139.570007) - 480 0.990476 (1440.140496 -0.467375 2.061353 139.570007) - 666 1.000000 (10649.935776 -0.703753 1.695312 139.570007) - 439 1.000000 (8831.786094 -0.616721 -3.013132 139.570007) - 459 1.000000 (564.230890 0.422435 2.023216 938.270020) - 670 1.000000 (4624.703905 -0.669051 1.812935 139.570007) - 381 0.948454 (1873.544422 -0.987584 1.785312 139.570007) - 262 1.000000 (2958.085068 -0.756720 1.966320 139.570007) - 548 1.000000 (6520.095386 -0.722013 1.710066 139.570007) - 429 1.000000 (8396.655604 -0.377025 2.337404 938.270020) - 275 0.979798 (3163.010709 -0.087770 1.439748 139.570007) - 390 1.000000 (6845.205493 -0.046164 1.890923 139.570007) - 306 1.000000 (3337.306737 -0.531296 -2.957881 139.570007) - 391 0.961165 (3033.901882 -0.008365 1.740078 139.570007) - 541 1.000000 (545.784147 0.146510 2.782773 139.570007) - 374 0.991379 (459.098973 -1.085417 2.520932 139.570007) - 440 0.990566 (3129.010524 -0.541599 -3.123144 139.569992) - 388 0.864198 (1807.247619 0.001958 1.959374 139.570007) - 264 0.989899 (1006.517564 -0.628630 2.078046 139.570007) - 265 0.981308 (2046.842202 -1.229884 1.919618 139.570007) - 386 1.000000 (418.842328 -0.471140 1.794831 139.570007) - 200577 1.000000 (939.288238 -0.396665 -1.303623 0.510999) - 410 1.000000 (1463.699962 0.618542 2.241800 139.570007) - 416 1.000000 (1421.183864 0.006277 -2.051387 139.570007) - 382 1.000000 (3227.090194 -0.793015 2.001750 139.570007) - 396 1.000000 (1173.703462 -0.226700 1.617275 493.679993) - 574 0.933333 (639.197187 -2.509149 0.349492 139.570007) - 376 1.000000 (1211.778960 -0.642577 2.012453 139.570007) - 587 1.000000 (669.634871 -0.652445 0.828699 139.570007) - 586 1.000000 (593.707779 -0.876339 1.636784 139.570007) - 260 1.000000 (623.046713 -0.907255 1.310514 139.570007) - 433 1.000000 (1019.321400 0.014048 2.101808 139.570007) - 558 1.000000 (513.852098 -0.947616 -3.134302 139.570007) - 292 1.000000 (810.171359 -0.935133 -1.350518 139.570007) - 515 1.000000 (470.459284 1.361737 1.027457 139.570007) - 297 1.000000 (15388.361326 -0.764196 1.760054 139.570007) - 245 0.814433 (505.662772 -1.076977 2.600655 139.570007) - 457 1.000000 (742.389708 0.879990 2.469867 938.270020) - 522 1.000000 (403.822910 -0.668550 2.424164 139.570007) - 384 1.000000 (448.053371 -0.575960 2.881755 139.570007) - 552 1.000000 (1501.092565 -0.380405 2.145929 139.570007) - 270 0.979592 (3024.421976 -0.160548 1.739352 139.570007) - 310 1.000000 (2730.192675 -0.858210 -2.596143 139.570007) - 397 1.000000 (678.547719 0.313131 1.213314 139.570007) - 436 1.000000 (1505.357506 -0.405220 3.045707 139.570007) - 542 0.988764 (2098.554934 0.191173 2.129126 139.570007) - 449 1.000000 (2598.573935 -0.375615 -2.582747 139.570007) - 313 1.000000 (18315.336681 -0.454534 -2.546831 493.679993) - 448 1.000000 (9919.479686 -0.492838 -2.540353 493.679993) - 272 1.000000 (7247.374497 -0.052351 1.645648 139.570007) - 372 1.000000 (700.562203 0.395263 1.266546 139.570007) - 328 0.986842 (486.648967 -1.947565 0.032541 493.679993) - 200551 1.000000 (501.759678 -0.373029 2.399634 0.510999) - 629 1.000000 (25610.475598 -0.359589 -1.274334 139.570007) - 638 0.990385 (26167.347974 -0.321076 -1.278798 493.679993) - 639 1.000000 (12987.221958 -0.353124 -1.264817 139.570007) - 636 0.989011 (15364.718294 -0.382224 -1.330249 139.570007) - 200431 0.873563 (867.228032 -0.662657 2.396105 139.570007) - 571 0.666667 (1159.889372 -1.675914 1.711831 139.570007) - 404 0.818182 (3264.541445 -2.155827 0.251117 139.570007) - 458 0.946237 (510.324179 0.210070 2.675322 139.570007) - 200496 0.988235 (6465.633922 -0.297515 2.250766 938.272034) - 200418 1.000000 (1708.997115 -0.267524 2.166395 139.570007) - 200363 0.891304 (424.411436 -0.747425 -2.822372 139.570007) - 445 0.987500 (1996.926517 -0.789014 -2.691502 139.570007) - 200028 1.000000 (541.006694 -0.370190 -1.146781 0.510999) - 200036 1.000000 (5020.461071 -0.347868 -1.307840 0.510999) - 200299 1.000000 (732.045118 1.126738 1.574864 139.570007) - 200001 1.000000 (12050.405540 -0.674861 1.748139 0.510999) - 200750 1.000000 (3358.898769 -0.082877 1.636051 0.510999) - 200035 1.000000 (594.668038 -0.347471 -1.308237 0.510999) - 200776 0.897196 (1130.470714 1.624250 0.655150 139.570007) - 0 0.666667 (no part) - 200014 0.952381 (7191.242728 -0.431756 1.835160 139.570007) - 200034 0.848485 (1669.231942 -0.347865 -1.321288 0.510999) - 200157 0.500000 (2852.117749 -0.818403 2.012675 0.510999) - - -Event index 4 ---> RefittedExtrapolatedMuonSpectrometerParticlesTruth - True ---> CombinedFitMuonParticlesTruth - True ---> MuGirlRefittedTrackParticlesTruth - True ---> StatCombinedMuonParticlesTruth - True ---> ExtrapolatedMuonSpectrometerParticlesTruth - True ---> GSFTrackParticleTruthCollection - True - 734 0.989583 (10019.415932 -0.901268 -1.905591 139.570007) - 72 1.000000 (63589.255652 1.737289 -0.244623 0.949598) - 722 0.981481 (7620.017355 1.460205 1.678915 139.570007) - 979 1.000000 (1910.614396 -0.593092 0.951404 139.570007) - 1174 0.991228 (8092.330820 1.495612 1.639873 139.570007) - 1172 0.990909 (8761.390717 1.519825 1.617924 139.570007) - 1173 1.000000 (5874.668757 1.524028 1.681648 139.570007) - 1170 1.000000 (3375.133638 1.471935 1.729963 139.570007) - 1177 1.000000 (4671.144738 1.443184 1.709905 139.570007) - 1183 0.813725 (12777.918936 1.499876 1.617248 139.570007) - 1182 0.979798 (19197.822584 1.464283 1.628873 493.679993) - 1169 0.977778 (7665.267957 1.527432 1.620175 493.679993) - 202365 0.872093 (2391.878145 1.736994 -0.243577 0.510999) - 200041 0.975000 (4655.829166 1.470419 1.666588 139.570007) - 200040 1.000000 (2387.465067 1.526223 1.559473 139.570007) - 202316 0.945946 (4749.346114 1.737174 -0.241112 0.510999) ---> TrackParticleTruthCollection - True - 685 1.000000 (723.493032 -2.405069 0.864902 139.570007) - 488 1.000000 (1966.199074 -2.056940 -1.852538 139.570007) - 444 1.000000 (3551.517350 2.263720 -1.509355 139.570007) - 649 1.000000 (1802.024479 2.210477 -1.710224 139.570007) - 442 1.000000 (2696.653376 2.139568 -1.179959 139.570007) - 677 1.000000 (697.828699 -2.192578 -1.993763 938.270020) - 734 0.989583 (10019.415932 -0.901268 -1.905591 139.570007) - 824 1.000000 (6425.716624 -0.909204 -1.730850 139.570007) - 514 1.000000 (2895.912836 -0.266891 -2.093621 938.270020) - 72 1.000000 (63589.255652 1.737289 -0.244623 0.949598) - 846 1.000000 (994.622760 -2.242390 2.263528 139.570007) - 823 1.000000 (4184.869440 -0.814643 -1.935960 493.679993) - 475 1.000000 (657.819602 -2.224376 -3.056238 139.570007) - 654 1.000000 (461.556245 2.241227 -2.280180 139.570007) - 680 1.000000 (903.451637 -1.736427 0.390111 139.570007) - 650 1.000000 (1300.308935 2.153888 -2.178551 139.569992) - 1061 0.971429 (497.130490 -1.273078 2.564086 139.570007) - 468 1.000000 (1803.874393 -0.877860 -2.199992 493.679993) - 675 1.000000 (1609.893205 0.960258 -2.140314 139.570007) - 905 0.887640 (676.864042 -0.476341 -1.159405 139.570007) - 729 1.000000 (4384.524410 -0.676066 -1.638462 493.679993) - 530 0.990385 (2013.258039 -1.742510 2.803215 139.570007) - 722 0.981481 (7620.017355 1.460205 1.678915 139.570007) - 676 1.000000 (776.267542 0.845564 -2.773883 139.570007) - 948 0.991453 (465.892671 -1.419141 -0.853903 139.570007) - 967 1.000000 (948.693902 -0.758470 -1.631067 139.570007) - 549 1.000000 (462.456393 1.655076 0.957866 139.570007) - 767 1.000000 (824.408087 -2.086060 2.478768 139.570007) - 723 1.000000 (3661.793097 -0.603279 -1.984833 139.569992) - 464 1.000000 (3322.986707 1.056548 -2.370643 139.570007) - 1045 1.000000 (454.695965 -0.445772 2.819707 139.570007) - 521 1.000000 (440.822472 -1.285546 -1.739215 139.570007) - 979 1.000000 (1910.614396 -0.593092 0.951404 139.570007) - 913 1.000000 (727.866591 -1.579102 -0.198848 139.570007) - 957 1.000000 (2311.739196 -0.205165 -1.721765 139.570007) - 819 1.000000 (1297.693025 1.494757 -1.359461 139.570007) - 949 1.000000 (565.561412 -1.807363 -1.585170 139.570007) - 648 0.989796 (564.270960 0.610518 -0.351719 139.570007) - 200187 0.989796 (428.875378 -0.666235 1.270770 139.570007) - 980 1.000000 (428.685064 -0.481998 1.112110 139.570007) - 647 1.000000 (571.961810 0.699678 2.843737 493.679993) - 714 1.000000 (575.282533 0.696595 2.614524 139.570007) - 684 1.000000 (848.880749 -1.812247 1.382819 139.570007) - 492 0.990099 (443.923650 -0.288152 -1.587906 139.570007) - 512 1.000000 (394.230661 -0.953218 2.241867 139.570007) - 566 1.000000 (2371.874119 -1.076209 -1.939530 139.570007) - 1068 1.000000 (1009.563314 2.371781 -2.474280 139.570007) - 968 1.000000 (5031.712024 -0.452047 -1.677994 139.570007) - 935 1.000000 (1760.993267 -1.901023 0.815766 139.570007) - 467 1.000000 (1282.912452 -1.154818 -2.567695 493.679993) - 833 0.988506 (613.475645 0.222109 -2.035789 139.570007) - 936 1.000000 (949.846333 -2.421113 0.639218 139.570007) - 201273 1.000000 (1721.337997 -1.751597 -1.810051 139.570007) - 1174 0.991228 (8092.330820 1.495612 1.639873 139.570007) - 1172 0.990909 (8761.390717 1.519825 1.617924 139.570007) - 201274 0.990385 (421.821527 -1.501517 -2.097298 139.570007) - 1173 1.000000 (5874.668757 1.524028 1.681648 139.570007) - 1014 1.000000 (360.324207 2.188656 -1.195554 139.570007) - 1170 1.000000 (3375.133638 1.471935 1.729963 139.570007) - 1032 1.000000 (636.015081 2.549263 -1.813482 139.570007) - 681 0.909091 (820.626150 -2.552098 0.898240 139.570007) - 1177 1.000000 (4671.144738 1.443184 1.709905 139.570007) - 1183 0.813725 (12777.918936 1.499876 1.617248 139.570007) - 202158 1.000000 (740.463302 1.488450 -1.863641 938.272034) - 884 0.971831 (560.243150 -0.800506 0.483482 139.570007) - 869 1.000000 (679.224550 -2.516029 1.288420 139.570007) - 1182 0.979798 (19197.822584 1.464283 1.628873 493.679993) - 1169 0.977778 (7665.267957 1.527432 1.620175 493.679993) - 200423 1.000000 (523.143031 0.912817 -1.514469 938.272034) - 816 1.000000 (432.709009 1.943202 -2.685776 938.270020) - 202365 0.872093 (2391.878145 1.736994 -0.243577 0.510999) - 200041 0.975000 (4655.829166 1.470419 1.666588 139.570007) - 201219 1.000000 (2406.813041 -0.451198 -1.671664 139.570007) - 200040 1.000000 (2387.465067 1.526223 1.559473 139.570007) - 200145 0.814815 (2464.293773 -0.643781 1.035868 0.510999) - 200913 0.750000 (818.990076 -1.107906 -1.655043 139.570007) - 202316 0.945946 (4749.346114 1.737174 -0.241112 0.510999) - 200155 0.760000 (1496.904032 -0.677342 -1.564349 0.510999) - - -Event index 5 ---> RefittedExtrapolatedMuonSpectrometerParticlesTruth - True ---> CombinedFitMuonParticlesTruth - True ---> MuGirlRefittedTrackParticlesTruth - True ---> StatCombinedMuonParticlesTruth - True ---> ExtrapolatedMuonSpectrometerParticlesTruth - True ---> GSFTrackParticleTruthCollection - True - 802 0.990826 (38327.080804 0.144903 1.845361 1189.400024) - 406 1.000000 (17479.244261 0.152048 1.852692 1197.400024) - 570 1.000000 (6046.981674 0.412271 2.531812 139.570007) - 571 0.991453 (5266.556728 0.288421 2.529095 139.570007) - 609 0.982143 (4547.241807 -0.624685 -1.415146 139.570007) - 606 1.000000 (7387.908308 -0.772514 -1.430416 139.570007) - 379 0.989583 (21757.680398 -0.744270 -1.655545 139.570007) - 712 1.000000 (12832.875289 0.936184 -2.923342 139.570007) - 382 1.000000 (11568.738258 -0.784176 -1.386791 139.570007) - 328 0.988636 (36587.607599 1.984833 -0.365198 493.679993) - 479 0.989130 (14218.903805 1.960346 -0.366860 139.570007) - 804 1.000000 (9681.999654 0.128502 1.838112 139.570007) - 617 1.000000 (4004.333113 0.408672 2.469320 139.570007) - 438 1.000000 (4772.005476 0.623362 2.552766 493.679993) - 477 1.000000 (8343.721793 1.963551 -0.366039 139.570007) - 575 1.000000 (5097.985144 0.161062 1.880569 139.570007) - 541 1.000000 (3405.610615 -0.797078 -1.705176 139.570007) - 608 1.000000 (1817.725540 -0.752172 -1.625928 139.570007) - 396 1.000000 (1743.690282 0.914843 -2.685810 139.570007) - 803 1.000000 (8068.499447 0.135778 1.859822 139.570007) - 403 1.000000 (14928.396965 0.658436 2.354294 139.570007) - 474 0.987805 (35724.705825 1.936166 -0.387290 139.570007) - 330 0.887500 (3985.517161 1.968062 -0.393666 139.570007) - 201083 1.000000 (31157.731196 -0.768892 -1.619322 0.510999) - 200206 0.842857 (2232.356123 -0.773699 2.183067 0.510999) - 850 1.000000 (11817.573842 -0.795321 2.242691 139.570007) - 855 0.980198 (2950.039834 -0.732243 2.173479 139.570007) - 851 0.989899 (2510.795743 -0.759280 2.123997 139.570007) - 846 1.000000 (11730.318533 -0.785364 2.195539 139.570007) - 844 1.000000 (2332.878119 -0.766300 2.198782 139.570007) - 200731 0.538462 (9386.285110 1.951717 -0.393205 0.510999) - 200744 0.177215 (203.601044 1.955506 -0.366441 0.510999) - 200668 0.756098 (4080.105447 1.946587 -0.385869 0.510999) - 201987 1.000000 (16431.831469 1.922521 -0.442643 938.272034) - 201984 1.000000 (1508.614726 1.901904 -0.382800 139.570007) - 475 1.000000 (9334.741250 1.972796 -0.377933 139.570007) - 201462 0.864865 (6784.674052 1.901417 -0.425819 938.272034) - 202101 0.840580 (4396.677784 1.991860 -0.383837 0.510999) - 200035 0.974684 (2436.959703 0.698081 2.430125 139.570007) - 200679 0.853333 (1060.918906 1.946474 -0.384054 0.510999) - 200667 0.828571 (2124.110579 1.947009 -0.385741 0.510999) - 201449 0.904762 (8830.507884 1.938390 -0.349063 0.510999) - 201448 0.750000 (16457.285239 1.938204 -0.349058 0.511000) - 201469 0.983607 (9712.277447 1.976693 -0.431652 139.570007) - 200691 1.000000 (44201.209419 1.949469 -0.396893 0.510988) - 201978 0.875000 (13396.167250 1.949040 -0.355350 139.570007) - 201125 0.985294 (2398.898561 -0.599892 -1.255616 139.570007) - 200846 0.850000 (1865.391066 0.441117 2.214662 0.510999) - 200096 0.500000 (844.776109 -0.974448 2.022101 139.570007) ---> TrackParticleTruthCollection - True - 79 1.000000 (151964.384396 -1.269018 2.631446 105.658386) - 802 0.990826 (38327.080804 0.144903 1.845361 1189.400024) - 406 1.000000 (17479.244261 0.152048 1.852692 1197.400024) - 570 1.000000 (6046.981674 0.412271 2.531812 139.570007) - 331 0.991150 (5623.210468 1.825591 -0.475064 139.570007) - 571 0.991453 (5266.556728 0.288421 2.529095 139.570007) - 609 0.982143 (4547.241807 -0.624685 -1.415146 139.570007) - 670 1.000000 (886.022329 -0.908332 2.449357 139.570007) - 606 1.000000 (7387.908308 -0.772514 -1.430416 139.570007) - 560 1.000000 (2635.873144 1.108796 -3.016116 139.570007) - 346 1.000000 (497.229893 -2.075622 -2.275322 139.570007) - 379 0.989583 (21757.680398 -0.744270 -1.655545 139.570007) - 712 1.000000 (12832.875289 0.936184 -2.923342 139.570007) - 394 1.000000 (2490.274591 0.988792 -2.948549 139.570007) - 672 1.000000 (1027.624093 -1.654267 1.842719 139.570007) - 482 1.000000 (2238.973680 1.747245 -0.439634 493.679993) - 382 1.000000 (11568.738258 -0.784176 -1.386791 139.570007) - 397 1.000000 (2686.105686 -1.013976 2.094983 139.570007) - 594 1.000000 (1251.995637 -1.929891 1.918229 139.570007) - 706 1.000000 (818.034114 1.417483 2.819178 493.679993) - 328 0.988636 (36587.607599 1.984833 -0.365198 493.679993) - 479 0.989130 (14218.903805 1.960346 -0.366860 139.570007) - 804 1.000000 (9681.999654 0.128502 1.838112 139.570007) - 539 1.000000 (13995.342933 -0.759282 -1.521133 139.570007) - 673 1.000000 (505.693615 -1.725423 1.962640 139.570007) - 604 1.000000 (789.933517 -2.329301 0.615749 139.570007) - 617 1.000000 (4004.333113 0.408672 2.469320 139.570007) - 438 1.000000 (4772.005476 0.623362 2.552766 493.679993) - 435 1.000000 (4654.243151 0.516698 2.420959 139.570007) - 625 1.000000 (2300.410970 0.232842 2.357161 139.570007) - 388 0.989691 (2540.220747 -1.048963 -0.962574 139.570007) - 701 0.990099 (4564.075050 -1.114308 -0.818403 139.570007) - 477 1.000000 (8343.721793 1.963551 -0.366039 139.570007) - 575 1.000000 (5097.985144 0.161062 1.880569 139.570007) - 536 1.000000 (3586.285929 -1.059654 -1.594810 938.270020) - 541 1.000000 (3405.610615 -0.797078 -1.705176 139.570007) - 395 0.989011 (1438.273551 0.784159 3.095162 139.570007) - 608 1.000000 (1817.725540 -0.752172 -1.625928 139.570007) - 546 0.988636 (2299.566185 -0.890427 -1.051805 139.570007) - 561 1.000000 (3652.741710 1.113500 -2.934738 139.570007) - 533 1.000000 (432.733154 -1.213607 3.010375 139.570007) - 381 1.000000 (2426.784071 -0.776848 -1.234715 139.570007) - 613 0.989691 (1138.428048 -0.740745 2.068566 139.570007) - 603 1.000000 (1170.217680 -2.498116 0.084862 139.570007) - 341 1.000000 (1253.358665 -1.720970 1.943464 139.570007) - 333 1.000000 (1160.971548 -0.027464 0.371328 139.570007) - 358 1.000000 (739.179750 -2.395899 0.136090 139.570007) - 591 1.000000 (556.835175 1.775643 -0.183376 938.270020) - 396 1.000000 (1743.690282 0.914843 -2.685810 139.570007) - 698 1.000000 (1386.576007 -1.285795 -0.856918 493.679993) - 200484 1.000000 (1324.809377 -0.940757 2.065515 0.510999) - 569 0.990566 (1844.742599 0.508185 2.717573 139.570007) - 739 1.000000 (985.856825 0.441278 2.223557 493.679993) - 895 1.000000 (1209.213304 0.510351 2.333788 139.570007) - 458 0.989691 (1515.312258 -0.070252 -0.305957 139.570007) - 755 1.000000 (573.991290 0.041534 1.921620 139.570007) - 200025 0.680851 (1121.722696 0.749280 2.641249 105.658401) - 664 1.000000 (626.639703 -0.554023 0.387055 139.570007) - 580 1.000000 (749.472911 -1.666456 1.268911 139.570007) - 419 1.000000 (993.753972 1.073679 -0.216305 938.270020) - 581 1.000000 (511.433636 -1.963337 0.494038 139.570007) - 532 1.000000 (482.861319 -1.109465 -1.473175 139.570007) - 368 0.652174 (798.142971 -1.201511 1.054854 139.570007) - 803 1.000000 (8068.499447 0.135778 1.859822 139.570007) - 322 1.000000 (1226.710958 1.580218 -2.700493 139.570007) - 697 0.923077 (2167.361460 -0.865321 -1.047114 493.679993) - 486 0.989691 (1588.744743 -0.148654 0.022424 139.570007) - 403 1.000000 (14928.396965 0.658436 2.354294 139.570007) - 411 1.000000 (1812.071134 0.391450 -2.790723 139.570007) - 474 0.987805 (35724.705825 1.936166 -0.387290 139.570007) - 619 1.000000 (1161.438138 0.236587 2.571896 139.570007) - 330 0.887500 (3985.517161 1.968062 -0.393666 139.570007) - 572 0.988636 (1370.374721 0.435350 2.317640 139.570007) - 201083 1.000000 (31157.731196 -0.768892 -1.619322 0.510999) - 200491 0.987342 (708.228579 -0.884875 2.134879 0.510999) - 200490 1.000000 (817.210905 -0.884951 2.134811 0.510999) - 892 1.000000 (1076.515377 1.027513 2.361209 139.570007) - 200206 0.842857 (2232.356123 -0.773699 2.183067 0.510999) - 841 1.000000 (4436.610092 -0.846717 2.303002 139.570007) - 850 1.000000 (11817.573842 -0.795321 2.242691 139.570007) - 840 1.000000 (11832.147396 -0.843397 2.257272 493.679993) - 855 0.980198 (2950.039834 -0.732243 2.173479 139.570007) - 201126 0.989691 (2742.934122 -0.863473 -1.640750 139.570007) - 852 1.000000 (2383.361112 -0.907655 2.244433 139.570007) - 843 1.000000 (5107.768327 -0.821245 2.242779 139.570007) - 851 0.989899 (2510.795743 -0.759280 2.123997 139.570007) - 846 1.000000 (11730.318533 -0.785364 2.195539 139.570007) - 201118 1.000000 (1167.696937 -0.422357 -1.862217 139.570007) - 845 0.978022 (3992.517914 -0.875490 2.208855 139.570007) - 201173 1.000000 (659.155919 -0.594390 -1.717729 0.510999) - 844 1.000000 (2332.878119 -0.766300 2.198782 139.570007) - 201117 1.000000 (966.568922 -0.663628 -1.434855 493.677002) - 200731 0.538462 (9386.285110 1.951717 -0.393205 0.510999) - 200744 0.177215 (203.601044 1.955506 -0.366441 0.510999) - 854 1.000000 (8078.284018 -0.826988 2.169717 139.570007) - 524 1.000000 (1526.800424 -1.728493 0.605583 139.570007) - 201976 1.000000 (942.961666 1.807638 -0.325699 139.570007) - 200668 0.756098 (4080.105447 1.946587 -0.385869 0.510999) - 200459 0.896907 (1752.076360 -0.328943 2.116806 938.272034) - 545 0.988095 (525.324366 -1.570104 -1.276702 139.570007) - 201987 1.000000 (16431.831469 1.922521 -0.442643 938.272034) - 201984 1.000000 (1508.614726 1.901904 -0.382800 139.570007) - 475 1.000000 (9334.741250 1.972796 -0.377933 139.570007) - 201980 1.000000 (991.788175 1.103315 -0.474400 139.570007) - 201981 1.000000 (1273.653945 1.122132 -0.449483 493.677002) - 200678 0.842857 (629.219778 1.947362 -0.386578 0.510999) - 201462 0.864865 (6784.674052 1.901417 -0.425819 938.272034) - 202101 0.840580 (4396.677784 1.991860 -0.383837 0.510999) - 200035 0.974684 (2436.959703 0.698081 2.430125 139.570007) - 200679 0.853333 (1060.918906 1.946474 -0.384054 0.510999) - 200659 1.000000 (761.642163 2.285133 0.137993 0.510999) - 200667 0.828571 (2124.110579 1.947009 -0.385741 0.510999) - 200692 0.222222 (32046.493275 1.949416 -0.396839 0.510997) - 201449 0.904762 (8830.507884 1.938390 -0.349063 0.510999) - 201448 0.750000 (16457.285239 1.938204 -0.349058 0.511000) - 201469 0.983607 (9712.277447 1.976693 -0.431652 139.570007) - 200691 1.000000 (44201.209419 1.949469 -0.396893 0.510988) - 201978 0.875000 (13396.167250 1.949040 -0.355350 139.570007) - 200536 0.984615 (1405.885009 0.995086 -3.053145 0.510999) - 200366 0.769231 (1093.220483 0.359148 2.497273 0.510999) - 202100 0.769231 (1154.696819 1.992337 -0.384427 0.510999) - 0 0.285714 (no part) - 201125 0.985294 (2398.898561 -0.599892 -1.255616 139.570007) - 200367 1.000000 (1344.476522 0.359235 2.497275 0.510999) - 0 1.000000 (no part) - 200411 0.961538 (4519.011042 0.312145 2.555974 0.510999) - 200846 0.850000 (1865.391066 0.441117 2.214662 0.510999) - 200682 0.961538 (3696.702246 1.895723 -0.321682 0.510999) - 201170 0.909091 (1452.714811 -0.699833 -1.779736 0.510999) - 200550 0.958333 (1576.482793 -1.063023 -1.179984 0.510999) - 200096 0.500000 (844.776109 -0.974448 2.022101 139.570007) - 200100 0.681818 (792.781130 -0.665035 2.188390 139.570007) - - -Event index 6 ---> RefittedExtrapolatedMuonSpectrometerParticlesTruth - True ---> CombinedFitMuonParticlesTruth - True ---> MuGirlRefittedTrackParticlesTruth - True ---> StatCombinedMuonParticlesTruth - True ---> ExtrapolatedMuonSpectrometerParticlesTruth - True ---> GSFTrackParticleTruthCollection - True - 273 1.000000 (5898.501299 2.143978 -1.788221 139.570007) - 312 1.000000 (19135.992970 1.373523 0.836889 493.679993) - 53 1.000000 (128394.106006 0.357500 0.429368 0.510999) - 446 1.000000 (5204.173272 0.992711 -1.529634 139.570007) - 449 1.000000 (7191.701528 1.013814 -1.545232 139.570007) - 450 1.000000 (1994.220280 1.122170 -1.585029 139.570007) - 440 1.000000 (1979.811900 0.399548 2.867592 139.570007) - 448 1.000000 (6220.178578 0.932947 -1.615607 139.570007) - 423 0.979167 (1253.284484 0.744709 2.850745 139.570007) - 675 1.000000 (2489.173055 0.432431 2.982100 493.679993) - 302 1.000000 (1741.756360 0.114271 2.484198 139.570007) - 585 1.000000 (12069.752026 1.106535 -1.605062 139.570007) - 443 1.000000 (7596.892656 0.891903 2.838157 0.511000) - 653 1.000000 (4421.644104 0.796039 2.752787 139.570007) - 687 1.000000 (1952.478433 0.857512 2.837893 139.570007) - 200155 0.600000 (486.447283 1.318680 -1.250406 139.570007) - 200153 1.000000 (6788.898193 1.185753 -1.505273 139.570007) ---> TrackParticleTruthCollection - True - 491 1.000000 (2021.511424 2.246566 -1.585237 139.570007) - 273 1.000000 (5898.501299 2.143978 -1.788221 139.570007) - 312 1.000000 (19135.992970 1.373523 0.836889 493.679993) - 53 1.000000 (128394.106006 0.357500 0.429368 0.510999) - 298 1.000000 (992.089036 2.121398 -2.941208 139.570007) - 446 1.000000 (5204.173272 0.992711 -1.529634 139.570007) - 353 1.000000 (2142.234586 -0.930720 2.131052 938.270020) - 293 1.000000 (543.395962 2.322383 -0.085677 139.570007) - 414 1.000000 (1302.743038 -0.058151 1.032788 139.570007) - 360 0.991071 (1191.428652 1.599309 2.763417 139.570007) - 511 1.000000 (5231.928045 1.524655 2.379247 139.570007) - 439 1.000000 (3129.888548 0.341096 2.903398 938.270020) - 441 0.991304 (1906.052918 0.546672 2.519015 938.270020) - 449 1.000000 (7191.701528 1.013814 -1.545232 139.570007) - 450 1.000000 (1994.220280 1.122170 -1.585029 139.570007) - 373 1.000000 (585.708818 -2.537324 0.601698 139.570007) - 677 0.990991 (1392.942902 0.514388 2.900461 139.570007) - 409 1.000000 (892.200221 -1.378407 2.324036 139.570007) - 431 1.000000 (1857.168853 0.176504 2.291460 139.570007) - 419 0.982906 (723.659261 1.587866 2.330406 139.570007) - 503 1.000000 (1202.725753 -0.982383 1.929041 938.270020) - 440 1.000000 (1979.811900 0.399548 2.867592 139.570007) - 451 1.000000 (1127.563965 0.988431 -1.625106 139.570007) - 291 0.970588 (541.190412 -0.399481 2.115326 493.679993) - 448 1.000000 (6220.178578 0.932947 -1.615607 139.570007) - 496 1.000000 (401.690218 0.734156 0.534706 139.570007) - 418 1.000000 (411.088621 1.244285 1.109116 139.570007) - 304 1.000000 (850.132389 -0.078197 2.213114 139.570007) - 406 0.987805 (792.085526 -0.891020 1.726079 139.570007) - 423 0.979167 (1253.284484 0.744709 2.850745 139.570007) - 321 0.933333 (425.431356 -0.067165 -1.185014 139.570007) - 675 1.000000 (2489.173055 0.432431 2.982100 493.679993) - 313 1.000000 (3635.319219 1.378416 0.834367 493.679993) - 584 1.000000 (4865.956389 1.158731 -1.529025 139.570007) - 277 1.000000 (2160.218663 -0.183234 -2.634497 139.570007) - 302 1.000000 (1741.756360 0.114271 2.484198 139.570007) - 456 1.000000 (488.606092 -0.439570 0.691042 139.570007) - 561 0.988764 (522.707851 -0.187324 1.383760 139.570007) - 585 1.000000 (12069.752026 1.106535 -1.605062 139.570007) - 684 1.000000 (3781.833208 0.450040 2.906807 139.570007) - 637 1.000000 (774.944748 0.736644 2.778284 139.570007) - 287 1.000000 (1948.871295 -0.652150 1.473527 139.570007) - 200742 0.993506 (575.544519 -1.622093 0.720335 938.272034) - 652 1.000000 (1041.551198 0.563745 2.730557 139.570007) - 443 1.000000 (7596.892656 0.891903 2.838157 0.511000) - 653 1.000000 (4421.644104 0.796039 2.752787 139.570007) - 654 1.000000 (2031.386601 0.656355 2.942994 139.570007) - 651 1.000000 (3503.480977 0.889490 2.678737 493.679993) - 679 1.000000 (1243.509114 0.403385 3.137236 139.570007) - 200690 1.000000 (642.598529 -1.495910 -0.074224 938.272034) - 686 1.000000 (2762.958684 0.616043 2.827575 493.679993) - 274 1.000000 (1488.041358 2.267494 -1.435744 139.570007) - 687 1.000000 (1952.478433 0.857512 2.837893 139.570007) - 200632 1.000000 (629.075263 2.328526 -1.298467 139.570007) - 200155 0.600000 (486.447283 1.318680 -1.250406 139.570007) - 200153 1.000000 (6788.898193 1.185753 -1.505273 139.570007) - 200812 1.000000 (3364.073596 0.113689 2.615211 0.510999) - 200828 0.952381 (1770.579172 0.059830 2.321217 139.570007) - - -Event index 7 ---> RefittedExtrapolatedMuonSpectrometerParticlesTruth - True ---> CombinedFitMuonParticlesTruth - True ---> MuGirlRefittedTrackParticlesTruth - True ---> StatCombinedMuonParticlesTruth - True ---> ExtrapolatedMuonSpectrometerParticlesTruth - True ---> GSFTrackParticleTruthCollection - True - 328 1.000000 (3771.322292 -2.238536 -3.028503 139.570007) - 606 0.990654 (24908.583255 0.653796 0.359686 139.570007) - 605 0.989474 (17845.374489 0.645315 0.341186 493.679993) - 402 1.000000 (4167.604819 1.143002 1.719978 139.570007) - 200008 0.974026 (2495.908091 1.815847 -1.194785 0.510999) - 200965 0.914286 (2824.522738 0.556932 0.311110 0.510999) - 201168 1.000000 (3517.108336 1.180909 1.680088 0.510999) ---> TrackParticleTruthCollection - True - 328 1.000000 (3771.322292 -2.238536 -3.028503 139.570007) - 606 0.990654 (24908.583255 0.653796 0.359686 139.570007) - 857 1.000000 (4464.179125 2.144395 -1.192859 493.679993) - 850 1.000000 (3387.764579 1.969072 -1.387907 493.679993) - 679 1.000000 (5848.251602 1.224821 -1.115083 139.570007) - 821 1.000000 (4658.072256 1.358619 -2.768643 105.660004) - 350 1.000000 (5581.635127 1.109955 -1.155475 139.570007) - 503 1.000000 (2506.588355 2.045490 -1.302842 139.570007) - 387 1.000000 (1630.674027 1.668914 2.961654 493.679993) - 863 1.000000 (1714.820241 2.000929 -1.129279 139.570007) - 569 0.990991 (2759.966743 1.166933 1.557916 139.570007) - 605 0.989474 (17845.374489 0.645315 0.341186 493.679993) - 508 1.000000 (1509.338447 1.341668 -1.528936 139.570007) - 342 1.000000 (1381.835184 -0.529750 -0.692264 139.570007) - 398 0.990909 (2080.956969 1.348861 -1.032611 139.570007) - 418 0.991870 (873.055351 -1.362137 0.375292 938.270020) - 352 0.956044 (941.788032 1.020278 -0.704426 139.570007) - 566 1.000000 (592.205732 1.011885 1.278098 139.570007) - 537 1.000000 (761.177165 1.198822 0.139909 139.570007) - 365 1.000000 (1561.730431 1.035011 -0.341215 139.570007) - 320 1.000000 (1130.886263 -1.059173 -1.546332 938.270020) - 824 1.000000 (624.122416 0.774328 -2.384239 105.660004) - 785 1.000000 (1207.910808 1.313615 2.535619 139.570007) - 678 1.000000 (2036.974049 1.359891 -1.116021 139.570007) - 506 1.000000 (1867.235300 1.588541 -1.128940 139.570007) - 783 1.000000 (1357.665894 1.625881 2.533678 139.570007) - 540 1.000000 (1169.858808 1.120248 1.085657 139.570007) - 363 1.000000 (1506.240066 0.888163 2.300797 139.570007) - 681 0.990826 (1092.081172 1.272560 1.986744 139.570007) - 855 0.989362 (539.621850 1.849641 -0.960255 139.570007) - 440 1.000000 (542.582281 -0.546588 1.272996 139.570007) - 608 1.000000 (589.045616 -2.164427 -0.803704 139.570007) - 532 1.000000 (2065.651247 0.819374 0.140622 139.570007) - 417 1.000000 (818.556258 -0.742103 -2.853098 938.270020) - 570 0.916667 (3407.687239 1.108308 1.577208 139.570007) - 402 1.000000 (4167.604819 1.143002 1.719978 139.570007) - 397 1.000000 (6680.512702 1.518619 -1.222471 139.570007) - 539 1.000000 (685.284449 1.743817 -0.247382 139.570007) - 404 0.990826 (710.958054 1.427979 1.748376 139.570007) - 684 0.987654 (3424.449198 0.996621 1.695243 139.570007) - 389 1.000000 (617.509835 -2.618595 -2.179688 139.570007) - 200973 1.000000 (483.975375 0.719896 -1.702832 139.570007) - 782 0.700000 (4157.130173 1.603552 2.267575 493.679993) - 849 0.727273 (1180.018895 2.010076 -1.283770 139.570007) - 200775 1.000000 (637.927635 1.352685 0.137045 938.272034) - 200007 0.769231 (1516.870473 1.816114 -1.195026 0.510999) - 200008 0.974026 (2495.908091 1.815847 -1.194785 0.510999) - 201285 1.000000 (520.572156 1.757042 -1.494010 0.510999) - 201852 1.000000 (1552.829795 0.166083 2.947177 938.272034) - 200247 0.969697 (3719.356468 1.140622 1.627510 0.510999) - 200448 0.947368 (1669.738041 1.069569 1.406332 0.510999) - 200965 0.914286 (2824.522738 0.556932 0.311110 0.510999) - 201168 1.000000 (3517.108336 1.180909 1.680088 0.510999) - - -Event index 8 ---> RefittedExtrapolatedMuonSpectrometerParticlesTruth - True ---> CombinedFitMuonParticlesTruth - True ---> MuGirlRefittedTrackParticlesTruth - True ---> StatCombinedMuonParticlesTruth - True ---> ExtrapolatedMuonSpectrometerParticlesTruth - True ---> GSFTrackParticleTruthCollection - True - 49 1.000000 (18120.816169 -2.225958 2.533144 0.512119) - 606 0.990476 (28739.498386 -0.525380 1.159765 139.570007) - 611 1.000000 (7863.626978 -0.482170 1.126110 139.570007) - 610 0.989899 (13479.181005 -0.532816 1.078848 139.570007) - 395 1.000000 (4631.367999 -1.208692 1.859817 139.570007) ---> TrackParticleTruthCollection - True - 49 1.000000 (18120.816169 -2.225958 2.533144 0.512119) - 320 1.000000 (34590.217358 -1.143583 -1.116415 139.570007) - 606 0.990476 (28739.498386 -0.525380 1.159765 139.570007) - 611 1.000000 (7863.626978 -0.482170 1.126110 139.570007) - 242 1.000000 (1419.515365 0.259920 -1.933248 139.570007) - 610 0.989899 (13479.181005 -0.532816 1.078848 139.570007) - 395 1.000000 (4631.367999 -1.208692 1.859817 139.570007) - 499 0.990741 (3121.366574 -1.317909 1.863686 139.570007) - 298 1.000000 (771.035935 -1.637673 0.104621 139.570007) - 444 1.000000 (867.317440 -1.534294 1.599714 139.570007) - 538 1.000000 (404.491992 -1.953043 -1.669338 105.660004) - 332 1.000000 (482.826566 0.759202 -2.423413 139.570007) - 421 1.000000 (508.982647 -1.379807 0.898444 139.570007) - 331 0.990385 (727.921360 -0.103236 0.840975 493.679993) - 470 0.991935 (450.292044 -1.324844 2.676643 139.570007) - 200246 1.000000 (800.302361 0.321157 2.854866 0.510999) - 269 1.000000 (2104.226102 -0.195889 -0.651294 493.679993) - 585 1.000000 (977.037897 0.713937 1.079235 139.570007) - 381 1.000000 (696.006692 -0.943779 -2.762113 139.570007) - 319 1.000000 (901.526951 -1.169669 -1.123023 139.570007) - 309 1.000000 (743.913612 1.641211 -3.095440 938.270020) - 387 0.990099 (689.399046 -0.775012 1.518654 139.570007) - 575 1.000000 (622.975270 0.314404 1.343741 493.679993) - 373 1.000000 (3031.695982 -0.373219 -0.764796 139.570007) - 584 0.989247 (1670.567491 1.103239 1.370717 493.679993) - 516 1.000000 (629.971314 1.924392 -0.718789 139.570007) - 571 1.000000 (540.666247 1.709678 1.424184 139.570007) - 402 1.000000 (1775.267875 -2.586344 -2.418760 0.531357) - 424 1.000000 (2015.846227 -1.817277 0.202565 139.570007) - 531 1.000000 (5428.723477 -0.214137 -0.818532 105.660004) - 290 1.000000 (2476.582719 1.016968 -2.776007 139.570007) - 355 1.000000 (598.700192 -2.011765 -2.291544 139.570007) - 388 1.000000 (690.820690 -0.835574 1.504723 139.570007) - 376 1.000000 (531.222510 0.082567 -0.526435 938.270020) - 612 1.000000 (31707.802001 -0.461555 1.102096 493.679993) - 471 0.991453 (679.895275 -1.593867 1.922216 139.570007) - 445 1.000000 (1532.629248 -1.333165 2.195491 139.570007) - 543 1.000000 (1373.156174 -0.448725 -0.895538 139.570007) - 539 1.000000 (5710.454714 -1.520397 -2.069536 493.679993) - 614 0.981982 (2239.119954 -0.373489 1.029288 139.570007) - 200547 1.000000 (1775.985544 -1.228610 -1.115540 139.570007) - 547 1.000000 (1677.931546 -0.544455 -0.982143 0.511000) - 544 0.988506 (6769.881628 -0.372422 -0.791987 493.679993) - 345 1.000000 (567.101347 -1.546773 2.132085 139.570007) - 200134 1.000000 (868.873254 -0.615330 0.906053 0.510999) - 609 0.849315 (5254.197902 -0.463994 1.080878 139.570007) - 437 1.000000 (1141.811725 -0.519529 -2.220509 139.570007) - 200634 1.000000 (1319.642677 1.691996 0.325307 493.677002) - 200125 1.000000 (1643.921090 -1.261062 1.839269 0.510999) - 200414 0.809524 (779.921689 -1.170617 -1.336071 0.510999) - 200121 0.500000 (515.704708 -1.274437 1.943749 0.510999) - - -Event index 9 ---> RefittedExtrapolatedMuonSpectrometerParticlesTruth - True ---> CombinedFitMuonParticlesTruth - True ---> MuGirlRefittedTrackParticlesTruth - True ---> StatCombinedMuonParticlesTruth - True ---> ExtrapolatedMuonSpectrometerParticlesTruth - True ---> GSFTrackParticleTruthCollection - True - 62 1.000000 (52388.219970 0.178967 -0.775162 0.510974) - 396 1.000000 (17730.258436 0.006636 -1.105569 938.270020) - 958 0.981481 (10070.691472 1.541614 -1.791601 139.570007) - 432 1.000000 (3076.472327 1.480137 -1.696447 493.679993) - 613 0.954023 (2155.170643 -0.851038 1.946122 139.570007) - 714 1.000000 (2663.668195 0.869383 0.447675 139.570007) - 549 1.000000 (12743.914419 0.919633 0.574279 493.679993) - 1116 1.000000 (8927.539727 0.862688 2.233442 139.570007) - 201130 0.880597 (5706.149620 0.907543 0.515537 139.570007) - 200510 0.500000 (4445.691474 2.175904 1.210327 0.510999) - 200216 0.972222 (2906.520381 1.540997 -1.728208 0.510999) - 200217 0.882353 (1248.139539 1.541888 -1.727696 0.510999) ---> TrackParticleTruthCollection - True - 657 1.000000 (1352.403729 2.291931 1.077985 139.570007) - 617 1.000000 (7273.179579 -1.022477 2.159016 139.570007) - 62 1.000000 (52388.219970 0.178967 -0.775162 0.510974) - 875 1.000000 (2815.998866 1.991597 1.179160 139.570007) - 622 1.000000 (1628.254593 -1.015142 2.192654 139.570007) - 1062 0.969697 (1879.247184 0.181006 0.816040 493.679993) - 601 1.000000 (860.339780 -2.356569 2.468595 139.570007) - 1120 1.000000 (2242.818678 0.971210 2.141760 139.570007) - 643 0.991870 (827.880043 1.575684 -2.057481 139.570007) - 396 1.000000 (17730.258436 0.006636 -1.105569 938.270020) - 1087 0.990196 (4628.621694 1.485973 2.963135 139.570007) - 1001 1.000000 (1865.875220 0.445923 0.056483 105.660004) - 958 0.981481 (10070.691472 1.541614 -1.791601 139.570007) - 395 1.000000 (15733.444502 0.093020 -1.148732 938.270020) - 661 1.000000 (2929.195819 -0.666086 -1.818449 938.270020) - 707 0.978022 (697.960975 0.781445 1.285477 493.679993) - 432 1.000000 (3076.472327 1.480137 -1.696447 493.679993) - 603 0.990566 (1070.773322 -1.097384 -0.463725 139.570007) - 663 0.988636 (3898.685985 -0.790229 -1.605672 938.270020) - 805 1.000000 (497.605768 -2.376006 0.588703 938.270020) - 618 1.000000 (2756.813908 -1.021878 1.882089 139.570007) - 771 1.000000 (2349.507662 0.920737 0.352157 493.679993) - 553 1.000000 (486.006368 -1.115178 2.128017 139.570007) - 626 0.990196 (2546.527078 -0.016668 -2.719786 139.570007) - 493 1.000000 (1911.859147 1.237769 -1.676704 493.679993) - 1092 1.000000 (1573.620690 1.270674 2.599458 493.679993) - 613 0.954023 (2155.170643 -0.851038 1.946122 139.570007) - 642 0.989247 (1132.594530 0.971682 -1.639278 139.570007) - 200941 0.687500 (426.414856 1.265941 2.550209 105.658401) - 714 1.000000 (2663.668195 0.869383 0.447675 139.570007) - 731 1.000000 (504.170278 0.412531 -2.658367 139.570007) - 421 1.000000 (722.722451 0.780578 -2.656206 139.570007) - 465 0.990476 (539.265473 -0.523690 -2.580042 493.679993) - 664 1.000000 (1059.796847 -0.579927 -1.791849 139.570007) - 769 0.989691 (871.846072 1.001193 0.549105 139.570007) - 712 1.000000 (911.495709 1.072359 3.064922 139.570007) - 708 1.000000 (1059.355015 0.229783 1.116649 139.570007) - 524 1.000000 (552.296551 -0.342527 0.204216 139.570007) - 402 1.000000 (1383.182248 -0.851011 -1.312598 493.679993) - 448 1.000000 (1213.791887 -1.083150 -1.903883 493.679993) - 393 1.000000 (757.828500 0.773000 -1.332828 139.570007) - 511 0.928571 (467.764356 1.061464 -2.331121 493.679993) - 485 1.000000 (806.947035 0.001005 1.089675 139.570007) - 612 1.000000 (1322.232893 -1.065601 1.562279 139.570007) - 904 1.000000 (782.654397 1.089008 -1.153232 139.570007) - 474 1.000000 (1806.383600 -1.094184 2.004995 938.270020) - 455 1.000000 (534.754074 -2.119272 0.642504 139.570007) - 887 1.000000 (415.598190 0.072062 -0.288572 139.570007) - 549 1.000000 (12743.914419 0.919633 0.574279 493.679993) - 426 1.000000 (1483.103969 0.897625 1.763846 493.679993) - 597 1.000000 (643.581948 -0.433970 -1.379946 139.570007) - 1059 1.000000 (2039.285571 0.881496 1.799571 139.570007) - 764 1.000000 (1431.908201 1.342702 1.747162 938.270020) - 1116 1.000000 (8927.539727 0.862688 2.233442 139.570007) - 898 1.000000 (723.145177 -0.377424 2.915254 139.570007) - 506 0.989011 (535.350792 -0.535216 -2.533526 139.570007) - 1121 0.975309 (12585.072669 0.783223 2.273147 139.570007) - 633 0.987500 (2213.877156 0.936551 2.206313 139.570007) - 1060 0.987179 (553.642037 0.711245 1.865309 139.570007) - 662 0.861111 (714.723971 -0.543240 -2.200001 139.570007) - 653 1.000000 (527.501870 0.408004 2.416236 139.570007) - 1117 0.986486 (5402.113799 0.760826 2.246015 139.570007) - 861 1.000000 (8613.138578 1.434937 -1.768659 493.679993) - 200443 1.000000 (447.090713 2.172572 -1.454321 139.570007) - 509 1.000000 (497.310829 2.010158 -2.662163 139.570007) - 559 1.000000 (489.108139 -2.563744 -2.954972 938.270020) - 200574 1.000000 (1166.511802 -0.845062 1.814620 139.570007) - 924 1.000000 (800.010587 1.314928 3.050109 139.570007) - 201131 1.000000 (2199.539338 0.975240 0.602639 139.570007) - 201889 1.000000 (1166.294013 -0.697508 2.074586 139.570007) - 201130 0.880597 (5706.149620 0.907543 0.515537 139.570007) - 201603 1.000000 (784.603033 -0.793283 1.990446 0.510999) - 200575 1.000000 (2371.182140 -0.954551 2.026605 139.570007) - 470 1.000000 (1254.508508 -0.747182 1.859109 139.570007) - 200510 0.500000 (4445.691474 2.175904 1.210327 0.510999) - 466 1.000000 (1092.593239 -1.612102 -0.653834 139.570007) - 200571 1.000000 (1428.603184 -0.022898 -2.912432 0.510999) - 200216 0.972222 (2906.520381 1.540997 -1.728208 0.510999) - 200091 1.000000 (3128.895125 0.987286 2.064129 139.570007) - 0 0.750000 (no part) - 200001 0.947368 (4023.849137 0.834779 2.241342 0.510999) - 201274 0.966667 (2328.399378 -0.672994 2.553657 139.570007) - 201792 1.000000 (1786.961650 1.658200 2.781618 938.272034) - 200217 0.882353 (1248.139539 1.541888 -1.727696 0.510999) - 201180 0.928571 (1379.795267 0.875584 0.680452 938.272034) - - diff --git a/Reconstruction/eflowRec/eflowRec/eflowCaloObject.h b/Reconstruction/eflowRec/eflowRec/eflowCaloObject.h index 8abcf94d50b9615402cfd42854ccee4aac2dc0f1..f52a29322848efd0e342f28c520b58a6d07a466a 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowCaloObject.h +++ b/Reconstruction/eflowRec/eflowRec/eflowCaloObject.h @@ -17,6 +17,7 @@ PURPOSE: Calorimeter Object data class ********************************************************************/ #include <vector> +#include <memory> #include "AthLinks/ElementLink.h" #include "CaloEvent/CaloClusterContainer.h" #include "xAODCaloEvent/CaloClusterContainer.h" @@ -67,11 +68,12 @@ public: std::vector<eflowTrackClusterLink*> efRecLink() { return m_trackClusterLinks; } void clearLinks() { m_trackClusterLinks.clear(); } - /* Static container accessors */ + /* Sets up static container of CaloClusters. This function does not own the objects, + but eventually Storegate takes ownership via calls to getClusterContainerPtr etc in eflowObjectBuilder.cxx */ static void setClusterContainerPtr(xAOD::CaloClusterContainer* clusCont, xAOD::CaloClusterAuxContainer* auxCont) { - m_clusterContainerPtr = clusCont; - m_clusterAuxContainerPtr = auxCont; - m_clusterContainerPtr->setStore(m_clusterAuxContainerPtr); + m_clusterContainerPtr = clusCont; + m_clusterAuxContainerPtr = auxCont; + m_clusterContainerPtr->setStore(m_clusterAuxContainerPtr); } /* Calculate total tracks energy, total tracks energy variance, total cluster energy for subtraction */ @@ -101,6 +103,7 @@ private: /* Containers of CaloClusters */ static xAOD::CaloClusterContainer* m_clusterContainerPtr; static xAOD::CaloClusterAuxContainer* m_clusterAuxContainerPtr; + }; #include "AthContainers/DataVector.h" diff --git a/Reconstruction/eflowRec/eflowRec/eflowPreparation.h b/Reconstruction/eflowRec/eflowRec/eflowPreparation.h index 37a9760b1684cbe38e4a545385105a15908d434b..93cad4a094e9fecbf616fbbe7ba3806471c32c70 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowPreparation.h +++ b/Reconstruction/eflowRec/eflowRec/eflowPreparation.h @@ -28,6 +28,8 @@ CREATED: 10th November, 2001 #include "xAODTracking/TrackParticle.h" #include "AthContainers/ConstDataVector.h" +#include "StoreGate/DataHandle.h" + #include "AthenaBaseComps/AthAlgorithm.h" #include "InDetTrackSelectionTool/IInDetTrackSelectionTool.h" @@ -57,12 +59,12 @@ class eflowPreparation : public AthAlgorithm { StatusCode makeClusterContainer(); StatusCode makeTrackContainer(); - /* for EM mode, LC weight for cells are retrieved before doing any subtraction; they will be used after subtraction */ + /** for EM mode, LC weight for cells are retrieved before doing any subtraction; they will be used after subtraction */ void retrieveLCCalCellWeight(double energy, unsigned index, std::map<IdentifierHash, double>& cellWeights); bool selectTrack(const xAOD::TrackParticle* track); - /* Put electron container and list of lepton cells into Storegate */ + /** Put electron container and list of lepton cells into Storegate */ StatusCode recordLeptonContainers(); /** select electrons to use */ @@ -87,68 +89,61 @@ class eflowPreparation : public AthAlgorithm { private: - /* Name of the cluster container and track container to read in: */ - std::string m_clustersName; - std::string m_clustersCalName; - std::string m_tracksName; - /* Name of and pointer to the eflowCaloObjectContainer to write out: */ - std::string m_eflowCaloObjectsOutputName; - eflowCaloObjectContainer* m_caloObjectContainer; + /// ReadHandle for the CaloClusterContainer to be used as input */ + SG::ReadHandle<xAOD::CaloClusterContainer> m_caloClusterReadHandle; - /* Name of and pointer to the eflowRecTrackContainer to write out: */ - std::string m_eflowRecTracksOutputName; - eflowRecTrackContainer* m_recTrackContainer; + /// ReadHandle for the CaloClusterContainer, at LC scale, to be used as input*/ + SG::ReadHandle<xAOD::CaloClusterContainer> m_caloCalClusterReadHandle; - /* Name of and pointer to the eflowRecClusterContainer to write out: */ - std::string m_eflowRecClustersOutputName; - eflowRecClusterContainer* m_recClusterContainer; + /// ReadHandle for the TrackParticleContainer to be used as input */ + SG::ReadHandle<xAOD::TrackParticleContainer> m_trackReadHandle; - /* Handle to interface on TrackToCalo tool. */ - ToolHandle<eflowTrackExtrapolatorBaseAlgTool> m_theTrackExtrapolatorTool; + /// ReadHandle for the ElectronContainer to be used as input */ + SG::ReadHandle<xAOD::ElectronContainer> m_electronReadHandle; - ToolHandle<PFTrackClusterMatchingTool> m_matchingTool; + /// ReadHandle for the MuonContainer to be used as input */ + SG::ReadHandle<xAOD::MuonContainer> m_muonReadHandle; + + /// WriteHandle for the eflowCaloObjectContainer to write out: */ + SG::WriteHandle<eflowCaloObjectContainer> m_eflowCaloObjectContainerWriteHandle; + + /// WriteHandle for the eflowRecTrackContainer to write out: */ + SG::WriteHandle<eflowRecTrackContainer> m_eflowRecTrackContainerWriteHandle; - /* Which eflow mode is in use - Tau, MET or Full */ - std::string m_eflowMode; + /// WriteHandle for the eflowRecClusterContainer to write out: */ + SG::WriteHandle<eflowRecClusterContainer> m_eflowRecClusterContainerWriteHandle; - /** container of electrons that we will select */ - xAOD::ElectronContainer* m_selectedElectrons; + /// Handle to interface on TrackToCalo tool. */ + ToolHandle<eflowTrackExtrapolatorBaseAlgTool> m_theTrackExtrapolatorTool; - /** container of muons that we will select */ - xAOD::MuonContainer* m_selectedMuons; + ToolHandle<PFTrackClusterMatchingTool> m_matchingTool; - /** container to put the lepton cells into */ - ConstDataVector<CaloCellContainer>* m_leptonCellContainer; + /// Which eflow mode is in use - Tau, MET or Full */ + std::string m_eflowMode; - /** Name of egamma track map */ - std::string m_egammaTrackMapName; + /// WriteHandle for the ElectronContainer, that will be filled with electrons passing the electron ID in eflowPreparation::selectElectrons */ + SG::WriteHandle<xAOD::ElectronContainer> m_selectedElectronsWriteHandle; - /** Name of electron container */ - std::string m_electronsName; + /// container of muons that we will select */ + std::unique_ptr<xAOD::MuonContainer> m_selectedMuons; - /** Name of muon container */ - std::string m_muonsName; + /// WriteHandle for the CaloCellContainer, that will store calorimeter cells associated to leptons (electrons and muons) */ + SG::WriteHandle<ConstDataVector<CaloCellContainer> > m_leptonCaloCellContainerWriteHandle; - /** bool to toggle masking out of lepton tracks */ + /// bool to toggle masking out of lepton tracks */ bool m_useLeptons; - /** bool to toggle storage of lepton CaloCells */ + /// bool to toggle storage of lepton CaloCells */ bool m_storeLeptonCells; - /** bool to assign name to container of electrons selected by eflowRec, to be used to mask out electron tracks */ - std::string m_eflowElectronsName; - - /** bool to assign mame to container of lepton cells, to be used to remove lepton cells */ - std::string m_eflowLeptonCellsName; - - /** Count the number of track-cluster matches -- for the summary in finalize() */ + /// Count the number of track-cluster matches -- for the summary in finalize() */ unsigned int m_nMatches; - /** New track selection tool */ - ToolHandle<InDet::IInDetTrackSelectionTool> m_selTool; + /// New track selection tool */ + ToolHandle<InDet::IInDetTrackSelectionTool> m_selTool; - /** Upper limit on track Pt for input tracks */ + /// Upper limit on track Pt for input tracks */ float m_upperTrackPtCut; }; diff --git a/Reconstruction/eflowRec/src/eflowPreparation.cxx b/Reconstruction/eflowRec/src/eflowPreparation.cxx index 1232e7f8ce25dd7d039c3dea47920971ec460b62..919bf94b34870c7525a4dc3a7cc28241b551bfef 100644 --- a/Reconstruction/eflowRec/src/eflowPreparation.cxx +++ b/Reconstruction/eflowRec/src/eflowPreparation.cxx @@ -42,6 +42,8 @@ CREATED: 8th November, 2001 #include "xAODMuon/Muon.h" #include "xAODEgamma/ElectronxAODHelpers.h" +#include "CxxUtils/make_unique.h" + // INCLUDE GAUDI HEADER FILES: #include "GaudiKernel/SystemOfUnits.h" #include "GaudiKernel/Property.h" @@ -58,45 +60,41 @@ CREATED: 8th November, 2001 eflowPreparation::eflowPreparation(const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name, pSvcLocator), - m_tracksName("InDetTrackParticles"), - m_eflowCaloObjectsOutputName("eflowCaloObjects01"), - m_caloObjectContainer(0), - m_eflowRecTracksOutputName("eflowRecTracks01"), - m_eflowRecClustersOutputName("eflowRecClusters01"), + m_caloClusterReadHandle("CaloTopoCluster"), + m_caloCalClusterReadHandle("CaloCalTopoCluster"), + m_trackReadHandle("InDetTrackParticles"), + m_electronReadHandle("Electrons"), + m_muonReadHandle("Muons"), + m_eflowCaloObjectContainerWriteHandle("eflowCaloObjects01"), + m_eflowRecTrackContainerWriteHandle("eflowRecTracks01"), + m_eflowRecClusterContainerWriteHandle("eflowRecClusters01"), m_theTrackExtrapolatorTool("Trk::ParticleCaloExtensionTool",this), m_matchingTool("PFTrackClusterMatchingTool/CalObjBldMatchingTool", this), m_eflowMode("FullMode"), - m_selectedElectrons(nullptr), - m_selectedMuons(nullptr), - m_leptonCellContainer(nullptr), - m_egammaTrackMapName("GSFTrackAssociation"), - m_electronsName("Electrons"), - m_muonsName("Muons"), + m_selectedElectronsWriteHandle("eflowRec_selectedElectrons_EM"), + m_leptonCaloCellContainerWriteHandle("eflowRec_leptonCellContainer_EM"), m_useLeptons(true), m_storeLeptonCells(false), - m_eflowElectronsName("eflowRec_selectedElectrons_EM"), - m_eflowLeptonCellsName("eflowRec_leptonCellContainer_EM"), m_nMatches(0), m_upperTrackPtCut(100.0) { // The following properties can be specified at run-time // (declared in jobOptions file) - declareProperty("ClustersName", m_clustersName); - declareProperty("CalClustersName", m_clustersCalName); - declareProperty("TracksName", m_tracksName); - declareProperty("EflowCaloObjectsOutputName", m_eflowCaloObjectsOutputName); - declareProperty("EflowRecTracksOutputName", m_eflowRecTracksOutputName); - declareProperty("EflowRecClustersOutputName", m_eflowRecClustersOutputName); + declareProperty("ClustersName",m_caloClusterReadHandle ); + declareProperty("CalClustersName",m_caloCalClusterReadHandle ); + declareProperty("TracksName", m_trackReadHandle); + declareProperty("EflowCaloObjectsOutputName", m_eflowCaloObjectContainerWriteHandle ); + declareProperty("EflowRecTracksOutputName", m_eflowRecTrackContainerWriteHandle); + declareProperty("EflowRecClustersOutputName", m_eflowRecClusterContainerWriteHandle); declareProperty("PFTrackClusterMatchingTool", m_matchingTool, "The track-cluster matching tool"); declareProperty("TrackExtrapolatorTool", m_theTrackExtrapolatorTool, "AlgTool to use for track extrapolation"); declareProperty("EFlowMode", m_eflowMode); - declareProperty("egammaTrackMapName", m_egammaTrackMapName); - declareProperty("electronsName", m_electronsName); - declareProperty("muonsName", m_muonsName); + declareProperty("electronsName", m_electronReadHandle); + declareProperty("muonsName", m_muonReadHandle); declareProperty("useLeptons", m_useLeptons); declareProperty("storeLeptonCells", m_storeLeptonCells); - declareProperty("eflowElectronsName", m_eflowElectronsName); - declareProperty("eflowLeptonCellsName", m_eflowLeptonCellsName); + declareProperty("eflowElectronsName", m_selectedElectronsWriteHandle); + declareProperty("eflowLeptonCellsName", m_leptonCaloCellContainerWriteHandle); declareProperty("TrackSelectionTool", m_selTool); declareProperty("UpperTrackPtCut",m_upperTrackPtCut); } @@ -127,8 +125,8 @@ StatusCode eflowPreparation::initialize() { return StatusCode::SUCCESS; } - if (m_useLeptons) m_selectedMuons = new xAOD::MuonContainer(SG::VIEW_ELEMENTS); - + if (m_useLeptons) m_selectedMuons = CxxUtils::make_unique<xAOD::MuonContainer>(SG::VIEW_ELEMENTS); + ATH_CHECK(m_selTool.retrieve()); return sc; @@ -138,8 +136,6 @@ StatusCode eflowPreparation::finalize() { msg(MSG::INFO) << "Produced " << m_nMatches << " track-cluster matches." << endmsg; - if (m_useLeptons && m_selectedMuons) delete m_selectedMuons; - return StatusCode::SUCCESS; } @@ -147,12 +143,14 @@ StatusCode eflowPreparation::finalize() { StatusCode eflowPreparation::execute() { if (m_useLeptons) this->clearContainers(); - + StatusCode sc; /* Create the eflowCaloObjectContainer and register it */ - m_caloObjectContainer = new eflowCaloObjectContainer(); - sc = evtStore()->record(m_caloObjectContainer, m_eflowCaloObjectsOutputName,false); + + + sc = m_eflowCaloObjectContainerWriteHandle.record(CxxUtils::make_unique<eflowCaloObjectContainer>()); + if (sc.isFailure()) { if (msgLvl(MSG::WARNING)) { msg(MSG::WARNING) << "Could not record eflowCaloObjectContainer in TDS" << endmsg; @@ -161,8 +159,8 @@ StatusCode eflowPreparation::execute() { } /* Create the eflowRecTrackContainer and register it */ - m_recTrackContainer = new eflowRecTrackContainer(); - sc = evtStore()->record(m_recTrackContainer, m_eflowRecTracksOutputName,false); + sc = m_eflowRecTrackContainerWriteHandle.record(CxxUtils::make_unique<eflowRecTrackContainer>()); + if (sc.isFailure()) { if (msgLvl(MSG::WARNING)) { msg(MSG::WARNING) << "Could not record eflowRecTrackContainer in TDS" << endmsg; @@ -171,8 +169,9 @@ StatusCode eflowPreparation::execute() { } /* Create the eflowRecClusterContainer and register it */ - m_recClusterContainer = new eflowRecClusterContainer(); - sc = evtStore()->record(m_recClusterContainer, m_eflowRecClustersOutputName,false); + + sc = m_eflowRecClusterContainerWriteHandle.record(CxxUtils::make_unique<eflowRecClusterContainer>()); + if (sc.isFailure()) { if (msgLvl(MSG::WARNING)) { msg(MSG::WARNING) << "Could not record eflowRecClusterContainer in TDS" << endmsg; @@ -205,13 +204,13 @@ StatusCode eflowPreparation::execute() { /* Create eflowCaloObject static calo cluster container */ eflowCaloObject::setClusterContainerPtr(new xAOD::CaloClusterContainer(), new xAOD::CaloClusterAuxContainer()); - - /* Collect all calo clusters from all cluster containers to m_recClusterContainer */ + + /* Collect all calo clusters from all cluster containers to m_eflowRecClusterContainerWriteHandle */ if (makeClusterContainer().isFailure()) { return StatusCode::SUCCESS; } - /* Apply the track selection, extrapolate, and collect selected tracks to m_recTrackContainer */ + /* Apply the track selection, extrapolate, and collect selected tracks to m_eflowRecTrackContainerWriteHandle */ if (makeTrackContainer().isFailure()) { return StatusCode::SUCCESS; } @@ -221,21 +220,16 @@ StatusCode eflowPreparation::execute() { ///////////////////////////////////////////////////////////////// void eflowPreparation::retrieveLCCalCellWeight(double energy, unsigned index, std::map<IdentifierHash,double>& cellsWeight) { - /* Retrieve the CaloCal cluster container */ - const xAOD::CaloClusterContainer* CaloCalClusterContainer; - if (evtStore()->retrieve(CaloCalClusterContainer, m_clustersCalName).isFailure() || !CaloCalClusterContainer) { - msg(MSG::WARNING) << " In retrieveLCCalCellWeight Can not retrieve cal cluster Container: " << m_clustersCalName << endmsg; - return ; - } - + /* match CaloCluster with CaloCalCluster to obtain cell weight */ /* first try the position at 'index'. If we are lucky, the loop can be avoided. */ - const xAOD::CaloCluster* matchedCalCluster = CaloCalClusterContainer->at(index); + /* Note the read handle has been tested to be valid prior to the call of this function */ + const xAOD::CaloCluster* matchedCalCluster = m_caloCalClusterReadHandle->at(index); if (!(fabs(energy - matchedCalCluster->rawE()) < 0.001)) { matchedCalCluster = 0; - for (unsigned iCalCalCluster = 0; iCalCalCluster < CaloCalClusterContainer->size(); + for (unsigned iCalCalCluster = 0; iCalCalCluster < m_caloCalClusterReadHandle->size(); ++iCalCalCluster) { - matchedCalCluster = CaloCalClusterContainer->at(iCalCalCluster); + matchedCalCluster = m_caloCalClusterReadHandle->at(iCalCalCluster); if (fabs(energy - matchedCalCluster->rawE()) < 0.001) { break; } @@ -260,41 +254,39 @@ void eflowPreparation::retrieveLCCalCellWeight(double energy, unsigned index, st StatusCode eflowPreparation::makeClusterContainer() { - /* Retrieve the cluster container */ - const xAOD::CaloClusterContainer* thisCaloClusterContainer; - StatusCode code = evtStore()->retrieve(thisCaloClusterContainer, m_clustersName); - if (evtStore()->retrieve(thisCaloClusterContainer, m_clustersName).isFailure() || !thisCaloClusterContainer) { - msg(MSG::WARNING) << " Can not retrieve cluster Container: " << m_clustersName << endmsg; + /* Verify the read handle has a valid pointer, and if not return */ + if (!m_caloClusterReadHandle.isValid()){ + msg(MSG::WARNING) << " Can not retrieve xAOD::CaloClusterContainer with name: " << m_caloClusterReadHandle.key() << endmsg; return StatusCode::SUCCESS; } - + /* Fill the vector of eflowRecClusters */ - unsigned int nClusters = thisCaloClusterContainer->size(); + unsigned int nClusters = m_caloClusterReadHandle->size(); for (unsigned int iCluster = 0; iCluster < nClusters; ++iCluster) { /* Create the eflowRecCluster and put it in the container */ - eflowRecCluster* thisEFRecCluster = new eflowRecCluster(ElementLink<xAOD::CaloClusterContainer>(*thisCaloClusterContainer, iCluster)); - - if (m_clustersCalName != "") { + std::unique_ptr<eflowRecCluster> thisEFRecCluster = CxxUtils::make_unique<eflowRecCluster>(ElementLink<xAOD::CaloClusterContainer>(*m_caloClusterReadHandle, iCluster)); + + if (m_caloCalClusterReadHandle.isValid()){ std::map<IdentifierHash,double> cellsWeightMap; - retrieveLCCalCellWeight(thisCaloClusterContainer->at(iCluster)->e(), iCluster, cellsWeightMap); + retrieveLCCalCellWeight(m_caloClusterReadHandle->at(iCluster)->e(), iCluster, cellsWeightMap); - if (false) { + if (msgLvl(MSG::DEBUG)) { //zhangr std::map<IdentifierHash, double>::iterator it = cellsWeightMap.begin(); for (; it != cellsWeightMap.end(); ++it) { - std::cout << "zhangrui eflowPreparation " << iCluster << "/" << nClusters << ": e=" - << thisCaloClusterContainer->at(iCluster)->e() << " (" << it->first << " " - << it->second << ")" << std::endl; + msg(MSG::DEBUG) << "zhangrui eflowPreparation " << iCluster << "/" << nClusters << ": e=" + << m_caloClusterReadHandle->at(iCluster)->e() << " (" << it->first << " " + << it->second << ")" << endmsg; } } thisEFRecCluster->setCellsWeight(cellsWeightMap); } thisEFRecCluster->setClusterId(iCluster); - m_recClusterContainer->push_back(thisEFRecCluster); + m_eflowRecClusterContainerWriteHandle->push_back(std::move(thisEFRecCluster)); if (msgLvl(MSG::DEBUG)) { - const xAOD::CaloCluster* thisCluster = thisCaloClusterContainer->at(iCluster); + const xAOD::CaloCluster* thisCluster = m_caloClusterReadHandle->at(iCluster); msg(MSG::DEBUG) << "eflowPreparation clus = " << thisCluster->eta() << " " << thisCluster->phi() << " " << thisCluster->e()/cosh(thisCluster->eta()) << " " << endmsg; } @@ -304,19 +296,18 @@ StatusCode eflowPreparation::makeClusterContainer() { } StatusCode eflowPreparation::makeTrackContainer() { - /* Retrieve xAOD::TrackParticle Container, return 'failure' if not existing */ - const xAOD::TrackParticleContainer* trackContainer; - StatusCode sc = evtStore()->retrieve(trackContainer, m_tracksName); - if (sc.isFailure() || !trackContainer) { - if (msgLvl(MSG::WARNING)) { msg(MSG::WARNING) << " No track container found in TDS" << endmsg; } + + /* Verify the read handle has a valid pointer, and if not return */ + if (!m_trackReadHandle.isValid()){ + if (msgLvl(MSG::WARNING)) { msg(MSG::WARNING) << "Can not retrieve xAOD::TrackParticleContainer with name: " << m_trackReadHandle.key() << endmsg; } return StatusCode::FAILURE; } /* Do the track selection for tracks to be used in all of the following steps: */ /* TODO (tuning): Check if resize(0) might be faster than clear() */ - xAOD::TrackParticleContainer::const_iterator itTrackParticle = trackContainer->begin(); + xAOD::TrackParticleContainer::const_iterator itTrackParticle = m_trackReadHandle->begin(); int trackIndex = 0; - for (; itTrackParticle != trackContainer->end(); ++itTrackParticle, ++trackIndex) { + for (; itTrackParticle != m_trackReadHandle->end(); ++itTrackParticle, ++trackIndex) { const xAOD::TrackParticle* track = (*itTrackParticle); if (!track) continue; // TODO: Print a WARNING here! @@ -330,13 +321,13 @@ StatusCode eflowPreparation::makeTrackContainer() { if (!rejectTrack) { /* Create the eflowRecCluster and put it in the container */ - eflowRecTrack* thisEFRecTrack = new eflowRecTrack(ElementLink<xAOD::TrackParticleContainer>(*trackContainer, trackIndex), m_theTrackExtrapolatorTool); + std::unique_ptr<eflowRecTrack> thisEFRecTrack = CxxUtils::make_unique<eflowRecTrack>(ElementLink<xAOD::TrackParticleContainer>(*m_trackReadHandle, trackIndex), m_theTrackExtrapolatorTool); thisEFRecTrack->setTrackId(trackIndex); - m_recTrackContainer->push_back(thisEFRecTrack); + m_eflowRecTrackContainerWriteHandle->push_back(std::move(thisEFRecTrack)); } } - std::sort(m_recTrackContainer->begin(), m_recTrackContainer->end(), eflowRecTrack::SortDescendingPt()); + std::sort(m_eflowRecTrackContainerWriteHandle->begin(), m_eflowRecTrackContainerWriteHandle->end(), eflowRecTrack::SortDescendingPt()); return StatusCode::SUCCESS; } @@ -349,9 +340,8 @@ bool eflowPreparation::selectTrack(const xAOD::TrackParticle* track) { StatusCode eflowPreparation::recordLeptonContainers(){ - m_selectedElectrons = new xAOD::ElectronContainer(SG::VIEW_ELEMENTS); - - StatusCode sc = evtStore()->record(m_selectedElectrons,m_eflowElectronsName,false); + StatusCode sc = m_selectedElectronsWriteHandle.record(CxxUtils::make_unique<xAOD::ElectronContainer>(SG::VIEW_ELEMENTS)); + if (sc.isFailure()) { if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not record egammaContainer in TDS" @@ -360,10 +350,9 @@ StatusCode eflowPreparation::recordLeptonContainers(){ } if (true == m_storeLeptonCells) { - m_leptonCellContainer = new ConstDataVector<CaloCellContainer>(SG::VIEW_ELEMENTS); //record the cell container - sc = evtStore()->record(m_leptonCellContainer, m_eflowLeptonCellsName, false); + sc = m_leptonCaloCellContainerWriteHandle.record(CxxUtils::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS)); if (sc.isFailure()) { if (msgLvl(MSG::WARNING)) @@ -378,10 +367,10 @@ StatusCode eflowPreparation::recordLeptonContainers(){ StatusCode eflowPreparation::selectMuons() { - const xAOD::MuonContainer* muonContainer(NULL); - StatusCode sc = evtStore()->retrieve(muonContainer, m_muonsName); - if (sc.isFailure() || !muonContainer) { - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << " No xAOD Muon container found in TDS with the name " << m_muonsName << endmsg; + const xAOD::MuonContainer* muonContainer = m_muonReadHandle.cptr(); + + if (!muonContainer) { + if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << " No xAOD Muon container found in TDS with the name " << m_muonReadHandle.key() << endmsg; return StatusCode::FAILURE; } @@ -397,7 +386,7 @@ StatusCode eflowPreparation::selectMuons() { xAOD::Muon::Quality muonQuality = theMuon->quality(); if( muonQuality <= xAOD::Muon::Medium) { - if (m_selectedMuons) { + if (nullptr != m_selectedMuons.get()){ m_selectedMuons->push_back(const_cast<xAOD::Muon*>(theMuon)); } else if (msgLvl(MSG::WARNING)) { msg(MSG::WARNING) << " Invalid pointer to m_selectedMuons in selectMuons " << std::endl; @@ -463,9 +452,9 @@ void eflowPreparation::storeMuonCells(const xAOD::Muon* muon){ StatusCode eflowPreparation::selectElectrons(){ - const xAOD::ElectronContainer* egammaContainer(0); - StatusCode sc = evtStore()->retrieve(egammaContainer, m_electronsName); - if (sc.isFailure() || !egammaContainer){ + + const xAOD::ElectronContainer* egammaContainer = m_electronReadHandle.cptr(); + if (!egammaContainer){ if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << " No Electron container found in TDS" << endmsg; return StatusCode::FAILURE; } @@ -485,8 +474,8 @@ StatusCode eflowPreparation::selectElectrons(){ continue; } if (true == val_med){ - if (m_selectedElectrons) m_selectedElectrons->push_back(const_cast<xAOD::Electron*>(theElectron)); - else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << " Invalid pointer to m_selectedElectrons in selectElectrons " << std::endl; + if (m_selectedElectronsWriteHandle.isValid()) m_selectedElectronsWriteHandle->push_back(const_cast<xAOD::Electron*>(theElectron)); + else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Do not have valid WriteHandle for ElectronContainer with name: " << m_selectedElectronsWriteHandle.key() << endmsg; if (true == m_storeLeptonCells) this->storeElectronCells(theElectron); }//mediumPP }//10GeV pt cut @@ -501,10 +490,10 @@ StatusCode eflowPreparation::selectElectrons(){ bool eflowPreparation::isElectron(const xAOD::TrackParticle* track){ - if (m_selectedElectrons){ + if (m_selectedElectronsWriteHandle.isValid()){ - xAOD::ElectronContainer::iterator firstElectron = m_selectedElectrons->begin(); - xAOD::ElectronContainer::iterator lastElectron = m_selectedElectrons->end(); + xAOD::ElectronContainer::iterator firstElectron = m_selectedElectronsWriteHandle->begin(); + xAOD::ElectronContainer::iterator lastElectron = m_selectedElectronsWriteHandle->end(); for (; firstElectron != lastElectron; ++firstElectron){ const xAOD::Electron* this_egamma = *firstElectron; @@ -553,7 +542,7 @@ void eflowPreparation::storeLeptonCells(const xAOD::CaloCluster* theCluster){ CaloClusterCellLink::const_iterator lastCell = theCellLink->end(); for (; firstCell != lastCell; ++firstCell){ - if (m_leptonCellContainer) m_leptonCellContainer->push_back(*firstCell); + if (m_leptonCaloCellContainerWriteHandle.isValid()) m_leptonCaloCellContainerWriteHandle->push_back(*firstCell); else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << " Invalid pointer to m_leptonCellContainer in storeLeptonCells" << endmsg; }//cell loop } diff --git a/Reconstruction/egamma/egammaAthenaPool/CMakeLists.txt b/Reconstruction/egamma/egammaAthenaPool/CMakeLists.txt index d7d8a2c5661f6ba864671cf7c5c4a28ced73277f..518a3ca4013316558bf497f6a7e63d93a5264f05 100644 --- a/Reconstruction/egamma/egammaAthenaPool/CMakeLists.txt +++ b/Reconstruction/egamma/egammaAthenaPool/CMakeLists.txt @@ -35,10 +35,16 @@ endif() find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) - run_tpcnv_test( egammaEventTPCnv_15.1.0 AOD-15.1.0-full ) - run_tpcnv_test( egammaEventTPCnv_15.6.9 AOD-15.6.9-full ) - run_tpcnv_test( egammaEventTPCnv_16.6.7.1 AOD-16.6.7.1-full ) - run_tpcnv_test( egammaEventTPCnv_18.0.0 AOD-18.0.0-full ) + set( EGAMMAATHENAPOOL_REFERENCE_TAG + egammaAthenaPoolReference-01-00-00 ) + run_tpcnv_test( egammaEventTPCnv_15.1.0 AOD-15.1.0-full + REFERENCE_TAG ${EGAMMAATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( egammaEventTPCnv_15.6.9 AOD-15.6.9-full + REFERENCE_TAG ${EGAMMAATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( egammaEventTPCnv_16.6.7.1 AOD-16.6.7.1-full + REFERENCE_TAG ${EGAMMAATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( egammaEventTPCnv_18.0.0 AOD-18.0.0-full + REFERENCE_TAG ${EGAMMAATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) endif() diff --git a/Reconstruction/egamma/egammaAthenaPool/share/egammaEventTPCnv_15.1.0.ref b/Reconstruction/egamma/egammaAthenaPool/share/egammaEventTPCnv_15.1.0.ref deleted file mode 100644 index 06d04bf298c0f1cc412f16ff973bfc309949c48e..0000000000000000000000000000000000000000 --- a/Reconstruction/egamma/egammaAthenaPool/share/egammaEventTPCnv_15.1.0.ref +++ /dev/null @@ -1,755 +0,0 @@ -Mon Apr 18 21:25:03 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "egammaAthenaPool/egammaEventTPCnv_15.1.0_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 2.74 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 21:25:51 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p1 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 4BF99853-1547-FAF5-35A1-827B2CE9B75C -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root File version:52200 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 4BF99853-1547-FAF5-35A1-827B2CE9B75C -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 54C1827D-740E-DE11-83C7-000423D9A21A -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root File version:52200 -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Found 8 metadata containers in input file, 0 will be used -IOVDbSvc INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found. -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.1.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.1.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.1.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.1.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.1.0-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.1.0-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-00 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-02-01-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-00, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2676 64.1319 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7032 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.506 136.131 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 14484Kb Time = 0.4S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-DC3-07 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-DC3-07, Name: DC3, Layout: Final, Code Version: 3.06.00, Description: DC3 Geometry -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 13312Kb Time = 0.24S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-R13-02 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x2a98220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-R13-02, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 22200Kb Time = 0.29S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.05S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-02-01-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-02-01-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-02-01-00> default MuonVersion is <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.01.Initial> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.01.Initial> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-02-01-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ASZT table in Oracle -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 21 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 4 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 215 -MuGM:ProcPosition INFO *** N. of stations described in mysql 220 -MuGM:ProcPosition INFO *** N. of types 28 size of jtypvec 28 -MuGM:ProcPosition INFO *** : 220 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1678 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-02-01-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.01.Initial -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1678 child volumes -MuGM:MuonFactory INFO *** 1670 independent elements and -MuGM:MuonFactory INFO *** 11928 elements cloned or shared -MuGM:MuonFactory INFO *** 215 kinds of stations -MuGM:MuonFactory INFO *** 1678 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1678 MuonStations -MuGM:MuonFactory INFO *** 2168 MDT Readout Elements 1108 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1678 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1678/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 19424Kb Time = 1.52S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 0Kb Time = 0.01S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16138 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 54C1827D-740E-DE11-83C7-000423D9A21A -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 54C1827D-740E-DE11-83C7-000423D9A21A -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root File version:52200 -PoolSvc INFO Failed to find container POOLContainer(DataHeader) to create POOL collection. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 5200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-SIM-00-00-00 set from input file -IOVDbSvc INFO TagInfo override for tag TrtStrawStatus-02 in folder /TRT/Cond/Status -IOVDbSvc INFO TagInfo override for tag TrtStrawStatusPermanent-01 in folder /TRT/Cond/StatusPermanent -ClassIDSvc INFO getRegistryEntries: read 739 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.1.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.1.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetAlign_CSC_02 for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.1.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.1.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTAlign_CSC_01 for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -AthenaEventLoopMgr INFO ===>>> start processing event #30002, run #5200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 167 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 43 CLIDRegistry entries for module ALL -VxContainerCnv INFO VxContainerCnv::initialize() - INFO MVFVxContainerCnv::initialize() -VxContainerCnv INFO VxContainerCnv: MVFVxCandidate converter=0x3b565b80 -ClassIDSvc INFO getRegistryEntries: read 1734 CLIDRegistry entries for module ALL -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 554 CLIDRegistry entries for module ALL -AthenaEventLoopMgr INFO ===>>> done processing event #30002, run #5200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #30004, run #5200 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30004, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30009, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30009, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30010, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30010, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30012, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30012, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30013, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30013, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30014, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30014, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30018, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30018, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30020, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30020, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30022, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30022, run #5200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.1.0/AOD-15.1.0-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 54C1827D-740E-DE11-83C7-000423D9A21A -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.48 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.31 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.31 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.46 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.35 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6370 (( 0.14 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.36 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.23 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Total payload read from COOL: 30482 bytes in (( 2.63 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 1.09 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 1.54 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 0 [us] #= 1 -ChronoStatSvc INFO Time User : Tot= 23.9 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Reconstruction/egamma/egammaAthenaPool/share/egammaEventTPCnv_15.6.9.ref b/Reconstruction/egamma/egammaAthenaPool/share/egammaEventTPCnv_15.6.9.ref deleted file mode 100644 index c8c13c6a583736e526212945b99e86228c315e5a..0000000000000000000000000000000000000000 --- a/Reconstruction/egamma/egammaAthenaPool/share/egammaEventTPCnv_15.6.9.ref +++ /dev/null @@ -1,756 +0,0 @@ -Mon Apr 18 21:27:39 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "egammaAthenaPool/egammaEventTPCnv_15.6.9_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 5.00 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 21:28:29 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p1 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] C51C9730-274C-3D31-04F9-CBCF18742833 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root File version:52200 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] C51C9730-274C-3D31-04F9-CBCF18742833 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 78299BCB-231B-DF11-9A5B-003048673400 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root File version:52200 -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Folder /TagInfo will be taken from file metadata -IOVDbSvc INFO Found 15 metadata containers in input file, 1 will be used -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -IOVDbSvc INFO Added taginfo remove for /TagInfo -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-00 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-02-01-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-00, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2676 64.1319 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7032 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.506 136.131 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 14484Kb Time = 0.39S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-DC3-07 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-DC3-07, Name: DC3, Layout: Final, Code Version: 3.06.00, Description: DC3 Geometry -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 13312Kb Time = 0.24S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-R13-02 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x13ea220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-R13-02, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 22200Kb Time = 0.27S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.05S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-02-01-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-02-01-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-02-01-00> default MuonVersion is <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.01.Initial> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.01.Initial> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-02-01-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ASZT table in Oracle -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 21 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 4 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 215 -MuGM:ProcPosition INFO *** N. of stations described in mysql 220 -MuGM:ProcPosition INFO *** N. of types 28 size of jtypvec 28 -MuGM:ProcPosition INFO *** : 220 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1678 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-02-01-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.01.Initial -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1678 child volumes -MuGM:MuonFactory INFO *** 1670 independent elements and -MuGM:MuonFactory INFO *** 11928 elements cloned or shared -MuGM:MuonFactory INFO *** 215 kinds of stations -MuGM:MuonFactory INFO *** 1678 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1678 MuonStations -MuGM:MuonFactory INFO *** 2168 MDT Readout Elements 1108 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1678 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1678/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 19424Kb Time = 1.33S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 0Kb Time = 0.01S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16175 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 78299BCB-231B-DF11-9A5B-003048673400 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 78299BCB-231B-DF11-9A5B-003048673400 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root File version:52200 -PoolSvc INFO Failed to find container POOLContainer(DataHeader) to create POOL collection. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -ClassIDSvc INFO getRegistryEntries: read 703 CLIDRegistry entries for module ALL -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 5200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-SIM-00-00-00 set from input file -IOVDbSvc INFO TagInfo override for tag TrtStrawStatus-02 in folder /TRT/Cond/Status -IOVDbSvc INFO TagInfo override for tag TrtStrawStatusPerm-02_test in folder /TRT/Cond/StatusPermanent -ClassIDSvc INFO getRegistryEntries: read 36 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetAlign_CSC_02 for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTAlign_CSC_01 for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -AthenaEventLoopMgr INFO ===>>> start processing event #30002, run #5200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 167 CLIDRegistry entries for module ALL -VxContainerCnv INFO VxContainerCnv::initialize() - INFO MVFVxContainerCnv::initialize() -VxContainerCnv INFO VxContainerCnv: MVFVxCandidate converter=0x3a18fb80 -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 2331 CLIDRegistry entries for module ALL -AthenaEventLoopMgr INFO ===>>> done processing event #30002, run #5200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #30004, run #5200 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30004, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30009, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30009, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30010, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30010, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30012, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30012, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30013, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30013, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30014, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30014, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30018, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30018, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30020, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30020, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30022, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30022, run #5200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 78299BCB-231B-DF11-9A5B-003048673400 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.46 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.31 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.35 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.50 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.36 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6370 (( 0.14 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.36 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.14 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Folder /TagInfo (AttrListColl) db-read 0/2 objs/chan/bytes 2/0/0 (( 0.00 ))s -IOVDbSvc INFO Total payload read from COOL: 30482 bytes in (( 2.63 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 1.12 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 1.51 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 0 [us] #= 1 -ChronoStatSvc INFO Time User : Tot= 23.4 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Reconstruction/egamma/egammaAthenaPool/share/egammaEventTPCnv_16.6.7.1.ref b/Reconstruction/egamma/egammaAthenaPool/share/egammaEventTPCnv_16.6.7.1.ref deleted file mode 100644 index ff5edd7bcd78bb219a2e65ca0caa7ba551c7d6a9..0000000000000000000000000000000000000000 --- a/Reconstruction/egamma/egammaAthenaPool/share/egammaEventTPCnv_16.6.7.1.ref +++ /dev/null @@ -1,756 +0,0 @@ -Mon Apr 18 21:25:03 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "egammaAthenaPool/egammaEventTPCnv_16.6.7.1_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 2.94 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 21:25:50 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p2 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p2 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] E452CCAA-ABF0-707C-4887-8DBEA71B04DB -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root File version:52600 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] E452CCAA-ABF0-707C-4887-8DBEA71B04DB -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 48D7B5A4-1E0D-E011-B6D0-003048F0E778 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root File version:52600 -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Folder /TagInfo will be taken from file metadata -IOVDbSvc INFO Found 15 metadata containers in input file, 1 will be used -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_16.6.7.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_16.6.7.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_16.6.7.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_16.6.7.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -IOVDbSvc INFO Added taginfo remove for /TagInfo -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_16.6.7.1-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_16.6.7.1-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-02 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-10-00-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-02, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2723 64.1329 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7078 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.51 136.132 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 14484Kb Time = 0.37S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-GEO-00 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-GEO-00, Name: GEO, Layout: Final, Code Version: 3.06.00, Description: Atlas Geometry 2008 -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 14336Kb Time = 0.25S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-GEO-00 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x246c220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-GEO-00, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 22200Kb Time = 0.3S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.05S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-10-00-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-10-00-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-10-00-00> default MuonVersion is <MuonSpectrometer-R.03.11> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.11> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.11 from DB MuonVersion <MuonSpectrometer-R.03.11> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.11> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.11 from DB MuonVersion <MuonSpectrometer-R.03.11> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-10-00-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO ASZT table found in Oracle -MuGM:RDBReadAtlas INFO ASZT size is 32 -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 22 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 3 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 226 -MuGM:ProcPosition INFO *** N. of stations described in mysql 226 -MuGM:ProcPosition INFO *** N. of types 30 size of jtypvec 30 -MuGM:ProcPosition INFO *** : 226 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1740 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-10-00-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.11 -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1740 child volumes -MuGM:MuonFactory INFO *** 1729 independent elements and -MuGM:MuonFactory INFO *** 11439 elements cloned or shared -MuGM:MuonFactory INFO *** 226 kinds of stations -MuGM:MuonFactory INFO *** 1740 stations with alignable transforms -MuGM:MuonFactory INFO *** 136 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1740 MuonStations -MuGM:MuonFactory INFO *** 2292 MDT Readout Elements 1170 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1740 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1740/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 21472Kb Time = 1.53S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 1024Kb Time = 0.01S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16160 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 48D7B5A4-1E0D-E011-B6D0-003048F0E778 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 48D7B5A4-1E0D-E011-B6D0-003048F0E778 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root File version:52600 -PoolSvc INFO Failed to find container POOLContainer(DataHeader) to create POOL collection. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -ClassIDSvc INFO getRegistryEntries: read 703 CLIDRegistry entries for module ALL -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 105200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-DR-BS7T-ANom-11 set from input file -ClassIDSvc INFO getRegistryEntries: read 36 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_16.6.7.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_16.6.7.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to InDetAlign_Nominal for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_16.6.7.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/egamma/egammaAthenaPool/run/egammaEventTPCnv_16.6.7.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TRTAlign_Nominal for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusTemporaryEmpty for folder /TRT/Cond/Status -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusPermanentAllBoardsBarrelIndividual for folder /TRT/Cond/StatusPermanent -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 8E91164C-1E3C-DB11-8CAB-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -AthenaEventLoopMgr INFO ===>>> start processing event #1, run #105200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 167 CLIDRegistry entries for module ALL -VxContainerCnv INFO VxContainerCnv::initialize() - INFO MVFVxContainerCnv::initialize() -VxContainerCnv INFO VxContainerCnv: MVFVxCandidate converter=0x3ab67b80 -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 2331 CLIDRegistry entries for module ALL -AthenaEventLoopMgr INFO ===>>> done processing event #1, run #105200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 8E91164C-1E3C-DB11-8CAB-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #2, run #105200 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #2, run #105200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #3, run #105200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #3, run #105200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #4, run #105200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #4, run #105200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #5, run #105200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #5, run #105200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #6, run #105200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #6, run #105200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #7, run #105200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #7, run #105200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #8, run #105200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #8, run #105200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #9, run #105200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #9, run #105200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #10, run #105200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #10, run #105200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.7.1/AOD-16.6.7.1-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 48D7B5A4-1E0D-E011-B6D0-003048F0E778 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.56 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.33 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.84 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.53 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.49 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 36/36/6732 (( 0.45 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.45 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.49 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Folder /TagInfo (AttrListColl) db-read 0/2 objs/chan/bytes 2/0/0 (( 0.00 ))s -IOVDbSvc INFO Total payload read from COOL: 30844 bytes in (( 4.12 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 1.73 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 2.39 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 0 [us] #= 1 -ChronoStatSvc INFO Time User : Tot= 24.5 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Reconstruction/tauEventAthenaPool/CMakeLists.txt b/Reconstruction/tauEventAthenaPool/CMakeLists.txt index 4083e7f27d876440e341da1e7a13af3fa4d6834e..832403be69e7ce22c49b1c243b2646103bb3fa6d 100644 --- a/Reconstruction/tauEventAthenaPool/CMakeLists.txt +++ b/Reconstruction/tauEventAthenaPool/CMakeLists.txt @@ -33,10 +33,16 @@ endif() find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) - run_tpcnv_test( tauEventTPCnv_15.0.0 AOD-15.0.0-full ) - run_tpcnv_test( tauEventTPCnv_15.6.9 AOD-15.6.9-full ) - run_tpcnv_test( tauEventTPCnv_17.2.9.1 AOD-17.2.9.1-full ) - run_tpcnv_test( tauEventTPCnv_18.0.0 AOD-18.0.0-full ) + set( TAUEVENTATHENAPOOL_REFERENCE_TAG + tauEventAthenaPoolReference-01-00-00 ) + run_tpcnv_test( tauEventTPCnv_15.0.0 AOD-15.0.0-full + REFERENCE_TAG ${TAUEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( tauEventTPCnv_15.6.9 AOD-15.6.9-full + REFERENCE_TAG ${TAUEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( tauEventTPCnv_17.2.9.1 AOD-17.2.9.1-full + REFERENCE_TAG ${TAUEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( tauEventTPCnv_18.0.0 AOD-18.0.0-full + REFERENCE_TAG ${TAUEVENTATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) endif() diff --git a/Reconstruction/tauEventAthenaPool/share/tauEventTPCnv_15.0.0.ref b/Reconstruction/tauEventAthenaPool/share/tauEventTPCnv_15.0.0.ref deleted file mode 100644 index c5334a7212fe464e3f911eb6862c9b9af291077c..0000000000000000000000000000000000000000 --- a/Reconstruction/tauEventAthenaPool/share/tauEventTPCnv_15.0.0.ref +++ /dev/null @@ -1,778 +0,0 @@ -Mon Apr 18 21:45:36 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "tauEventAthenaPool/tauEventTPCnv_15.0.0_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 2.14 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 21:46:17 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSig_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigHypoContainer_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigHypo_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigElemStore_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigHypoKine_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigObjContainer_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigObject_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p1 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] F8217C77-45A8-820F-6D1F-3BF0879A4DEE -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root File version:52200 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] F8217C77-45A8-820F-6D1F-3BF0879A4DEE -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 54C1827D-740E-DE11-83C7-000423D9A21A -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root File version:52200 -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Found 8 metadata containers in input file, 0 will be used -IOVDbSvc INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found. -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-02 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-10-00-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-02, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2723 64.1329 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7078 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.51 136.132 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 14484Kb Time = 0.36S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-GEO-00 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-GEO-00, Name: GEO, Layout: Final, Code Version: 3.06.00, Description: Atlas Geometry 2008 -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 13312Kb Time = 0.25S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-GEO-00 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x1a50220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-GEO-00, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 22200Kb Time = 0.29S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.05S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-10-00-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-10-00-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-10-00-00> default MuonVersion is <MuonSpectrometer-R.03.11> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.11> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.11 from DB MuonVersion <MuonSpectrometer-R.03.11> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.11> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.11 from DB MuonVersion <MuonSpectrometer-R.03.11> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-10-00-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO ASZT table found in Oracle -MuGM:RDBReadAtlas INFO ASZT size is 32 -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 22 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 3 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 226 -MuGM:ProcPosition INFO *** N. of stations described in mysql 226 -MuGM:ProcPosition INFO *** N. of types 30 size of jtypvec 30 -MuGM:ProcPosition INFO *** : 226 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1740 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-10-00-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.11 -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1740 child volumes -MuGM:MuonFactory INFO *** 1729 independent elements and -MuGM:MuonFactory INFO *** 11439 elements cloned or shared -MuGM:MuonFactory INFO *** 226 kinds of stations -MuGM:MuonFactory INFO *** 1740 stations with alignable transforms -MuGM:MuonFactory INFO *** 136 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1740 MuonStations -MuGM:MuonFactory INFO *** 2292 MDT Readout Elements 1170 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1740 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1740/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 21472Kb Time = 1.5S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 1024Kb Time = 0.01S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16138 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 54C1827D-740E-DE11-83C7-000423D9A21A -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 54C1827D-740E-DE11-83C7-000423D9A21A -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root File version:52200 -PoolSvc INFO Failed to find container POOLContainer(DataHeader) to create POOL collection. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 5200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-SIM-00-00-00 set from input file -IOVDbSvc INFO TagInfo override for tag TrtStrawStatus-02 in folder /TRT/Cond/Status -IOVDbSvc INFO TagInfo override for tag TrtStrawStatusPermanent-01 in folder /TRT/Cond/StatusPermanent -ClassIDSvc INFO getRegistryEntries: read 739 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetAlign_CSC_02 for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.0.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTAlign_CSC_01 for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -GeoModelSvc WARNING *** *** Geometry configured through jobOptions does not match TagInfo tags! *** *** -GeoModelSvc INFO ** Job Option configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-10-00-00 -GeoModelSvc INFO * InDet tag: -GeoModelSvc INFO * Pixel tag: -GeoModelSvc INFO * SCT tag: -GeoModelSvc INFO * TRT tag: -GeoModelSvc INFO * LAr tag: -GeoModelSvc INFO * Tile tag: -GeoModelSvc INFO * Muon tag: -GeoModelSvc INFO * Calo tag: -GeoModelSvc INFO * MagField tag: -GeoModelSvc INFO * CavernInfra tag: -GeoModelSvc INFO * ForwardDetectors tag: -GeoModelSvc INFO ** TAG INFO configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-02-01-00 -AthenaEventLoopMgr INFO ===>>> start processing event #30002, run #5200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 109 CLIDRegistry entries for module ALL -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 93 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 12 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 1681 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 586 CLIDRegistry entries for module ALL -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 485 CLIDRegistry entries for module ALL -AthenaEventLoopMgr INFO ===>>> done processing event #30002, run #5200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #30004, run #5200 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30004, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30009, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30009, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30010, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30010, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30012, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30012, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30013, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30013, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30014, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30014, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30018, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30018, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30020, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30020, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30022, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30022, run #5200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.0.0/AOD-15.0.0-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 54C1827D-740E-DE11-83C7-000423D9A21A -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.08 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.03 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.03 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 1.85 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.04 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6370 (( 0.02 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.34 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.09 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Total payload read from COOL: 30482 bytes in (( 2.47 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 0.14 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 2.33 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 1 [ms] #= 1 -ChronoStatSvc INFO Time User : Tot= 23.5 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Reconstruction/tauEventAthenaPool/share/tauEventTPCnv_15.6.9.ref b/Reconstruction/tauEventAthenaPool/share/tauEventTPCnv_15.6.9.ref deleted file mode 100644 index 89b8f9d0f2ad2d03ed4a88f675e8216581368065..0000000000000000000000000000000000000000 --- a/Reconstruction/tauEventAthenaPool/share/tauEventTPCnv_15.6.9.ref +++ /dev/null @@ -1,755 +0,0 @@ -Mon Apr 18 21:42:33 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "tauEventAthenaPool/tauEventTPCnv_15.6.9_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 2.30 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 21:43:16 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p1 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] C51C9730-274C-3D31-04F9-CBCF18742833 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root File version:52200 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] C51C9730-274C-3D31-04F9-CBCF18742833 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 78299BCB-231B-DF11-9A5B-003048673400 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root File version:52200 -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Folder /TagInfo will be taken from file metadata -IOVDbSvc INFO Found 15 metadata containers in input file, 1 will be used -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -IOVDbSvc INFO Added taginfo remove for /TagInfo -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-00 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-02-01-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-00, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2676 64.1319 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7032 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.506 136.131 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 14484Kb Time = 0.39S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-DC3-07 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-DC3-07, Name: DC3, Layout: Final, Code Version: 3.06.00, Description: DC3 Geometry -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 13312Kb Time = 0.24S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-R13-02 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x1a78220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-R13-02, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 22200Kb Time = 0.26S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.04S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-02-01-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-02-01-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-02-01-00> default MuonVersion is <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.01.Initial> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.01.Initial> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-02-01-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ASZT table in Oracle -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 21 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 4 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 215 -MuGM:ProcPosition INFO *** N. of stations described in mysql 220 -MuGM:ProcPosition INFO *** N. of types 28 size of jtypvec 28 -MuGM:ProcPosition INFO *** : 220 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1678 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-02-01-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.01.Initial -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1678 child volumes -MuGM:MuonFactory INFO *** 1670 independent elements and -MuGM:MuonFactory INFO *** 11928 elements cloned or shared -MuGM:MuonFactory INFO *** 215 kinds of stations -MuGM:MuonFactory INFO *** 1678 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1678 MuonStations -MuGM:MuonFactory INFO *** 2168 MDT Readout Elements 1108 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1678 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1678/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 19424Kb Time = 1.37S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 0Kb Time = 0.01S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16175 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 78299BCB-231B-DF11-9A5B-003048673400 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 78299BCB-231B-DF11-9A5B-003048673400 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root File version:52200 -PoolSvc INFO Failed to find container POOLContainer(DataHeader) to create POOL collection. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -ClassIDSvc INFO getRegistryEntries: read 703 CLIDRegistry entries for module ALL -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 5200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-SIM-00-00-00 set from input file -IOVDbSvc INFO TagInfo override for tag TrtStrawStatus-02 in folder /TRT/Cond/Status -IOVDbSvc INFO TagInfo override for tag TrtStrawStatusPerm-02_test in folder /TRT/Cond/StatusPermanent -ClassIDSvc INFO getRegistryEntries: read 36 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetAlign_CSC_02 for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_15.6.9-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTAlign_CSC_01 for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -AthenaEventLoopMgr INFO ===>>> start processing event #30002, run #5200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 109 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 622 CLIDRegistry entries for module ALL -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 60 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 1690 CLIDRegistry entries for module ALL -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -AthenaEventLoopMgr INFO ===>>> done processing event #30002, run #5200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #30004, run #5200 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30004, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30009, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30009, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30010, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30010, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30012, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30012, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30013, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30013, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30014, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30014, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30018, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30018, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30020, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30020, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30022, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30022, run #5200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.9/AOD-15.6.9-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 78299BCB-231B-DF11-9A5B-003048673400 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.71 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.40 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.48 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.77 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.49 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6370 (( 0.22 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.54 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.28 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Folder /TagInfo (AttrListColl) db-read 0/2 objs/chan/bytes 2/0/0 (( 0.00 ))s -IOVDbSvc INFO Total payload read from COOL: 30482 bytes in (( 3.89 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 1.59 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 2.30 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 0 [us] #= 1 -ChronoStatSvc INFO Time User : Tot= 24.3 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Reconstruction/tauEventAthenaPool/share/tauEventTPCnv_17.2.9.1.ref b/Reconstruction/tauEventAthenaPool/share/tauEventTPCnv_17.2.9.1.ref deleted file mode 100644 index 2ad5a97c4d0ad987477de61549912a8d96b12746..0000000000000000000000000000000000000000 --- a/Reconstruction/tauEventAthenaPool/share/tauEventTPCnv_17.2.9.1.ref +++ /dev/null @@ -1,750 +0,0 @@ -Mon Apr 18 21:45:36 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "tauEventAthenaPool/tauEventTPCnv_17.2.9.1_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 2.02 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 21:46:18 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p2 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] A065520C-03F9-D697-0BE1-17F01CA2F400 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root File version:53005 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] A065520C-03F9-D697-0BE1-17F01CA2F400 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 01CDB931-513D-1C4A-8241-DD2C5A81FE52 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root File version:53005 -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root" -ImplicitCollection Info and a name "POOLContainer(DataHeader)" -PoolSvc INFO Failed to find container MetaDataHdrDataHeader to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Folder /TagInfo will be taken from file metadata -IOVDbSvc INFO Found 15 metadata containers in input file, 1 will be used -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_17.2.9.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_17.2.9.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_17.2.9.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_17.2.9.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -IOVDbSvc INFO Added taginfo remove for /TagInfo -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_17.2.9.1-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_17.2.9.1-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-02 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-10-00-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-02, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2723 64.1329 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7078 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.51 136.132 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 14484Kb Time = 0.36S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-GEO-00 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-GEO-00, Name: GEO, Layout: Final, Code Version: 3.06.00, Description: Atlas Geometry 2008 -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 14336Kb Time = 0.25S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-GEO-00 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x1116220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-GEO-00, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 22200Kb Time = 0.28S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.04S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-10-00-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-10-00-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-10-00-00> default MuonVersion is <MuonSpectrometer-R.03.11> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.11> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.11 from DB MuonVersion <MuonSpectrometer-R.03.11> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.11> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.11 from DB MuonVersion <MuonSpectrometer-R.03.11> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-10-00-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO ASZT table found in Oracle -MuGM:RDBReadAtlas INFO ASZT size is 32 -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 22 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 3 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 226 -MuGM:ProcPosition INFO *** N. of stations described in mysql 226 -MuGM:ProcPosition INFO *** N. of types 30 size of jtypvec 30 -MuGM:ProcPosition INFO *** : 226 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1740 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-10-00-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.11 -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1740 child volumes -MuGM:MuonFactory INFO *** 1729 independent elements and -MuGM:MuonFactory INFO *** 11439 elements cloned or shared -MuGM:MuonFactory INFO *** 226 kinds of stations -MuGM:MuonFactory INFO *** 1740 stations with alignable transforms -MuGM:MuonFactory INFO *** 136 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1740 MuonStations -MuGM:MuonFactory INFO *** 2292 MDT Readout Elements 1170 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1740 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1740/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 21472Kb Time = 1.6S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 1024Kb Time = 0.01S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16977 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 01CDB931-513D-1C4A-8241-DD2C5A81FE52 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 01CDB931-513D-1C4A-8241-DD2C5A81FE52 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root File version:53005 -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root" -ImplicitCollection Info and a name "POOLContainer(DataHeader)" -ClassIDSvc INFO getRegistryEntries: read 703 CLIDRegistry entries for module ALL -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdrDataHeader to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 105200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-DR-BS7T-ANom-11 set from input file -ClassIDSvc INFO getRegistryEntries: read 36 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_17.2.9.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_17.2.9.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to InDetAlign_Nominal for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_17.2.9.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Reconstruction/tauEventAthenaPool/run/tauEventTPCnv_17.2.9.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TRTAlign_Nominal for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusTemporaryEmpty for folder /TRT/Cond/Status -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusPermanentAllBoardsBarrelIndividual for folder /TRT/Cond/StatusPermanent -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 8E91164C-1E3C-DB11-8CAB-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -AthenaEventLoopMgr INFO ===>>> start processing event #1, run #105200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 109 CLIDRegistry entries for module ALL -VxContainerCnv INFO VxContainerCnv::initialize() - INFO MVFVxContainerCnv::initialize() -VxContainerCnv INFO VxContainerCnv: MVFVxCandidate converter=0x38189600 -ClassIDSvc INFO getRegistryEntries: read 672 CLIDRegistry entries for module ALL -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -AthenaEventLoopMgr INFO ===>>> done processing event #1, run #105200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 8E91164C-1E3C-DB11-8CAB-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #2, run #105200 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #2, run #105200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #3, run #105200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #3, run #105200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #4, run #105200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #4, run #105200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #5, run #105200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #5, run #105200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #6, run #105200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #6, run #105200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #7, run #105200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #7, run #105200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #8, run #105200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #8, run #105200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #9, run #105200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #9, run #105200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #10, run #105200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #10, run #105200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.9.1/AOD-17.2.9.1-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 01CDB931-513D-1C4A-8241-DD2C5A81FE52 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 1.18 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.05 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.36 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.07 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.05 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 36/36/6732 (( 0.04 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.04 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.04 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Folder /TagInfo (AttrListColl) db-read 0/2 objs/chan/bytes 2/0/0 (( 0.00 ))s -IOVDbSvc INFO Total payload read from COOL: 30844 bytes in (( 1.83 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 1.58 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 0.24 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 1 [ms] #= 1 -ChronoStatSvc INFO Time User : Tot= 24.3 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Simulation/Digitization/CMakeLists.txt b/Simulation/Digitization/CMakeLists.txt index 4c7f48a9f6968ac003dd6c51b24442efcb9903de..d3d7351189b57ab8e06a2a52f09c9375479639fb 100644 --- a/Simulation/Digitization/CMakeLists.txt +++ b/Simulation/Digitization/CMakeLists.txt @@ -6,9 +6,7 @@ atlas_subdir( Digitization ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/MinimalRunTime - PRIVATE +atlas_depends_on_subdirs( PRIVATE TestPolicy ) # Install files from the package: diff --git a/Simulation/G4Atlas/G4AtlasAlg/python/G4AtlasAlgConfig.py b/Simulation/G4Atlas/G4AtlasAlg/python/G4AtlasAlgConfig.py index aeb047185638404f625a3d0af6602a27b216b0e9..906ac630dd6a0b6c86b59ce3ff19763a623a656f 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/python/G4AtlasAlgConfig.py +++ b/Simulation/G4Atlas/G4AtlasAlg/python/G4AtlasAlgConfig.py @@ -2,15 +2,6 @@ from AthenaCommon import CfgMgr -def getAthenaStackingAction(name='AthenaStackingAction', **kwargs): - from G4AtlasApps.SimFlags import simFlags - if "ATLAS" in simFlags.SimLayout(): - kwargs.setdefault('KillAllNeutrinos', True) - return CfgMgr.AthenaStackingAction(name,**kwargs) - -def getAthenaTrackingAction(name='AthenaTrackingAction', **kwargs): - return CfgMgr.AthenaTrackingAction(name,**kwargs) - def getAthenaStackingActionTool(name='G4UA::AthenaStackingActionTool', **kwargs): from G4AtlasApps.SimFlags import simFlags if "ATLAS" in simFlags.SimLayout(): @@ -18,6 +9,7 @@ def getAthenaStackingActionTool(name='G4UA::AthenaStackingActionTool', **kwargs) return CfgMgr.G4UA__AthenaStackingActionTool(name,**kwargs) def getAthenaTrackingActionTool(name='G4UA::AthenaTrackingActionTool', **kwargs): + kwargs.setdefault('SecondarySavingLevel', 2) return CfgMgr.G4UA__AthenaTrackingActionTool(name,**kwargs) def getG4AtlasAlg(name='G4AtlasAlg', **kwargs): @@ -51,12 +43,6 @@ def getG4AtlasAlg(name='G4AtlasAlg', **kwargs): if not simFlags.RandomSeedList.checkForExistingSeed('AtlasG4'): simFlags.RandomSeedList.addSeed( "AtlasG4", 423451, 3213210 ) - # Until we fully migrate to V2 user actions, we disable the unused version via switch - if simFlags.UseV2UserActions.get_Value() == True: - kwargs.setdefault('UserActionSvc', '') - else: - kwargs.setdefault('UserActionSvcV2', '') - # Multi-threading settinggs from AthenaCommon.ConcurrencyFlags import jobproperties as concurrencyProps if concurrencyProps.ConcurrencyFlags.NumThreads() > 0: @@ -74,4 +60,8 @@ def getG4AtlasAlg(name='G4AtlasAlg', **kwargs): # verbosities["Tracking"]='1' # print verbosities kwargs.setdefault('Verbosities', verbosities) + + # Set commands for the G4AtlasAlg + kwargs.setdefault("G4Commands", simFlags.G4Commands.get_Value()) + return CfgMgr.G4AtlasAlg(name, **kwargs) diff --git a/Simulation/G4Atlas/G4AtlasAlg/python/G4AtlasAlgConfigDb.py b/Simulation/G4Atlas/G4AtlasAlg/python/G4AtlasAlgConfigDb.py index 32b4fa818d34984e3ada5100b17444bff26b9371..8f75d0627f2721ff95c26678082657a13efa89bc 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/python/G4AtlasAlgConfigDb.py +++ b/Simulation/G4Atlas/G4AtlasAlg/python/G4AtlasAlgConfigDb.py @@ -2,11 +2,7 @@ from AthenaCommon.CfgGetter import addAlgorithm, addTool -# V1 user action migration -addTool("G4AtlasAlg.G4AtlasAlgConfig.getAthenaTrackingAction","AthenaTrackingAction") -addTool("G4AtlasAlg.G4AtlasAlgConfig.getAthenaStackingAction","AthenaStackingAction") -# V2 user action migration addTool("G4AtlasAlg.G4AtlasAlgConfig.getAthenaTrackingActionTool", "G4UA::AthenaTrackingActionTool") addTool("G4AtlasAlg.G4AtlasAlgConfig.getAthenaStackingActionTool", diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.cxx index 2cda9a48c508a1033134cb2605452a7f60b1f372..68a1630ff94925fd086e0d673a662702db19c42e 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.cxx +++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.cxx @@ -28,117 +28,6 @@ #include "G4Gamma.hh" -// -// Current AthenaStackingAction implementation. -// New one is below. -// - -// static AthenaStackingAction stacking; - -AthenaStackingAction::AthenaStackingAction(const std::string& type, const std::string& name, const IInterface* parent):UserActionBase(type,name,parent), p_killAllNeutrinos(false), p_stackEnergyCut(-1){ - - declareProperty("KillAllNeutrinos",p_killAllNeutrinos); - declareProperty("KillLowEPhotons",p_stackEnergyCut); -} - -G4ClassificationOfNewTrack AthenaStackingAction::ClassifyNewTrack(const G4Track* aTrack) -{ - // Neutrinos turned off at job options level - G4ParticleDefinition &particleType = *(aTrack->GetDefinition() ); - if ( p_killAllNeutrinos && - ( &particleType == G4NeutrinoE::NeutrinoEDefinition() || - &particleType == G4AntiNeutrinoE::AntiNeutrinoEDefinition() || - &particleType == G4NeutrinoMu::NeutrinoMuDefinition() || - &particleType == G4AntiNeutrinoMu::AntiNeutrinoMuDefinition() || - &particleType == G4NeutrinoTau::NeutrinoTauDefinition() || - &particleType == G4AntiNeutrinoTau::AntiNeutrinoTauDefinition() ) ){ - return fKill; - } - - if ( &particleType == G4Gamma::Gamma() && - aTrack->GetTotalEnergy() < 0.00005 ){ // Safe cut for ultra-low-energy photons - return fKill; - } - - - G4Track *mutableTrack=const_cast<G4Track*>(aTrack); - - G4Event *ev=G4EventManager::GetEventManager()->GetNonconstCurrentEvent(); - EventInformation* eventInfo __attribute__ ((unused)) = - static_cast<EventInformation*>( ev->GetUserInformation() ); - - int pID=aTrack->GetParentID(); - if (!pID) // this is a primary particle. - { - const G4PrimaryParticle *pp=nullptr; - PrimaryParticleInformation *ppi=nullptr; - - const G4DynamicParticle *dp = aTrack->GetDynamicParticle(); - if (dp) - { - pp=(const G4PrimaryParticle *)dp->GetPrimaryParticle(); - } - if (pp) - { - ppi = dynamic_cast<PrimaryParticleInformation*> (pp->GetUserInformation()); - } - if (ppi) - { - const HepMC::GenParticle *part=ppi->GetHepMCParticle(); - bool hasISFParticle = ppi->GetISFParticle()!=nullptr; - if (!hasISFParticle) - { - // don't do anything - if (part) - { - // OK, we got back to HepMC - TrackInformation *ti=new TrackInformation(part); - ti->SetRegenerationNr(0); - // regNr=0 and classify=Primary are default values anyway - mutableTrack->SetUserInformation(ti); - ti->SetClassification(Primary); - } - else if (ppi->GetParticleBarcode()>=0) - { - // PrimaryParticleInformation should at least provide a barcode - TrackBarcodeInfo *bi = new TrackBarcodeInfo(ppi->GetParticleBarcode()); - mutableTrack->SetUserInformation(bi); - } - } // no ISFParticle attached - } // has PrimaryParticleInformation - } - else // secondary track: see if it must be saved - { - // Time cut for particles stacking after a certain time... - if ( p_stackEnergyCut > 0 && - &particleType == G4Gamma::Gamma() && - aTrack->GetTotalEnergy() < p_stackEnergyCut ) - { - return fKill; - } - - } - - return fUrgent; -} - - -StatusCode AthenaStackingAction::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -// -// New AthenaStackingAction implementation for multi-threading. -// namespace G4UA { diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.h b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.h index f97c4005cee34e7f0400bb29c7033944bcf1bb60..89ca6d6a0a867ed340b59ffbb4be1741836cfb29 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.h +++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.h @@ -2,38 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef AthenaStackingAction_H -#define AthenaStackingAction_H - -//#include "FadsActions/ApplicationStackingAction.h" -#include "G4AtlasTools/UserActionBase.h" - -/// Current stacking action implementation -class AthenaStackingAction:public UserActionBase { -public: - AthenaStackingAction(const std::string& type, const std::string& name, const IInterface* parent); - ~AthenaStackingAction(){} - - virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - - inline void KillAllNeutrinos(const bool a){ p_killAllNeutrinos=a; } - inline bool KillAllNeutrinos() const { return p_killAllNeutrinos; } - - inline void KillLowEPhotons(const double a){ p_stackEnergyCut=a; } - inline double KillLowEPhotons() const { return p_stackEnergyCut; } - -private: - - bool p_killAllNeutrinos; - double p_stackEnergyCut; -}; - -#endif - - #ifndef G4ATLASALG_G4UA_ATHENASTACKINGACTION_H #define G4ATLASALG_G4UA_ATHENASTACKINGACTION_H diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.cxx index 4cb1307d85702ef61c8796cb52dac95db70e77aa..84713b7e619c506118cbfc7d5f845d258d6d9176 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.cxx +++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.cxx @@ -4,85 +4,19 @@ #include "AthenaTrackingAction.h" -#include "MCTruth/EventInformation.h" -#include "MCTruth/PrimaryParticleInformation.h" -#include "MCTruth/TrackHelper.h" -#include "MCTruth/TrackInformation.h" -#include "MCTruthBase/AtlasTrajectory.h" -#include "MCTruthBase/TruthStrategyManager.h" +#include <iostream> #include "G4DynamicParticle.hh" #include "G4PrimaryParticle.hh" +#include "G4Event.hh" #include "G4EventManager.hh" -#include <iostream> - -AthenaTrackingAction::AthenaTrackingAction(const std::string& type, - const std::string& name, - const IInterface* parent) - : UserActionBase(type, name, parent) -{ -} - -void AthenaTrackingAction::PreTracking(const G4Track* inTrack) -{ - // Retrieve the saving level for secondaries. - // Why isn't this handled via normal configuration? - static int ilevel = - TruthStrategyManager::GetStrategyManager()->GetSecondarySavingLevel(); - //std::cout<<" this is AthenaTrackingAction::PreUserTrackingAction"<<std::endl; - - // Use the TrackHelper code to identify the kind of particle. - TrackHelper trackHelper(inTrack); - if (trackHelper.IsPrimary() || trackHelper.IsRegisteredSecondary()) - { - // Why a const_cast??? - // This is an ugly way to communicate the GenParticle... - HepMC::GenParticle* part = - const_cast<HepMC::GenParticle*>( trackHelper.GetTrackInformation()-> - GetHepMCParticle() ); - EventInformation* eventInfo = - TruthStrategyManager::GetStrategyManager()->GetEventInformation(); - if (trackHelper.IsPrimary()) eventInfo->SetCurrentPrimary(part); - eventInfo->SetCurrentlyTraced(part); - } - if (trackHelper.IsPrimary() || - (trackHelper.IsRegisteredSecondary() && ilevel>1) || - (trackHelper.IsSecondary() && ilevel>2)) - { - // Create a new AtlasTrajectory and store it. - AtlasTrajectory* temp = new AtlasTrajectory(inTrack); - m_fpTrackingManager->SetStoreTrajectory(true); - m_fpTrackingManager->SetTrajectory(temp); - } -} - - -void AthenaTrackingAction::PostTracking(const G4Track* /*outTrack*/) -{ - //std::cout <<"AthenaTrackingAction::PostUserTrackingAction"<<std::endl; - // We are done tracking this particle, so reset the trajectory. - m_fpTrackingManager->SetStoreTrajectory(false); -} - -// TODO: move to use declareInterface instead. -StatusCode AthenaTrackingAction::queryInterface(const InterfaceID& riid, - void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design for multi-threading (V2 migration) follows. -//============================================================================= +#include "MCTruth/EventInformation.h" +#include "MCTruth/PrimaryParticleInformation.h" +#include "MCTruth/TrackHelper.h" +#include "MCTruth/TrackInformation.h" +#include "MCTruthBase/AtlasTrajectory.h" +#include "AthenaBaseComps/AthMsgStreamMacros.h" namespace G4UA { @@ -90,8 +24,9 @@ namespace G4UA //--------------------------------------------------------------------------- // Constructor //--------------------------------------------------------------------------- - AthenaTrackingAction::AthenaTrackingAction(MSG::Level lvl) + AthenaTrackingAction::AthenaTrackingAction(MSG::Level lvl, int secondarySavingLevel) : m_msg("AthenaTrackingAction") + , m_secondarySavingLevel(secondarySavingLevel) { m_msg.get().setLevel(lvl); } @@ -103,11 +38,6 @@ namespace G4UA { ATH_MSG_DEBUG("Starting to track a new particle"); - // Retrieve the saving level for secondaries. - // TODO: use a more normal configuration mechanism for this. - static int ilevel = - TruthStrategyManager::GetStrategyManager()->GetSecondarySavingLevel(); - // Use the TrackHelper code to identify the kind of particle. TrackHelper trackHelper(track); @@ -121,16 +51,16 @@ namespace G4UA GetHepMCParticle() ); // Assign the GenParticle to the EventInformation. - EventInformation* eventInfo = - TruthStrategyManager::GetStrategyManager()->GetEventInformation(); + EventInformation* eventInfo = static_cast<EventInformation*> + (G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetUserInformation()); if (trackHelper.IsPrimary()) eventInfo->SetCurrentPrimary(part); eventInfo->SetCurrentlyTraced(part); } // Condition for creating a trajectory object to store truth. if (trackHelper.IsPrimary() || - (trackHelper.IsRegisteredSecondary() && ilevel>1) || - (trackHelper.IsSecondary() && ilevel>2)) + (trackHelper.IsRegisteredSecondary() && m_secondarySavingLevel>1) || + (trackHelper.IsSecondary() && m_secondarySavingLevel>2)) { ATH_MSG_DEBUG("Preparing an AtlasTrajectory for saving truth"); diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.h b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.h index abb3c3e38a5c5f08de25710a772bccf21c31effe..8b2386806ccbf38846767e1d5d748817ab6df553 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.h +++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.h @@ -5,8 +5,6 @@ #ifndef G4AtlasAlg_AthenaTrackingAction_H #define G4AtlasAlg_AthenaTrackingAction_H -#include "G4AtlasTools/UserActionBase.h" - /// @class AthenaTrackingAction /// @brief User action for pre/post tracking truth handling. /// @@ -14,27 +12,6 @@ /// as part of the simulation infrastructure migrations. The multi-threaded /// (V2) design is still in the works. /// -class AthenaTrackingAction : public UserActionBase { -public: - - /// Standard constructor - AthenaTrackingAction(const std::string& type, const std::string& name, - const IInterface* parent); - - /// Geant4 method called at the beginning of tracking a particle. - virtual void PreTracking(const G4Track*) override; - /// Geant4 method called at the end of tracking a particle. - virtual void PostTracking(const G4Track*) override; - - /// Gaudi boiler-plate. - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - -}; // class AthenaTrackingAction - - -//============================================================================= -// New design for multi-threading (V2 migration) follows. -//============================================================================= #include "AthenaKernel/MsgStreamMember.h" #include "G4AtlasInterfaces/IPreTrackingAction.h" @@ -55,7 +32,7 @@ namespace G4UA public: /// Constructor - AthenaTrackingAction(MSG::Level lvl = MSG::INFO); + AthenaTrackingAction(MSG::Level lvl, int secondarySavingLevel); /// @brief Called before tracking a new particle. /// @@ -75,7 +52,8 @@ namespace G4UA MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; } bool msgLvl( MSG::Level lvl ) const { return m_msg.get().level() <= lvl; } mutable Athena::MsgStreamMember m_msg; - + /// The saving level for secondaries. + int m_secondarySavingLevel; }; // class AthenaTrackingAction } // namespace G4UA diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.cxx index 96eb02518df162487f2c38dd2923aa998bbc289e..4b69eceedea1ad233fb1527d2edcc8975f3dd480 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.cxx +++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.cxx @@ -15,9 +15,11 @@ namespace G4UA AthenaTrackingActionTool(const std::string& type, const std::string& name, const IInterface* parent) : ActionToolBase<AthenaTrackingAction>(type, name, parent) + , m_secondarySavingLevel(2) { declareInterface<IPreTrackingActionTool>(this); declareInterface<IPostTrackingActionTool>(this); + declareProperty("SecondarySavingLevel", m_secondarySavingLevel, "Three valid options: 1 - Primaries; 2 - StoredSecondaries(default); 3 - All"); } //--------------------------------------------------------------------------- @@ -37,7 +39,7 @@ namespace G4UA { ATH_MSG_DEBUG("Constructing an AthenaTrackingAction"); // Create and configure the action plugin. - auto action = CxxUtils::make_unique<AthenaTrackingAction>( msg().level() ); + auto action = CxxUtils::make_unique<AthenaTrackingAction>( msg().level(), m_secondarySavingLevel ); return std::move(action); } diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.h b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.h index 94aa12544185470c6bf167ba4c00e4cc35d78501..92ebd5a2bc044527eb46c9b80c40a492ba0db01f 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.h +++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.h @@ -47,7 +47,9 @@ namespace G4UA /// Create an action for this thread virtual std::unique_ptr<AthenaTrackingAction> makeAction() override final; - + private: + /// The saving level for secondaries. + int m_secondarySavingLevel; }; // class AthenaTrackingActionTool } // namespace G4UA diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx index 65051f9ad9f6d830e1eb10b075fb0d70a3bc5460..f04d021e17d4a11e0027ca61f2e175194be802a4 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx +++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx @@ -42,7 +42,6 @@ static std::once_flag finalizeOnceFlag; G4AtlasAlg::G4AtlasAlg(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator), m_rndmGenSvc("AtDSFMTGenSvc", name), - m_UASvc("UserActionSvc", name), // current user action design m_userActionSvc("G4UA::UserActionSvc", name), // new user action design m_physListTool("PhysicsListToolBase") { @@ -61,8 +60,7 @@ G4AtlasAlg::G4AtlasAlg(const std::string& name, ISvcLocator* pSvcLocator) // Service instantiation declareProperty("AtRndmGenSvc", m_rndmGenSvc); - declareProperty("UserActionSvc", m_UASvc); - declareProperty("UserActionSvcV2", m_userActionSvc); + declareProperty("UserActionSvc", m_userActionSvc); declareProperty("PhysicsListTool", m_physListTool); // Verbosities @@ -70,6 +68,9 @@ G4AtlasAlg::G4AtlasAlg(const std::string& name, ISvcLocator* pSvcLocator) // Multi-threading specific settings declareProperty("MultiThreading", m_useMT=false); + + // Commands to send to the G4UI + declareProperty("G4Commands", m_g4commands); } @@ -89,31 +90,8 @@ StatusCode G4AtlasAlg::initialize() return StatusCode::FAILURE; } - // For now, we decide which user action service to setup based on which - // handle has a non-empty name configured. Then we can steer it from the - // configuration layer. This will go away when we drop V1 actions. - - // V1 user action service - if( !m_UASvc.name().empty() ) { - ATH_CHECK( m_UASvc.retrieve() ); - - // Make sure only one user action version is used at a time. - if( !m_userActionSvc.name().empty() ) { - ATH_MSG_ERROR("Configured to use both V1 and V2 user actions, " << - "which isn't supported!"); - return StatusCode::FAILURE; - } - if(m_useMT) { - ATH_MSG_ERROR("Using V1 user action design, which won't work in MT"); - return StatusCode::FAILURE; - } - } - - // V2 user action service - if( !m_userActionSvc.name().empty() ) { - ATH_CHECK( m_userActionSvc.retrieve() ); - } - + ATH_CHECK( m_userActionSvc.retrieve() ); + if(m_useMT) { // Retrieve the python service to trigger its initialization. This is done // here just to make sure things are initialized in the proper order. @@ -214,6 +192,11 @@ void G4AtlasAlg::initializeOnce() ATH_MSG_INFO("Random nr. generator is set to Geant4"); } + // Send UI commands + for (auto g4command : m_g4commands){ + ui->ApplyCommand( g4command ); + } + // G4 init moved to PyG4AtlasAlg / G4AtlasEngine /// @todo Reinstate or delete?! This can't actually be called from the Py algs //ATH_MSG_INFO("Firing initialization of G4!!!"); diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h index 6e2f3a874e19041f23e8e24d72447ade0876d246..708b09ae3e4c4b5de6a33a2685c30d5c18bda5b6 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h +++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h @@ -82,16 +82,18 @@ private: bool m_killAbortedEvents; bool m_flagAbortedEvents; + /// Verbosity settings for Geant4 std::map<std::string,std::string> m_verbosities; + /// Commands to send to the G4 UI + std::vector<std::string> m_g4commands; + /// Activate multi-threading configuration bool m_useMT; /// Random number service ServiceHandle<IAtRndmGenSvc> m_rndmGenSvc; - /// First user action service implementation - ServiceHandle<IUserActionSvc> m_UASvc; - /// New user action service implementation + /// user action service ServiceHandle<G4UA::IUserActionSvc> m_userActionSvc; /// Physics List Tool ToolHandle<IPhysicsListTool> m_physListTool; diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/components/G4AtlasAlg_entries.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/components/G4AtlasAlg_entries.cxx index f7b87e4c34d3864784501ad9950317d19f5822d9..58e0365369cc0405a75a6ede2d6a4b5efb23a077 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/components/G4AtlasAlg_entries.cxx +++ b/Simulation/G4Atlas/G4AtlasAlg/src/components/G4AtlasAlg_entries.cxx @@ -1,13 +1,9 @@ #include "GaudiKernel/DeclareFactoryEntries.h" #include "../G4AtlasAlg.h" -#include "../AthenaStackingAction.h" -#include "../AthenaTrackingAction.h" #include "../AthenaStackingActionTool.h" #include "../AthenaTrackingActionTool.h" DECLARE_ALGORITHM_FACTORY( G4AtlasAlg ) -DECLARE_TOOL_FACTORY( AthenaStackingAction ) -DECLARE_TOOL_FACTORY( AthenaTrackingAction ) DECLARE_NAMESPACE_TOOL_FACTORY( G4UA, AthenaStackingActionTool ) DECLARE_NAMESPACE_TOOL_FACTORY( G4UA, AthenaTrackingActionTool ) diff --git a/Simulation/G4Atlas/G4AtlasApps/python/PyG4Atlas.py b/Simulation/G4Atlas/G4AtlasApps/python/PyG4Atlas.py index 6672837aa2a25d2c33e5f7cb312f17f68aaf9a7c..5e03a1a93a04e87964fc68661c07a9a7031c8c9a 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/PyG4Atlas.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/PyG4Atlas.py @@ -141,8 +141,8 @@ class G4AtlasEngine: if "init_G4" not in self._InitList: G4AtlasEngine.log.debug(' G4AtlasEngine: _init_G4: init Geant4 ') if G4AtlasEngine.log.level <= 30: - g4Command = G4AtlasEngine.gbl.G4Commands() - g4Command.run.verbose(2) # FIXME make configurable based on Athena message level? + from G4AtlasApps.SimFlags import simFlags + simFlags.G4Commands += ['/run/verbose 2'] # FIXME make configurable based on Athena message level? G4AtlasEngine._ctrl.initializeG4(is_hive) self._InitList.append('init_G4') G4AtlasEngine._app_profiler('_init_G4: ') @@ -169,22 +169,6 @@ class G4AtlasEngine: G4AtlasEngine._ctrl.mctruthMenu.listStrategies() - def _init_Graphics(self): - """ Inits the G4 visualization stuff. - - (for internal use) - """ - if 'init_Graphics' not in self._InitList: - G4AtlasEngine.log.debug('G4AtlasEngine: _init_Graphics: init G4 Graphics ') - G4Graphics = G4AtlasEngine.menu_Visualization() - if G4Graphics.ActiveStatusOn: - G4Graphics._init() - else: - G4AtlasEngine.log.debug('G4AtlasEngine: _init_Graphics: init G4 Graphics --> no graphics request' ) - else: - G4AtlasEngine.log.warning('G4AtlasEngine: init_Graphics is already done') - - def _init_Simulation(self): """\ Simulation engine initialization. @@ -198,7 +182,6 @@ class G4AtlasEngine: pre/postInitG4 - called before/after the init_G4 method pre/postInitMCTruth - called before/after the init_MCTruth method pre/postInitFields - called before/after the init_Fields method - pre/postInitGraphics - called before/after the init_Graphics method postInit - called after all sim engine initialisation methods The current init level is stored in G4AtlasEngine.init_status, and its @@ -232,8 +215,6 @@ class G4AtlasEngine: else: G4AtlasEngine.log.debug('not initializing MCTruth in G4AtlasEngine because useISF=True') - _run_init_stage("Graphics") - self.init_status = "postInit" G4AtlasEngine.log.debug("G4AtlasEngine:init stage " + self.init_status) _run_init_callbacks(self.init_status) @@ -282,21 +263,6 @@ class G4AtlasEngine: raise RuntimeError('Dict %s can not be found' % dict_name) - def read_XML(self, xml_name): - """ Reads XML files. - - xml_name ='name_XML_file' - """ - if xml_name: - if xml_name not in G4AtlasEngine.List_LoadedXML: - try: - G4AtlasEngine._ctrl.ReadXML(xml_name) - G4AtlasEngine.List_LoadedXML.append(xml_name) - G4AtlasEngine.log.debug('G4AtlasEngine:read_XML: %s read' % xml_name) - except: - RuntimeError('XML file %s can not be found' % xml_name) - - def print_Summary(self): """ Prints the summary """ @@ -470,167 +436,6 @@ class G4AtlasEngine: - # TODO: PLEASE can we remove this? - class menu_Visualization(object): - """ - Initial version of the menu for the visualization. - - NOT READY YET!!!! - """ - class __impl: - def spam(self): - return id(self) - __instance=None - - - def __init__(self): - if G4AtlasEngine.menu_Visualization.__instance is None: - G4AtlasEngine.menu_Visualization.__instance = G4AtlasEngine.menu_Visualization.__impl() - self._Built=False - self.ActiveStatusOn=False - self.VisTracks=False - self.VisDriver='VRML2FILE' - from AtlasG4Eng import GeV - self.TrackPtCut=.3*GeV - self.DrawNeutralTracks=False - self.List_Volumen2Vis=list() - self.List_Volumen2NotVis=list() - - - def __getattr__(self, attr): - return getattr(self.__instance, attr) - - - def __setattr__(self, attr, value): - return setattr(self.__instance, attr, value) - - - def add_volume2vis(self,name_volume): - """ Adds only one volume or wild-card to the list - of volumes you want to visualize - """ - self.List_Volumen2Vis.append(name_volume) - - - def add_ListV2vis(self,list_volume): - """ Adds a list of volumes or wild-cards to the list - of volumes you want to visualize - """ - self.List_Volumen2Vis=self.List_Volumen2Vis+list_volume - - - def add_volume2Notvis(self,name_volume): - """ Adds only one volume or wild-card to the list - of volumes you do not want to visualize - """ - self.List_Volumen2NotVis.append(name_volume) - - - def add_ListV2Notvis(self,list_volume): - """ Adds a list of volumes or wild-cards to the list - of volumes you do not want to visualize - """ - self.List_Volumen2NotVis=self.List_Volumen2NotVis+list_volume - - - def get_ListVolume2vis(self): - """ Gets the list of volumes that will be visible. - """ - return self.List_Volumen2Vis - - - def get_ListVolume2Notvis(self): - """ Gets the list of volumes that will be invisible. - """ - return self.List_Volumen2NotVis - - - def set_active(self): - """ Activates the visualization - """ - self.ActiveStatusOn=True - - - def set_Parameters(self,name_parameter,new_value): - """ Changes the default visualization parameters. - - VisDriver (default 'VRML2FILE') - TrackPtCut (default .3*GeV ) - DrawNeutralTracks (default False ) - """ - if (name_parameter=='VisDriver'): - self.VisDriver=new_value - if (name_parameter=='TrackPtCut'): - self.TrackPtCut=new_value - if (name_parameter=='DrawNeutralTracks'): - self.DrawNeutralTracks=new_value - - - def set_VisTrack(self): - """ Activates the visualization of tracks. - It will produce one wrl file for each event - """ - self.VisTracks=True - - - def print_status(self): - """ Gets the actual status of the visualization menu - """ - print 'AtlasG4Eng.menu_visualization status: ' - print '---------------------------------------' - print 'Built:: ',self._Built - print 'Active:: ',self.ActiveStatusOn - print 'Visualize Tracks:: ',self.VisTracks - print 'Visualization driver:: ',self.VisDriver - print 'TrackPtCut :: ',self.TrackPtCut - print 'DrawNeutralTracks :: ',self.DrawNeutralTracks - print 'List of Volumes to visualize ' - print self.List_Volumen2Vis - print 'List of Volumes not to visualize ' - print self.List_Volumen2NotVis - - - def _init(self): - if self.ActiveStatusOn and not(self._Built): - # init graphics - G4AtlasEngine._ctrl.initializeGraphics() - self._Built=True - # support for event visualization - if self.VisTracks: - G4AtlasEngine.load_Lib('G4UserActions') - G4AtlasEngine.load_Lib('G4EventGraphics') - VisAction=UserAction('G4EventGraphics',\ - 'DrawEventPyAction',['BeginOfEvent','EndOfEvent']) - G4AtlasEngine.menu_UserActions.add_UserAction(VisAction) - G4AtlasEngine.load_Dict("G4EventGraphicsDict") - self.EventGraphics=\ - G4AtlasEngine.gbl.EventGraphicsPyMessenger.Instance() - self.EventGraphics.SetTrackDisplayLevel(3) - self.EventGraphics.SetTrackPtCut(self.TrackPtCut) - self.EventGraphics.SetTrackColorScheme(3) - self.EventGraphics.SetDrawNeutralTracks(self.DrawNeutralTracks) - self.__dict__['EventGraphics']=self.EventGraphics - if self.ActiveStatusOn: - # invisible volumes - for v1 in self.List_Volumen2NotVis: - G4AtlasEngine._ctrl.geometryMenu.SetInvisible(v1) - # visible volumes - for v2 in self.List_Volumen2Vis: - G4AtlasEngine._ctrl.geometryMenu.SetVisible(v2) - G4command=G4AtlasEngine.gbl.G4Commands() - G4command.vis.open(self.VisDriver) - G4command.vis.drawVolume() - G4command.vis.viewer.flush() - - - def visualize(self): - if self._Built: - G4command = G4AtlasEngine.gbl.G4Commands() - G4command.vis.open(self.VisDriver) - G4command.vis.drawVolume() - G4command.vis.viewer.flush() - - class DetConfigurator: """ DetConfigurator is a hook for the specific sub-detector configuration. @@ -1219,14 +1024,6 @@ class _PyG4AtlasComp(PyG4Atlas_base): AtlasG4Eng.G4Eng._init_Simulation() from G4AtlasApps.SimFlags import simFlags - if simFlags.ISFRun: - # TODO: does this 'HACK' need to be fixed at some point? - # *AS* HACK, as "G4AtlasControl/SimControl.cxx" fails dynamic cast - # see also G4AtlasRunManager - AtlasG4Eng.G4Eng.gbl.G4Commands().run.verbose(2) - AtlasG4Eng.G4Eng._ctrl.G4Command("/run/initialize") - #AtlasG4Eng.G4Eng.gbl.G4Commands().tracking.verbose(1) - AtlasG4Eng.G4Eng._app_profiler('%s end of initialize' % self.name()) if "atlas_flags" in simFlags.extra_flags: beamcondsvc = PyAthena.py_svc('BeamCondSvc/BeamCondSvc', createIf=True, iface=cppyy.gbl.IBeamCondSvc) diff --git a/Simulation/G4Atlas/G4AtlasApps/python/SimAtlasKernel.py b/Simulation/G4Atlas/G4AtlasApps/python/SimAtlasKernel.py index c80503bbf56fdb731ae0f977d5e023ff64061e7f..2ece46126e455faa04841e873555e0d26a53e511 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/SimAtlasKernel.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/SimAtlasKernel.py @@ -270,23 +270,7 @@ class AtlasSimSkeleton(SimSkeleton): """ Configure the geometry and SD """ AtlasG4Eng.G4Eng.log.verbose('AtlasSimSkeleton._do_GeoSD :: starting') - - ## Inner detector - if DetFlags.ID_on(): - if DetFlags.geometry.TRT_on(): - AtlasG4Eng.G4Eng.read_XML("TRgeomodelgeometry.xml") # FIXME need to find a better way to do this - - ## Calorimeters - if DetFlags.Calo_on(): - ## LAr - if DetFlags.geometry.LAr_on(): - from G4AtlasApps.SimFlags import simFlags - # if this is an ISF run, allow the collections on store gate to be modified - # by other algorithms (i.e. set them non-const) - allowSGMods = True if simFlags.ISFRun else False - from atlas_calo import PyLArG4RunControler - lArG4RunControl = PyLArG4RunControler('PyLArG4RunControl', 'LArG4RunControlDict', allowMods=allowSGMods) - + # TODO drop this method. AtlasG4Eng.G4Eng.log.verbose('AtlasSimSkeleton._do_GeoSD :: done') diff --git a/Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py b/Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py index db2bfbb8ee2d6c7a10e0d6d8db6954bd04b68abe..416c475b85bb9848fb90acf1cf3dfd75360503cb 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py @@ -649,16 +649,6 @@ class RecordFlux(JobProperty): allowedTypes = ['bool'] StoredValue = False -class UseV2UserActions(JobProperty): - """ - Migration version of the user actions. This should only be used by experts! - - V1 corresponds to JIRA ATLASSIM-1752 - - V2 corresponds to JIRA ATLASSIM-2226 - """ - statusOn = True - allowedTypes = ['bool'] - StoredValue = True - class OptionalUserActionList(JobProperty): """Configuration for Optional UserActions The name of the action must be a name retrievable through the ConfigurableFactory""" @@ -706,7 +696,6 @@ class UserActionConfig(JobProperty): else: self.StoredValue[actionTool]={prop:value} - class specialConfiguration(JobProperty): """ contains information on configuring simulation for special physics models. Populated, if possible, by evgen file metadata. diff --git a/Simulation/G4Atlas/G4AtlasApps/python/callbacks.py b/Simulation/G4Atlas/G4AtlasApps/python/callbacks.py index af06489bdf96572d138a99dc6604ff1a9780e36a..af27039578ed956ef25f01c754bae49fd85e6df2 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/callbacks.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/callbacks.py @@ -23,8 +23,15 @@ def use_nystromrk4_stepper(): ## Use verbose G4 tracking def use_verbose_tracking(): - from G4AtlasApps import AtlasG4Eng - AtlasG4Eng.G4Eng.gbl.G4Commands().tracking.verbose(1) + from G4AtlasApps.SimFlags import simFlags + simFlags.G4Commands += ['/tracking/verbose 1'] + +## Do a recursive geometry test +def do_recursive_geometry_test(): + from G4AtlasApps.SimFlags import simFlags + simFlags.G4Commands += ["/geometry/test/recursion_start 0"] + simFlags.G4Commands += ["/geometry/test/recursion_depth 2"] + simFlags.G4Commands += ["/geometry/test/recursive_test"] # Add a truth catch for LLP decay processes def add_LLP_truth_strategies(): diff --git a/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas.py b/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas.py index c816c914ab8e33798f0a140b2dbc41711a407cad..848202c2456ec09c4f03a613c03705d7844bae58 100644 --- a/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas.py +++ b/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas.py @@ -61,7 +61,7 @@ simFlags.EventFilter.set_On() ## Change the field stepper or use verbose G4 tracking #from G4AtlasApps import callbacks #callbacks.use_simplerunge_stepper() -#simFlags.InitFunctions.add_function("postInit", callbacks.use_verbose_tracking) +#callbacks.use_verbose_tracking() ## Use single particle generator from AthenaCommon.AthenaCommonFlags import athenaCommonFlags diff --git a/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas_ReadEvgen.py b/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas_ReadEvgen.py index d4b5657646def05fd2eec3cceee58189622076a8..eadaaff099cf72925be42231bf5a201aeff0d87e 100644 --- a/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas_ReadEvgen.py +++ b/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas_ReadEvgen.py @@ -61,7 +61,7 @@ simFlags.EventFilter.set_On() ## Change the field stepper or use verbose G4 tracking #from G4AtlasApps import callbacks #callbacks.use_simplerunge_stepper() -#simFlags.InitFunctions.add_function("postInit", callbacks.use_verbose_tracking) +#callbacks.use_verbose_tracking() from AthenaCommon.CfgGetter import getAlgorithm topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True) diff --git a/Simulation/G4Atlas/G4AtlasControl/CMakeLists.txt b/Simulation/G4Atlas/G4AtlasControl/CMakeLists.txt index 20f448098b65aaed69ab97da08d1a6ba87399157..43f126e0d11e0c88c785ba3d1c7e34e20a3b686f 100644 --- a/Simulation/G4Atlas/G4AtlasControl/CMakeLists.txt +++ b/Simulation/G4Atlas/G4AtlasControl/CMakeLists.txt @@ -10,10 +10,7 @@ atlas_depends_on_subdirs( PUBLIC GaudiKernel PRIVATE Simulation/G4Sim/FADS/FadsPackageLoader - Simulation/G4Sim/FADS/FadsUtilities - Simulation/G4Sim/FADS/FadsXMLParser - Simulation/G4Sim/MCTruthBase - Tools/PathResolver ) + Simulation/G4Sim/MCTruthBase ) # External dependencies: find_package( CLHEP ) @@ -31,10 +28,10 @@ atlas_add_library( G4AtlasControl PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES GaudiKernel - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} FadsPackageLoader FadsUtilities FadsXMLParser MCTruthBaseLib PathResolver ) + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} FadsPackageLoader MCTruthBaseLib ) atlas_add_dictionary( G4AtlasControlDict G4AtlasControl/G4AtlasControlDict.h G4AtlasControl/selection.xml INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel FadsPackageLoader FadsUtilities FadsXMLParser MCTruthBaseLib PathResolver G4AtlasControl ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel FadsPackageLoader MCTruthBaseLib G4AtlasControl ) diff --git a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/G4AtlasControlDict.h b/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/G4AtlasControlDict.h index af7641d35d5500b93b98d915e3e107b50d58055b..a510ada8a411d8d05715b4fe2eaedaeed66505ad 100644 --- a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/G4AtlasControlDict.h +++ b/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/G4AtlasControlDict.h @@ -4,5 +4,3 @@ #include "G4AtlasControl/SimControl.h" #include "G4AtlasControl/MCTruthMenu.h" -#include "G4AtlasControl/G4CommandInterface.h" -#include "G4AtlasControl/ParticleDataModifier.h" diff --git a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/G4CommandInterface.h b/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/G4CommandInterface.h deleted file mode 100644 index 3c2fa34529108b87f255384157bce4da28a4307e..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/G4CommandInterface.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef G4AtlasControl_G4CommandInterface_H -#define G4AtlasControl_G4CommandInterface_H - -/// -/// @todo The classes in this header have dangerously common names! -/// - -#include <string> - -/// @todo NEEDS DOCUMENTATION -struct Control{ - Control(); - static void execute(const std::string); - static void loop(const std::string,const std::string,int,int,int stepSize=1); - static void foreach(const std::string,const std::string,const std::string); - static void suppressAbortion(int); - static void verbose(int); - static void saveHistory(const std::string); - static void stopSavingHistory(); - static void alias(const std::string,const std::string); - static void unalias(const std::string); - static void listAlias(); - static void shell(const std::string); - static void manual(const std::string); - static void createHTML(const std::string); - static void maximumStoredHistory(int); -}; - -/// @todo NEEDS DOCUMENTATION -struct Units { - Units(); - static void list(); -}; - -/// @todo NEEDS DOCUMENTATION -struct Viewer { - static void flush(const std::string viewer=""); -} ; - -/// @todo NEEDS DOCUMENTATION -struct Vis { - Vis(); - static void drawVolume(const std::string volName=""); - static void open(const std::string sysName="",int winSize=600); - Viewer viewer; -}; - -/// @todo NEEDS DOCUMENTATION -struct Gtest { - Gtest(); - static void tolerance(double); - static void position(double,double,double); - static void direction(double,double,double); - static void line_test(bool); - static void grid_cells(double,double,double); - static void grid_test(bool); - static void cylinder_geometry(int,int,int); - static void cylinder_scaleZ(double); - static void cylinder_scaleRho(double); - static void cylinder_test(bool); - static void recursion_start(int); - static void recursion_depth(int); - static void run(bool); - static void recursive_test(); -}; - -/// @todo NEEDS DOCUMENTATION -struct Gnavigator{ - Gnavigator(); - static void reset(); - static void verbose(int); - static void check_mode(bool); -}; - -/// @todo NEEDS DOCUMENTATION -struct Geometry { - Geometry(); - static Gtest test; - static Gnavigator navigator; -}; - -/// @todo NEEDS DOCUMENTATION -struct Tracking { - Tracking(); - static void abort(); - static void resume(); - static void storeTrajectory(int); - static void verbose(int); -}; - -/// @todo NEEDS DOCUMENTATION -struct Estack { - static void list(); - static void clear(int); -}; - -/// @todo NEEDS DOCUMENTATION -namespace G4Command { -struct Event { - Event(); - static void abort(); - static void verbose(int); - Estack stack; -}; -} - -/// @todo NEEDS DOCUMENTATION -struct Run { - Run(); - static void initialize(); - static void beamOn(int,const std::string macro="NULL",int i=-1); - static void verbose(int); - static void dumpRegion(const std::string region="ALL"); - static void dumpCouples(); - static void optimizeGeometry(bool fl=true); - static void breakAtBeginOfEvent(bool fl=true); - static void breakAtEndOfEvent(bool fl=true); - static void abort(bool fl=false); - static void abortCurrentEvent(); - static void geometryModified(); - static void physicsModified(); - static void cutoffModified(); - static void randomNumberStatusDirectory(const std::string fName="./"); - static void storeRandomNumberStatus(bool fl=true); - static void restoreRandomNumberStatus(const std::string fName="currentRun.rndm"); -}; - -/// @todo NEEDS DOCUMENTATION -struct Random { - Random(); - static void setDirectoryName(const std::string dir="./"); - static void setSavingFlag(bool fl=true); - static void saveThisRun(); - static void saveThisEvent(); - static void resetEngineFrom(const std::string fName="currentRun.rndm"); -}; - -/// @todo NEEDS DOCUMENTATION -struct Particle { - Particle(); -}; - -/// @todo NEEDS DOCUMENTATION -struct Process { - Process(); - static void list(const std::string type="all"); - static void verbose(int i=1); - static void setVerbose(int,const std::string type="all"); - static void dump(const std::string,const std::string particle="all"); - static void activate(const std::string, const std::string particle="all"); - static void inactivate(const std::string,const std::string particle="all"); -}; - - -/// @todo NEEDS DOCUMENTATION -struct Physics_engine { - Physics_engine(); -}; - -/// @todo NEEDS DOCUMENTATION -struct G4Commands { - G4Commands(); - Control control; - Units units; - Vis vis; - Geometry geometry; - Tracking tracking; - G4Command::Event event; - Run run; - Random random; - Particle particle; - Process process; - Physics_engine physics_engine; -}; - -#endif diff --git a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/ParticleDataModifier.h b/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/ParticleDataModifier.h deleted file mode 100644 index 923520e3e8f92825ac84764099a2ac97ca9de351..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/ParticleDataModifier.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef G4AtlasControl_ParticleDataModifier_H -#define G4AtlasControl_ParticleDataModifier_H - -class G4ParticlePropertyTable; -class G4ParticleTable; - -#include <string> - -/// helper class to allow W access to particle data -class ParticleDataModifier { - public: - ParticleDataModifier(); - ParticleDataModifier(const std::string); - - void SetParticleMass(const std::string, double); - void SetParticleWidth(const std::string, double); - void SetParticleMass(double) const; - void SetParticleWidth(double) const; - void SetParticleLifeTime(const std::string, double); - void SetParticleLifeTime(double) const; - void Stable(const std::string, bool); - void Stable(bool); - void AddDecayChannel(const std::string, double,const std::string); - void AddDecayChannel(double,const std::string) const; - void SetPDGCode(const std::string, int); - void SetPDGCode(int) const; - void SetParticleCharge(const std::string, double); - void SetParticleCharge(double) const; - - private: - G4ParticlePropertyTable* partProperties; - G4ParticleTable* partTable; - std::string partName; -}; - -#endif diff --git a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/SimControl.h b/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/SimControl.h index 82f2e71ca5250acdfb4af57ca83df45396ab23c7..e6fd550101f2c9c30a92fc266f375b0a66a06800 100644 --- a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/SimControl.h +++ b/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/SimControl.h @@ -5,8 +5,8 @@ #ifndef G4AtlasControl_SimControl_H #define G4AtlasControl_SimControl_H -#include <string> #include "G4AtlasControl/MCTruthMenu.h" +#include <string> /// @class SimControl /// @brief C++ class used for passing configuration @@ -23,20 +23,12 @@ public: SimControl(); /// Empty Destructor virtual ~SimControl(); - /// Pass a command to the G4UIManager from the python layer - void G4Command(const std::string&) const; - /// Start a UIsession. FIXME not used anywhere - already obsolete? ATLASSIM-2766 - void UIsession() const; /// Used to load libraries for G4Extentions using FadsPackageLoader. FIXME Drop this. ATLASSIM-2768 void load(const std::string&) const; - /// Used to read XML configuration by FadsXMLParser. FIXME Migrate remaining clients so this can be dropped. ATLASSIM-2769 - void ReadXML(const std::string&) const; /// Access the MCTruthMenu. FIXME Migrate TruthStrategy configuration. ATLASSIM-2767 const MCTruthMenu& mcMenu() const ; /// Still used from PyG4Atlas.G4AtlasEngine to initialize Geant4. void initializeG4(bool isMT=false) const; - /// Still used from PyG4Atlas.menu_Visualization used by PyG4Atlas.G4AtlasEngine._init_Graphics. FIXME Drop this - obsolete. - void initializeGraphics() const; /// Currently used to configure TruthStrategies for AtlasG4 jobs. FIXME Migrate TruthStrategy configuration. ATLASSIM-2767 MCTruthMenu mctruthMenu; }; diff --git a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/selection.xml b/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/selection.xml index 4d00596784067a5a20f393faf816d9ad2ec90cdf..d731025ed2224443d8b5ba1f18e7f1b11da93b5d 100644 --- a/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/selection.xml +++ b/Simulation/G4Atlas/G4AtlasControl/G4AtlasControl/selection.xml @@ -1,21 +1,4 @@ <lcgdict> <class name="SimControl"/> <class name="MCTruthMenu"/> - <class name="ParticleDataModifier"/> - <class name="Control"/> - <class name="Units"/> - <class name="Vis"/> - <class name="Viewer"/> - <class name="Geometry"/> - <class name="Gtest"/> - <class name="Gnavigator"/> - <class name="Tracking"/> - <class name="Estack"/> - <class name="G4Command::Event"/> - <class name="Run"/> - <class name="Random"/> - <class name="Particle"/> - <class name="Process"/> - <class name="Physics_engine"/> - <class name="G4Commands"/> </lcgdict> diff --git a/Simulation/G4Atlas/G4AtlasControl/cmt/requirements b/Simulation/G4Atlas/G4AtlasControl/cmt/requirements index d962c68a42df82ca1c3deced1da98d789640196b..b5cdae56efe40c1973c146a22452511853f43063 100644 --- a/Simulation/G4Atlas/G4AtlasControl/cmt/requirements +++ b/Simulation/G4Atlas/G4AtlasControl/cmt/requirements @@ -9,10 +9,7 @@ private use AtlasCLHEP AtlasCLHEP-* External use Geant4 Geant4-* External use FadsPackageLoader FadsPackageLoader-* Simulation/G4Sim/FADS -use FadsUtilities FadsUtilities-* Simulation/G4Sim/FADS -use FadsXMLParser FadsXMLParser-* Simulation/G4Sim/FADS use MCTruthBase MCTruthBase-* Simulation/G4Sim -use PathResolver PathResolver-* Tools end_private ####include_dirs "$(G4AtlasControl_root)" diff --git a/Simulation/G4Atlas/G4AtlasControl/src/G4CommandInterface.cxx b/Simulation/G4Atlas/G4AtlasControl/src/G4CommandInterface.cxx deleted file mode 100644 index fae095736b22dbe17a86b2519c4f101ae23303bd..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasControl/src/G4CommandInterface.cxx +++ /dev/null @@ -1,513 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "G4AtlasControl/G4CommandInterface.h" - -#include "G4UImanager.hh" -#include "G4VisManager.hh" - -#include <iostream> -#include <sstream> - -Gtest Geometry::test; -Gnavigator Geometry::navigator; - -Control::Control() -{ -} -void Control::execute(const std::string fileName) -{ - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand("/control/execute "+fileName); -} -void Control::loop(const std::string mac,const std::string counter,int init,int fin,int stepSize) -{ - std::ostringstream oss; - oss<<"/control/loop "<<mac<<" "<<counter<<" "<<init<<" "<<fin - <<stepSize; - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand(oss.str()); -} -void Control::foreach(const std::string macro,const std::string counter,const std::string valueList) -{ - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand("/control/foreach "+macro+" "+counter+" "+valueList); -} -void Control::suppressAbortion(int i) -{ - std::ostringstream oss; - oss<<"/control/suppressAbortion "<<i; - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand(oss.str()); -} -void Control::verbose(int i) -{ - std::ostringstream oss; - oss<<"/control/verbose "<<i; - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand(oss.str()); -} -void Control::saveHistory(const std::string fileName) -{ - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand("/control/saveHistory "+fileName); -} -void Control::stopSavingHistory() -{ - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand("/control/stopSavingHistory"); -} -void Control::alias(const std::string aliasName,const std::string aliasValue) -{ - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand("/control/alias "+aliasName+" "+aliasValue); -} -void Control::unalias(const std::string aliasName) -{ - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand("/control/unalias "+aliasName); -} - -void Control::listAlias() -{ - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand("/control/listAlias"); -} -void Control::shell(const std::string command) -{ - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand("/control/shell "+command); -} -void Control::manual(const std::string dirPath) -{ - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand("/control/manual "+dirPath); -} -void Control::createHTML(const std::string dirPath) -{ - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand("/control/createHTML "+dirPath); -} -void Control::maximumStoredHistory(int i) -{ - std::ostringstream oss; - oss<<"/control/maximumStoredHistory "<<i; - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand(oss.str()); -} - -Units::Units() -{ -} - -void Units::list() -{ - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand("/units/list"); -} - -Vis::Vis() -{ -} - -void Vis::drawVolume(const std::string volName) -{ - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand("/vis/drawVolume"+volName); -} - -void Vis::open(const std::string sysName,int winSize) -{ - std::ostringstream oss; - oss<<"/vis/open "<<sysName<<" "<<winSize; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} - -void Viewer::flush(const std::string viewer) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/vis/viewer/flush "+viewer); -} - -Gtest::Gtest() -{ -} -void Gtest::tolerance(double d) -{ - std::ostringstream oss; - oss<<"/geometry/test/tolerance "<<d; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -void Gtest::position(double d1,double d2,double d3) -{ - std::ostringstream oss; - oss<<"/geometry/test/position "<<d1<<" "<<d2<<" "<<d3; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -void Gtest::direction(double d1,double d2,double d3) -{ - std::ostringstream oss; - oss<<"/geometry/test/direction "<<d1<<" "<<d2<<" "<<d3; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -void Gtest::line_test(bool t) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - std::string tst="FALSE"; - if (t) tst="TRUE"; - UI->ApplyCommand("/geometry/test/line_test "+tst); -} -void Gtest::grid_cells(double d1,double d2,double d3) -{ - std::ostringstream oss; - oss<<"/geometry/test/grid_cells "<<d1<<" "<<d2<<" "<<d3; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -void Gtest::grid_test(bool t) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - std::string tst="FALSE"; - if (t) tst="TRUE"; - UI->ApplyCommand("/geometry/test/grid_test "+tst); -} -void Gtest::cylinder_geometry(int i1,int i2,int i3) -{ - std::ostringstream oss; - oss<<"/geometry/test/cylinder_geometry "<<i1<<" "<<i2<<" "<<i3; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -void Gtest::cylinder_scaleZ(double d1) -{ - std::ostringstream oss; - oss<<"/geometry/test/cylinder_scaleZ "<<d1; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -void Gtest::cylinder_scaleRho(double d1) -{ - std::ostringstream oss; - oss<<"/geometry/test/cylinder_scaleRho "<<d1; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -void Gtest::cylinder_test(bool t) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - std::string tst="FALSE"; - if (t) tst="TRUE"; - UI->ApplyCommand("/geometry/test/cylinder_test "+tst); -} -void Gtest::recursion_start(int i1) -{ - std::ostringstream oss; - oss<<"/geometry/test/recursion_start "<<i1; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -void Gtest::recursion_depth(int i1) -{ - std::ostringstream oss; - oss<<"/geometry/test/recursion_depth "<<i1; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -void Gtest::run(bool t) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - std::string tst="FALSE"; - if (t) tst="TRUE"; - UI->ApplyCommand("/geometry/test/run "+tst); -} -void Gtest::recursive_test() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/geometry/test/recursive_test "); -} - -Gnavigator::Gnavigator() -{ -} - -void Gnavigator::reset() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/geometry/navigator/reset"); -} -void Gnavigator::verbose(int i) -{ - std::ostringstream oss; - oss<<"/geometry/navigator/verbose "<<i; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -void Gnavigator::check_mode(bool t) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - std::string tst="FALSE"; - if (t) tst="TRUE"; - UI->ApplyCommand("/geometry/navigator/check_mode "+tst); -} - -Geometry::Geometry() -{ -} - -Tracking::Tracking() -{ -} - -void Tracking::abort() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/tracking/abort"); -} - -void Tracking::resume() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/tracking/resume"); -} - -void Tracking::storeTrajectory(int i) -{ - std::ostringstream oss; - oss<<"/tracking/storeTrajectory "<<i; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} - -void Tracking::verbose(int i) -{ - std::ostringstream oss; - oss<<"/tracking/verbose "<<i; - std::cout<<"setting tracking/verbose to "<<i<<std::endl; - std::cout<<oss.str()<<std::endl; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} - -void Estack::list() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/event/stack/list"); -} - -void Estack::clear(int i) -{ - std::ostringstream oss; - oss<<"/event/stack/clear "<<i; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} - -namespace G4Command { -Event::Event() -{ -} - -void Event::abort() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/event/abort"); -} - -void Event::verbose(int i) -{ - std::ostringstream oss; - oss<<"/event/verbose "<<i; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -} - - -Run::Run() -{ -} - -void Run::initialize() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/initialize"); -} -void Run::beamOn(int i,const std::string macro,int k) -{ - std::ostringstream oss; - oss<<"/run/beamOn "<<i<<" "<<macro<<" "<<k; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} - -void Run::verbose(int i) -{ - std::ostringstream oss; - oss<<"/run/verbose "<<i; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} - -void Run::dumpRegion(const std::string region) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/dumpRegion "+region); -} -void Run::dumpCouples() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/dumpCouples"); -} -void Run::optimizeGeometry(bool fl) -{ - std::string tfl=FALSE; - if (fl) tfl=TRUE; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/optimizeGeometry "+tfl); -} -void Run::breakAtBeginOfEvent(bool fl) -{ - std::string tfl=FALSE; - if (fl) tfl=TRUE; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/breakAtBeginOfEvent "+tfl); -} -void Run::breakAtEndOfEvent(bool fl) -{ - std::string tfl=FALSE; - if (fl) tfl=TRUE; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/breakAtEndOfEvent "+tfl); -} -void Run::abort(bool fl) -{ - std::string tfl=FALSE; - if (fl) tfl=TRUE; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/abort "+tfl); -} -void Run::abortCurrentEvent() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/abortCurrentEvent"); -} -void Run::geometryModified() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/geometryModified"); -} -void Run::physicsModified() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/physicsModified"); -} -void Run::cutoffModified() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/cutoffModified"); -} -void Run::randomNumberStatusDirectory(const std::string fName) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/randomNumberStatusDirectory "+fName); -} -void Run::storeRandomNumberStatus(bool fl) -{ - std::string tfl=FALSE; - if (fl) tfl=TRUE; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/storeRandomNumberStatus "+tfl); -} -void Run::restoreRandomNumberStatus(const std::string fName) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/run/restoreRandomNumberStatus "+fName); -} - -Random::Random() -{ -} - -void Random::setDirectoryName(const std::string dir) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/random/setDirectoryName "+dir); -} -void Random::setSavingFlag(bool fl) -{ - std::string tfl=FALSE; - if (fl) tfl=TRUE; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/random/setSavingFlag "+tfl); -} -void Random::saveThisRun() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/random/saveThisRun"); -} -void Random::saveThisEvent() -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/random/saveThisEvent"); -} -void Random::resetEngineFrom(const std::string fName) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/random/resetEngineFrom "+fName); -} - -Particle::Particle() -{ -} - -Process::Process() -{ -} - -void Process::list(const std::string type) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/process/list "+type); -} -void Process::verbose(int i) -{ - std::ostringstream oss; - oss<<"/process/verbose "<<i; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -void Process::setVerbose(int i,const std::string type) -{ - std::ostringstream oss; - oss<<"/process/setVerbose "<<i<<" "<<type; - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand(oss.str()); -} -void Process::dump(const std::string procName,const std::string particle) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/process/dump "+procName+" "+particle); -} -void Process::activate(const std::string procName, const std::string particle) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/process/activate "+procName+" "+particle); -} -void Process::inactivate(const std::string procName,const std::string particle) -{ - G4UImanager *UI=G4UImanager::GetUIpointer(); - UI->ApplyCommand("/process/inactivate "+procName+" "+particle); -} -Physics_engine::Physics_engine() -{ -} - -G4Commands::G4Commands() -{ - std::cout<<" creating the python interface to G4 "<<std::endl; -} diff --git a/Simulation/G4Atlas/G4AtlasControl/src/ParticleDataModifier.cxx b/Simulation/G4Atlas/G4AtlasControl/src/ParticleDataModifier.cxx deleted file mode 100644 index 0513f96843166d60a17aa61ee59c5d163c17ddd4..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasControl/src/ParticleDataModifier.cxx +++ /dev/null @@ -1,404 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "G4AtlasControl/ParticleDataModifier.h" - -#include "G4ParticlePropertyTable.hh" -#include "G4ParticleTable.hh" -#include "G4ParticlePropertyData.hh" - -#include "G4DecayTable.hh" -#include "G4VDecayChannel.hh" -#include "G4PhaseSpaceDecayChannel.hh" - -#include "FadsUtilities/Tokenizer.h" - -#include <iostream> - -ParticleDataModifier::ParticleDataModifier() -{ - partName=""; - partProperties=G4ParticlePropertyTable::GetParticlePropertyTable(); - partTable=G4ParticleTable::GetParticleTable(); -} - -ParticleDataModifier::ParticleDataModifier(const std::string pName) -{ - partName=pName; - partProperties=G4ParticlePropertyTable::GetParticlePropertyTable(); - partTable=G4ParticleTable::GetParticleTable(); -} - -void ParticleDataModifier::SetParticleMass(const std::string pName, double value) -{ - partName=pName; - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - G4ParticlePropertyData* pData=partProperties->GetParticleProperty(partName); - if (value != pData->GetPDGMass()) pData->SetPDGMass(value); - partProperties->SetParticleProperty(*pData); - } - else - { - std::cout<<"Particle "<<pName<<" not found in the ParticleTable!!!"<<std::endl; - } - } -} - -void ParticleDataModifier::SetParticleWidth(const std::string pName, double value) -{ - partName=pName; - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - G4ParticlePropertyData* pData=partProperties->GetParticleProperty(partName); - if (value != pData->GetPDGWidth()) pData->SetPDGWidth(value); - partProperties->SetParticleProperty(*pData); - } - else - { - std::cout<<"Particle "<<pName<<" not found in the ParticleTable!!!"<<std::endl; - } - } -} - -void ParticleDataModifier::SetParticleMass(double value) const -{ - if (partName.empty()) - { - std::cout<<" Particle name not set!! returning"<<std::endl; - return; - } - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - G4ParticlePropertyData* pData=partProperties->GetParticleProperty(partName); - if (value != pData->GetPDGMass()) pData->SetPDGMass(value); - partProperties->SetParticleProperty(*pData); - } - } -} - -void ParticleDataModifier::SetParticleWidth(double value) const -{ - if (partName.empty()) - { - std::cout<<" Particle name not set!! returning"<<std::endl; - return; - } - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - G4ParticlePropertyData* pData=partProperties->GetParticleProperty(partName); - if (value != pData->GetPDGWidth()) pData->SetPDGWidth(value); - partProperties->SetParticleProperty(*pData); - } - } -} - -void ParticleDataModifier::Stable(const std::string pName, bool value) -{ - partName=pName; - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - if (value) - std::cout<<" Setting "<<partName<<" to be stable "<<std::endl; - else - std::cout<<" Setting "<<partName<<" to be unstable "<<std::endl; - particle->SetPDGStable(value); - } - } -} - -void ParticleDataModifier::Stable(bool value) -{ - if (partName.empty()) - { - std::cout<<" Particle name not set!! returning"<<std::endl; - return; - } - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - if (value) - std::cout<<" Setting "<<partName<<" to be stable "<<std::endl; - else - std::cout<<" Setting "<<partName<<" to be unstable "<<std::endl; - particle->SetPDGStable(value); - } - } -} - -void ParticleDataModifier::SetParticleLifeTime(double value) const -{ - if (partName.empty()) - { - std::cout<<" Particle name not set!! returning"<<std::endl; - return; - } - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - G4ParticlePropertyData* pData=partProperties->GetParticleProperty(partName); - if (value != pData->GetPDGLifeTime()) pData->SetPDGLifeTime(value); - partProperties->SetParticleProperty(*pData); - } - } -} - -void ParticleDataModifier::SetParticleLifeTime(const std::string pName, double value) -{ - partName=pName; - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - G4ParticlePropertyData* pData=partProperties->GetParticleProperty(partName); - if (value != pData->GetPDGLifeTime()) pData->SetPDGLifeTime(value); - partProperties->SetParticleProperty(*pData); - } - else - { - std::cout<<"Particle "<<pName<<" not found in the ParticleTable!!!"<<std::endl; - } - } -} - -void ParticleDataModifier::AddDecayChannel(const std::string pName, double bRatio, - const std::string decayProd) -{ - FADS::Tokenizer tok("=",decayProd); - int nProducts=tok.size(); - - partName=pName; - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - G4DecayTable* table = particle->GetDecayTable(); - if (table==NULL) - table = new G4DecayTable(); - G4VDecayChannel** mode = new G4VDecayChannel*[1]; - // really love this one! - if (nProducts==2) - mode[0] = new G4PhaseSpaceDecayChannel(partName,bRatio,2,tok[0],tok[1]); - else if (nProducts==3) - mode[0] = new G4PhaseSpaceDecayChannel(partName,bRatio,3,tok[0],tok[1],tok[2]); - else if (nProducts==4) - mode[0] = new G4PhaseSpaceDecayChannel(partName,bRatio,4,tok[0],tok[1],tok[2],tok[3]); - else - { - std::cout<<"no decay in more than 4 particles allowed!!"<<std::endl; - delete [] mode; - return; - } - table->Insert(mode[0]); - delete [] mode; - particle->SetDecayTable(table); - } - } -} - -void ParticleDataModifier::AddDecayChannel(double bRatio, const std::string decayProd) const -{ - FADS::Tokenizer tok("=",decayProd); - int nProducts=tok.size(); - - if (partName.empty()) - { - std::cout<<" Particle name not set!! returning"<<std::endl; - return; - } - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - G4DecayTable* table = particle->GetDecayTable(); - if (table==NULL) - table = new G4DecayTable(); - G4VDecayChannel** mode = new G4VDecayChannel*[1]; - // really love this one! - if (nProducts==2) - mode[0] = new G4PhaseSpaceDecayChannel(partName,bRatio,2,tok[0],tok[1]); - else if (nProducts==3) - mode[0] = new G4PhaseSpaceDecayChannel(partName,bRatio,3,tok[0],tok[1],tok[2]); - else if (nProducts==4) - mode[0] = new G4PhaseSpaceDecayChannel(partName,bRatio,4,tok[0],tok[1],tok[2],tok[3]); - else - { - std::cout<<"no decay in more than 4 particles allowed!!"<<std::endl; - delete [] mode; - return; - } - table->Insert(mode[0]); - delete [] mode; - particle->SetDecayTable(table); - } - } -} - -void ParticleDataModifier::SetPDGCode(int value) const -{ - if (partName.empty()) - { - std::cout<<" Particle name not set!! returning"<<std::endl; - return; - } - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - G4ParticlePropertyData* pData=partProperties->GetParticleProperty(partName); - if (value != pData->GetPDGEncoding()) pData->SetPDGEncoding(value); - partProperties->SetParticleProperty(*pData); - } - } -} - -void ParticleDataModifier::SetPDGCode(const std::string pName, int value) -{ - partName=pName; - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - G4ParticlePropertyData* pData=partProperties->GetParticleProperty(partName); - if (value != pData->GetPDGEncoding()) pData->SetPDGEncoding(value); - partProperties->SetParticleProperty(*pData); - } - else - { - std::cout<<"Particle "<<pName<<" not found in the ParticleTable!!!"<<std::endl; - } - } -} - -void ParticleDataModifier::SetParticleCharge(double value) const -{ - if (partName.empty()) - { - std::cout<<" Particle name not set!! returning"<<std::endl; - return; - } - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - G4ParticlePropertyData* pData=partProperties->GetParticleProperty(partName); - if (value != pData->GetPDGCharge()) pData->SetPDGCharge(value); - partProperties->SetParticleProperty(*pData); - } - } -} - -void ParticleDataModifier::SetParticleCharge(const std::string pName, double value) -{ - partName=pName; - G4ParticleTable::G4PTblDicIterator* theParticleIterator; - theParticleIterator = partTable->GetIterator(); - - // loop over all particles in G4ParticleTable - theParticleIterator->reset(); - while( (*theParticleIterator)() ) - { - G4ParticleDefinition* particle = theParticleIterator->value(); - if (partName==particle->GetParticleName()) - { - G4ParticlePropertyData* pData=partProperties->GetParticleProperty(partName); - if (value != pData->GetPDGCharge()) pData->SetPDGCharge(value); - partProperties->SetParticleProperty(*pData); - } - else - { - std::cout<<"Particle "<<pName<<" not found in the ParticleTable!!!"<<std::endl; - } - } -} diff --git a/Simulation/G4Atlas/G4AtlasControl/src/SimControl.cxx b/Simulation/G4Atlas/G4AtlasControl/src/SimControl.cxx index 2b67336acbba485b5830dd4c5eb00b8ce173a7f2..0edb23c997b9e9ce3a7d3a614dd5f1296aec47c3 100644 --- a/Simulation/G4Atlas/G4AtlasControl/src/SimControl.cxx +++ b/Simulation/G4Atlas/G4AtlasControl/src/SimControl.cxx @@ -4,71 +4,28 @@ #include "G4AtlasControl/SimControl.h" -// STL includes -#include <iostream> - // Geant4 includes #include "G4RunManager.hh" -#include "G4UImanager.hh" -#include "G4UIsession.hh" -#include "G4UIterminal.hh" -#include "G4UItcsh.hh" -#include "G4VisManager.hh" - -// Framework includes -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/Bootstrap.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/IMessageSvc.h" -#include "PathResolver/PathResolver.h" // FADS includes #include "FadsPackageLoader/PackageLoader.h" -#include "FadsXMLParser/XMLReader.h" + +// STL includes +#include <stdexcept> SimControl::SimControl() { - // std::cout<<" Creating the SimControl "<<std::endl; } SimControl::~SimControl() { } -void SimControl::G4Command(const std::string& comm) const -{ - G4UImanager *ui=G4UImanager::GetUIpointer(); - ui->ApplyCommand(comm); -} - -void SimControl::UIsession() const -{ - std::cout<<" Starting a G4 terminal "<<std::endl; - G4UIsession * ses = new G4UIterminal(new G4UItcsh); - ses->SessionStart(); - - delete ses; -} - void SimControl::load(const std::string& lib) const { FADS::PackageLoader a(lib.c_str()); } -void SimControl::ReadXML(const std::string& fileName) const -{ - - const std::string filename=fileName; - std::string file=PathResolver::find_file(filename,"DATAPATH"); - if (!file.empty()) - { - FADS::XMLReader *temp=FADS::XMLReader::GetXMLReader(); - temp->Process(file); - } - else std::cout<<"file "<<filename<<" not found"<<std::endl; - -} - const MCTruthMenu& SimControl::mcMenu() const { static const MCTruthMenu& temp=mctruthMenu; @@ -88,9 +45,3 @@ void SimControl::initializeG4(bool isMT) const } else throw std::runtime_error("Run manager retrieval has failed"); } - -void SimControl::initializeGraphics() const -{ - // G4VisManager* visManager=new G4SvcVisManager(); - // visManager->Initialize(); -} diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/G4InitMute.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/G4InitMute.h deleted file mode 100644 index 1d5d9c8f52704fa4a0f94e9986034dbb975f0862..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/G4InitMute.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "G4ParticleTable.hh" - -// FIXME: this is just a temporary hack to allow genCong with the UserActionSvc. Please do not use this class anywhere in your code - -class G4InitMute{ - - public: - G4InitMute(){ - - G4ParticleTable::GetParticleTable()->SetReadiness(); - - }; - - ~G4InitMute(){}; - -}; - -class G4InitUnmute{ - - public: - G4InitUnmute(){ - - G4ParticleTable::GetParticleTable()->SetReadiness(false); - - }; - - ~G4InitUnmute(){}; - -}; diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/Geo2G4SvcBase.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/Geo2G4SvcBase.h new file mode 100644 index 0000000000000000000000000000000000000000..23a51e664095d0a39149215d04899d240b17cf49 --- /dev/null +++ b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/Geo2G4SvcBase.h @@ -0,0 +1,27 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef G4AtlasInterfaces_Geo2G4SvcBase_H +#define G4AtlasInterfaces_Geo2G4SvcBase_H + +#include <string> + +class VolumeBuilder; + +/// @todo NEEDS DOCUMENTATION +class Geo2G4SvcBase +{ +public: + virtual void RegisterVolumeBuilder(VolumeBuilder* vb) = 0; + virtual void UnregisterVolumeBuilder(VolumeBuilder* vb) = 0; + virtual VolumeBuilder* GetVolumeBuilder(std::string s) const = 0; + virtual VolumeBuilder* GetDefaultBuilder() const = 0; + + virtual void SetDefaultBuilder(VolumeBuilder*) = 0; + virtual void SetDefaultBuilder(std::string) = 0; + virtual void ListVolumeBuilders() const = 0; + + virtual bool UseTopTransforms() const = 0; +}; +#endif // G4AtlasInterfaces_Geo2G4SvcBase_H diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IGeo2G4Svc.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IGeo2G4Svc.h new file mode 100644 index 0000000000000000000000000000000000000000..f5a7ba70080a19c6a310875232edfd847c4dd450 --- /dev/null +++ b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IGeo2G4Svc.h @@ -0,0 +1,22 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef G4AtlasInterfaces_IGeo2G4Svc_H +#define G4AtlasInterfaces_IGeo2G4Svc_H + +#include "GaudiKernel/IService.h" +#include "Geo2G4SvcBase.h" + +class IGeo2G4Svc: virtual public IService, + virtual public Geo2G4SvcBase { +public: + static const InterfaceID& interfaceID(); +}; + +inline const InterfaceID& IGeo2G4Svc::interfaceID() +{ + static const InterfaceID IID_IGeo2G4Svc("IGeo2G4Svc",1,0); + return IID_IGeo2G4Svc; +} +#endif // G4AtlasInterfaces_IGeo2G4Svc_H diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IUserAction.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IUserAction.h deleted file mode 100644 index daa8ce89d0ffeff7482bb9c24a428bf1a85717e7..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IUserAction.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef G4ATLASINTERFACES_IUSERACTION_H -#define G4ATLASINTERFACES_IUSERACTION_H - -#include "GaudiKernel/IAlgTool.h" - -// need explicit include because of G4ClassificationOfNewTrack -#include "G4UserStackingAction.hh" - -//#include "G4AtlasInterfaces/UserActionRole.h" - -/** @class IUserAction IUserAction.h "G4AtlasInterfaces/IUserAction.h" - * - * Abstract interface to Geant4 Physics list classes - * - * @author Andrea Di Simone - * @date 2015-01-12 - */ - - -class G4Run; -class G4Event; -class G4Step; -class G4Track; -class G4EventManager; -class G4TrackingManager; -class G4StackManager; -class G4SteppingManager; - -namespace G4AtlasUA{ - - enum Role{BeginOfRun=0, BeginOfEvent, PreTracking, Step, Classification, NewStage, PrepareNewEvent, PostTracking, EndOfEvent, EndOfRun}; - -} - -class IUserAction : virtual public IAlgTool { - public: - IUserAction() {} - virtual ~IUserAction() {} - static const InterfaceID& interfaceID() { - static const InterfaceID IID_IUserAction( "IUserAction" , 1 , 0 ) ; - return IID_IUserAction ; - } - - /** interface for the BeginOfRun */ - virtual void BeginOfRun (const G4Run*) = 0 ; - - /** interface for the EndOfRun */ - virtual void EndOfRun (const G4Run*) = 0 ; - - /** interface for the BeginOfEvent */ - virtual void BeginOfEvent (const G4Event*) = 0 ; - /** interface for the BeginOfEvent */ - virtual void EndOfEvent (const G4Event*) = 0 ; - - /** interface for stepping actions */ - virtual void Step (const G4Step*) = 0 ; - - /** interface for PreUserTrackingAction */ - virtual void PreTracking (const G4Track*) = 0 ; - /** interface for PostUserTrackingAction */ - virtual void PostTracking (const G4Track*) = 0 ; - - /** interface for the stacking action */ - virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack) = 0; - virtual void NewStage() = 0; - virtual void PrepareNewEvent() = 0; - - /** to ask an action what are its roles */ - //virtual std::vector<G4AtlasUA::Role> Roles() = 0; - - // /** to ask an action what is its global priority */ - //virtual G4AtlasUA::Priority Priority() = 0; - ///** to set the global priority */ - //virtual void SetPriority(G4AtlasUA::Priority) = 0; - - /** to ask an action what is its priority for a given role */ - //virtual G4AtlasUA::Priority Priority(G4AtlasUA::Role) = 0; - ///** to set a priority for a given role */ - //virtual void SetPriority( G4AtlasUA::Priority, G4AtlasUA::Role) = 0; - - //** to add a role for the action */ - virtual void AddRole(G4AtlasUA::Role, unsigned int) = 0; - virtual void printRoles() = 0; - - //** ask a stepping action if it is associated to a specific region */ - virtual std::vector<std::string> GetRegions() = 0; - - //** cache a copy of the main G4 managers - virtual void setManagers(G4EventManager*, G4TrackingManager*, G4StackManager*, G4SteppingManager*) = 0; - -}; -#endif diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IUserActionSvc.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IUserActionSvc.h index 2328b0f4bbee92980609a95e67e5b0f1b2c7d3cd..f59279b953b55e781527f79578e92890956efe22 100644 --- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IUserActionSvc.h +++ b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IUserActionSvc.h @@ -2,52 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef G4ATLASINTERFACES_IUSERACTIONSVC_H -#define G4ATLASINTERFACES_IUSERACTIONSVC_H - -#include "GaudiKernel/IService.h" - -/** @class IUserActionSvc IUserActionSvc.h "G4AtlasInterfaces/IUserActionSvc.h" - * - * Abstract interface to manage simulation user actions - * - * @author Andrea Di Simone - * @date 2015-01-13 - */ - -class G4UserRunAction; -class G4UserEventAction; -class G4UserTrackingAction; -class G4UserStackingAction; -class G4UserSteppingAction; -class G4VTrajectory; -class G4TrackingManager; -class G4StackManager; - -class IUserActionSvc : virtual public IService { - public: - IUserActionSvc() {} - virtual ~IUserActionSvc() {} - static const InterfaceID& interfaceID() { - static const InterfaceID IID_IUserActionSvc( "IUserActionSvc" , 1 , 0 ) ; - return IID_IUserActionSvc ; - } - - // methods to allow access at G4 kernel managers, which were accessed before through the FADS singletons - virtual void SetTrajectory(G4VTrajectory * aTraj) = 0; - virtual G4TrackingManager* TrackingManager() const = 0; - virtual G4StackManager* StackManager() const = 0; - virtual void ResetTrajectory() = 0; - - virtual void SetLegacyRA(G4UserRunAction* anAction) = 0; - virtual void SetLegacyEA(G4UserEventAction* anAction) = 0; - virtual void SetLegacySA(G4UserSteppingAction* anAction) = 0; - virtual void SetLegacyTA(G4UserTrackingAction* anAction) = 0; - virtual void SetLegacyStaA(G4UserStackingAction* anAction)= 0; - -}; - -#endif #ifndef G4ATLASINTERFACES_G4UA__IUSERACTIONSVC_H #define G4ATLASINTERFACES_G4UA__IUSERACTIONSVC_H diff --git a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfig.py b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfig.py index 3a0e7ef6bce25382d70512ddbb7a6fa1acac0963..9359f1c37c58e4353edfeef8396a25b279444312 100644 --- a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfig.py +++ b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfig.py @@ -1,7 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr, CfgGetter -from G4AtlasServices.G4AtlasUserActionConfig import userActionName #from G4AtlasApps.SimFlags import simFlags #from AthenaCommon.BeamFlags import jobproperties @@ -115,6 +114,67 @@ def getForwardFieldSvc(name="ForwardField", **kwargs): #kwargs.setdefault("FieldOn", True) return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ1FwdG4FieldSvc(name='Q1FwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q1") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ2FwdG4FieldSvc(name='Q2FwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q2") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ3FwdG4FieldSvc(name='Q3FwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q3") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getD1FwdG4FieldSvc(name='D1FwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "D1") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getD2FwdG4FieldSvc(name='D2FwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "D2") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ4FwdG4FieldSvc(name='Q4FwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q4") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ5FwdG4FieldSvc(name='Q5FwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q5") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ6FwdG4FieldSvc(name='Q6FwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q6") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ7FwdG4FieldSvc(name='Q7FwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q7") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ1HKickFwdG4FieldSvc(name='Q1HKickFwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q1HKick") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ1VKickFwdG4FieldSvc(name='Q1VKickFwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q1VKick") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ2HKickFwdG4FieldSvc(name='Q2HKickFwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q2HKick") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ2VKickFwdG4FieldSvc(name='Q2VKickFwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q2VKick") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ3HKickFwdG4FieldSvc(name='Q3HKickFwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q3HKick") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ3VKickFwdG4FieldSvc(name='Q3VKickFwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q3VKick") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ4VKickAFwdG4FieldSvc(name='Q4VKickAFwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q4VKickA") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ4HKickFwdG4FieldSvc(name='Q4HKickFwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q4HKick") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ4VKickBFwdG4FieldSvc(name='Q4VKickBFwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q4VKickB") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ5HKickFwdG4FieldSvc(name='Q5HKickFwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q5HKick") + return CfgMgr.StandardFieldSvc(name, **kwargs) +def getQ6VKickFwdG4FieldSvc(name='Q6VKickFwdG4FieldSvc', **kwargs): + kwargs.setdefault("MagneticFieldSvc", "Q6VKick") + return CfgMgr.StandardFieldSvc(name, **kwargs) + def getATLAS_FieldMgrList(): fieldMgrList = [] from G4AtlasApps.SimFlags import simFlags diff --git a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfigDb.py b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfigDb.py index 82c102b15d5f69661d149c920ff01e9c26570de7..84893404424bf4b52a3bfde62fb4b6707bb900b9 100644 --- a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfigDb.py +++ b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasServicesConfigDb.py @@ -6,21 +6,33 @@ addService("G4AtlasServices.G4AtlasServicesConfig.getDetectorGeometrySvc","Detec addService("G4AtlasServices.G4AtlasServicesConfig.getG4AtlasSvc","G4AtlasSvc") addService("G4AtlasServices.G4AtlasServicesConfig.getG4GeometryNotifierSvc","G4GeometryNotifierSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV1UserActionSvc","UserActionSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV1ISFUserActionSvc","ISFUserActionSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV1ISFFullUserActionSvc","ISFFullUserActionSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV1ISFPassBackUserActionSvc","ISFPassBackUserActionSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV1ISF_AFIIUserActionSvc","ISF_AFIIUserActionSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV1ISFQuasiStableUserActionSvc","ISFQuasiStableUserActionSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV1CTBUserActionSvc","CTBUserActionSvc") - -addService("G4AtlasServices.G4AtlasUserActionConfig.getV2UserActionSvc","G4UA::UserActionSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV2ISFUserActionSvc","G4UA::ISFUserActionSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV2ISFFullUserActionSvc","G4UA::ISFFullUserActionSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV2ISFPassBackUserActionSvc","G4UA::ISFPassBackUserActionSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV2ISF_AFIIUserActionSvc","G4UA::ISF_AFIIUserActionSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV2ISFQuasiStableUserActionSvc","G4UA::ISFQuasiStableUserActionSvc") -addService("G4AtlasServices.G4AtlasUserActionConfig.getV2CTBUserActionSvc","G4UA::CTBUserActionSvc") +addService("G4AtlasServices.G4AtlasUserActionConfig.getUserActionSvc","G4UA::UserActionSvc") +addService("G4AtlasServices.G4AtlasUserActionConfig.getISFUserActionSvc","G4UA::ISFUserActionSvc") +addService("G4AtlasServices.G4AtlasUserActionConfig.getISFFullUserActionSvc","G4UA::ISFFullUserActionSvc") +addService("G4AtlasServices.G4AtlasUserActionConfig.getISFPassBackUserActionSvc","G4UA::ISFPassBackUserActionSvc") +addService("G4AtlasServices.G4AtlasUserActionConfig.getISF_AFIIUserActionSvc","G4UA::ISF_AFIIUserActionSvc") +addService("G4AtlasServices.G4AtlasUserActionConfig.getISFQuasiStableUserActionSvc","G4UA::ISFQuasiStableUserActionSvc") +addService("G4AtlasServices.G4AtlasUserActionConfig.getCTBUserActionSvc","G4UA::CTBUserActionSvc") addService("G4AtlasServices.G4AtlasServicesConfig.getStandardFieldSvc","StandardField") addService("G4AtlasServices.G4AtlasServicesConfig.getForwardFieldSvc","ForwardField") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ1FwdG4FieldSvc", "Q1FwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ2FwdG4FieldSvc", "Q2FwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ3FwdG4FieldSvc", "Q3FwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getD1FwdG4FieldSvc", "D1FwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getD2FwdG4FieldSvc", "D2FwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ4FwdG4FieldSvc", "Q4FwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ5FwdG4FieldSvc", "Q5FwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ6FwdG4FieldSvc", "Q6FwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ7FwdG4FieldSvc", "Q7FwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ1HKickFwdG4FieldSvc", "Q1HKickFwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ1VKickFwdG4FieldSvc", "Q1VKickFwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ2HKickFwdG4FieldSvc", "Q2HKickFwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ2VKickFwdG4FieldSvc", "Q2VKickFwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ3HKickFwdG4FieldSvc", "Q3HKickFwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ3VKickFwdG4FieldSvc", "Q3VKickFwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ4VKickAFwdG4FieldSvc", "Q4VKickAFwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ4HKickFwdG4FieldSvc", "Q4HKickFwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ4VKickBFwdG4FieldSvc", "Q4VKickBFwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ5HKickFwdG4FieldSvc", "Q5HKickFwdG4FieldSvc") +addService("G4AtlasServices.G4AtlasServicesConfig.getQ6VKickFwdG4FieldSvc", "Q6VKickFwdG4FieldSvc") diff --git a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfig.py b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfig.py index 4b0f3b37d98df96eba4f7419db8c26312a15053c..eedebe58c15a950ee26b1e30cd6c1fd08a4cc633 100644 --- a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfig.py +++ b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfig.py @@ -4,23 +4,14 @@ from AthenaCommon import CfgGetter,CfgMgr,Logging # Common methods to return default UserAction(Tool)s -# provide V1 or V2 action names -def userActionName(aName): - from G4AtlasApps.SimFlags import simFlags - if (hasattr(simFlags, 'UseV2UserActions') and simFlags.UseV2UserActions()): - if aName == 'CalibrationDefaultProcessing': ## This one uses a different naming convention... - return 'G4UA::CaloG4::CalibrationDefaultProcessingTool' - return 'G4UA::'+aName+'Tool' - return aName - # actions to be run at begin of run def getDefaultBoRActions(): from G4AtlasApps.SimFlags import simFlags defaultUA=[] - if not ((hasattr(simFlags, 'UseV2UserActions') and simFlags.UseV2UserActions()) or simFlags.ISFRun): #FIXME temp workaround - defaultUA+=[userActionName('G4SimTimer')] + #if not simFlags.ISFRun: + # defaultUA+=['G4UA::G4SimTimerTool'] if hasattr(simFlags, 'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn: - defaultUA+=[userActionName('StoppedParticleAction')] + defaultUA+=['G4UA::StoppedParticleActionTool'] return defaultUA # actions to be run at end of run @@ -28,16 +19,8 @@ def getDefaultEoRActions(): from G4AtlasApps.SimFlags import simFlags from AthenaCommon.BeamFlags import jobproperties defaultUA=[] - #FIXME temp workaround - if not ((hasattr(simFlags, 'UseV2UserActions') and simFlags.UseV2UserActions()) or simFlags.ISFRun): - defaultUA+=[userActionName('G4SimTimer')] - defaultUA+=[userActionName('G4TrackCounter')] if hasattr(simFlags, 'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn: - defaultUA+=[userActionName('StoppedParticleAction')] - if not (hasattr(simFlags, 'UseV2UserActions') and simFlags.UseV2UserActions()): #FIXME temp workaround - defaultUA+=[userActionName('G4CosmicFilter')] - if jobproperties.Beam.beamType() == 'cosmics' and not ((hasattr(simFlags, 'UseV2UserActions') and simFlags.UseV2UserActions()) or simFlags.ISFRun): #FIXME temp workaround - defaultUA+=[userActionName('G4CosmicFilter')] + defaultUA+=['G4UA::StoppedParticleActionTool'] return defaultUA # begin of event @@ -46,15 +29,16 @@ def getDefaultBoEActions(): from AthenaCommon.BeamFlags import jobproperties defaultUA=[] if not simFlags.ISFRun: - defaultUA+=[userActionName('G4SimTimer')] - defaultUA+=[userActionName('MCTruthSteppingAction')] - defaultUA+=[userActionName('G4TrackCounter')] + defaultUA+=['G4UA::G4SimTimerTool'] + defaultUA+=['G4UA::MCTruthSteppingActionTool'] + defaultUA+=['G4UA::G4TrackCounterTool'] + if jobproperties.Beam.beamType() == 'cosmics' and hasattr(simFlags, 'CavernBG') and not simFlags.CavernBG.statusOn: - defaultUA+=[userActionName('CosmicPerigeeAction')] + defaultUA+=['G4UA::CosmicPerigeeActionTool'] if hasattr(simFlags, 'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn: - defaultUA+=[userActionName('StoppedParticleAction')] + defaultUA+=['G4UA::StoppedParticleActionTool'] if hasattr(simFlags, 'CalibrationRun') and simFlags.CalibrationRun() == 'LAr+Tile': - defaultUA+=[userActionName('CalibrationDefaultProcessing')] + defaultUA+=['G4UA::CaloG4::CalibrationDefaultProcessingTool'] return defaultUA # end of event @@ -63,14 +47,14 @@ def getDefaultEoEActions(): from AthenaCommon.BeamFlags import jobproperties defaultUA=[] if not simFlags.ISFRun: - defaultUA+=[userActionName('G4SimTimer')] + defaultUA+=['G4UA::G4SimTimerTool'] if hasattr(simFlags, 'CavernBG') and simFlags.CavernBG.statusOn and simFlags.CavernBG.get_Value() == 'Read': - defaultUA+=[userActionName('HitWrapper')] - if hasattr(simFlags, 'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn: - defaultUA+=[userActionName('StoppedParticleAction')] - defaultUA+=[userActionName('G4CosmicFilter')] + defaultUA+=['G4UA::HitWrapperTool'] + if hasattr(simFlags,'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn: + defaultUA+=['G4UA::StoppedParticleActionTool'] + defaultUA+=['G4UA::G4CosmicFilterTool'] if jobproperties.Beam.beamType() == 'cosmics' and not simFlags.ISFRun: - defaultUA+=[userActionName('G4CosmicFilter')] + defaultUA+=['G4UA::G4CosmicFilterTool'] return defaultUA # stepping @@ -79,13 +63,13 @@ def getDefaultSteppingActions(): from AthenaCommon.BeamFlags import jobproperties defaultUA=[] if not simFlags.ISFRun: - defaultUA+=[userActionName('MCTruthSteppingAction')] + defaultUA+=['G4UA::MCTruthSteppingActionTool'] if jobproperties.Beam.beamType() == 'cosmics' and hasattr(simFlags, 'CavernBG') and not simFlags.CavernBG.statusOn: - defaultUA+=[userActionName('CosmicPerigeeAction')] + defaultUA+=['G4UA::CosmicPerigeeActionTool'] if hasattr(simFlags, 'CalibrationRun') and simFlags.CalibrationRun() == 'LAr+Tile': - defaultUA+=[userActionName('CalibrationDefaultProcessing')] + defaultUA+=['G4UA::CaloG4::CalibrationDefaultProcessingTool'] if simFlags.PhysicsList == 'QGSP_BERT_HP': - defaultUA+=[userActionName('PhotonKiller')] + defaultUA+=['G4UA::PhotonKillerTool'] return defaultUA # PreUserTracking @@ -93,8 +77,8 @@ def getDefaultBoTActions(): from G4AtlasApps.SimFlags import simFlags defaultUA=[] if not simFlags.ISFRun: - defaultUA+=[userActionName('AthenaTrackingAction')] - defaultUA+=[userActionName('G4TrackCounter')] + defaultUA+=['G4UA::AthenaTrackingActionTool'] + defaultUA+=['G4UA::G4TrackCounterTool'] return defaultUA # PostUserTracking @@ -102,13 +86,13 @@ def getDefaultEoTActions(): from G4AtlasApps.SimFlags import simFlags defaultUA=[] if not simFlags.ISFRun: - defaultUA+=[userActionName('AthenaTrackingAction')] + defaultUA+=['G4UA::AthenaTrackingActionTool'] return defaultUA # Stacking Classification def getDefaultStackingActions(): defaultUA=[] - defaultUA+=[userActionName('AthenaStackingAction')] + defaultUA+=['G4UA::AthenaStackingActionTool'] return defaultUA # Stacking PrepareNewEvent @@ -119,127 +103,8 @@ def getDefaultStaPrepareActions(): def getDefaultStaNewStageActions(): return [] -# -# Methods used to retrieve V1 UserActionSvc -# - -# this creates the V1 USerActionSvc with the default actions -# additional actions must be added to the service by the -# client packages, through G4AtlasUserActionConfig.UAStore -def getV1UserActionSvc(name="UserActionSvc", **kwargs): - kwargs.setdefault('BeginOfRunActions', getDefaultBoRActions()) - kwargs.setdefault('EndOfRunActions', getDefaultEoRActions()) - kwargs.setdefault('BeginOfEventActions', getDefaultBoEActions()) - kwargs.setdefault('EndOfEventActions', getDefaultEoEActions()) - kwargs.setdefault('SteppingActions', getDefaultSteppingActions()) - kwargs.setdefault('PreTrackingActions', getDefaultBoTActions()) - kwargs.setdefault('PostTrackingActions', getDefaultEoTActions()) - kwargs.setdefault('StackingActionsClassification', getDefaultStackingActions()) - kwargs.setdefault('StackingActionsPrepareNewEvent', getDefaultStaPrepareActions()) - kwargs.setdefault('StackingActionsNewStage', getDefaultStaNewStageActions()) - # placeholder for more advanced config, if needed - return CfgMgr.UserActionSvc(name, **kwargs) - -def getV1CTBUserActionSvc(name="CTBUserActionSvc", **kwargs): - from G4AtlasApps.SimFlags import simFlags - bor = getDefaultBoRActions() - eor = getDefaultEoRActions() - boe = getDefaultBoEActions() - eoe = getDefaultEoEActions() - bot = getDefaultBoTActions() - eot = getDefaultEoTActions() - stepping = getDefaultSteppingActions() - stacking = getDefaultStackingActions() - - if simFlags.SimLayout.get_Value()=='tb_LArH6_2004': - eoe=['LArHitsH6EventAction']+eoe - eoe+=['LArGeoH62004EventAction'] - if simFlags.LArTB_H6Step.statusOn: - if simFlags.LArTB_H6Step.get_Value(): - stepping+=['LArGeoH62004SteppingAction'] - boe+=['RadLenNtuple'] - eoe+=['RadLenNtuple'] - stepping+=['RadLenNtuple'] - kwargs.setdefault('BeginOfRunActions', bor) - kwargs.setdefault('EndOfRunActions', eor) - kwargs.setdefault('BeginOfEventActions', boe) - kwargs.setdefault('EndOfEventActions', eoe) - kwargs.setdefault('SteppingActions', stepping) - kwargs.setdefault('PreTrackingActions', bot) - kwargs.setdefault('PostTrackingActions', eot) - kwargs.setdefault('StackingActionsClassification', stacking) - - # placeholder for more advanced config, if needed - return CfgMgr.UserActionSvc(name, **kwargs) - - -def getV1ISFUserActionSvc(name="ISFUserActionSvc", **kwargs): - TrackProcessorUserAction = kwargs.pop('TrackProcessorUserAction',[]) - PhysicsValidationUserAction = kwargs.pop('PhysicsValidationUserAction',[]) - MCTruthUserAction = kwargs.pop('MCTruthUserAction',['ISFMCTruthUserAction']) - - from G4AtlasApps.SimFlags import simFlags - bor = getDefaultBoRActions() + PhysicsValidationUserAction - eor = getDefaultEoRActions() - boe = getDefaultBoEActions() + TrackProcessorUserAction + PhysicsValidationUserAction - eoe = getDefaultEoEActions() + TrackProcessorUserAction + PhysicsValidationUserAction - bot = TrackProcessorUserAction + MCTruthUserAction + getDefaultBoTActions() + PhysicsValidationUserAction - eot = TrackProcessorUserAction + MCTruthUserAction + getDefaultEoTActions() - stepping = getDefaultSteppingActions() + TrackProcessorUserAction + PhysicsValidationUserAction - stacking = getDefaultStackingActions() - - kwargs.setdefault('BeginOfRunActions', bor) - kwargs.setdefault('EndOfRunActions', eor) - kwargs.setdefault('BeginOfEventActions', boe) - kwargs.setdefault('EndOfEventActions', eoe) - kwargs.setdefault('SteppingActions', stepping) - kwargs.setdefault('PreTrackingActions', bot) - kwargs.setdefault('PostTrackingActions', eot) - kwargs.setdefault('StackingActionsClassification', stacking) - - return CfgMgr.UserActionSvc(name, **kwargs) - -def getV1ISFFullUserActionSvc(name="ISFFullUserActionSvc", **kwargs): - # this configuration needs ISFMCTruthUserAction, - # G4OnlyPhysicsValidationUserAction, and FullG4TrackProcessorUserAction - from ISF_Config.ISF_jobProperties import ISF_Flags - if ISF_Flags.ValidationMode.get_Value(): - kwargs.setdefault('PhysicsValidationUserAction',['G4OnlyPhysicsValidationUserAction']) - kwargs.setdefault('TrackProcessorUserAction', ['FullG4TrackProcessorUserAction']) - return getV1ISFUserActionSvc(name, **kwargs) - -def getV1ISFPassBackUserActionSvc(name="ISFPassBackUserActionSvc", **kwargs): - # this configuration needs ISFMCTruthUserAction, - # G4OnlyPhysicsValidationUserAction, and PassBackG4TrackProcessorUserAction - from ISF_Config.ISF_jobProperties import ISF_Flags - if ISF_Flags.ValidationMode.get_Value(): - kwargs.setdefault('PhysicsValidationUserAction', ['G4OnlyPhysicsValidationUserAction']) - kwargs.setdefault('TrackProcessorUserAction', ['PassBackG4TrackProcessorUserAction']) - return getV1ISFUserActionSvc(name, **kwargs) - -def getV1ISF_AFIIUserActionSvc(name="ISF_AFIIUserActionSvc", **kwargs): - # this configuration needs ISFMCTruthUserAction, - # AFII_G4PhysicsValidationUserAction, and AFII_G4TrackProcessorUserAction - from ISF_Config.ISF_jobProperties import ISF_Flags - if ISF_Flags.ValidationMode.get_Value(): - kwargs.setdefault('PhysicsValidationUserAction', ['AFII_G4PhysicsValidationUserAction']) - kwargs.setdefault('TrackProcessorUserAction', ['AFII_G4TrackProcessorUserAction']) - return getV1ISFUserActionSvc(name, **kwargs) - -def getV1ISFQuasiStableUserActionSvc(name="ISFQuasiStableUserActionSvc", **kwargs): - # this configuration needs ISFMCTruthUserAction, - # QuasiStableG4PhysicsValidationUserAction, and FullG4TrackProcessorUserAction - from ISF_Config.ISF_jobProperties import ISF_Flags - if ISF_Flags.ValidationMode.get_Value(): - kwargs.setdefault('PhysicsValidationUserAction', ['QuasiStableG4PhysicsValidationUserAction']) - return getV1ISFFullUserActionSvc(name, **kwargs) - - -# -# Methods used to retrieve V2 user actions -# -def getV2UserActionSvc(name="G4UA::UserActionSvc", **kwargs): +def getUserActionSvc(name="G4UA::UserActionSvc", **kwargs): """ Get the standard UA svc configurable with all default actions added. This function is normally called by the configured factory, not users. @@ -260,7 +125,7 @@ def getV2UserActionSvc(name="G4UA::UserActionSvc", **kwargs): # placeholder for more advanced config, if needed return CfgMgr.G4UA__UserActionSvc(name, **kwargs) -def getV2CTBUserActionSvc(name="G4UA::CTBUserActionSvc", **kwargs): +def getCTBUserActionSvc(name="G4UA::CTBUserActionSvc", **kwargs): from G4AtlasApps.SimFlags import simFlags bor = getDefaultBoRActions()+simFlags.OptionalUserActionList.get_Value()['BeginOfRun'] eor = getDefaultEoRActions()+simFlags.OptionalUserActionList.get_Value()['EndOfRun'] @@ -295,7 +160,7 @@ def getV2CTBUserActionSvc(name="G4UA::CTBUserActionSvc", **kwargs): return CfgMgr.G4UA__UserActionSvc(name, **kwargs) -def getV2ISFUserActionSvc(name="G4UA::ISFUserActionSvc", **kwargs): +def getISFUserActionSvc(name="G4UA::ISFUserActionSvc", **kwargs): TrackProcessorUserAction = kwargs.pop('TrackProcessorUserAction',[]) PhysicsValidationUserAction = kwargs.pop('PhysicsValidationUserAction',[]) MCTruthUserAction = kwargs.pop('MCTruthUserAction',['ISFMCTruthUserActionTool']) @@ -321,48 +186,40 @@ def getV2ISFUserActionSvc(name="G4UA::ISFUserActionSvc", **kwargs): return CfgMgr.G4UA__UserActionSvc(name, **kwargs) -def getV2ISFFullUserActionSvc(name="G4UA::ISFFullUserActionSvc", **kwargs): +def getISFFullUserActionSvc(name="G4UA::ISFFullUserActionSvc", **kwargs): # this configuration needs ISFMCTruthUserAction, # G4OnlyPhysicsValidationUserAction, and FullG4TrackProcessorUserAction from ISF_Config.ISF_jobProperties import ISF_Flags if ISF_Flags.ValidationMode.get_Value(): - kwargs.setdefault('PhysicsValidationUserAction',[]) - # FIXME: this action has not been migrated yet - #kwargs.setdefault('PhysicsValidationUserAction',['G4OnlyPhysicsValidationUserActionTool']) + kwargs.setdefault('PhysicsValidationUserAction',['G4OnlyPhysicsValidationUserActionTool']) kwargs.setdefault('TrackProcessorUserAction', ['FullG4TrackProcessorUserActionTool']) - return getV2ISFUserActionSvc(name, **kwargs) + return getISFUserActionSvc(name, **kwargs) -def getV2ISFPassBackUserActionSvc(name="G4UA::ISFPassBackUserActionSvc", **kwargs): +def getISFPassBackUserActionSvc(name="G4UA::ISFPassBackUserActionSvc", **kwargs): # this configuration needs ISFMCTruthUserAction, # G4OnlyPhysicsValidationUserAction, and PassBackG4TrackProcessorUserAction from ISF_Config.ISF_jobProperties import ISF_Flags if ISF_Flags.ValidationMode.get_Value(): - kwargs.setdefault('PhysicsValidationUserAction',[]) - # FIXME: this action has not been migrated yet - #kwargs.setdefault('PhysicsValidationUserAction', ['G4OnlyPhysicsValidationUserActionTool']) + kwargs.setdefault('PhysicsValidationUserAction',['G4OnlyPhysicsValidationUserActionTool']) kwargs.setdefault('TrackProcessorUserAction', ['PassBackG4TrackProcessorUserActionTool']) - return getV2ISFUserActionSvc(name, **kwargs) + return getISFUserActionSvc(name, **kwargs) -def getV2ISF_AFIIUserActionSvc(name="G4UA::ISF_AFIIUserActionSvc", **kwargs): +def getISF_AFIIUserActionSvc(name="G4UA::ISF_AFIIUserActionSvc", **kwargs): # this configuration needs ISFMCTruthUserAction, # AFII_G4PhysicsValidationUserAction, and AFII_G4TrackProcessorUserAction from ISF_Config.ISF_jobProperties import ISF_Flags if ISF_Flags.ValidationMode.get_Value(): - kwargs.setdefault('PhysicsValidationUserAction',[]) - # FIXME: this action has not been migrated yet - #kwargs.setdefault('PhysicsValidationUserAction', ['AFII_G4PhysicsValidationUserActionTool']) + kwargs.setdefault('PhysicsValidationUserAction',['AFII_G4PhysicsValidationUserActionTool']) kwargs.setdefault('TrackProcessorUserAction', ['AFII_G4TrackProcessorUserActionTool']) - return getV2ISFUserActionSvc(name, **kwargs) + return getISFUserActionSvc(name, **kwargs) -def getV2ISFQuasiStableUserActionSvc(name="G4UA::ISFQuasiStableUserActionSvc", **kwargs): +def getISFQuasiStableUserActionSvc(name="G4UA::ISFQuasiStableUserActionSvc", **kwargs): # this configuration needs ISFMCTruthUserAction, # QuasiStableG4PhysicsValidationUserAction, and FullG4TrackProcessorUserAction from ISF_Config.ISF_jobProperties import ISF_Flags if ISF_Flags.ValidationMode.get_Value(): - kwargs.setdefault('PhysicsValidationUserAction',[]) - # FIXME: this action has not been migrated yet - #kwargs.setdefault('PhysicsValidationUserAction', ['QuasiStableG4PhysicsValidationUserActionTool']) - return getV2ISFFullUserActionSvc(name, **kwargs) + kwargs.setdefault('PhysicsValidationUserAction',['QuasiStableG4PhysicsValidationUserActionTool']) + return getISFFullUserActionSvc(name, **kwargs) def addAction(actionTool, roles, systemAction=False): diff --git a/Simulation/G4Atlas/G4AtlasServices/src/DetectorGeometrySvc.cxx b/Simulation/G4Atlas/G4AtlasServices/src/DetectorGeometrySvc.cxx index a1c16380c0181626689f7399f0c0dff1755bb40e..db6d814979c799b6c21bd001a5a7a9f76035a822 100644 --- a/Simulation/G4Atlas/G4AtlasServices/src/DetectorGeometrySvc.cxx +++ b/Simulation/G4Atlas/G4AtlasServices/src/DetectorGeometrySvc.cxx @@ -68,13 +68,15 @@ StatusCode DetectorGeometrySvc::initialize(){ m_detConstruction->SetWorld(m_detTool->GetWorldVolume()); ATH_MSG_DEBUG( "Setting up G4 physics regions" ); - for (auto it: m_regionCreators) - ATH_CHECK( it.retrieve() ); + for (auto& it: m_regionCreators) + { + ATH_CHECK( it.retrieve() ); + } if (m_activateParallelWorlds) { ATH_MSG_DEBUG( "Setting up G4 parallel worlds" ); - for (auto it: m_parallelWorlds) + for (auto& it: m_parallelWorlds) { ATH_CHECK( it.retrieve() ); m_parallelWorldNames.push_back(it.name()); @@ -85,7 +87,6 @@ StatusCode DetectorGeometrySvc::initialize(){ ATH_MSG_DEBUG( "Setting up field managers" ); ATH_CHECK( m_fieldManagers.retrieve() ); ATH_CHECK( initializeFields() ); - //for (auto fm: m_fieldManagers) ATH_CHECK( fm.retrieve() ); ATH_MSG_DEBUG( "DetectorGeometrySvc initialized!!!" ); return StatusCode::SUCCESS; diff --git a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasSvc.cxx b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasSvc.cxx index da390803dd80b6e303c2252131acce26b7f2ab66..c74a23336725936ead0b3f7582c9f85b9f2956f8 100644 --- a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasSvc.cxx +++ b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasSvc.cxx @@ -15,8 +15,8 @@ G4AtlasSvc::G4AtlasSvc( const std::string& name, ISvcLocator* pSvcLocator ) : AthService(name,pSvcLocator),m_detGeoSvc("DetectorGeometrySvc","G4AtlasSvc") { - ATH_MSG_INFO( "G4AtlasSvc being created!" ); - declareProperty( "ActivateParallelWorlds",m_activateParallelGeometries,"Toggle on/off the G4 parallel geometry system"); + ATH_MSG_INFO( "G4AtlasSvc being created!" ); + declareProperty( "ActivateParallelWorlds",m_activateParallelGeometries,"Toggle on/off the G4 parallel geometry system"); } G4AtlasSvc::~G4AtlasSvc() @@ -26,7 +26,7 @@ G4AtlasSvc::~G4AtlasSvc() StatusCode G4AtlasSvc::initialize(){ // go through all tools and retrieve them // This fires initialize() for each of those tools - + ATH_MSG_INFO( "this is G4AtlasSvc::initialize() " ); ATH_MSG_INFO( "retireving the Detector Geometry Service" ); @@ -36,21 +36,21 @@ StatusCode G4AtlasSvc::initialize(){ CHECK(m_physicsListTool.retrieve()); if (m_activateParallelGeometries) - { - G4VModularPhysicsList* thePhysicsList=dynamic_cast<G4VModularPhysicsList*>(m_physicsListTool->GetPhysicsList()); - if (!thePhysicsList) - { - ATH_MSG_FATAL("Failed dynamic_cast!! this is not a G4VModularPhysicsList!"); - return StatusCode::FAILURE; - } + { + G4VModularPhysicsList* thePhysicsList=dynamic_cast<G4VModularPhysicsList*>(m_physicsListTool->GetPhysicsList()); + if (!thePhysicsList) + { + ATH_MSG_FATAL("Failed dynamic_cast!! this is not a G4VModularPhysicsList!"); + return StatusCode::FAILURE; + } #if G4VERSION_NUMBER >= 1010 - std::vector<std::string>& parallelWorldNames=m_detGeoSvc->GetParallelWorldNames(); - for (auto it: parallelWorldNames) - { - thePhysicsList->RegisterPhysics(new G4ParallelWorldPhysics(it,true)); - } + std::vector<std::string>& parallelWorldNames=m_detGeoSvc->GetParallelWorldNames(); + for (auto& it: parallelWorldNames) + { + thePhysicsList->RegisterPhysics(new G4ParallelWorldPhysics(it,true)); + } #endif - } + } return StatusCode::SUCCESS; } @@ -61,7 +61,7 @@ StatusCode G4AtlasSvc::finalize() return StatusCode::SUCCESS; } -StatusCode G4AtlasSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) +StatusCode G4AtlasSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) { if ( IG4AtlasSvc::interfaceID().versionMatch(riid) ) { *ppvInterface = dynamic_cast<IG4AtlasSvc*>(this); @@ -72,4 +72,3 @@ StatusCode G4AtlasSvc::queryInterface(const InterfaceID& riid, void** ppvInterfa addRef(); return StatusCode::SUCCESS; } - diff --git a/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.cxx b/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.cxx index 314bad5e3bcb9e9103bec2df03c9651d8d9fcf3c..c93a75813cb020f32ba4faafc52de077e70635eb 100644 --- a/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.cxx +++ b/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.cxx @@ -4,349 +4,6 @@ #include <mutex> -#include "UserActionSvc.h" - -#include "G4RunManager.hh" -#include "G4RegionStore.hh" - -// Constructor - UserActionSvc::UserActionSvc( const std::string& name, ISvcLocator* pSvcLocator ) : - AthService(name, pSvcLocator), - m_BoR(),m_EoR(),m_BoE(),m_EoE(),m_Ste(),m_BoT(),m_EoT(),m_StaCla(),m_StaPrepare(),m_StaNewStage(), - m_legacy_RA(0),m_legacy_EA(0),m_legacy_TA(0),m_legacy_SA(0),m_legacy_StaA(0){ - - declareProperty("BeginOfRunActions",m_BoR); - declareProperty("EndOfRunActions",m_EoR); - declareProperty("BeginOfEventActions",m_BoE); - declareProperty("EndOfEventActions",m_EoE); - declareProperty("SteppingActions",m_Ste); - declareProperty("PreTrackingActions",m_BoT); - declareProperty("PostTrackingActions",m_EoT); - declareProperty("StackingActionsClassification",m_StaCla); - declareProperty("StackingActionsPrepareNewEvent",m_StaPrepare); - declareProperty("StackingActionsNewStage",m_StaNewStage); - } - - -StatusCode UserActionSvc::initialize(){ - - ATH_MSG_INFO( "Initializing UserActionSvc: " << name() ); - - - ATH_CHECK(m_BoR.retrieve()); - ATH_CHECK(m_EoR.retrieve()); - - ATH_CHECK(m_BoE.retrieve()); - ATH_CHECK(m_EoE.retrieve()); - - ATH_CHECK(m_Ste.retrieve()); - - ATH_CHECK(m_BoT.retrieve()); - ATH_CHECK(m_EoT.retrieve()); - - ATH_CHECK(m_StaCla.retrieve()); - ATH_CHECK(m_StaPrepare.retrieve()); - ATH_CHECK(m_StaNewStage.retrieve()); - - // cache the pointers to the original interfaces, to remove the toolhandles - // notify the actions of the roles they were assigned and of the order of execution - - fillUserActionsList(m_BoR,m_BoRquick,G4AtlasUA::BeginOfRun,"BeginOfRun"); - fillUserActionsList(m_BoE,m_BoEquick,G4AtlasUA::BeginOfEvent,"BeginOfEvent"); - fillUserActionsList(m_BoT,m_BoTquick,G4AtlasUA::PreTracking,"PreUserTracking"); - fillUserActionsList(m_Ste,m_Stequick,G4AtlasUA::Step,"Stepping"); - fillUserActionsList(m_EoT,m_EoTquick,G4AtlasUA::PostTracking,"PostUserTracking"); - fillUserActionsList(m_StaCla,m_StaClaquick,G4AtlasUA::Classification,"Classification"); - fillUserActionsList(m_StaPrepare,m_StaPreparequick,G4AtlasUA::PrepareNewEvent,"PrepareNewEvent"); - fillUserActionsList(m_StaNewStage,m_StaNewStagequick,G4AtlasUA::NewStage,"NewStage"); - fillUserActionsList(m_EoE,m_EoEquick,G4AtlasUA::EndOfEvent,"EndOfEvent"); - fillUserActionsList(m_EoR,m_EoRquick,G4AtlasUA::EndOfRun,"EndOfRun"); - - - - registerToRunManager(); - - return StatusCode::SUCCESS; - -} - - -void UserActionSvc::setManagers(std::vector<IUserAction*>& actionlist){ - - for(auto action: actionlist) - action->setManagers(fpEventManager, fpTrackingManager, stackManager,fpSteppingManager); -} - -void UserActionSvc::fillUserActionsList(ToolHandleArray<IUserAction>& thlist, std::vector<IUserAction*>& actionlist,G4AtlasUA::Role role,std::string tag){ - - ATH_MSG_INFO("List of declared "<<tag<<" actions (in order of execution):"); - - int order=0; - for(auto action: thlist){ - // add stepping actions to global list only if no specific region is declared - if(action->GetRegions().size()==0 || role!=G4AtlasUA::Step){ - ATH_MSG_INFO(" ->"<<action->name());//<<" with properties"); - actionlist.push_back(&(*action)); - actionlist.back()->AddRole(role,order); - ++order; - } else { - ATH_MSG_INFO(" ->"<<action->name()<< " [Regional: will be assigned to "<<action->GetRegions().size()<<" regions at begin of run]"); - } - } - -} - - -void UserActionSvc::registerToRunManager(){ - - ATH_MSG_INFO( "Registering actions to G4 run manager "); - - G4RunManager* manager=G4RunManager::GetRunManager(); - - manager->SetUserAction((G4UserRunAction*)this); - manager->SetUserAction((G4UserEventAction*)this); - manager->SetUserAction((G4UserTrackingAction*)this); - manager->SetUserAction((G4UserSteppingAction*)this); - manager->SetUserAction((G4UserStackingAction*)this); - - // at this point the internal pointers to the managers have been filled by G4. we pass them to the actual user actions - - setManagers(m_BoRquick); - setManagers(m_BoEquick); - setManagers(m_BoTquick); - setManagers(m_Stequick); - setManagers(m_EoTquick); - setManagers(m_StaClaquick); - setManagers(m_StaPreparequick); - setManagers(m_StaNewStagequick); - setManagers(m_EoEquick); - setManagers(m_EoRquick); - - -} - -StatusCode UserActionSvc::finalize(){ - - ATH_MSG_INFO( "Finalizing UserActionSvc: " << name() ); - - - return StatusCode::SUCCESS; - -} - - // Destructor - UserActionSvc::~UserActionSvc(){ - //std::cout<<"in UASvc dtor"<<std::endl; - delete m_legacy_RA; - delete m_legacy_EA; - delete m_legacy_TA; - delete m_legacy_SA; - delete m_legacy_StaA; - // delete the wrappers for the regional stepping actions - for(auto regAction: m_SteRegion) - delete regAction; - } - - -void UserActionSvc::SetLegacyRA(G4UserRunAction* anAction){ - - m_legacy_RA=anAction; - -} - -void UserActionSvc::SetLegacyEA(G4UserEventAction* anAction){ - - m_legacy_EA=anAction; - -} - -void UserActionSvc::SetLegacySA(G4UserSteppingAction* anAction){ - - m_legacy_SA=anAction; - -} - -void UserActionSvc::SetLegacyTA(G4UserTrackingAction* anAction){ - - m_legacy_TA=anAction; - -} - -void UserActionSvc::SetLegacyStaA(G4UserStackingAction* anAction){ - - m_legacy_StaA=anAction; - -} - - - - -void UserActionSvc::PreUserTrackingAction(const G4Track* aTrack){ - - // first execute the legacy actions - - if(m_legacy_TA) m_legacy_TA->PreUserTrackingAction(aTrack); - - // now execute the new actions - for(auto action: m_BoTquick) - action->PreTracking(aTrack); - -} - -void UserActionSvc::PostUserTrackingAction(const G4Track* aTrack){ - - // first execute the legacy actions - - if(m_legacy_TA) m_legacy_TA->PostUserTrackingAction(aTrack); - - // now execute the new actions - - for(auto action: m_EoTquick) - action->PostTracking(aTrack); - -} -void UserActionSvc::BeginOfEventAction(const G4Event* anEvent){ - - // first execute the legacy actions - - if(m_legacy_EA) m_legacy_EA->BeginOfEventAction(anEvent); - - // now execute the new actions - - for(auto action: m_BoEquick) - action->BeginOfEvent(anEvent); -} - -void UserActionSvc::EndOfEventAction(const G4Event* anEvent){ - - // first execute the legacy actions - - if(m_legacy_EA) m_legacy_EA->EndOfEventAction(anEvent); - - // now execute the new actions - - for(auto action: m_EoEquick) - action->EndOfEvent(anEvent); - -} - -void UserActionSvc::BeginOfRunAction(const G4Run* aRun ){ - - for(auto action: m_Ste){ - for(auto region: action->GetRegions()){ - G4Region* pRegion = G4RegionStore::GetInstance()->GetRegion(region); - if(!pRegion){ - ATH_MSG_ERROR( "Region "<<region<<" requested by "<<action->name()<<" not found"); - ATH_MSG_ERROR( "Job will go on, but the action will have no effect"); - } else{ - ATH_MSG_INFO("Assigning stepping action "<<action->name()<<" to region "<<region); - // note that the region does not take ownership of the action - RegionStepping* steregion=new RegionStepping(&(*action)); - pRegion->SetRegionalSteppingAction(steregion); - // need to keep the pointers to delete them - m_SteRegion.push_back(steregion); - - } - } - - } - - // first execute the legacy actions - - if(m_legacy_RA) m_legacy_RA->BeginOfRunAction(aRun); - - // now execute the new actions - - for(auto action: m_BoRquick){ - action->BeginOfRun(aRun); - } - -} - -void UserActionSvc::EndOfRunAction(const G4Run* aRun){ - - // first execute the legacy actions - - if(m_legacy_RA) m_legacy_RA->EndOfRunAction(aRun); - - // now execute the new actions - for(auto action: m_EoRquick) - action->EndOfRun(aRun); - -} - -void UserActionSvc::UserSteppingAction(const G4Step* aStep){ - - // first execute the legacy actions - - if(m_legacy_SA) m_legacy_SA->UserSteppingAction(aStep); - - // now execute the new actions - for(auto action: m_Stequick) - action->Step(aStep); - -} - - G4ClassificationOfNewTrack UserActionSvc::ClassifyNewTrack(const G4Track* aTrack){ - - if(m_legacy_StaA) m_legacy_StaA->ClassifyNewTrack(aTrack); - - G4ClassificationOfNewTrack classification(fUrgent); - for(auto action: m_StaClaquick) - { - classification = action->ClassifyNewTrack(aTrack); - if(fKill==classification) { return fKill; } - } - // FIXME need to find a better way to handle conflicting classifications... See ATLASSIM-2421 - return classification; - } - -void UserActionSvc::NewStage(){ - - // first execute the legacy actions - - if(m_legacy_StaA) m_legacy_StaA->NewStage(); - - // now execute the new actions - for(auto action: m_StaNewStagequick) - action->NewStage(); - - -} - -void UserActionSvc::PrepareNewEvent(){ - - // first execute the legacy actions - - if(m_legacy_StaA) m_legacy_StaA->PrepareNewEvent(); - - // now execute the new actions - for(auto action: m_StaPreparequick) - action->PrepareNewEvent(); - -} - - - -StatusCode UserActionSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserActionSvc::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserActionSvc*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return AthService::queryInterface(riid, ppvInterface); - } - - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design for the user action service -//============================================================================= - - // Framework includes #include "CxxUtils/make_unique.h" @@ -402,35 +59,35 @@ namespace G4UA ATH_MSG_INFO("Initializing. user action tools of each type, in order of execution:"); ATH_MSG_INFO(" begin-run: " << m_beginRunActionTools.size()); - for(auto action : m_beginRunActionTools) + for(auto& action : m_beginRunActionTools) ATH_MSG_INFO(" -> " << action.name()); ATH_MSG_INFO(" end-run: " << m_endRunActionTools.size()); - for(auto action : m_endRunActionTools) + for(auto& action : m_endRunActionTools) ATH_MSG_INFO(" -> " << action.name()); ATH_MSG_INFO(" begin-event: " << m_beginEventActionTools.size()); - for(auto action : m_beginEventActionTools) + for(auto& action : m_beginEventActionTools) ATH_MSG_INFO(" -> " << action.name()); ATH_MSG_INFO(" end-event: " << m_endEventActionTools.size()); - for(auto action : m_endEventActionTools) + for(auto& action : m_endEventActionTools) ATH_MSG_INFO(" -> " << action.name()); ATH_MSG_INFO(" stacking: " << m_stackingActionTools.size()); - for(auto action : m_stackingActionTools) + for(auto& action : m_stackingActionTools) ATH_MSG_INFO(" -> " << action.name()); ATH_MSG_INFO(" pre-tracking: " << m_preTrackingActionTools.size()); - for(auto action : m_preTrackingActionTools) + for(auto& action : m_preTrackingActionTools) ATH_MSG_INFO(" -> " << action.name()); ATH_MSG_INFO(" post-tracking: " << m_postTrackingActionTools.size()); - for(auto action : m_postTrackingActionTools) + for(auto& action : m_postTrackingActionTools) ATH_MSG_INFO(" -> " << action.name()); ATH_MSG_INFO(" stepping: " << m_steppingActionTools.size()); - for(auto action : m_steppingActionTools) + for(auto& action : m_steppingActionTools) ATH_MSG_INFO(" -> " << action.name()); ATH_CHECK( m_beginRunActionTools.retrieve() ); @@ -487,10 +144,10 @@ namespace G4UA } auto runAction = CxxUtils::make_unique<G4AtlasRunAction>(); // Assign begin-run plugins - for(auto beginRunTool : m_beginRunActionTools) + for(auto& beginRunTool : m_beginRunActionTools) runAction->addBeginRunAction( beginRunTool->getBeginRunAction() ); // Assign end-run plugins - for(auto endRunTool : m_endRunActionTools) + for(auto& endRunTool : m_endRunActionTools) runAction->addEndRunAction( endRunTool->getEndRunAction() ); G4RunManager::GetRunManager()->SetUserAction( runAction.get() ); @@ -503,10 +160,10 @@ namespace G4UA } auto eventAction = CxxUtils::make_unique<G4AtlasEventAction>(); // Assign begin-event plugins - for(auto beginEventTool : m_beginEventActionTools) + for(auto& beginEventTool : m_beginEventActionTools) eventAction->addBeginEventAction( beginEventTool->getBeginEventAction() ); // Assign end-event plugins - for(auto endEventTool : m_endEventActionTools) + for(auto& endEventTool : m_endEventActionTools) eventAction->addEndEventAction( endEventTool->getEndEventAction() ); G4RunManager::GetRunManager()->SetUserAction( eventAction.get() ); m_eventActions.set( std::move(eventAction) ); @@ -518,7 +175,7 @@ namespace G4UA } auto stackAction = CxxUtils::make_unique<G4AtlasStackingAction>(); // Assign stacking plugins - for(auto stackTool : m_stackingActionTools){ + for(auto& stackTool : m_stackingActionTools){ auto stackPlugin = stackTool->getStackingAction(); ATH_MSG_INFO("stackPlugin " << stackPlugin); stackAction->addAction( stackPlugin ); @@ -533,10 +190,10 @@ namespace G4UA } auto trackAction = CxxUtils::make_unique<G4AtlasTrackingAction>(); // Assign pre-tracking plugins - for(auto preTrackTool : m_preTrackingActionTools) + for(auto& preTrackTool : m_preTrackingActionTools) trackAction->addPreTrackAction( preTrackTool->getPreTrackingAction() ); // Assign post-tracking plugins - for(auto postTrackTool : m_postTrackingActionTools) + for(auto& postTrackTool : m_postTrackingActionTools) trackAction->addPostTrackAction( postTrackTool->getPostTrackingAction() ); G4RunManager::GetRunManager()->SetUserAction( trackAction.get() ); m_trackingActions.set( std::move(trackAction) ); @@ -548,7 +205,7 @@ namespace G4UA } auto stepAction = CxxUtils::make_unique<G4AtlasSteppingAction>(); // Assign stepping plugins - for(auto stepTool : m_steppingActionTools) + for(auto& stepTool : m_steppingActionTools) stepAction->addAction( stepTool->getSteppingAction() ); G4RunManager::GetRunManager()->SetUserAction( stepAction.get() ); m_steppingActions.set( std::move(stepAction) ); diff --git a/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.h b/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.h index c9c55a7fc50ccdeddfbd6e4c9284f6b25608202e..a6bf5f9ad766a0e8315d69717212ab653edf257a 100644 --- a/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.h +++ b/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.h @@ -3,143 +3,6 @@ */ -#ifndef G4ATLASSERVICES_USERACTIONSVC_H -#define G4ATLASSERVICES_USERACTIONSVC_H - -#include "AthenaBaseComps/AthService.h" -#include "GaudiKernel/ToolHandle.h" - -#include "G4UserRunAction.hh" -#include "G4UserSteppingAction.hh" -#include "G4UserEventAction.hh" -#include "G4UserTrackingAction.hh" -#include "G4UserStackingAction.hh" - -#include "G4AtlasInterfaces/G4InitMute.h" - -#include "G4AtlasInterfaces/IUserActionSvc.h" -#include "G4AtlasInterfaces/IUserAction.h" - -#include "G4TrackingManager.hh" - -/** @class UserActionSvc UserActionSvc.h "G4AtlasServices/UserActionSvc.h" - * - * Implementation of an athena service to handle G4 user actions - * The class inherits from the G4 action classes, and registers itself - * to the run manager. - * Athena-specific actions (IUserAction) can be added to the service and will be - * hooked to the G4 kernel - * - * @author Andrea Di Simone - * @date 2015-01-12 - */ - - -class UserActionSvc: virtual public IUserActionSvc, public AthService, public G4InitMute, public G4UserRunAction, public G4UserSteppingAction, - public G4UserEventAction, public G4UserTrackingAction, public G4UserStackingAction { - - public: - UserActionSvc( const std::string& name, ISvcLocator* svc );//!< Service constructor - virtual ~UserActionSvc(); - - virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ) override final; - static const InterfaceID& interfaceID() { return IUserActionSvc::interfaceID(); } - - virtual StatusCode initialize() override final; //!< Service init - virtual StatusCode finalize() override final; //!< Service finalize - - virtual void PreUserTrackingAction(const G4Track*) override final; //!< hook for the g4 run manager - virtual void PostUserTrackingAction(const G4Track*) override final; //!< hook for the g4 run manager - virtual void BeginOfEventAction(const G4Event* ) override final; //!< hook for the g4 run manager - virtual void EndOfEventAction(const G4Event* ) override final; //!< hook for the g4 run manager - virtual void BeginOfRunAction(const G4Run* ) override final; //!< hook for the g4 run manager - virtual void EndOfRunAction(const G4Run* ) override final; //!< hook for the g4 run manager - virtual void UserSteppingAction(const G4Step*) override final; //!< hook for g4 the run manager - - virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack) override final; //!< hook for g4 the run manager - virtual void PrepareNewEvent() override final; - virtual void NewStage() override final; - - // some hooks to manage legacy actions from FADS - void SetLegacyRA(G4UserRunAction* anAction) override final; - void SetLegacyEA(G4UserEventAction* anAction) override final; - void SetLegacySA(G4UserSteppingAction* anAction) override final; - void SetLegacyTA(G4UserTrackingAction* anAction) override final; - void SetLegacyStaA(G4UserStackingAction* anAction) override final; - - - - // needeed to replicate functionality provided by the old FADS singletons - virtual void SetTrajectory(G4VTrajectory * aTraj) override {fpTrackingManager->SetStoreTrajectory(true); fpTrackingManager->SetTrajectory(aTraj);}; - virtual G4TrackingManager* TrackingManager() const override {return fpTrackingManager;}; - virtual G4StackManager* StackManager() const override final {return stackManager;}; - virtual void ResetTrajectory() override {fpTrackingManager->SetStoreTrajectory(false);}; - - // now the new actions - - // there is no priority handling here. the order in which the actions are executed is the one - // in which they are put in the array - // this assumes some machinery is in place on the python side to allow priority manipulation - // separate arrays for BeginOf* and EndOf*, to allow flexibility in the priority (i.e. an action - // can in principle be first in BeginOfRun, second in BeginOfEvent, sixth in EndOfEvent, last in EndOfRun) - - private: - - ToolHandleArray<IUserAction> m_BoR; //!< Actions activated for BeginOfRun - ToolHandleArray<IUserAction> m_EoR; //!< Actions activated for EndOfRun - ToolHandleArray<IUserAction> m_BoE; //!< Actions activated for BeginOfEvent - ToolHandleArray<IUserAction> m_EoE; //!< Actions activated for EndOfEvent - ToolHandleArray<IUserAction> m_Ste; //!< Actions activated for Stepping - ToolHandleArray<IUserAction> m_BoT; //!< Actions activated for PreTracking - ToolHandleArray<IUserAction> m_EoT; //!< Actions activated for PostTracking - ToolHandleArray<IUserAction> m_StaCla; //!< Actions activated for Stacking, classifynewtrack - ToolHandleArray<IUserAction> m_StaPrepare; //!< Actions activated for Stacking, preparenewevent - ToolHandleArray<IUserAction> m_StaNewStage; //!< Actions activated for Stacking, newstage - - G4UserRunAction* m_legacy_RA; - G4UserEventAction* m_legacy_EA; - G4UserTrackingAction* m_legacy_TA; - G4UserSteppingAction* m_legacy_SA; - G4UserStackingAction* m_legacy_StaA; - - void registerToRunManager(); - - void fillUserActionsList(ToolHandleArray<IUserAction>&, std::vector<IUserAction*>&,G4AtlasUA::Role,std::string); - void setManagers(std::vector<IUserAction*>& actionlist); - - // these are to remove the overhead due to the toolhandles - std::vector<IUserAction*> m_BoRquick; //!< Actions activated for BeginOfRun - std::vector<IUserAction*> m_EoRquick; //!< Actions activated for EndOfRun - std::vector<IUserAction*> m_BoEquick; //!< Actions activated for BeginOfEvent - std::vector<IUserAction*> m_EoEquick; //!< Actions activated for EndOfEvent - std::vector<IUserAction*> m_Stequick; //!< Actions activated for Stepping - std::vector<IUserAction*> m_BoTquick; //!< Actions activated for PreTracking - std::vector<IUserAction*> m_EoTquick; //!< Actions activated for PostTracking - std::vector<IUserAction*> m_StaClaquick; //!< Actions activated for PostTracking - std::vector<IUserAction*> m_StaPreparequick; //!< Actions activated for PostTracking - std::vector<IUserAction*> m_StaNewStagequick; //!< Actions activated for PostTracking - - // ADS: need to wrap a G4UserSteppingAction around a IUserAction to allow regional actions - class RegionStepping final: public G4UserSteppingAction{ - - public: - RegionStepping(IUserAction* ua):G4UserSteppingAction(){m_UA=ua;}; - ~RegionStepping(){;}; // IUserAction must not be destroyed here - inline void UserSteppingAction(const G4Step* aStep) override {m_UA->Step(aStep);}; - private: - IUserAction* m_UA; - - }; - - std::vector<RegionStepping*> m_SteRegion; //!< Actions activated for Stepping only in a particular region - -}; - - - -#endif - - #ifndef G4ATLASSERVICES__G4UA_USERACTIONSVC_H #define G4ATLASSERVICES__G4UA_USERACTIONSVC_H diff --git a/Simulation/G4Atlas/G4AtlasServices/src/components/G4AtlasServices_entries.cxx b/Simulation/G4Atlas/G4AtlasServices/src/components/G4AtlasServices_entries.cxx index 873c2a9a6f6720d8749c0baafaf3e93cdbc5ed69..a7d8f455b2994af59f57a560a1db72e3acc72ecd 100644 --- a/Simulation/G4Atlas/G4AtlasServices/src/components/G4AtlasServices_entries.cxx +++ b/Simulation/G4Atlas/G4AtlasServices/src/components/G4AtlasServices_entries.cxx @@ -10,7 +10,6 @@ DECLARE_SERVICE_FACTORY( G4AtlasSvc ) DECLARE_SERVICE_FACTORY( G4GeometryNotifierSvc ) DECLARE_SERVICE_FACTORY( DetectorGeometrySvc ) -DECLARE_SERVICE_FACTORY( UserActionSvc ) DECLARE_SERVICE_FACTORY( G4UA::UserActionSvc ) DECLARE_SERVICE_FACTORY( ConstantFieldSvc ) DECLARE_SERVICE_FACTORY( StandardFieldSvc ) diff --git a/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfig.py b/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfig.py index 9c78494472327513710633c83a7be91576cb2e0f..f9d38c6c94286a4e857bf240570ccf8593d07f69 100644 --- a/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfig.py +++ b/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfig.py @@ -108,8 +108,6 @@ def MuonEntryLayerTestTool(name="MuonEntry", **kwargs): def MuonExitLayerTestTool(name="MuonExit", **kwargs): kwargs.setdefault("CollectionName", "MuonExit") return CfgMgr.LayerTestTool(name, **kwargs) -def SteppingValidation(name="SteppingValidation",**kwargs): - return CfgMgr.SteppingValidation(name, **kwargs) def LucidHitsTestTool(name="LucidHitsTestTool",**kwargs): return CfgMgr.LucidHitsTestTool(name, **kwargs) diff --git a/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfigDb.py b/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfigDb.py index ae4aa7940a0dce239015044fe794a13ab20aa7ee..5f246952b8b590be7b2b1e2dd750ecc8936b7a5d 100644 --- a/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfigDb.py +++ b/Simulation/G4Atlas/G4AtlasTests/python/G4AtlasTestsConfigDb.py @@ -36,6 +36,5 @@ addTool("G4AtlasTests.G4AtlasTestsConfig.PileupTruthTestTool", "PileupTruthTestT addTool("G4AtlasTests.G4AtlasTestsConfig.CaloEntryLayerTestTool", "CaloEntryLayerTestTool") addTool("G4AtlasTests.G4AtlasTestsConfig.MuonEntryLayerTestTool", "MuonEntryLayerTestTool") addTool("G4AtlasTests.G4AtlasTestsConfig.MuonExitLayerTestTool", "MuonExitLayerTestTool") -addTool("G4AtlasTests.G4AtlasTestsConfig.SteppingValidation", "SteppingValidation") addTool("G4AtlasTests.G4AtlasTestsConfig.getSteppingValidationTool", "G4UA::SteppingValidationTool") addTool("G4AtlasTests.G4AtlasTestsConfig.LucidHitsTestTool", "LucidHitsTestTool") diff --git a/Simulation/G4Atlas/G4AtlasTests/share/postInclude.StepVal.py b/Simulation/G4Atlas/G4AtlasTests/share/postInclude.StepVal.py index d9dceaf9d00527fd711c0f4fa50333a4ab5fe01a..2930f5eb29e5f36cecb5ca3993ff592ba90d5fb1 100644 --- a/Simulation/G4Atlas/G4AtlasTests/share/postInclude.StepVal.py +++ b/Simulation/G4Atlas/G4AtlasTests/share/postInclude.StepVal.py @@ -6,15 +6,6 @@ if not hasattr(ServiceMgr, 'THistSvc'): ServiceMgr.THistSvc.Output += ["truth DATAFILE='stepping.root' OPT='NEW'"]; from G4AtlasApps.SimFlags import simFlags -if hasattr(simFlags, 'UseV2UserActions') and simFlags.UseV2UserActions(): - # hive-friendly version - simFlags.OptionalUserActionList.addAction('G4UA::SteppingValidationTool',['BeginOfRun','EndOfEvent','BeginOfEvent','Step']) -else: - # V1 userActions - try: - from G4AtlasServices.G4AtlasUserActionConfig import UAStore - except ImportError: - from G4AtlasServices.UserActionStore import UAStore - # add default configurable - UAStore.addAction('SteppingValidation',['Step','BeginOfEvent','EndOfEvent']) +simFlags.OptionalUserActionList.addAction('G4UA::SteppingValidationTool',['BeginOfRun','EndOfEvent','BeginOfEvent','Step']) + diff --git a/Simulation/G4Atlas/G4AtlasTests/src/G4AtlasTests_entries.cxx b/Simulation/G4Atlas/G4AtlasTests/src/G4AtlasTests_entries.cxx index 8a680e049d95c53a4d9e2e55033c79ca91402776..5f6301568a4e637e25ae562a8e40accffb74a2e8 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/G4AtlasTests_entries.cxx +++ b/Simulation/G4Atlas/G4AtlasTests/src/G4AtlasTests_entries.cxx @@ -24,7 +24,6 @@ #include "TruthTestTool.h" #include "LayerTestTool.h" #include "CaloCalibrationHitsTestTool.h" -#include "SteppingValidation.h" #include "SteppingValidationTool.h" #include "LucidHitsTestTool.h" #include "CalibHitValidate.h" @@ -50,7 +49,6 @@ DECLARE_FACTORY_ENTRIES(G4AtlasTests) DECLARE_ALGTOOL( ZDCHitsTestTool ) DECLARE_ALGTOOL( CaloCalibrationHitsTestTool ) DECLARE_ALGTOOL( LayerTestTool ) - DECLARE_ALGTOOL( SteppingValidation ) DECLARE_ALGTOOL( G4UA::SteppingValidationTool ) DECLARE_ALGTOOL( LucidHitsTestTool ) DECLARE_ALGORITHM( G4TestAlg ) @@ -76,7 +74,6 @@ DECLARE_TOOL_FACTORY( ALFA_SimHitsTestTool ) DECLARE_TOOL_FACTORY( ZDCHitsTestTool ) DECLARE_TOOL_FACTORY( CaloCalibrationHitsTestTool ) DECLARE_TOOL_FACTORY( LayerTestTool ) -DECLARE_TOOL_FACTORY( SteppingValidation ) DECLARE_TOOL_FACTORY( G4UA::SteppingValidationTool ) DECLARE_ALGORITHM_FACTORY( G4TestAlg ) DECLARE_ALGORITHM_FACTORY( CalibHitValidate ) diff --git a/Simulation/G4Atlas/G4AtlasTests/src/MMHitsTestTool.cxx b/Simulation/G4Atlas/G4AtlasTests/src/MMHitsTestTool.cxx index b5a32aed9ed02dfb81b82fddc1c2d3bfcac0b1d9..54f906e33504807f0cd1175ec67b2898584cfb7b 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/MMHitsTestTool.cxx +++ b/Simulation/G4Atlas/G4AtlasTests/src/MMHitsTestTool.cxx @@ -37,9 +37,9 @@ #include "TH1F.h" using namespace MuonGM; +using namespace std; + - - StatusCode MMHitsTestTool::processEvent() { CHECK(executeCheckEventInfo()); @@ -49,10 +49,128 @@ StatusCode MMHitsTestTool::processEvent() { for (GenericMuonSimHitCollection::const_iterator i_hit = p_collection->begin(); i_hit != p_collection->end(); ++i_hit) { Amg::Vector3D u = (*i_hit).globalPosition(); CHECK(executeFillHistos(u)); + //Useful link on how to retrieve variables: http://acode-browser.usatlas.bnl.gov/lxr/source/atlas/MuonSpectrometer/MuonValidation/MuonPRDTest/src/MMSimHitVariables.cxx + //Get station names and make plots for each wedge + MicromegasHitIdHelper* hitHelper = MicromegasHitIdHelper::GetHelper(); + int simId = (*i_hit).GenericId(); + std::string sim_stationName = hitHelper->GetStationName(simId); + //Declare station name strings + static std::string s_m1s1("M1S1"); + static std::string s_m2s1("M2S1"); + static std::string s_m1l1("M1L1"); + static std::string s_m2l1("M2L1"); + static std::string s_m1s2("M1S2"); + static std::string s_m2s2("M2S2"); + static std::string s_m1l2("M1L2"); + static std::string s_m2l2("M2L2"); + + //----------------------------------Wedge 1 Histos begin------------------------------------------------------------------------- + //M1S1 (Note: M1->Module 1, S1->Small sector, wedge 1) + if (sim_stationName==s_m1s1 && u.z()>0){ + m_MMTransverseEta1SmallWedge1->Fill(u.x(),u.y()); + } + + //M2S1 (Note: M2->Module 2, S1->Small sector, wedge 1) + if (sim_stationName==s_m2s1 && u.z()>0){ + m_MMTransverseEta2SmallWedge1->Fill(u.x(),u.y()); + } + + //M1L1 (Note: M1->Module 1, S1->Large sector, wedge 1) + if (sim_stationName==s_m1l1 && u.z()>0){ + m_MMTransverseEta1LargeWedge1->Fill(u.x(),u.y()); + } + + //M2L1 (Note: M2->Module 2, S1->Large sector, wedge 1.) + if (sim_stationName==s_m2l1 && u.z()>0){ + m_MMTransverseEta2LargeWedge1->Fill(u.x(),u.y()); + } + + //Plots of transverse and rZ view for wedge 1 in either +ve Z or -ve Z and done separately for large and small sectors + double rwedge1 = sqrt(u.x()*u.x()+u.y()*u.y()); //Evaluate r + + //Small sectors at +ve Z + if ((sim_stationName==s_m1s1 || sim_stationName==s_m2s1) && u.z() > 0){ + m_MM_SmallWedge1_TransverseView_positiveZ->Fill(u.x(),u.y()); + m_MM_SmallWedge1_rZview_positiveZ->Fill(u.z(), rwedge1); + m_MM_rPlot_S1_posZ->Fill(rwedge1); + } + + //Small sectors at -ve Z + if ((sim_stationName==s_m1s1 || sim_stationName==s_m2s1) && u.z() < 0){ + m_MM_SmallWedge1_TransverseView_negativeZ->Fill(u.x(),u.y()); + m_MM_SmallWedge1_rZview_negativeZ->Fill(u.z(), rwedge1); + } + + //Large sectors at +ve Z + if ((sim_stationName==s_m1l1 || sim_stationName==s_m2l1) && u.z() > 0){ + m_MM_LargeWedge1_TransverseView_positiveZ->Fill(u.x(),u.y()); + m_MM_LargeWedge1_rZview_positiveZ->Fill(u.z(), rwedge1); + m_MM_rPlot_L1_posZ->Fill(rwedge1); + } + + //Large sectors at -ve Z + if ((sim_stationName==s_m1l1 || sim_stationName==s_m2l1) && u.z() < 0){ + m_MM_LargeWedge1_TransverseView_negativeZ->Fill(u.x(),u.y()); + m_MM_LargeWedge1_rZview_negativeZ->Fill(u.z(), rwedge1); + } + //----------------------------------Wedge 1 Histos end------------------------------------------------------------------------- + + //----------------------------------Wedge 2 Histos begin--------------------------------------------------------------------- + //M1S2 (Note: M1->Module 1, S2->Small sector, wedge 2) + if (sim_stationName==s_m1s2 && u.z()>0){ + m_MMTransverseEta1SmallWedge2->Fill(u.x(),u.y()); + } + + //M2S2 (Note: M1->Module 2, S2->Small sector, wedge 2) + if (sim_stationName==s_m2s2 && u.z()>0){ + m_MMTransverseEta2SmallWedge2->Fill(u.x(),u.y()); + } + + //M1L2 (Note: M1->Module 1, L2->Large sector, wedge 2) + if (sim_stationName==s_m1l2 && u.z()>0){ + m_MMTransverseEta1LargeWedge2->Fill(u.x(),u.y()); + } + + //M2L2 (Note: M2->Module 2, L2->Large sector, wedge 2) + if (sim_stationName==s_m2l2 && u.z()>0){ + m_MMTransverseEta2LargeWedge2->Fill(u.x(),u.y()); + } + + //Plots of transverse and rZ view for wedge 1 in either +ve Z or -ve Z and done separately for large and small sectors + double rwedge2 = sqrt(u.x()*u.x()+u.y()*u.y()); //Evaluate r + + //Small sectors at +ve Z + if ((sim_stationName==s_m1s2 || sim_stationName==s_m2s2) && u.z() > 0){ + m_MM_SmallWedge2_TransverseView_positiveZ->Fill(u.x(),u.y()); + m_MM_SmallWedge2_rZview_positiveZ->Fill(u.z(), rwedge2); + m_MM_rPlot_S2_posZ->Fill(rwedge2); + } + + //Small sectors at -ve Z + if ((sim_stationName==s_m1s2 || sim_stationName==s_m2s2) && u.z() < 0){ + m_MM_SmallWedge2_TransverseView_negativeZ->Fill(u.x(),u.y()); + m_MM_SmallWedge2_rZview_negativeZ->Fill(u.z(), rwedge2); + } + + //Large sectors at +ve Z + if ((sim_stationName==s_m1l2 || sim_stationName==s_m2l2) && u.z() > 0){ + m_MM_LargeWedge2_TransverseView_positiveZ->Fill(u.x(),u.y()); + m_MM_LargeWedge2_rZview_positiveZ->Fill(u.z(), rwedge2); + m_MM_rPlot_L2_posZ->Fill(rwedge2); + } + + //Large sectors at -ve Z + if ((sim_stationName==s_m1l2 || sim_stationName==s_m2l2) && u.z() < 0){ + m_MM_LargeWedge2_TransverseView_negativeZ->Fill(u.x(),u.y()); + m_MM_LargeWedge2_rZview_negativeZ->Fill(u.z(), rwedge2); + } + //-----------------------------------------------Wedge 2 Histos end----------------------------------------------------------- + + // GeoMMHit ghit(*i_hit); -// if (!ghit) continue; -// Amg::Vector3D u = ghit.getGlobalPosition(); -// CHECK(executeFillHistos(u)); + // if (!ghit) continue; + // Amg::Vector3D u = ghit.getGlobalPosition(); + // CHECK(executeFillHistos(u)); } } @@ -62,5 +180,47 @@ StatusCode MMHitsTestTool::processEvent() { StatusCode MMHitsTestTool::initialize() { CHECK(MuonHitTestToolBase::initialize()); + + //-------------------------------Wedge 1 begin------------------------------------------------------------------------------- + _TH1D(m_MM_rPlot_S1_posZ,"MM_rPlot_S1_posZ",10000,0.,14000.); + _TH1D(m_MM_rPlot_L1_posZ,"MM_rPlot_L1_posZ",5000,0.,5000.); + + _TH2D(m_MM_SmallWedge1_rZview_positiveZ,"MM_rZView_S1_posZ",1000,7000.,8000.,5000,0.,5000.); + _TH2D(m_MM_SmallWedge1_rZview_negativeZ,"MM_rZView_S1_negZ",1000,-8000.,-7000.,5000,0.,5000.); + _TH2D(m_MM_LargeWedge1_rZview_positiveZ,"MM_rZView_L1_posZ",1000,7000.,8000.,5000,0.,5000.); + _TH2D(m_MM_LargeWedge1_rZview_negativeZ,"MM_rZView_L1_negZ",1000,-8000.,-7000.,5000,0.,5000.); + + _TH2D(m_MMTransverseEta1SmallWedge1,"MM_TransverseView_M1S1_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D(m_MMTransverseEta2SmallWedge1,"MM_TransverseView_M2S1_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D(m_MMTransverseEta1LargeWedge1,"MM_TransverseView_M1L1_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D(m_MMTransverseEta2LargeWedge1,"MM_TransverseView_M2L1_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + + _TH2D(m_MM_SmallWedge1_TransverseView_positiveZ,"MM_TransverseView_S1_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D(m_MM_SmallWedge1_TransverseView_negativeZ,"MM_TransverseView_S1_negZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D(m_MM_LargeWedge1_TransverseView_positiveZ,"MM_TransverseView_L1_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D(m_MM_LargeWedge1_TransverseView_negativeZ,"MM_TransverseView_L1_negZ",1200,-6000.,6000.,1200,-6000.,6000.); + //--------------------------------Wedge 1 end-------------------------------------------------------------------------------- + + //--------------------------------Wedge 2 begin------------------------------------------------------------------------------ + _TH1D(m_MM_rPlot_S2_posZ,"MM_rPlot_S2_posZ",10000,0.,14000.); + _TH1D(m_MM_rPlot_L2_posZ,"MM_rPlot_L2_posZ",10000,0.,14000.); + + _TH2D(m_MM_SmallWedge2_rZview_positiveZ,"MM_rZView_S2_posZ",1000,7000.,8000.,5000,0.,5000.); + _TH2D(m_MM_SmallWedge2_rZview_negativeZ,"MM_rZView_S2_negZ",1000,-8000.,-7000.,5000,0.,5000.); + _TH2D(m_MM_LargeWedge2_rZview_positiveZ,"MM_rZView_L2_posZ",1000,7000.,8000.,5000,0.,5000.); + _TH2D(m_MM_LargeWedge2_rZview_negativeZ,"MM_rZView_L2_negZ",1000,-8000.,-7000.,5000,0.,5000.); + + _TH2D(m_MMTransverseEta1SmallWedge2,"MM_TransverseView_M1S2_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D(m_MMTransverseEta2SmallWedge2,"MM_TransverseView_M2S2_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D(m_MMTransverseEta1LargeWedge2,"MM_TransverseView_M1L2_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D(m_MMTransverseEta2LargeWedge2,"MM_TransverseView_M2L2_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + + _TH2D(m_MM_SmallWedge2_TransverseView_positiveZ,"MM_TransverseView_S2_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D(m_MM_SmallWedge2_TransverseView_negativeZ,"MM_TransverseView_S2_negZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D(m_MM_LargeWedge2_TransverseView_positiveZ,"MM_TransverseView_L2_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D(m_MM_LargeWedge2_TransverseView_negativeZ,"MM_TransverseView_L2_negZ",1200,-6000.,6000.,1200,-6000.,6000.); + //--------------------------------Wedge 2 end--------------------------------------------------------------------------------------- + + return StatusCode::SUCCESS; } diff --git a/Simulation/G4Atlas/G4AtlasTests/src/MMHitsTestTool.h b/Simulation/G4Atlas/G4AtlasTests/src/MMHitsTestTool.h index 024e4509a51be53190e3f98b56e066c142226e31..4c3e113847bb621f03fef80b8a6825be938fe5e3 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/MMHitsTestTool.h +++ b/Simulation/G4Atlas/G4AtlasTests/src/MMHitsTestTool.h @@ -22,16 +22,34 @@ public: //m_pMdtIdHelper(0) { declareProperty("DoMMTest", m_DoMMTest=true); - m_BarrelEtaCut=1.; + m_BarrelEtaCut=10.; } StatusCode initialize(); StatusCode processEvent(); - protected: +protected: + + TH1 *m_MM_rPlot_S1_posZ, *m_MM_rPlot_S2_posZ, *m_MM_rPlot_L1_posZ, *m_MM_rPlot_L2_posZ; + + TH2 *m_MMTransverseEta1SmallWedge1, *m_MMTransverseEta2SmallWedge1, *m_MMTransverseEta1LargeWedge1; + TH2 *m_MMTransverseEta2LargeWedge1, *m_MMTransverseEta1SmallWedge2, *m_MMTransverseEta2SmallWedge2; + TH2 *m_MMTransverseEta1LargeWedge2, *m_MMTransverseEta2LargeWedge2; + + TH2 *m_MM_SmallWedge1_TransverseView_positiveZ, *m_MM_SmallWedge1_TransverseView_negativeZ; + TH2 *m_MM_LargeWedge1_TransverseView_positiveZ, *m_MM_LargeWedge1_TransverseView_negativeZ; + TH2 *m_MM_SmallWedge1_rZview_positiveZ, *m_MM_SmallWedge1_rZview_negativeZ; + TH2 *m_MM_LargeWedge1_rZview_positiveZ, *m_MM_LargeWedge1_rZview_negativeZ; + + TH2 *m_MM_SmallWedge2_TransverseView_positiveZ, *m_MM_SmallWedge2_TransverseView_negativeZ; + TH2 *m_MM_LargeWedge2_TransverseView_positiveZ, *m_MM_LargeWedge2_TransverseView_negativeZ; + TH2 *m_MM_SmallWedge2_rZview_positiveZ, *m_MM_SmallWedge2_rZview_negativeZ; + TH2 *m_MM_LargeWedge2_rZview_positiveZ, *m_MM_LargeWedge2_rZview_negativeZ; + // Identifier getIdentifier(HitID cschit); -// StatusCode checkIdentifier(Identifier offid); + // StatusCode checkIdentifier(Identifier offid); + private: bool m_DoMMTest; diff --git a/Simulation/G4Atlas/G4AtlasTests/src/MuonHitTestToolBase.cxx b/Simulation/G4Atlas/G4AtlasTests/src/MuonHitTestToolBase.cxx index ab6f7009c5176dfd0bba73acf9212af09934b89b..5d8ed372fbf0a3f5b56375fcfb0cc386d5c9d83d 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/MuonHitTestToolBase.cxx +++ b/Simulation/G4Atlas/G4AtlasTests/src/MuonHitTestToolBase.cxx @@ -12,7 +12,7 @@ #include "TH1D.h" #include "TH2D.h" - +#include <math.h> MuonHitTestToolBase::MuonHitTestToolBase(const std::string& type, const std::string& name, const IInterface* parent) @@ -26,7 +26,7 @@ MuonHitTestToolBase::MuonHitTestToolBase(const std::string& type, const std::str m_eta(0), m_theta(0), m_phi(0), m_zResid(0),m_phiResid(0), m_detBarrel(0), m_longView(0) - + { declareProperty("BarrelEtaCut", m_BarrelEtaCut=99.); declareProperty("DetectorName", m_detname="MDT"); @@ -58,11 +58,11 @@ StatusCode MuonHitTestToolBase::executeCheckEventInfo() HepMC::GenEvent::particle_const_iterator p; for (p= (**e).particles_begin(); p!= (**e).particles_end(); p++) { if ( (*p)->barcode()<200000) { - Amg::Vector3D temp_momentum((**p).momentum().px(), - (**p).momentum().py(), - (**p).momentum().pz()); - m_direction = temp_momentum.unit(); - break; + Amg::Vector3D temp_momentum((**p).momentum().px(), + (**p).momentum().py(), + (**p).momentum().pz()); + m_direction = temp_momentum.unit(); + break; } } } @@ -72,40 +72,42 @@ StatusCode MuonHitTestToolBase::executeCheckEventInfo() StatusCode MuonHitTestToolBase::executeFillHistos(const Amg::Vector3D & u) { ///for MDTs that have barrel + endcap section, take only the barrel when plotting the xy-2d plot of the detector - if (fabs(m_direction.eta())<m_BarrelEtaCut){ - //mdtdet->Fill(u.x(),u.y()); - m_muondetBarrel->Fill(u.x(),u.y()); - m_detBarrel->Fill(u.x(),u.y()); - } + if (fabs(m_direction.eta())<m_BarrelEtaCut){ + //mdtdet->Fill(u.x(),u.y()); + m_muondetBarrel->Fill(u.x(),u.y()); + m_detBarrel->Fill(u.x(),u.y()); + } - double rad=sqrt(u.x()*u.x()+u.y()*u.y()); - m_muonlongView->Fill(u.z(),rad); - m_longView->Fill(u.z(),rad); + double rad=sqrt(u.x()*u.x()+u.y()*u.y()); + m_muonlongView->Fill(u.z(),rad); + m_longView->Fill(u.z(),rad); - // //m_direction vector is filled with truth above, so here it is wrong (no eta, theta, phi of the hit!!!) - // *AS* why not use "u"? - // theta->Fill(m_direction.theta()); - // theta->Fill(m_direction.theta()); - // eta->Fill(m_direction.eta()); - // eta->Fill(m_direction.eta()); - // phi->Fill(m_direction.phi()); - // phi->Fill(m_direction.phi()); + // //m_direction vector is filled with truth above, so here it is wrong (no eta, theta, phi of the hit!!!) + // *AS* why not use "u"? + // theta->Fill(m_direction.theta()); + // theta->Fill(m_direction.theta()); + // eta->Fill(m_direction.eta()); + // eta->Fill(m_direction.eta()); + // phi->Fill(m_direction.phi()); + // phi->Fill(m_direction.phi()); - m_muonzResid->Fill(u.cross(m_direction).dot(m_direction.cross(Amg::Vector3D(0,0,1)).unit())); - m_muonphiResid->Fill(u.cross(m_direction).z()); + m_muonzResid->Fill(u.cross(m_direction).dot(m_direction.cross(Amg::Vector3D(0,0,1)).unit())); + m_muonphiResid->Fill(u.cross(m_direction).z()); - m_zResid->Fill(u.cross(m_direction).dot(m_direction.cross(Amg::Vector3D(0,0,1)).unit())); - m_phiResid->Fill(u.cross(m_direction).z()); + m_zResid->Fill(u.cross(m_direction).dot(m_direction.cross(Amg::Vector3D(0,0,1)).unit())); + m_phiResid->Fill(u.cross(m_direction).z()); - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } + + StatusCode MuonHitTestToolBase::initialize() { CHECK(detStore()->retrieve(m_pMuonMgr)); //MuonSpectrometer - /** Generic Muon part, these histograms are filled from + /** Generic Muon part, these histograms are filled from all subalgorithms (MDT,RPC,CSC,TGC) For detailed description look in the .cxx code */ @@ -115,16 +117,16 @@ StatusCode MuonHitTestToolBase::initialize() { _TH1D(m_muonevnt,"event_num",100,0.,1000.); _TH1D(m_muonrun,"run_num",100,-300.,300.); - /* - TH1D *etamuon=new TH1D("muonhitpos_eta","muonhitpos_eta",50,-5.,5.); - registerHistogram("/truth/muonhitpos_eta",etamuon); + /* + TH1D *etamuon=new TH1D("muonhitpos_eta","muonhitpos_eta",50,-5.,5.); + registerHistogram("/truth/muonhitpos_eta",etamuon); - TH1D *theta=new TH1D("muonhitpos_theta","muonhitpos_theta",50,-10.,10.); - registerHistogram("/truth/muonhitpos_theta",theta); + TH1D *theta=new TH1D("muonhitpos_theta","muonhitpos_theta",50,-10.,10.); + registerHistogram("/truth/muonhitpos_theta",theta); - TH1D *phimuon=new TH1D("muonhitpos_phi","muonhitpos_phi",50,-5.,5.); - registerHistogram("/truth/muonhitpos_phi",phimuon); - */ + TH1D *phimuon=new TH1D("muonhitpos_phi","muonhitpos_phi",50,-5.,5.); + registerHistogram("/truth/muonhitpos_phi",phimuon); + */ _TH1D(m_muonzResid,"muonhitpos_zResid",50,-300.,300.); _TH1D(m_muonphiResid,"muonhitpos_phiResid",50,-300.,300.); @@ -134,20 +136,20 @@ StatusCode MuonHitTestToolBase::initialize() { // ================================================================================ m_path+=m_detname+"/"; - // book Histograms - /** specific part, these histograms are filled from subalgorithm - For detailed description look, e.g, in the CSCHitsTestAlg.cxx code - */ - /* - TH1D *eta=new TH1D("hitpos_eta","hitpos_eta",50,-5.,5.); - registerHistogram("/truth/hitpos_eta",eta); - - TH1D *theta=new TH1D("hitpos_theta","hitpos_theta",50,-10.,10.); - registerHistogram("/truth/hitpos_theta",theta); - - TH1D *phi=new TH1D("hitpos_phi","hitpos_phi",50,-5.,5.); - registerHistogram("/truth/hitpos_phi",phi); - */ + // book Histograms + /** specific part, these histograms are filled from subalgorithm + For detailed description look, e.g, in the CSCHitsTestAlg.cxx code + */ + /* + TH1D *eta=new TH1D("hitpos_eta","hitpos_eta",50,-5.,5.); + registerHistogram("/truth/hitpos_eta",eta); + + TH1D *theta=new TH1D("hitpos_theta","hitpos_theta",50,-10.,10.); + registerHistogram("/truth/hitpos_theta",theta); + + TH1D *phi=new TH1D("hitpos_phi","hitpos_phi",50,-5.,5.); + registerHistogram("/truth/hitpos_phi",phi); + */ _TH1D(m_zResid,(m_detname+"_hitpos_zResid").c_str(),50,-300.,300.); _TH1D(m_phiResid,(m_detname+"_hitpos_phiResid").c_str(),50,-300.,300.); diff --git a/Simulation/G4Atlas/G4AtlasTests/src/MuonHitTestToolBase.h b/Simulation/G4Atlas/G4AtlasTests/src/MuonHitTestToolBase.h index b770ab5898a177fba1e1c40d214247c9ea66caac..ce020cc0c61c2572b672135fbd32211b02d80362 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/MuonHitTestToolBase.h +++ b/Simulation/G4Atlas/G4AtlasTests/src/MuonHitTestToolBase.h @@ -18,19 +18,23 @@ namespace MuonGM { } -class MuonHitTestToolBase : public SimTestToolBase { +class MuonHitTestToolBase : public SimTestToolBase { - public: +public: MuonHitTestToolBase(const std::string& type, const std::string& name, const IInterface* parent); - + StatusCode initialize(); - protected: +protected: StatusCode executeCheckEventInfo(); StatusCode executeFillHistos(const Amg::Vector3D &); + StatusCode executeFillHistosSectors_Wedge1(const Amg::Vector3D &, std::string); + StatusCode executeFillHistosSectors_Wedge2(const Amg::Vector3D &, std::string); + //StatusCode executeFillHistos_sTGc_Wedge1(const Amg::Vector3D &, std::string); + StatusCode executeFillHistos_sTGc(const Amg::Vector3D &, std::string); - protected: +protected: std::string m_detname; const MuonGM::MuonDetectorManager* m_pMuonMgr; @@ -46,6 +50,8 @@ class MuonHitTestToolBase : public SimTestToolBase { TH1 *m_eta, *m_theta, *m_phi; TH1 *m_zResid, *m_phiResid; TH2 *m_detBarrel, *m_longView; + + // helper variables Amg::Vector3D m_direction; }; diff --git a/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.cxx b/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.cxx index a8956d0c117d41ba221afde35b83998f06958555..4f4fbf03064d4943aa973c94ecf8e8c9f787bb8d 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.cxx +++ b/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.cxx @@ -17,101 +17,6 @@ #include "MCTruth/TrackHelper.h" -void SteppingValidation::BeginOfEvent(const G4Event*) { - m_prim=m_sec=0; - m_primH=m_primF=0; - m_dh=m_dh2=m_dp=m_dp2=0; - m_nsec=0; -} -void SteppingValidation::EndOfEvent(const G4Event*) { - // Fill lateral energy spread - if (m_nsec>0){ - m_latPhi->Fill( std::sqrt( m_dp2/m_nsec - std::pow(m_dp/m_nsec,2) ) ); - m_latEta->Fill( std::sqrt( m_dh2/m_nsec - std::pow(m_dh/m_nsec,2) ) ); - } -} - -StatusCode SteppingValidation::initialize(){ - m_path += "Stepping/"; - - // Set up all the histograms... - _TH1D( m_stepL , "stepL" , 100 , -9 , 3 ); - _TH1D( m_stepProc , "stepProc" , 15 , -0.5 , 14.5 ); - _TH1D( m_mscAngle , "mscAngle" , 100 , 0. , M_PI ); - _TH1D( m_stepELoss , "stepELoss" , 100 , -10 , 2 ); - _TH1D( m_secE , "secE" , 100 , -3.5 , 5 ); - _TH2D( m_EvsR , "EvsR" , 100 , 0 , 1.2 , 100 , 1000. , 20000.); - _TH1D( m_latPhi , "latPhi" , 100 , 0. , 1.2 ); - _TH1D( m_latEta , "latEta" , 100 , 0. , 0.6 ); - - _SET_TITLE(m_stepL, "Step length distribution", "Step length [log(mm)]", "Steps"); - _SET_TITLE(m_stepProc, "Step process distribution", "Step process", "Steps"); - _SET_TITLE(m_mscAngle, "Multiple scattering angle distribution", "Angle", "Steps"); - _SET_TITLE(m_stepELoss, "Energy loss distribution", "Energy Loss [log(MeV)]", "Steps"); - _SET_TITLE(m_secE, "Secondary energy distribution", "Energy [log(MeV)]", "Secondaries"); - _SET_TITLE(m_EvsR, "Primary Energy vs Radius", "Radius [m]", "Primary Energy [MeV]"); - _SET_TITLE(m_latPhi, "Phi energy distribution", "Energy-weighted #phi RMS", "Primaries"); - _SET_TITLE(m_latEta, "Eta energy distribution", "Energy-weighted #eta RMS", "Primaries"); - - return StatusCode::SUCCESS; -} - -void SteppingValidation::Step(const G4Step* aStep) -{ - // Fill process type - m_stepProc->Fill(aStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessType()); - - // Fill energy deposit - m_stepELoss->Fill( log10(aStep->GetTotalEnergyDeposit()) ); - - // Fill step length - m_stepL->Fill( log10( aStep->GetStepLength() ) ); - - // Fill secondary energies - if (m_prim==0){ - m_prim = aStep->GetTrack(); - } else if (aStep->GetTrack()!=m_prim && aStep->GetTrack()!=m_sec){ // New secondary - m_secE->Fill( log10(aStep->GetPreStepPoint()->GetTotalEnergy()) ); - m_sec=aStep->GetTrack(); - } - - if (aStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessType()==1){ // Defined by transport --> MSC - if (m_prim==aStep->GetTrack()){ - double angle = std::acos( aStep->GetPreStepPoint()->GetMomentumDirection().dot( aStep->GetPostStepPoint()->GetMomentumDirection() ) ); - m_mscAngle->Fill(angle); - m_EvsR->Fill( aStep->GetPostStepPoint()->GetPosition().perp()*0.001 , aStep->GetTrack()->GetTotalEnergy() ); - } - } - - if (aStep->GetTrack()->GetNextVolume()==0){ - // Leaving world! Use this for RMS calculations - if (m_prim==aStep->GetTrack()){ - m_primH = aStep->GetPostStepPoint()->GetPosition().eta(); - m_primF = aStep->GetPostStepPoint()->GetPosition().phi(); - } else { - m_dh += (aStep->GetPostStepPoint()->GetPosition().eta() - m_primH )*aStep->GetTrack()->GetTotalEnergy(); - m_dh2 += std::pow(aStep->GetPostStepPoint()->GetPosition().eta() - m_primH,2)*aStep->GetTrack()->GetTotalEnergy(); - m_dp += (aStep->GetPostStepPoint()->GetPosition().phi() - m_primF )*aStep->GetTrack()->GetTotalEnergy(); - m_dp2 += std::pow(aStep->GetPostStepPoint()->GetPosition().phi() - m_primF,2)*aStep->GetTrack()->GetTotalEnergy(); - m_nsec += aStep->GetTrack()->GetTotalEnergy(); - } - } - -} - - -StatusCode SteppingValidation::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - namespace G4UA{ diff --git a/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.h b/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.h index 41b2b5801d90d0282e2d0b9823cf5e1af9102c05..6abd452c894ae9ff5e33a25f18942e921f4d2a37 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.h +++ b/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.h @@ -5,7 +5,6 @@ #ifndef SteppingValidation_H #define SteppingValidation_H -#include "G4AtlasTools/UserActionBase.h" #include "SimTestToolBase.h" #include <string> @@ -17,35 +16,6 @@ class G4Track; // User action to do some basic step-based validation of G4 -class SteppingValidation final: public UserActionBase, public SimTestHisto { - - public: - // Constructor - SteppingValidation(const std::string& type, const std::string& name, const IInterface* parent) - : UserActionBase(type,name,parent) - , SimTestHisto() - , m_stepL(0),m_stepProc(0),m_mscAngle(0),m_stepELoss(0),m_secE(0) - , m_latPhi(0),m_latEta(0),m_EvsR(0) - , m_prim(0),m_sec(0) - , m_primH(0),m_primF(0),m_dh(0),m_dh2(0),m_dp(0),m_dp2(0),m_nsec(0) - {} - - // User Action functions - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfEvent(const G4Event*) override; - virtual void Step(const G4Step*) override; - - virtual StatusCode initialize() override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - - private: - TH1 *m_stepL, *m_stepProc, *m_mscAngle, *m_stepELoss, *m_secE, *m_latPhi, *m_latEta; - TH2 *m_EvsR; - G4Track *m_prim, *m_sec; - double m_primH,m_primF,m_dh,m_dh2,m_dp,m_dp2,m_nsec; -}; - #include "G4AtlasInterfaces/IBeginRunAction.h" #include "G4AtlasInterfaces/IEndEventAction.h" diff --git a/Simulation/G4Atlas/G4AtlasTests/src/sTGCHitsTestTool.cxx b/Simulation/G4Atlas/G4AtlasTests/src/sTGCHitsTestTool.cxx index 6d2e2cb13a025e93e6b1ad87385f7936c7611928..f474fdc1de42f62c85f92181407da7062e5d8115 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/sTGCHitsTestTool.cxx +++ b/Simulation/G4Atlas/G4AtlasTests/src/sTGCHitsTestTool.cxx @@ -37,21 +37,69 @@ #include "TH1F.h" using namespace MuonGM; - - +using namespace std; + + StatusCode sTGCHitsTestTool::processEvent() { CHECK(executeCheckEventInfo()); - if (m_DosTGCTest) { + if (m_DosTGCTest) { const DataHandle<GenericMuonSimHitCollection> p_collection; CHECK(evtStore()->retrieve(p_collection,"sTGCSensitiveDetector")); - for (GenericMuonSimHitCollection::const_iterator i_hit = p_collection->begin(); i_hit != p_collection->end(); ++i_hit) { + for (GenericMuonSimHitCollection::const_iterator i_hit = p_collection->begin(); i_hit != p_collection->end(); ++i_hit) { Amg::Vector3D u = (*i_hit).globalPosition(); CHECK(executeFillHistos(u)); + + + sTgcHitIdHelper* hitHelper = sTgcHitIdHelper::GetHelper(); + int simId = (*i_hit).GenericId(); + std::string sim_stationName = hitHelper->GetStationName(simId); + + static std::string TS11("TS11"); + static std::string TS21("TS21"); + static std::string TS31("TS31"); + static std::string TL11("TL11"); + static std::string TL21("TL21"); + static std::string TL31("TL31"); + + if (sim_stationName==TS11 && u.z()>0){ + m_sTgc_TransverseView_TS11_posZ->Fill(u.x(),u.y()); + } + + + if (sim_stationName==TS21 && u.z()>0){ + m_sTgc_TransverseView_TS21_posZ->Fill(u.x(),u.y()); + } + + + if (sim_stationName==TS31 && u.z()>0){ + m_sTgc_TransverseView_TS31_posZ->Fill(u.x(),u.y()); + } + + if (sim_stationName==TL11 && u.z()>0){ + m_sTgc_TransverseView_TL11_posZ->Fill(u.x(),u.y()); + } + + + if (sim_stationName==TL21 && u.z()>0){ + m_sTgc_TransverseView_TL21_posZ->Fill(u.x(),u.y()); + } + + if (sim_stationName==TL31 && u.z()>0){ + m_sTgc_TransverseView_TL31_posZ->Fill(u.x(),u.y()); + } + + double r_sTGc = sqrt(u.x()*u.x()+u.y()*u.y()); + + if (u.z() > 0){ + m_sTgc_rZview_positiveZ->Fill(u.z(), r_sTGc); + } + + // GeoMMHit ghit(*i_hit); -// if (!ghit) continue; -// Amg::Vector3D u = ghit.getGlobalPosition(); -// CHECK(executeFillHistos(u)); + // if (!ghit) continue; + // Amg::Vector3D u = ghit.getGlobalPosition(); + // CHECK(executeFillHistos(u)); } } @@ -61,5 +109,14 @@ StatusCode sTGCHitsTestTool::processEvent() { StatusCode sTGCHitsTestTool::initialize() { CHECK(MuonHitTestToolBase::initialize()); - return StatusCode::SUCCESS; + _TH2D( m_sTgc_TransverseView_TS11_posZ,"sTGC_TransverseView_TS11_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D( m_sTgc_TransverseView_TS21_posZ,"sTGC_TransverseView_TS21_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D( m_sTgc_TransverseView_TS31_posZ,"sTGC_TransverseView_TS31_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + + _TH2D( m_sTgc_TransverseView_TL11_posZ,"sTGC_TransverseView_TL11_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D( m_sTgc_TransverseView_TL21_posZ,"sTGC_TransverseView_TL21_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + _TH2D( m_sTgc_TransverseView_TL31_posZ,"sTGC_TransverseView_TL31_posZ",1200,-6000.,6000.,1200,-6000.,6000.); + + _TH2D(m_sTgc_rZview_positiveZ,"sTGC_rZView_posZ",2000,6500.,8500.,5000,0.,5000.); + return StatusCode::SUCCESS; } diff --git a/Simulation/G4Atlas/G4AtlasTests/src/sTGCHitsTestTool.h b/Simulation/G4Atlas/G4AtlasTests/src/sTGCHitsTestTool.h index 1decb74f2d70187a80e6d20ac8ec1d32a3fd54fc..2d9fbfe99aac7a0ff620878a347659860cfbb8c6 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/sTGCHitsTestTool.h +++ b/Simulation/G4Atlas/G4AtlasTests/src/sTGCHitsTestTool.h @@ -22,16 +22,20 @@ public: //m_pMdtIdHelper(0) { declareProperty("DosTGCTest", m_DosTGCTest=true); - m_BarrelEtaCut=1.; + m_BarrelEtaCut=10.; } StatusCode initialize(); StatusCode processEvent(); - protected: +protected: + + TH2 *m_sTgc_TransverseView_TS11_posZ, *m_sTgc_TransverseView_TS21_posZ, *m_sTgc_TransverseView_TS31_posZ; + TH2 *m_sTgc_TransverseView_TL11_posZ, *m_sTgc_TransverseView_TL21_posZ, *m_sTgc_TransverseView_TL31_posZ; + TH2 *m_sTgc_rZview_positiveZ; // Identifier getIdentifier(HitID cschit); -// StatusCode checkIdentifier(Identifier offid); + // StatusCode checkIdentifier(Identifier offid); private: bool m_DosTGCTest; diff --git a/Simulation/G4Atlas/G4AtlasTools/CMakeLists.txt b/Simulation/G4Atlas/G4AtlasTools/CMakeLists.txt index 82cac64680fbf858a3d8b82bad2b93404f53ec1f..d73deb18aa3cbb9dc47d43a42b583b60ddaee4e8 100644 --- a/Simulation/G4Atlas/G4AtlasTools/CMakeLists.txt +++ b/Simulation/G4Atlas/G4AtlasTools/CMakeLists.txt @@ -12,8 +12,7 @@ atlas_depends_on_subdirs( PUBLIC Simulation/G4Atlas/G4AtlasInterfaces PRIVATE GaudiKernel - Simulation/G4Utilities/G4PhysicsLists - Simulation/G4Utilities/Geo2G4 ) + Simulation/G4Utilities/G4PhysicsLists ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) @@ -30,13 +29,13 @@ atlas_add_library( G4AtlasToolsLib INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${TBB_LIBRARIES} AthenaBaseComps G4AtlasInterfaces Geo2G4Lib + LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${TBB_LIBRARIES} AthenaBaseComps G4AtlasInterfaces PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel G4PhysicsLists ) atlas_add_component( G4AtlasTools src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} ${TBB_LIBRARIES} AthenaBaseComps G4AtlasInterfaces GaudiKernel G4PhysicsLists Geo2G4Lib G4AtlasToolsLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} ${TBB_LIBRARIES} AthenaBaseComps G4AtlasInterfaces GaudiKernel G4PhysicsLists G4AtlasToolsLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/SensitiveDetectorBase.h b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/SensitiveDetectorBase.h index 6d5502f9c87f8eb2ecd2e818386471936810cd75..5c356512ba1312378b7a965ec260d0a89f810311 100644 --- a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/SensitiveDetectorBase.h +++ b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/SensitiveDetectorBase.h @@ -70,6 +70,11 @@ class SensitiveDetectorBase : virtual public ISensitiveDetector, public AthAlgTo protected: + /// @brief Assign SD to a list of volumes + /** This method supports wild card matching */ + StatusCode assignSD(G4VSensitiveDetector* sd, + const std::vector<std::string>& volumes) const; + /// @brief Retrieve the current SD. /** In AthenaMT, this means the thread-local SD. Otherwise, it is simply the single SD. */ diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/UserActionBase.h b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/UserActionBase.h deleted file mode 100644 index 20effbe273571d5a0a8c45f72c1b88ad69a6a729..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/UserActionBase.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef G4ATLASTOOLS_USERACTIONBASE_H -#define G4ATLASTOOLS_USERACTIONBASE_H - -// Base classes -#include "G4AtlasInterfaces/IUserAction.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include <stdexcept> -#include <iostream> - -#include "G4EventManager.hh" -#include "G4TrackingManager.hh" -#include "G4StackManager.hh" -#include "G4SteppingManager.hh" - -class UserActionBase : virtual public IUserAction , public AthAlgTool { - public: - // Standard constructor and destructor - UserActionBase(const std::string& type, const std::string& name, const IInterface *parent); - virtual ~UserActionBase() {};//std::cout<<"in UAB dtor"<<std::endl;}; - - // Base class methods from IUserAction - - virtual void BeginOfRun (const G4Run*) override {throw std::runtime_error("Action "+name()+"is scheduled for BeginOfRun, but no implementation is provided. Check your configuration.");}; - virtual void EndOfRun (const G4Run*) override {throw std::runtime_error("Action "+name()+" is scheduled for EndOfRun, but no implementation is provided. Check your configuration.");}; - - virtual void BeginOfEvent (const G4Event*) override {throw std::runtime_error("Action "+name()+" is scheduled for BeginOfEvent, but no implementation is provided. Check your configuration.");}; - virtual void EndOfEvent (const G4Event*) override {throw std::runtime_error("Action "+name()+" is scheduled for EndOfEvent, but no implementation is provided. Check your configuration.");}; - - virtual void Step (const G4Step*) override {throw std::runtime_error("Action "+name()+" is scheduled for Stepping, but no implementation is provided. Check your configuration.");}; - - virtual void PreTracking (const G4Track*) override {throw std::runtime_error("Action "+name()+" is scheduled for PreTracking, but no implementation is provided. Check your configuration.");}; - virtual void PostTracking (const G4Track*) override {throw std::runtime_error("Action "+name()+" is scheduled for PostTracking, but no implementation is provided. Check your configuration.");}; - - /** interface for the stacking action */ - virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track*) override {return fUrgent;}; - virtual void NewStage() override {throw std::runtime_error("Action "+name()+" is scheduled for NewStage, but no implementation is provided. Check your configuration.");}; - virtual void PrepareNewEvent() override {throw std::runtime_error("Action "+name()+" is scheduled for PrepareNewEvent, but no implementation is provided. Check your configuration.");}; - - // virtual std::vector< G4AtlasUA::Role> Roles() override {}; - - virtual void AddRole( G4AtlasUA::Role, unsigned int order ) override final; - virtual void printRoles() override final; - - virtual std::vector<std::string > GetRegions() override final {return m_regions;}; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - virtual void setManagers(G4EventManager* em, G4TrackingManager* tm, G4StackManager* stam, G4SteppingManager* stem) override final { - m_fpEventManager=em; - m_stackManager=stam; - m_fpSteppingManager=stem; - m_fpTrackingManager=tm; - }; - - protected: - - // private (for dervived classes) pointers to main G4 managers - // these are passed by the UserActionService after registration of the actions to the G4RunManager - G4EventManager* m_fpEventManager; - G4StackManager* m_stackManager; - G4SteppingManager* m_fpSteppingManager; - G4TrackingManager* m_fpTrackingManager; - - private: - - std::map< G4AtlasUA::Role, unsigned int> m_roles; ///!< The roles of this action - std::vector<std::string> m_regions; ///!< stepping actions can be activated only in some specific region - -}; - - - - -#endif diff --git a/Simulation/G4Atlas/G4AtlasTools/cmt/requirements b/Simulation/G4Atlas/G4AtlasTools/cmt/requirements index 3b840497dbffa52df232640f86486d0deb45e401..ba489ab42cab4d3c9c4be604a65798a206b6f96c 100644 --- a/Simulation/G4Atlas/G4AtlasTools/cmt/requirements +++ b/Simulation/G4Atlas/G4AtlasTools/cmt/requirements @@ -17,7 +17,6 @@ private use AtlasBoost AtlasBoost-* External use AtlasCLHEP AtlasCLHEP-* External use GaudiInterface GaudiInterface-* External -use Geo2G4 Geo2G4-* Simulation/G4Utilities use G4PhysicsLists G4PhysicsLists-* Simulation/G4Utilities end_private diff --git a/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py b/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py index 90053594f8d8334aace18e2bd55cc0c4d4740d71..5d5439468b791ec8d18afbff8169994db23c84c4 100644 --- a/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py +++ b/Simulation/G4Atlas/G4AtlasTools/python/G4AtlasToolsConfig.py @@ -121,12 +121,17 @@ def generateMuonSensitiveDetectorList(): from G4AtlasApps.SimFlags import simFlags from AthenaCommon.BeamFlags import jobproperties if jobproperties.Beam.beamType() == 'cosmics': - SensitiveDetectorList += [ 'MDTSensitiveDetectorCosmics' , 'RPCSensitiveDetectorCosmics' , 'TGCSensitiveDetectorCosmics' ] + if DetFlags.simulate.MDT_on() : SensitiveDetectorList += [ 'MDTSensitiveDetectorCosmics' ] + if DetFlags.simulate.RPC_on() : SensitiveDetectorList += [ 'RPCSensitiveDetectorCosmics' ] + if DetFlags.simulate.TGC_on() : SensitiveDetectorList += [ 'TGCSensitiveDetectorCosmics' ] else: - SensitiveDetectorList += [ 'MDTSensitiveDetector' , 'RPCSensitiveDetector' , 'TGCSensitiveDetector' ] + if DetFlags.simulate.MDT_on() : SensitiveDetectorList += [ 'MDTSensitiveDetector' ] + if DetFlags.simulate.RPC_on() : SensitiveDetectorList += [ 'RPCSensitiveDetector' ] + if DetFlags.simulate.TGC_on() : SensitiveDetectorList += [ 'TGCSensitiveDetector' ] if simFlags.SimulateNewSmallWheel(): - SensitiveDetectorList += [ 'sTGCSensitiveDetector' , 'MicromegasSensitiveDetector' ] - else: + if DetFlags.simulate.sTGC_on() : SensitiveDetectorList += [ 'sTGCSensitiveDetector' ] + if DetFlags.simulate.Micromegas_on() : SensitiveDetectorList += [ 'MicromegasSensitiveDetector' ] + elif DetFlags.simulate.CSC_on(): # CSCs built instead of NSW if jobproperties.Beam.beamType() == 'cosmics': SensitiveDetectorList += [ 'CSCSensitiveDetectorCosmics' ] diff --git a/Simulation/G4Atlas/G4AtlasTools/python/G4FieldConfig.py b/Simulation/G4Atlas/G4AtlasTools/python/G4FieldConfig.py index f532d1f40e123f1247386a600b1d3f6e92a34ccb..f8710d2776160e60948df769396bde7cd087823d 100644 --- a/Simulation/G4Atlas/G4AtlasTools/python/G4FieldConfig.py +++ b/Simulation/G4Atlas/G4AtlasTools/python/G4FieldConfig.py @@ -85,85 +85,85 @@ def getBasicFwdFieldMangerTool(name='FwdFieldManagerTool', **kwargs): return getBasicDetectorFieldManagerTool(name, **kwargs) def getQ1FwdFieldMangerTool(name='Q1FwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q1") + kwargs.setdefault("FieldSvc", "Q1FwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQXAA.1R1MagQ1']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ2FwdFieldMangerTool(name='Q2FwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q2") + kwargs.setdefault("FieldSvc", "Q2FwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQXBA.2R1MagQ2a', 'FwdRegion::LQXBA.2R1MagQ2b']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ3FwdFieldMangerTool(name='Q3FwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q3") + kwargs.setdefault("FieldSvc", "Q3FwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQXAG.3R1MagQ3']) return getBasicFwdFieldMangerTool(name, **kwargs) def getD1FwdFieldMangerTool(name='D1FwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "D1") + kwargs.setdefault("FieldSvc", "D1FwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::MBXW.A4R1MagD1a', 'FwdRegion::MBXW.B4R1MagD1b', 'FwdRegion::MBXW.C4R1MagD1c', 'FwdRegion::MBXW.D4R1MagD1d', 'FwdRegion::MBXW.E4R1MagD1e', 'FwdRegion::MBXW.F4R1MagD1f']) return getBasicFwdFieldMangerTool(name, **kwargs) def getD2FwdFieldMangerTool(name='D2FwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "D2") + kwargs.setdefault("FieldSvc", "D2FwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LBRCD.4R1MagD2']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ4FwdFieldMangerTool(name='Q4FwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q4") + kwargs.setdefault("FieldSvc", "Q4FwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQYCH.4R1MagQ4']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ5FwdFieldMangerTool(name='Q5FwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q5") + kwargs.setdefault("FieldSvc", "Q5FwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQNDC.5R1MagQ5']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ6FwdFieldMangerTool(name='Q6FwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q6") + kwargs.setdefault("FieldSvc", "Q6FwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQNDD.6R1MagQ6']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ7FwdFieldMangerTool(name='Q7FwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q7") + kwargs.setdefault("FieldSvc", "Q7FwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQNFD.7R1MagQ7a', 'FwdRegion::LQNFD.7R1MagQ7b']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ1HKickFwdFieldMangerTool(name='Q1HKickFwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q1HKick") + kwargs.setdefault("FieldSvc", "Q1HKickFwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQXAA.1R1MagQ1HKick']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ1VKickFwdFieldMangerTool(name='Q1VKickFwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q1VKick") + kwargs.setdefault("FieldSvc", "Q1VKickFwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQXAA.1R1MagQ1VKick']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ2HKickFwdFieldMangerTool(name='Q2HKickFwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q2HKick") + kwargs.setdefault("FieldSvc", "Q2HKickFwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQXBA.2R1MagQ2HKick']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ2VKickFwdFieldMangerTool(name='Q2VKickFwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q2VKick") + kwargs.setdefault("FieldSvc", "Q2VKickFwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQXBA.2R1MagQ2VKick']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ3HKickFwdFieldMangerTool(name='Q3HKickFwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q3HKick") + kwargs.setdefault("FieldSvc", "Q3HKickFwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQXAG.3R1MagQ3HKick']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ3VKickFwdFieldMangerTool(name='Q3VKickFwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q3VKick") + kwargs.setdefault("FieldSvc", "Q3VKickFwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQXAG.3R1MagQ3VKick']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ4VKickAFwdFieldMangerTool(name='Q4VKickAFwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q4VKickA") + kwargs.setdefault("FieldSvc", "Q4VKickAFwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQYCH.4R1MagQ4VKickA']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ4HKickFwdFieldMangerTool(name='Q4HKickFwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q4HKick") + kwargs.setdefault("FieldSvc", "Q4HKickFwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQYCH.4R1MagQ4HKick']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ4VKickBFwdFieldMangerTool(name='Q4VKickBFwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q4VKickB") + kwargs.setdefault("FieldSvc", "Q4VKickBFwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQYCH.4R1MagQ4VKickB']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ5HKickFwdFieldMangerTool(name='Q5HKickFwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q5HKick") + kwargs.setdefault("FieldSvc", "Q5HKickFwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQNDC.5R1MagQ5HKick']) return getBasicFwdFieldMangerTool(name, **kwargs) def getQ6VKickFwdFieldMangerTool(name='Q6VKickFwdFieldManager', **kwargs): - kwargs.setdefault("FieldSvc", "Q6VKick") + kwargs.setdefault("FieldSvc", "Q6VKickFwdG4FieldSvc") kwargs.setdefault("LogicalVolumes", ['FwdRegion::LQNDD.6R1MagQ6VKick']) return getBasicFwdFieldMangerTool(name, **kwargs) diff --git a/Simulation/G4Atlas/G4AtlasTools/src/DetectorFieldManagerTool.cxx b/Simulation/G4Atlas/G4AtlasTools/src/DetectorFieldManagerTool.cxx index 5ef53756134f6974d8af20eb8ee0b1f04513ecb2..0ec6ef6cf9a4bccb63618e2664cc70947c65102c 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/DetectorFieldManagerTool.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/DetectorFieldManagerTool.cxx @@ -71,7 +71,7 @@ StatusCode DetectorFieldManagerTool::initializeField() // Assign the field manager to volumes auto logVolStore = G4LogicalVolumeStore::GetInstance(); - for (auto volume: m_volumeList) { + for (const auto& volume: m_volumeList) { G4LogicalVolume* logicalVolume = logVolStore->GetVolume(volume); if (logicalVolume) logicalVolume->SetFieldManager(fieldMgr, true); else { diff --git a/Simulation/G4Atlas/G4AtlasTools/src/DetectorGeometryBase.cxx b/Simulation/G4Atlas/G4AtlasTools/src/DetectorGeometryBase.cxx index bdfa8fad096cb1c93846d5605850c6f1effede15..e1662a27f2bdf662c49ca31761f3849288f6d99f 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/DetectorGeometryBase.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/DetectorGeometryBase.cxx @@ -91,26 +91,39 @@ void DetectorGeometryBase::BuildGeometry() void DetectorGeometryBase::SetRotationAndOffset() { ATH_MSG_VERBOSE( name() << "::SetRotationAndOffset() (Base class method)"); - //Rotate first + // Firstly do the rotation if (!m_envelope.theRotation) { - //FIXME probably a neater way to do this part. + // m_envelope.theRotation is null, so create an identity + // rotation first. + // FIXME probably a neater way to do this part. m_envelope.theRotation=new G4RotationMatrix; + // add the extra rotations. m_envelope.theRotation->rotateX(m_rotateX); m_envelope.theRotation->rotateY(m_rotateY); m_envelope.theRotation->rotateZ(m_rotateZ); if (m_envelope.thePositionedVolume) - m_envelope.thePositionedVolume->SetRotation(m_envelope.theRotation); + { + // Override the rotation for m_envelope.thePositionedVolume. + m_envelope.thePositionedVolume->SetRotation(m_envelope.theRotation); + } } else { + // m_envelope.theRotation already exists, so just add the + // extra rotations. m_envelope.theRotation->rotateX(m_rotateX); m_envelope.theRotation->rotateY(m_rotateY); m_envelope.theRotation->rotateZ(m_rotateZ); } - //Then offset the position + // Secondly add the additional position offset to the existing + // m_envelope.thePosition vector. m_envelope.thePosition+=G4ThreeVector(m_offsetX,m_offsetY,m_offsetZ); - if (m_envelope.thePositionedVolume) m_envelope.thePositionedVolume->SetTranslation(m_envelope.thePosition); + if (m_envelope.thePositionedVolume) + { + // Override the translation for m_envelope.thePositionedVolume. + m_envelope.thePositionedVolume->SetTranslation(m_envelope.thePosition); + } ATH_MSG_VERBOSE( name() << "::SetRotationAndOffset() (Base class method): Finished" ); return; @@ -153,11 +166,11 @@ void DetectorGeometryBase::PositionInParent() void DetectorGeometryBase::BuildSubDetectors() { ATH_MSG_VERBOSE( name() << "::BuildSubDetectors() (Base class method): Starting"); - for (auto itr: m_subDetTools) + for (auto& subDetTool: m_subDetTools) { - ATH_MSG_VERBOSE(name() << "::BuildSubDetectors() (Base class method): Positioning "<<itr->GetDetectorName()<<" within "<<m_detectorName); - itr->SetParent(this); - itr->Build(); + ATH_MSG_VERBOSE(name() << "::BuildSubDetectors() (Base class method): Positioning "<<subDetTool->GetDetectorName()<<" within "<<m_detectorName); + subDetTool->SetParent(this); + subDetTool->Build(); } ATH_MSG_VERBOSE( name() << "::BuildSubDetectors() (Base class method): Finished"); } diff --git a/Simulation/G4Atlas/G4AtlasTools/src/FastSimulationBase.cxx b/Simulation/G4Atlas/G4AtlasTools/src/FastSimulationBase.cxx index 769da0003faabeb3cd22d330aa0301b396b806f0..acee63457d111d08bc14625d4eb1f350884f3789 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/FastSimulationBase.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/FastSimulationBase.cxx @@ -39,9 +39,9 @@ StatusCode FastSimulationBase::initializeFastSim(){ // Go through the regions and hook the fast simulation up G4RegionStore* regionStore = G4RegionStore::GetInstance(); bool missedOne = false; - for (auto myreg : m_regionNames){ + for (const auto& myreg : m_regionNames){ int found=0; // Regions with more than one name... - for (auto areg : *regionStore){ + for (auto* areg : *regionStore){ if (myreg.data()==areg->GetName()){ ++found; G4FastSimulationManager* theFastSimulationManager = areg->GetFastSimulationManager(); diff --git a/Simulation/G4Atlas/G4AtlasTools/src/FastSimulationMasterTool.cxx b/Simulation/G4Atlas/G4AtlasTools/src/FastSimulationMasterTool.cxx index 65a5f51300711bba110d516b2520436c30bce9d8..30551e0b47fa61bae466ae8af23fddcca6f8ef9e 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/FastSimulationMasterTool.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/FastSimulationMasterTool.cxx @@ -25,7 +25,7 @@ StatusCode FastSimulationMasterTool::initializeFastSims(){ CHECK( m_FastSimList.retrieve() ); // Initialize the SDs - for (auto ifs : m_FastSimList){ + for (auto& ifs : m_FastSimList){ CHECK(ifs->initializeFastSim()); } @@ -47,7 +47,7 @@ StatusCode FastSimulationMasterTool::initializeFastSims(){ StatusCode FastSimulationMasterTool::EndOfAthenaEvent(){ // Call gather for all sensitive detectors - for (auto ifs : m_FastSimList){ + for (auto& ifs : m_FastSimList){ CHECK(ifs->EndOfAthenaEvent()); } return StatusCode::SUCCESS; diff --git a/Simulation/G4Atlas/G4AtlasTools/src/G4MultiSensitiveDetector.cc b/Simulation/G4Atlas/G4AtlasTools/src/G4MultiSensitiveDetector.cc index 752e212625e4c05f5bd9ef8d7381f8d57a5bd964..a956726615026c6bc8bd1454f1cde99e38e6813d 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/G4MultiSensitiveDetector.cc +++ b/Simulation/G4Atlas/G4AtlasTools/src/G4MultiSensitiveDetector.cc @@ -74,7 +74,7 @@ G4MultiSensitiveDetector::Initialize(G4HCofThisEvent* ) { //SDManager is resposnsible for calling this since the granular SDs // are also registered - //for ( auto sd : fSensitiveDetectors ) sd->Initialize(hcte); + //for ( auto* sd : fSensitiveDetectors ) sd->Initialize(hcte); } void @@ -82,25 +82,25 @@ G4MultiSensitiveDetector::EndOfEvent(G4HCofThisEvent* ) { //SDManager is resposnsible for calling this since the granular SDs // are also registered - //for ( auto sd : fSensitiveDetectors ) sd->EndOfEvent(hcte); + //for ( auto* sd : fSensitiveDetectors ) sd->EndOfEvent(hcte); } void G4MultiSensitiveDetector::clear() { - for ( auto sd : fSensitiveDetectors ) sd->clear(); + for ( auto* sd : fSensitiveDetectors ) sd->clear(); } void G4MultiSensitiveDetector::DrawAll() { - for ( auto sd : fSensitiveDetectors ) sd->DrawAll(); + for ( auto* sd : fSensitiveDetectors ) sd->DrawAll(); } void G4MultiSensitiveDetector::PrintAll() { - for ( auto sd : fSensitiveDetectors ) sd->PrintAll(); + for ( auto* sd : fSensitiveDetectors ) sd->PrintAll(); } G4bool @@ -108,7 +108,7 @@ G4MultiSensitiveDetector::ProcessHits(G4Step*aStep,G4TouchableHistory*) { VDBG(2,GetName()<<" : Called processHits: "<<aStep<<" with Edep: "<<aStep->GetTotalEnergyDeposit()); G4bool result = true; - for (auto sd : fSensitiveDetectors ) + for (auto* sd : fSensitiveDetectors ) result &= sd->Hit(aStep); return result; } @@ -130,7 +130,7 @@ G4VSensitiveDetector* G4MultiSensitiveDetector::Clone() const { VDBG(2,GetName()<<"Cloning an instance of G4MultiSensitiveDetector"); G4MultiSensitiveDetector* newInst = new G4MultiSensitiveDetector(this->GetName()); - for ( auto sd : fSensitiveDetectors ) + for ( auto* sd : fSensitiveDetectors ) newInst->AddSD( sd->Clone() ); return newInst; } diff --git a/Simulation/G4Atlas/G4AtlasTools/src/PhysicsListToolBase.cxx b/Simulation/G4Atlas/G4AtlasTools/src/PhysicsListToolBase.cxx index 582f7232311432a96ca4520624247ae4bef7343b..ff5ad2e8d942608e0ec3981b1f0c9f756a13185a 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/PhysicsListToolBase.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/PhysicsListToolBase.cxx @@ -81,14 +81,14 @@ void PhysicsListToolBase::CreatePhysicsList() // them... //Register physics options to the G4VModularPhysicsList - for (auto itr: m_phys_option) + for (auto& physOptTool: m_phys_option) { - m_physicsList->RegisterPhysics(itr->GetPhysicsOption()); + m_physicsList->RegisterPhysics(physOptTool->GetPhysicsOption()); } //Register decays to the G4VModularPhysicsList - for (auto itr: m_phys_decay) + for (auto& physDecayTool: m_phys_decay) { - m_physicsList->RegisterPhysics(itr->GetPhysicsOption()); + m_physicsList->RegisterPhysics(physDecayTool->GetPhysicsOption()); } //ConstructProcess(); diff --git a/Simulation/G4Atlas/G4AtlasTools/src/RegionCreator.cxx b/Simulation/G4Atlas/G4AtlasTools/src/RegionCreator.cxx index f78718c6d1cc46c0d10a1eaed111bd226db11706..72aa5267802f173186cdc734e1285fcf47799beb 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/RegionCreator.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/RegionCreator.cxx @@ -17,91 +17,93 @@ RegionCreator::RegionCreator(const std::string& type, const std::string& name, c : AthAlgTool(type,name,parent),m_regionName(name),m_gammaCut(1.*Gaudi::Units::mm),m_electronCut(1.*Gaudi::Units::mm),m_positronCut(1.*Gaudi::Units::mm), m_protonCut(1.*Gaudi::Units::mm) { - ATH_MSG_INFO( "Region Creator being built: " << name ); - - // re-initialize m_regionName in order to take the real tool name rather than the path to it - size_t ipos=m_regionName.find_last_of("."); - size_t length=m_regionName.size(); - if (ipos<length) m_regionName=m_regionName.substr(ipos+1,length-ipos-1); - ATH_MSG_INFO( "m_regionName default value reset to "<<m_regionName); - - declareProperty( "VolumeList" , m_logicalVolumes , "List of volumes to be included in this region" ); - declareProperty( "ElectronCut" , m_electronCut, "Cut to be applied for electrons"); - declareProperty( "PositronCut" , m_positronCut, "Cut to be applied for positrons"); - declareProperty( "GammaCut" , m_gammaCut, "Cut to be applied for gammas"); - declareProperty( "ProtonCut" , m_protonCut, "Cut to be applied for gammas"); - - declareProperty( "RegionName" , m_regionName , "Region name (same as the Tool name if not set"); - - + ATH_MSG_INFO( "Region Creator being built: " << name ); + + // re-initialize m_regionName in order to take the real tool name rather than the path to it + size_t ipos=m_regionName.find_last_of("."); + size_t length=m_regionName.size(); + if (ipos<length) m_regionName=m_regionName.substr(ipos+1,length-ipos-1); + ATH_MSG_INFO( "m_regionName default value reset to "<<m_regionName); + + declareProperty( "VolumeList" , m_logicalVolumes , "List of volumes to be included in this region" ); + declareProperty( "ElectronCut" , m_electronCut, "Cut to be applied for electrons"); + declareProperty( "PositronCut" , m_positronCut, "Cut to be applied for positrons"); + declareProperty( "GammaCut" , m_gammaCut, "Cut to be applied for gammas"); + declareProperty( "ProtonCut" , m_protonCut, "Cut to be applied for gammas"); + + declareProperty( "RegionName" , m_regionName , "Region name (same as the Tool name if not set"); + + } // Athena method, called at initialization time StatusCode RegionCreator::initialize() -{ - ATH_MSG_INFO(" initializing RegionCreator "<<name() ); - - //create a new G4Region - G4Region* theRegion=new G4Region(m_regionName); - - // loop over volumes and fish for those in the list - int nVolumes = 0; - G4LogicalVolumeStore* logStore=G4LogicalVolumeStore::GetInstance(); - for (auto vol: m_logicalVolumes) - for (auto it: *logStore) - { - - if (vol==it->GetName()) - { - nVolumes++; - it->SetRegion(theRegion); - theRegion->AddRootLogicalVolume(it); - } - } - - ATH_MSG_INFO(" a total of "<<nVolumes<<" volumes was assigned to region "<<m_regionName ); - - // create a G4ProductionCuts object and set appropriate values - G4ProductionCuts* cuts=new G4ProductionCuts(); - cuts->SetProductionCut(m_gammaCut,"gamma"); - cuts->SetProductionCut(m_electronCut,"e-"); - cuts->SetProductionCut(m_positronCut,"e+"); - cuts->SetProductionCut(m_protonCut,"proton"); - - // assign cuts to the region and return succesfully - theRegion->SetProductionCuts(cuts); - - Dump(); - - return StatusCode::SUCCESS; +{ + ATH_MSG_INFO(" initializing RegionCreator "<<name() ); + + //create a new G4Region + G4Region* theRegion=new G4Region(m_regionName); + + // loop over volumes and fish for those in the list + int nVolumes = 0; + G4LogicalVolumeStore* logStore=G4LogicalVolumeStore::GetInstance(); + for (const auto& vol: m_logicalVolumes) + for (auto* it: *logStore) + { + + if (vol==it->GetName()) + { + nVolumes++; + it->SetRegion(theRegion); + theRegion->AddRootLogicalVolume(it); + } + } + + ATH_MSG_INFO(" a total of "<<nVolumes<<" volumes was assigned to region "<<m_regionName ); + + // create a G4ProductionCuts object and set appropriate values + G4ProductionCuts* cuts=new G4ProductionCuts(); + cuts->SetProductionCut(m_gammaCut,"gamma"); + cuts->SetProductionCut(m_electronCut,"e-"); + cuts->SetProductionCut(m_positronCut,"e+"); + cuts->SetProductionCut(m_protonCut,"proton"); + + // assign cuts to the region and return succesfully + theRegion->SetProductionCuts(cuts); + + Dump(); + + return StatusCode::SUCCESS; } - + void RegionCreator::Dump() { - ATH_MSG_INFO("+----------------------------------------------------+"); - ATH_MSG_INFO(" "); - ATH_MSG_INFO(" Dump of region "<<m_regionName); - ATH_MSG_INFO(" Volumes being assigned to this region:"); - for (auto vol: m_logicalVolumes) - ATH_MSG_INFO(" "<<vol); - ATH_MSG_INFO(" "); - ATH_MSG_INFO(" Cuts selected for this region:"); - ATH_MSG_INFO(" Gamma ="<<m_gammaCut); - ATH_MSG_INFO(" Electron ="<<m_electronCut); - ATH_MSG_INFO(" Positron ="<<m_positronCut); - ATH_MSG_INFO(" Proton ="<<m_protonCut); - ATH_MSG_INFO(" "); - ATH_MSG_INFO("+----------------------------------------------------+"); + ATH_MSG_INFO("+----------------------------------------------------+"); + ATH_MSG_INFO(" "); + ATH_MSG_INFO(" Dump of region "<<m_regionName); + ATH_MSG_INFO(" Volumes being assigned to this region:"); + for (const auto& vol: m_logicalVolumes) + { + ATH_MSG_INFO(" "<<vol); + } + ATH_MSG_INFO(" "); + ATH_MSG_INFO(" Cuts selected for this region:"); + ATH_MSG_INFO(" Gamma ="<<m_gammaCut); + ATH_MSG_INFO(" Electron ="<<m_electronCut); + ATH_MSG_INFO(" Positron ="<<m_positronCut); + ATH_MSG_INFO(" Proton ="<<m_protonCut); + ATH_MSG_INFO(" "); + ATH_MSG_INFO("+----------------------------------------------------+"); } - + StatusCode -RegionCreator::queryInterface(const InterfaceID& riid, void** ppvIf) +RegionCreator::queryInterface(const InterfaceID& riid, void** ppvIf) { - if ( riid == IRegionCreator::interfaceID() ) - { - *ppvIf = (IRegionCreator*)this; - addRef(); - return StatusCode::SUCCESS; - } + if ( riid == IRegionCreator::interfaceID() ) + { + *ppvIf = (IRegionCreator*)this; + addRef(); + return StatusCode::SUCCESS; + } return AlgTool::queryInterface( riid, ppvIf ); } diff --git a/Simulation/G4Atlas/G4AtlasTools/src/SensitiveDetectorBase.cxx b/Simulation/G4Atlas/G4AtlasTools/src/SensitiveDetectorBase.cxx index 236573a47c43779f3edef673b34692b2e927e1d7..96dfeed227882b767f8fed8f4f9afe4bd653aff3 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/SensitiveDetectorBase.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/SensitiveDetectorBase.cxx @@ -2,6 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ +// STL includes +#include <sstream> + // Base class #include "G4AtlasTools/SensitiveDetectorBase.h" @@ -15,6 +18,7 @@ #include "G4AtlasTools/G4MultiSensitiveDetector.hh" + SensitiveDetectorBase::SensitiveDetectorBase(const std::string& type, const std::string& name, const IInterface* parent) @@ -33,6 +37,15 @@ StatusCode SensitiveDetectorBase::initializeSD() { ATH_MSG_VERBOSE( name() << "::initializeSD()" ); + // Sanity check for volume configuration problems. + // It would be better to have a more robust solution for this. + if(m_volumeNames.empty() != m_noVolumes) { + ATH_MSG_ERROR("Initializing SD from " << name() << ", NoVolumes = " + << (m_noVolumes? "true" : "false") << ", but LogicalVolumeNames = " + << m_volumeNames); + return StatusCode::FAILURE; + } + // Make sure SD isn't already registered if(getSD()) { @@ -49,64 +62,73 @@ StatusCode SensitiveDetectorBase::initializeSD() } setSD(sd); - // Set the verbosity information on this thing - if(msgLvl(MSG::VERBOSE)) getSD()->SetVerboseLevel(10); - else if(msgLvl(MSG::DEBUG)) getSD()->SetVerboseLevel(5); + // Assign the SD to our list of volumes + ATH_CHECK( assignSD( getSD(), m_volumeNames ) ); - // Grab the user detector construction - // G4RunManager* rm = G4RunManager::GetRunManager(); - // G4VUserDetectorConstruction* dc=rm->GetUserDetectorConstruction(); + ATH_MSG_DEBUG( "Initialized and added SD " << name() ); + return StatusCode::SUCCESS; +} + +//----------------------------------------------------------------------------- +// Assign an SD to a list of volumes +//----------------------------------------------------------------------------- +StatusCode SensitiveDetectorBase:: +assignSD(G4VSensitiveDetector* sd, const std::vector<std::string>& volumes) const +{ + // Propagate verbosity setting to the SD + if(msgLvl(MSG::VERBOSE)) sd->SetVerboseLevel(10); + else if(msgLvl(MSG::DEBUG)) sd->SetVerboseLevel(5); // Add the sensitive detector to the SD manager in G4 for SDs, // even if it has no volumes associated to it. - G4SDManager* SDmanager = G4SDManager::GetSDMpointer(); - SDmanager->AddNewDetector(getSD()); - if(!m_noVolumes) - { - // Go through the logical volumes and hook the SDs up - bool gotOne = false; - G4LogicalVolumeStore* logicalVolumeStore = G4LogicalVolumeStore::GetInstance(); - for (const auto& myvol : m_volumeNames) - { - int found = 0; - for (auto ilv : *logicalVolumeStore ) - { - if (ilv->GetName() == myvol.data()) - { - // Do not break on found to protect against multiple volumes - // with the same name - ++found; - SetSensitiveDetector( ilv, getSD() ); - gotOne = true; - } // Found a volume! - } // Loop over all the volumes in the geometry - // Give notice if we have missed a volume in here - if (0==found) - { - ATH_MSG_WARNING( "Volume " << myvol << - " not found in G4LogicalVolumeStore." ); - } - else - { - ATH_MSG_VERBOSE( found << " copies of LV " << myvol << - " found; SD " << name() << " assigned." ); - } - } // Loop over my volumes - - // Crash out if we have failed to assign a volume - this is bad news! - if (!gotOne) - { - ATH_MSG_ERROR( "Failed to assign *any* volume to SD " << name() << - " and expected at least one." ); - return StatusCode::FAILURE; + auto sdMgr = G4SDManager::GetSDMpointer(); + sdMgr->AddNewDetector(sd); + + if(!volumes.empty()) { + bool gotOne = false; + auto logicalVolumeStore = G4LogicalVolumeStore::GetInstance(); + for(const auto& volumeName : volumes) { + // Keep track of how many volumes we find with this name string. + // We allow for multiple matches. + int numFound = 0; + + // Find volumes with this name + for(auto* logVol : *logicalVolumeStore) { + //if( matchStrings( volumeName.data(), logVol->GetName() ) ) + if(logVol->GetName() == volumeName.c_str()) { + ++numFound; + SetSensitiveDetector(logVol, sd); } + } + // Warn if no volumes were found + if(numFound == 0) { + ATH_MSG_WARNING("Volume " << volumeName << + " not found in G4LogicalVolumeStore."); + } + else { + ATH_MSG_VERBOSE("Found " << numFound << " copies of LV " << volumeName << + "; SD " << sd->GetName() << " assigned."); + gotOne = true; + } + } - ATH_MSG_DEBUG( "Initialized and added SD " << name() ); + + // Abort if we have failed to assign any volume + if(!gotOne) { + ATH_MSG_ERROR( "Failed to assign *any* volume to SD " << name() << + " and expected at least one." ); + return StatusCode::FAILURE; + } + } + return StatusCode::SUCCESS; } -StatusCode -SensitiveDetectorBase::queryInterface(const InterfaceID& riid, void** ppvIf) +//----------------------------------------------------------------------------- +// Interface query boiler plate +//----------------------------------------------------------------------------- +StatusCode SensitiveDetectorBase:: +queryInterface(const InterfaceID& riid, void** ppvIf) { if ( riid == ISensitiveDetector::interfaceID() ) { @@ -142,8 +164,8 @@ void SensitiveDetectorBase::setSD(G4VSensitiveDetector* sd) #endif } -void SensitiveDetectorBase::SetSensitiveDetector -(G4LogicalVolume* logVol, G4VSensitiveDetector* aSD) const +void SensitiveDetectorBase:: +SetSensitiveDetector(G4LogicalVolume* logVol, G4VSensitiveDetector* aSD) const { // New Logic: allow for "multiple" SDs being attached to a single LV. // To do that we use a special proxy SD called G4MultiSensitiveDetector @@ -163,7 +185,11 @@ void SensitiveDetectorBase::SetSensitiveDetector } else { - const G4String msdname = "/MultiSD_"+logVol->GetName(); + // Construct a unique name using the volume address + std::stringstream ss; + ss << static_cast<const void*>(logVol); + const G4String msdname = "/MultiSD_" + logVol->GetName() + ss.str(); + //ATH_MSG_INFO("MultiSD name: " << msdname); msd = new G4MultiSensitiveDetector(msdname); // We need to register the proxy to have correct handling of IDs G4SDManager::GetSDMpointer()->AddNewDetector(msd); diff --git a/Simulation/G4Atlas/G4AtlasTools/src/UserActionBase.cxx b/Simulation/G4Atlas/G4AtlasTools/src/UserActionBase.cxx deleted file mode 100644 index 5acbc4729f1d68000481a78fe7ff860ac79df25b..0000000000000000000000000000000000000000 --- a/Simulation/G4Atlas/G4AtlasTools/src/UserActionBase.cxx +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "G4AtlasTools/UserActionBase.h" - -#include "CLHEP/Units/PhysicalConstants.h" -#include "G4VUserPhysicsList.hh" -#include "G4RunManager.hh" -#include "G4EmProcessOptions.hh" -#include "G4UImanager.hh" -#include "G4PhysListFactory.hh" - -UserActionBase::UserActionBase(const std::string& type, const std::string& name, const IInterface* parent) - : AthAlgTool(type,name,parent), - m_fpEventManager(nullptr), - m_stackManager(nullptr), - m_fpSteppingManager(nullptr), - m_fpTrackingManager(nullptr), - m_regions() -{ - - declareProperty("TargetRegions",m_regions); - -} - - -void UserActionBase::AddRole(G4AtlasUA::Role theRole, unsigned int order){ - - m_roles.insert(std::map<G4AtlasUA::Role, unsigned int>::value_type(theRole,order)); - -} - -StatusCode -UserActionBase::queryInterface(const InterfaceID& riid, void** ppvIf) -{ - if ( riid == IUserAction::interfaceID() ) - { - *ppvIf = (IUserAction*)this; - addRef(); - return StatusCode::SUCCESS; - } - return AthAlgTool::queryInterface( riid, ppvIf ); -} - -void UserActionBase::printRoles(){ - - - ATH_MSG_INFO("Roles enabled are:"); - - for(auto p: m_roles){ - - ATH_MSG_INFO(" Role: "<<p.first<<" in position "<<p.second); - - } - - ATH_MSG_INFO("[BeginOfRun=0, BeginOfEvent=1, PreTracking=2, Step=3, Classification=4, NewStage=5, PrepareNewEvent=6, PostTracking=7, EndOfEvent=8, EndOfRun=9]"); - -} diff --git a/Simulation/G4Atlas/G4AtlasTools/src/components/G4AtlasTools_entries.cxx b/Simulation/G4Atlas/G4AtlasTools/src/components/G4AtlasTools_entries.cxx index a2c49291b40c42f1e6447f4a44a0cc0fbef552fd..c74a873e541fabfa6934a543ceeb173fbb70bcbf 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/components/G4AtlasTools_entries.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/components/G4AtlasTools_entries.cxx @@ -2,13 +2,11 @@ #include "G4AtlasTools/PhysicsListToolBase.h" #include "G4AtlasTools/DetectorGeometryBase.h" -#include "G4AtlasTools/UserActionBase.h" #include "G4AtlasTools/CylindricalEnvelope.h" #include "G4AtlasTools/BoxEnvelope.h" #include "G4AtlasTools/PolyconicalEnvelope.h" #include "G4AtlasTools/EnvelopeTool.h" #include "G4AtlasTools/G4AtlasDetectorConstructionTool.h" -#include "G4AtlasTools/GeoDetectorTool.h" #include "G4AtlasTools/RegionCreator.h" #include "../UserLimitsTool.h" #include "G4AtlasTools/AddPhysicsDecayTool.h" @@ -19,13 +17,11 @@ DECLARE_TOOL_FACTORY( PhysicsListToolBase ) DECLARE_TOOL_FACTORY( DetectorGeometryBase ) -DECLARE_TOOL_FACTORY( UserActionBase ) DECLARE_TOOL_FACTORY( CylindricalEnvelope ) DECLARE_TOOL_FACTORY( BoxEnvelope ) DECLARE_TOOL_FACTORY( PolyconicalEnvelope ) DECLARE_TOOL_FACTORY( EnvelopeTool ) DECLARE_TOOL_FACTORY( G4AtlasDetectorConstructionTool ) -DECLARE_TOOL_FACTORY( GeoDetectorTool ) DECLARE_TOOL_FACTORY( RegionCreator ) DECLARE_TOOL_FACTORY( UserLimitsTool ) DECLARE_TOOL_FACTORY( SensitiveDetectorMasterTool ) diff --git a/Simulation/G4Extensions/Charginos/python/CharginosConfig.py b/Simulation/G4Extensions/Charginos/python/CharginosConfig.py index b9f4e50677e34e95fa58a718e47b1d14b6e68de0..927b1bcbb2115bb2644980c5661a4e38e7f6a8c8 100644 --- a/Simulation/G4Extensions/Charginos/python/CharginosConfig.py +++ b/Simulation/G4Extensions/Charginos/python/CharginosConfig.py @@ -2,12 +2,11 @@ from AthenaCommon import CfgMgr def getCharginosPhysicsTool(name="CharginosPhysicsTool", **kwargs): - from G4AtlasApps import AtlasG4Eng + from G4AtlasApps.SimFlags import simFlags from AthenaCommon.SystemOfUnits import GeV,MeV,eplus,ns - # FIXME AtlasG4Eng will soon be obsolete need to do this in a better way. - C1Mass = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration["AMSBC1Mass"]) - N1Mass = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration["AMSBN1Mass"]) - C1Lifetime = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration["AMSBC1Lifetime"]) + C1Mass = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1Mass", None)) + N1Mass = eval(simFlags.specialConfiguration.get_Value().get("AMSBN1Mass", None)) + C1Lifetime = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1Lifetime", "-1.0")) kwargs.setdefault("CharginoPlusMass", C1Mass*MeV) # TODO check units kwargs.setdefault("CharginoPlusStable", (C1Lifetime < 0)) @@ -41,4 +40,4 @@ def getCharginosPhysicsTool(name="CharginosPhysicsTool", **kwargs): ##kwargs.setdefault("NeutralinoLifetime", -1) ##kwargs.setdefault("NeutralinoShortlived", False) - return CfgMgr.CharginosPhysicsToolTool(name, **kwargs) + return CfgMgr.CharginosPhysicsTool(name, **kwargs) diff --git a/Simulation/G4Extensions/Charginos/src/CharginosPhysicsTool.cxx b/Simulation/G4Extensions/Charginos/src/CharginosPhysicsTool.cxx index f14150ca152dd3a55950df3168ac9a25022a0170..46838162a93c97320b2e08eb65171f0564b6a147 100644 --- a/Simulation/G4Extensions/Charginos/src/CharginosPhysicsTool.cxx +++ b/Simulation/G4Extensions/Charginos/src/CharginosPhysicsTool.cxx @@ -13,7 +13,8 @@ // Geant4 physics lists #include "G4ProcessManager.hh" #include "G4ParticleTable.hh" -#include "G4hhIonisation.hh" +#include "G4hIonisation.hh" +#include "G4hMultipleScattering.hh" #include "G4Transportation.hh" #include "G4MuIonisation.hh" #include "G4ProcessManager.hh" @@ -111,7 +112,8 @@ void CharginosPhysicsTool::ConstructProcess() { ATH_MSG_DEBUG(" ConstructProcess for Charginos being run"); - G4hhIonisation *theIonisation = new G4hhIonisation; + G4hIonisation *theIonisation = new G4hIonisation; + G4hMultipleScattering *theMSC = new G4hMultipleScattering; G4Transportation *theTransportation=new G4Transportation; G4ProcessManager *charginoPlus = m_theCharginoPlus->GetProcessManager(); @@ -119,6 +121,8 @@ void CharginosPhysicsTool::ConstructProcess() charginoPlus->AddProcess(theTransportation); charginoMinus->AddProcess(theTransportation); + charginoPlus->AddProcess(theMSC,-1,1,1); + charginoMinus->AddProcess(theMSC,-1,1,1); charginoPlus->AddProcess(theIonisation,-1,2,2); charginoMinus->AddProcess(theIonisation,-1,2,2); } diff --git a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilter.h b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilter.h index 4627a25fc42ce18d9fe9f8d2869a8d2c822e10e4..5276dbd7d5bb0637866f3a97317a38bcc5c55b17 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilter.h +++ b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilter.h @@ -10,36 +10,6 @@ #ifndef G4CosmicAndFilter_H #define G4CosmicAndFilter_H -#include "G4AtlasTools/UserActionBase.h" - -#include <string> - -class G4CosmicAndFilter final: public UserActionBase { - -private: - - int ntracks; - - int m_ntot,m_npass; - - std::string m_collectionName; - std::string m_collectionName2; - -public: - - G4CosmicAndFilter(const std::string& type, const std::string& name, const IInterface* parent); - - virtual StatusCode initialize() override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - virtual void EndOfEvent(const G4Event*) override; - virtual void EndOfRun(const G4Run*) override; - - - - -}; - #include "G4AtlasInterfaces/IEndEventAction.h" #include "AthenaBaseComps/AthMessaging.h" diff --git a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilter.h b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilter.h index 5572d2428d9d3dcd3f9ed0c7ddfee1f962d644d4..51970ab7c5ff5dd0e75117d791a775fa066bf9bd 100755 --- a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilter.h +++ b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilter.h @@ -10,32 +10,6 @@ #ifndef G4CosmicFilter_H #define G4CosmicFilter_H -#include "G4AtlasTools/UserActionBase.h" - -#include <string> - -class G4CosmicFilter final: public UserActionBase -{ - private: - - int m_ntot,m_npass; - int m_PDGId; - std::string m_collectionName; - - double m_ptMin , m_ptMax; - -public: - - G4CosmicFilter(const std::string& type, const std::string& name, const IInterface* parent); - - virtual StatusCode initialize() override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - virtual void EndOfEvent(const G4Event*) override; - virtual void EndOfRun(const G4Run*) override; - -}; - #include "G4AtlasInterfaces/IEndEventAction.h" #include "AthenaBaseComps/AthMessaging.h" diff --git a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilter.h b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilter.h index 1cce4167dbe06d7d4dfa3e3b8c6d8d866c286245..5d88e28c654f38a8fceb56df0932fe15ff372e10 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilter.h +++ b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilter.h @@ -10,31 +10,6 @@ #ifndef G4CosmicOrFilter_H #define G4CosmicOrFilter_H -#include "G4AtlasTools/UserActionBase.h" - -#include <string> - -class G4CosmicOrFilter final: public UserActionBase { - private: - /** Counters for filter efficiency calculations */ - int m_ntot,m_npass; - - /** Names for filtering collections */ - std::string m_collectionName; - std::string m_collectionName2; - std::string m_collectionName3; - - public: - G4CosmicOrFilter(const std::string& type, const std::string& name, const IInterface* parent); - - virtual StatusCode initialize() override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - virtual void EndOfEvent(const G4Event*) override; - virtual void EndOfRun(const G4Run*) override; - -}; - #include "G4AtlasInterfaces/IEndEventAction.h" #include "AthenaBaseComps/AthMessaging.h" diff --git a/Simulation/G4Extensions/G4CosmicFilter/python/G4CosmicFilterConfig.py b/Simulation/G4Extensions/G4CosmicFilter/python/G4CosmicFilterConfig.py index 3fb8764731c81174895d7358c5d44dcb8d88bcc7..ad028bacc834a2d08bbeec8f6b6faadfdd23f877 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/python/G4CosmicFilterConfig.py +++ b/Simulation/G4Extensions/G4CosmicFilter/python/G4CosmicFilterConfig.py @@ -60,38 +60,6 @@ def configCosmicFilterVolumeNames(): return [collectionName] -def getCosmicFilter(name="G4CosmicFilter", **kwargs): - - volumes=configCosmicFilterVolumeNames() - - # use simple cosmic filter - if len(volumes)==1: - - if simFlags.CosmicFilterID.statusOn: - kwargs.setdefault("PDGId", simFlags.CosmicFilterID.get_Value()) - if simFlags.CosmicFilterPTmin.statusOn: - kwargs.setdefault("PtMin", simFlags.CosmicFilterPTmin.get_Value()) - if simFlags.CosmicFilterPTmax.statusOn: - kwargs.setdefault("PtMax", simFlags.CosmicFilterPTmax.get_Value()) - kwargs.setdefault("CollectionName",volumes[0]) - - print 'G4CosmicFilter: Filter volume is %s' % volumes[0] - - return CfgMgr.G4CosmicFilter(name, **kwargs) - - elif len(volumes)==2: - # need a cosmic AND filter - kwargs.setdefault("CollectionName",volumes[0]) - kwargs.setdefault("CollectionName2",volumes[1]) - return CfgMgr.G4CosmicAndFilter(name, **kwargs) - - else: - # need a cosmic OR filter - kwargs.setdefault("CollectionName",volumes[0]) - kwargs.setdefault("CollectionName2",volumes[1]) - kwargs.setdefault("CollectionName3",volumes[2]) - return CfgMgr.G4CosmicOrFilter(name, **kwargs) - def getCosmicFilterTool(name="G4UA::G4CosmicFilterTool", **kwargs): volumes=configCosmicFilterVolumeNames() diff --git a/Simulation/G4Extensions/G4CosmicFilter/python/G4CosmicFilterConfigDb.py b/Simulation/G4Extensions/G4CosmicFilter/python/G4CosmicFilterConfigDb.py index 2457fe071168cf4c2c594771c9ac4f65b9e29ea1..4cacfa67b20e57c778e92949bf51989732dac377 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/python/G4CosmicFilterConfigDb.py +++ b/Simulation/G4Extensions/G4CosmicFilter/python/G4CosmicFilterConfigDb.py @@ -3,7 +3,5 @@ from AthenaCommon.CfgGetter import addTool # this returns three different tools, depending on the runtime config -addTool("G4CosmicFilter.G4CosmicFilterConfig.getCosmicFilter", "G4CosmicFilter") addTool("G4CosmicFilter.G4CosmicFilterConfig.getCosmicFilterTool", "G4UA::G4CosmicFilterTool") -#addTool("G4CosmicFilter.G4CosmicFilterConfig.getCosmicAndFilter", "G4CosmicAndFilter") -#addTool("G4CosmicFilter.G4CosmicFilterConfig.getCosmicOrFilter", "G4CosmicOrFilter") + diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilter.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilter.cxx index 308a9b4d788a39b66b22d2b7eeb4d022de1dccc0..0999b63835eea0478e33a8c033ffdf039495f373 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilter.cxx +++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilter.cxx @@ -11,96 +11,6 @@ #include "StoreGate/ReadHandle.h" -G4CosmicAndFilter::G4CosmicAndFilter(const std::string& type, const std::string& name, const IInterface* parent) - : UserActionBase(type,name,parent) - , ntracks(0) - , m_ntot(0) - , m_npass(0) - , m_collectionName("TRTBarrelEntryLayer") - , m_collectionName2("CaloEntryLayer") -{ - declareProperty("CollectionName",m_collectionName); - declareProperty("CollectionName2",m_collectionName2); -} - -void G4CosmicAndFilter::EndOfEvent(const G4Event*) -{ - - m_ntot++; - int counter(0); - SG::ReadHandle <TrackRecordCollection> coll(m_collectionName); - if (! coll.isValid()) - { - ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection " << m_collectionName); - } - else - { - counter = coll->size(); - } - - if (counter==0) - { - ATH_MSG_INFO("aborting event due to failing AND filter"); - G4RunManager::GetRunManager()->AbortEvent(); - return; - } - - SG::ReadHandle <TrackRecordCollection> coll2(m_collectionName2); - if (! coll2.isValid()) - { - ATH_MSG_INFO( "Cannot retrieve TrackRecordCollection " << m_collectionName2 ); - } - else - { - counter = coll2->size(); - } - - if (counter==0) - { - ATH_MSG_INFO("aborting event due to failing AND filter"); - G4RunManager::GetRunManager()->AbortEvent(); - return; - } - - m_npass++; - return; -} - -StatusCode G4CosmicAndFilter::initialize() -{ - - ATH_MSG_INFO( "using collectionName "<<m_collectionName << " and " <<m_collectionName2 ); - - return StatusCode::SUCCESS; -} - -void G4CosmicAndFilter::EndOfRun(const G4Run*) -{ - ATH_MSG_INFO( "processed "<< m_ntot <<" events, "<< m_npass<<" events passed filter " ); -} - - -StatusCode G4CosmicAndFilter::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) - { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } - else - { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - - - -#include "G4CosmicFilter/G4CosmicAndFilter.h" - - #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IMessageSvc.h" diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilter.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilter.cxx index ccc209a335ec0d2b02a4920434d680ef2547e71e..c84f03d6d600ce28784a0e672515c59af8f060de 100755 --- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilter.cxx +++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilter.cxx @@ -11,92 +11,6 @@ #include "G4Event.hh" #include "StoreGate/ReadHandle.h" -G4CosmicFilter::G4CosmicFilter(const std::string& type, const std::string& name, const IInterface* parent) - : UserActionBase(type,name,parent) - , m_ntot(0) - , m_npass(0) - , m_PDGId(0) - , m_collectionName("CaloEntryLayer") - , m_ptMin(-1) - , m_ptMax(-1) -{ - declareProperty("CollectionName",m_collectionName); - declareProperty("PDGId",m_PDGId); - declareProperty("PtMin",m_ptMin); - declareProperty("PtMax",m_ptMax); -} - - -void G4CosmicFilter::EndOfEvent(const G4Event*) -{ - int counter(0); - - m_ntot++; - - SG::ReadHandle <TrackRecordCollection> coll(m_collectionName); - if (! coll.isValid()) - { - ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection " << m_collectionName ); - G4RunManager::GetRunManager()->AbortEvent(); - return; - } - - counter = coll->size(); - - if (m_PDGId!=0 || m_ptMin>0 || m_ptMax>0) - { - counter=0; - for (const auto& a_tr : *coll) - { - if (m_PDGId!=0 && m_PDGId != fabs(a_tr.GetPDGCode())) continue; - if (m_ptMin>0 && m_ptMin > a_tr.GetMomentum().perp() ) continue; - if (m_ptMax>0 && m_ptMax < a_tr.GetMomentum().perp() ) continue; - counter++; - } - } - - //std::cout << "EndOfEventAction counter is "<<counter<<std::endl; - if (counter==0) - { - ATH_MSG_INFO("aborting event due to failing filter"); - G4RunManager::GetRunManager()->AbortEvent(); - return; - } - - m_npass++; - return; -} - -StatusCode G4CosmicFilter::initialize() -{ - - ATH_MSG_INFO( "using collectionName "<<m_collectionName ); - ATH_MSG_INFO( "using PDG ID "<<m_PDGId ); - ATH_MSG_INFO( "using pTmin "<<m_ptMin ); - ATH_MSG_INFO( "using pTmax "<<m_ptMax ); - - return StatusCode::SUCCESS; -} - -void G4CosmicFilter::EndOfRun(const G4Run*) -{ - ATH_MSG_INFO( "processed "<< m_ntot <<" events, "<< m_npass<<" events passed filter" ); -} - -StatusCode G4CosmicFilter::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) - { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } - else - { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/ISvcLocator.h" diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilter.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilter.cxx index 4d7d71235a522a39da1bc8e60520b769419258da..55d3cecbe401641c8e6d5283bea2fc3e6ad153e9 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilter.cxx +++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilter.cxx @@ -9,101 +9,6 @@ #include "G4Event.hh" #include "StoreGate/ReadHandle.h" -G4CosmicOrFilter::G4CosmicOrFilter(const std::string& type, const std::string& name, const IInterface* parent) - : UserActionBase(type,name,parent) - , m_ntot(0) - , m_npass(0) - , m_collectionName("TRTBarrelEntryLayer") - , m_collectionName2("CaloEntryLayer") - , m_collectionName3("TRTBarrelEntryLayer") -{ - - declareProperty("CollectionName", m_collectionName); - declareProperty("CollectionName2",m_collectionName2); - declareProperty("CollectionName3",m_collectionName3); - -} - -void G4CosmicOrFilter::EndOfEvent(const G4Event*) -{ - - int counterOne(0), counterTwo(0), counterThree(0); - //need way to get "and" or "or" in - m_ntot++; - - SG::ReadHandle <TrackRecordCollection> coll(m_collectionName); - if (! coll.isValid()) - { - ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection " ); - } - else - { - counterOne = coll->size(); - } - - SG::ReadHandle <TrackRecordCollection> coll2(m_collectionName2); - if (!coll2.isValid()) - { - ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection " ); - } - else - { - counterTwo = coll2->size(); - } - - SG::ReadHandle <TrackRecordCollection> coll3(m_collectionName3); - if (! coll3.isValid()) - { - ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection" ); - } - else - { - counterThree = coll3->size(); - } - - if (counterOne==0 && counterTwo==0 && counterThree==0) - { - ATH_MSG_INFO("aborting event due to failing OR filter"); - G4RunManager::GetRunManager()->AbortEvent(); - } - else - { - m_npass++; - } - return; -} - -StatusCode G4CosmicOrFilter::initialize() -{ - - ATH_MSG_INFO( "G4CosmicOrFilter: using collectionName(s) "<<m_collectionName << " and " <<m_collectionName2 << "and, with OR " << m_collectionName3 ); - - return StatusCode::SUCCESS; -} - -void G4CosmicOrFilter::EndOfRun(const G4Run*) -{ - ATH_MSG_INFO( "Processed "<< m_ntot <<" events, "<< m_npass<<" events passed filter " ); -} - -StatusCode G4CosmicOrFilter::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) - { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } - else - { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -#include "G4CosmicFilter/G4CosmicFilter.h" - #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/ISvcLocator.h" diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/components/G4CosmicFilter_entries.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/components/G4CosmicFilter_entries.cxx index 786230fe2c1a3e17970a6131604499e2c54517bd..f4519c2d78dd808d4bdc8dc9ccbe257d5e76b68d 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/src/components/G4CosmicFilter_entries.cxx +++ b/Simulation/G4Extensions/G4CosmicFilter/src/components/G4CosmicFilter_entries.cxx @@ -10,18 +10,11 @@ -DECLARE_TOOL_FACTORY( G4CosmicFilter ) -DECLARE_TOOL_FACTORY( G4CosmicAndFilter ) -DECLARE_TOOL_FACTORY( G4CosmicOrFilter ) - DECLARE_TOOL_FACTORY( G4UA::G4CosmicFilterTool ) DECLARE_TOOL_FACTORY( G4UA::G4CosmicAndFilterTool ) DECLARE_TOOL_FACTORY( G4UA::G4CosmicOrFilterTool ) DECLARE_FACTORY_ENTRIES( G4CosmicFilter ) { - DECLARE_TOOL( G4CosmicFilter ) - DECLARE_TOOL( G4CosmicAndFilter ) - DECLARE_TOOL( G4CosmicOrFilter ) DECLARE_TOOL( G4UA::G4CosmicFilterTool ) DECLARE_TOOL( G4UA::G4CosmicAndFilterTool ) diff --git a/Simulation/G4Extensions/G4HitFilter/python/G4HitFilterConfigDb.py b/Simulation/G4Extensions/G4HitFilter/python/G4HitFilterConfigDb.py index 7881960d1a4971a3fbb75f2f4827690a194fff0b..ba28d9b1fcccc813b4344168043e2e00fa5ef9c9 100644 --- a/Simulation/G4Extensions/G4HitFilter/python/G4HitFilterConfigDb.py +++ b/Simulation/G4Extensions/G4HitFilter/python/G4HitFilterConfigDb.py @@ -2,6 +2,5 @@ from AthenaCommon.CfgGetter import addTool -addTool("G4HitFilter.G4HitFilterConf.G4HitFilter", "G4HitFilter") addTool("G4HitFilter.G4HitFilterConfig.getG4HitFilterTool", "G4UA::G4HitFilterTool") diff --git a/Simulation/G4Extensions/G4HitFilter/share/G4HitFilter.py b/Simulation/G4Extensions/G4HitFilter/share/G4HitFilter.py index 54c07c0aef20c7be2fb40a58f1eda0134ae934b8..da401cab08ab81e03f6bab7d2fa6778f5397d65c 100755 --- a/Simulation/G4Extensions/G4HitFilter/share/G4HitFilter.py +++ b/Simulation/G4Extensions/G4HitFilter/share/G4HitFilter.py @@ -1,18 +1,9 @@ from AthenaCommon.CfgGetter import getPublicTool from G4AtlasApps.SimFlags import simFlags -if hasattr(simFlags, 'UseV2UserActions') and simFlags.UseV2UserActions(): - # configuration for MT actions - from G4HitFilter.G4HitFilterConfig import addG4HitFilterTool - hitf = getPublicTool('G4UA::G4HitFilterTool',tryDefaultConfigurable=True) - addG4HitFilterTool(hitf) -else: - # V1 userActions - try: - from G4AtlasServices.G4AtlasUserActionConfig import UAStore - except ImportError: - from G4AtlasServices.UserActionStore import UAStore - hitf = getPublicTool('G4HitFilter',tryDefaultConfigurable=True) - UAStore.addAction(hitf,['EndOfEvent']) +# configuration for MT actions +from G4HitFilter.G4HitFilterConfig import addG4HitFilterTool +hitf = getPublicTool('G4UA::G4HitFilterTool',tryDefaultConfigurable=True) +addG4HitFilterTool(hitf) hitf.VolumeNames=[ "BCMHits", diff --git a/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.cxx b/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.cxx index a34a8728f389c424c5714fc702ab4756d5dc8830..c0c7c90c42a485defc684ac6a89d2c8048641024 100755 --- a/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.cxx +++ b/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.cxx @@ -22,163 +22,6 @@ #include <iostream> -G4HitFilter::G4HitFilter(const std::string& type, const std::string& name, const IInterface* parent): - UserActionBase(type,name,parent), - m_volumenames(), - m_ntot(0), - m_npass(0), - m_hitContainers() -{ - - declareProperty("VolumeNames",m_volumenames); - -} - -StatusCode G4HitFilter::initialize(){ - - if(m_volumenames.size()==0){ - - ATH_MSG_ERROR("No hit containers declared"); - return StatusCode::FAILURE; - - } - - int hitType = 999; - - for(auto vol: m_volumenames){ - if(vol == "BCMHits") hitType = SI; - else if(vol == "BLMHits") hitType = SI; - else if(vol == "CSC_Hits") hitType = CSC; - else if(vol == "LArCalibrationHitActive") hitType = CALOCALIB; - else if(vol == "LArCalibrationHitDeadMaterial") hitType = CALOCALIB; - else if(vol == "LArCalibrationHitInactive") hitType = CALOCALIB; - else if(vol == "LArHitEMB") hitType = LAR; - else if(vol == "LArHitEMEC") hitType = LAR; - else if(vol == "LArHitFCAL") hitType = LAR; - else if(vol == "LArHitHEC") hitType = LAR; - else if(vol == "LucidSimHitsVector") hitType = LUCID; - else if(vol == "MBTSHits") hitType = TILE; - else if(vol == "MDT_Hits") hitType = MDT; - else if(vol == "PixelHits") hitType = SI; - else if(vol == "RPC_Hits") hitType = RPC; - else if(vol == "SCT_Hits") hitType = SI; - else if(vol == "TGC_Hits") hitType = TGC; - else if(vol == "TRTUncompressedHits") hitType = TRT; - else if(vol == "TileHitVec") hitType = TILE; - - - if(hitType==999){ - - ATH_MSG_ERROR("unknown hit tipe"<<vol); - return StatusCode::FAILURE; - - } - - m_hitContainers.push_back(std::make_pair(hitType,vol)); - - - } - - return StatusCode::SUCCESS; - -} - - -void G4HitFilter::EndOfEvent(const G4Event*){ - unsigned int counter = 0; - - m_ntot++; - - std::vector<std::pair<int, std::string> >::iterator itr = m_hitContainers.begin(); - std::vector<std::pair<int, std::string> >::iterator itr_end = m_hitContainers.end(); - for(;itr!=itr_end;++itr) { - if((*itr).first == CALOCALIB) { - SG::ReadHandle<CaloCalibrationHitContainer> cont((*itr).second); - if(! cont.isValid()) continue; - counter += cont->size(); - } - else if((*itr).first == CSC) { - SG::ReadHandle< CSCSimHitCollection> cont((*itr).second); - if(! cont.isValid()) continue; - counter += cont->size(); - } - else if((*itr).first == LAR) { - SG::ReadHandle< LArHitContainer> cont((*itr).second); - if(! cont.isValid()) continue; - counter += cont->size(); - } - else if((*itr).first == LUCID) { - SG::ReadHandle< LUCID_SimHitCollection> cont((*itr).second); - if(! cont.isValid()) continue; - counter += cont->size(); - } - else if((*itr).first == MDT) { - SG::ReadHandle< MDTSimHitCollection> cont((*itr).second); - if(! cont.isValid()) continue; - counter += cont->size(); - } - else if((*itr).first == RPC) { - SG::ReadHandle< RPCSimHitCollection> cont((*itr).second); - if(! cont.isValid()) continue; - counter += cont->size(); - } - else if((*itr).first == SI) { - SG::ReadHandle< SiHitCollection> cont((*itr).second); - if(! cont.isValid()) continue; - counter += cont->size(); - } - else if((*itr).first == TGC) { - SG::ReadHandle< TGCSimHitCollection> cont((*itr).second); - if(! cont.isValid()) continue; - counter += cont->size(); - } - else if((*itr).first == TILE) { - SG::ReadHandle< TileHitVector> cont((*itr).second); - if(! cont.isValid()) continue; - counter += cont->size(); - } - else if((*itr).first == TRT) { - SG::ReadHandle< TRTUncompressedHitCollection> cont((*itr).second); - if(! cont.isValid()) continue; - counter += cont->size(); - } - else { - continue; - } - - // Require at least one hit from one selected detector volume. - if(counter>0) break; - } - - if (counter==0){ - ATH_MSG_INFO("G4HitFilter: failing the event"); - G4RunManager::GetRunManager()->AbortEvent(); - } - else { - ATH_MSG_INFO("G4HitFilter: passing the event"); - m_npass++; - } -} - - -StatusCode G4HitFilter::finalize() { - ATH_MSG_INFO("processed "<< m_ntot <<" events, "<< m_npass<<" events passed filter "); - return StatusCode::SUCCESS; -} - - -StatusCode G4HitFilter::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/ISvcLocator.h" diff --git a/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.h b/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.h index ef0584c63dd97527412e3bedbe9336f5df4514ad..7288ee52c2a79e66e227f1a937e98b3bdc84ae75 100755 --- a/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.h +++ b/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.h @@ -6,45 +6,11 @@ #define G4HITFILTER_H -#include "G4AtlasTools/UserActionBase.h" #include <string> #include <vector> #include <map> -class G4HitFilter final: public UserActionBase { - - public: - G4HitFilter(const std::string& type, const std::string& name, const IInterface* parent); - - virtual void EndOfEvent(const G4Event*) override; - virtual StatusCode initialize() override; - virtual StatusCode finalize() override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - private: - - enum hitCntainerTypes { - CALOCALIB, - CSC, - LAR, - LUCID, - MDT, - RPC, - SI, - TGC, - TILE, - TRT }; - - // property on python side - std::vector<std::string> m_volumenames; - - // internals - int m_ntot,m_npass; - std::vector<std::pair<int,std::string> > m_hitContainers; -}; - #include "G4AtlasInterfaces/IEndEventAction.h" #include "G4AtlasInterfaces/IBeginRunAction.h" diff --git a/Simulation/G4Extensions/G4HitFilter/src/components/G4HitFilter_entries.cxx b/Simulation/G4Extensions/G4HitFilter/src/components/G4HitFilter_entries.cxx index 3143b44b6557b3fb0e9e60f1ae4671d93fdcdbbb..515bc64a72e112b8ba50ae8938e90b47a95cc15d 100644 --- a/Simulation/G4Extensions/G4HitFilter/src/components/G4HitFilter_entries.cxx +++ b/Simulation/G4Extensions/G4HitFilter/src/components/G4HitFilter_entries.cxx @@ -1,14 +1,11 @@ #include "GaudiKernel/DeclareFactoryEntries.h" -#include "../G4HitFilter.h" #include "../G4HitFilterTool.h" -DECLARE_TOOL_FACTORY( G4HitFilter ) DECLARE_TOOL_FACTORY( G4UA::G4HitFilterTool ) DECLARE_FACTORY_ENTRIES( G4HitFilter ) { - DECLARE_TOOL( G4HitFilter ) DECLARE_TOOL( G4UA::G4HitFilterTool ) } diff --git a/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py b/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py index 037719c59ef2dadfbe526fd94a3aba5122b233a3..22fcc73adcc3316a934cec64dfa0acdb5bcfb87f 100644 --- a/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py +++ b/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py @@ -3,24 +3,24 @@ from AthenaCommon import CfgMgr def getGauginosPhysicsTool(name="GauginosPhysicsTool", **kwargs): from AthenaCommon.SystemOfUnits import GeV,MeV,eplus,ns - from G4AtlasApps import AtlasG4Eng - GMSBNeutralino = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration["GMSBNeutralino"]) - GMSBTime = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration["GMSBLifeTime"]) - kwargs.setdefault("GravitinoMass", GMSBNeutralino) - ##kwargs.setdefault("GravitinoWidth", 0.0*GeV); - ##kwargs.setdefault("GravitinoCharge", 0); - ##kwargs.setdefault("GravitinoPDGCode", 1000039); - kwargs.setdefault("GravitinoStable", False); - kwargs.setdefault("GravitinoLifetime", GMSBTime); - ##kwargs.setdefault("GravitinoShortlived", False); + from G4AtlasApps.SimFlags import simFlags + GMSBNeutralino = eval(simFlags.specialConfiguration.get_Value().get("GMSBNeutralino", None)) + GMSBTime = eval(simFlags.specialConfiguration.get_Value().get("GMSBLifeTime", None)) + kwargs.setdefault("NeutralinoMass", GMSBNeutralino) + ##kwargs.setdefault("NeutralinoWidth", 0.0*GeV); + ##kwargs.setdefault("NeutralinoCharge", 0); + ##kwargs.setdefault("NeutralinoPDGCode", 1000039); + kwargs.setdefault("NeutralinoStable", False); + kwargs.setdefault("NeutralinoLifetime", GMSBTime); + ##kwargs.setdefault("NeutralinoShortlived", False); - if AtlasG4Eng.G4Eng.Dict_SpecialConfiguration.has_key("GMSBGravitino"): - GMSBGravitino = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration["GMSBGravitino"]) - kwargs.setdefault("NeutralinoMass", GMSBGravitino); - ##kwargs.setdefault("NeutralinoWidth", 0.0*GeV); - ##kwargs.setdefault("NeutralinoCharge", 0); - ##kwargs.setdefault("NeutralinoPDGCode", 1000022); - ##kwargs.setdefault("NeutralinoStable", True); - ##kwargs.setdefault("NeutralinoLifetime", -1); - ##kwargs.setdefault("NeutralinoShortlived", False); - return CfgMgr.GauginosPhysicsToolTool(name, **kwargs) + if simFlags.specialConfiguration.get_Value().has_key("GMSBGravitino"): + GMSBGravitino = eval(simFlags.specialConfiguration.get_Value().get("GMSBGravitino", None)) + kwargs.setdefault("GravitinoMass", GMSBGravitino); + ##kwargs.setdefault("GravitinoWidth", 0.0*GeV); + ##kwargs.setdefault("GravitinoCharge", 0); + ##kwargs.setdefault("GravitinoPDGCode", 1000022); + ##kwargs.setdefault("GravitinoStable", True); + ##kwargs.setdefault("GravitinoLifetime", -1); + ##kwargs.setdefault("GravitinoShortlived", False); + return CfgMgr.GauginosPhysicsTool(name, **kwargs) diff --git a/Simulation/G4Extensions/Monopole/python/MonopoleConfig.py b/Simulation/G4Extensions/Monopole/python/MonopoleConfig.py index 023184843e496ff4bb8e272b6d2c1d71e2a12ead..d2c4b4a269111895f6c014aa8fcd678e96ede83d 100644 --- a/Simulation/G4Extensions/Monopole/python/MonopoleConfig.py +++ b/Simulation/G4Extensions/Monopole/python/MonopoleConfig.py @@ -2,7 +2,7 @@ from AthenaCommon import CfgMgr def getMonopolePhysicsTool(name="MonopolePhysicsTool", **kwargs): - return CfgMgr.MonopolePhysicsToolTool(name, **kwargs) + return CfgMgr.MonopolePhysicsTool(name, **kwargs) def getG4mplEqMagElectricFieldTool(name="G4mplEqMagElectricField", **kwargs): return CfgMgr.G4mplEqMagElectricFieldTool(name, **kwargs) diff --git a/Simulation/G4Extensions/Quirks/CMakeLists.txt b/Simulation/G4Extensions/Quirks/CMakeLists.txt index 9f6a32300947045f80c907bd63fb854eb4c3c5e9..aa88d9d64bfe8e350eab1564735b85421d5c0f39 100644 --- a/Simulation/G4Extensions/Quirks/CMakeLists.txt +++ b/Simulation/G4Extensions/Quirks/CMakeLists.txt @@ -10,6 +10,7 @@ atlas_depends_on_subdirs( PUBLIC GaudiKernel PRIVATE Control/AthenaBaseComps + Control/CxxUtils Simulation/G4Atlas/G4AtlasInterfaces Simulation/G4Atlas/G4AtlasTools ) diff --git a/Simulation/G4Extensions/Quirks/cmt/requirements b/Simulation/G4Extensions/Quirks/cmt/requirements index 1a4318afbef29e157ce5ec94a3015dab35497c39..a6dafedda5462b07af47d5aa573678b67b970f5b 100644 --- a/Simulation/G4Extensions/Quirks/cmt/requirements +++ b/Simulation/G4Extensions/Quirks/cmt/requirements @@ -7,6 +7,7 @@ use AtlasPolicy AtlasPolicy-* private use AthenaBaseComps AthenaBaseComps-* Control +use CxxUtils CxxUtils-* Control use Geant4 Geant4-* External use G4AtlasInterfaces G4AtlasInterfaces-* Simulation/G4Atlas use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas diff --git a/Simulation/G4Extensions/Quirks/python/QuirksConfig.py b/Simulation/G4Extensions/Quirks/python/QuirksConfig.py index c9c7df425749a0aca3f3f1d5317788c5609de1ac..ff7d077ae870aa75ee35744c3b0be32ee8856117 100644 --- a/Simulation/G4Extensions/Quirks/python/QuirksConfig.py +++ b/Simulation/G4Extensions/Quirks/python/QuirksConfig.py @@ -3,3 +3,15 @@ from AthenaCommon import CfgMgr def getQuirkPhysicsTool(name="QuirkPhysicsTool", **kwargs): return CfgMgr.QuirkPhysicsToolTool(name, **kwargs) + +def getDebugSteppingActionTool(name="G4UA::DebugSteppingActionTool", **kwargs): + from Quirks.QuirksConf import G4UA__DebugSteppingActionTool + from G4AtlasApps.SimFlags import simFlags + # use configuration passed through the flags + if name in simFlags.UserActionConfig.get_Value().keys(): + for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems(): + kwargs.setdefault(prop,value) + + return G4UA__DebugSteppingActionTool(name, **kwargs) + + diff --git a/Simulation/G4Extensions/Quirks/python/QuirksConfigDb.py b/Simulation/G4Extensions/Quirks/python/QuirksConfigDb.py index 7cb6bb59cf0e26796618b1894339ef895e729dd9..afc1488631df799963cb72cd8f80119c0a27a56c 100644 --- a/Simulation/G4Extensions/Quirks/python/QuirksConfigDb.py +++ b/Simulation/G4Extensions/Quirks/python/QuirksConfigDb.py @@ -2,3 +2,4 @@ from AthenaCommon.CfgGetter import addTool addTool("Quirks.QuirksConfig.getQuirkPhysicsTool" , "QuirkPhysicsTool" ) +addTool("Quirks.QuirksConfig.getDebugSteppingActionTool" , "G4UA::DebugSteppingActionTool" ) diff --git a/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.cxx b/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.cxx index 68c2b6d84e017baf27ac303d0479f34c3f8626ae..21ea39768e58796a736388c3dce0f76457c318b5 100755 --- a/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.cxx +++ b/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.cxx @@ -13,132 +13,129 @@ #include "DebugSteppingAction.h" #ifndef QUIRKS_STANDALONE -StatusCode DebugSteppingAction::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} +namespace G4UA{ #endif - + #ifdef QUIRKS_STANDALONE -DebugSteppingAction::DebugSteppingAction(G4double step, G4int numSteps) : + DebugSteppingAction::DebugSteppingAction(G4double step, G4int numSteps) : G4UserSteppingAction(), m_step(step), m_numSteps(numSteps) -{ - + { + #else - -DebugSteppingAction::DebugSteppingAction(const std::string& type, const std::string& name, const IInterface* parent): - UserActionBase(type,name,parent),m_step(0),m_numSteps(0){ - declareProperty("DebugStep",m_step); - declareProperty("NumSteps",m_numSteps); + +DebugSteppingAction::DebugSteppingAction(const Config& config):m_config(config) + { #endif m_iStep[0] = 0; m_iStep[1] = 0; -} - -DebugSteppingAction::~DebugSteppingAction() {} - -void DebugSteppingAction::Step(const G4Step* step) { - const G4Track* track = step->GetTrack(); - const G4StepPoint* ps = step->GetPostStepPoint(); - const G4ParticleDefinition* particle = track->GetParticleDefinition(); - const Quirk* quirk = dynamic_cast<const Quirk*>(particle); - if (quirk == 0) return; - - G4int i = (particle->GetPDGEncoding() > 0) ? 0 : 1; - m_xprev[i] = m_x[i]; - m_x[i] = G4LorentzVector(ps->GetPosition(), CLHEP::c_light * ps->GetGlobalTime()); - m_p[i] = track->GetDynamicParticle()->Get4Momentum(); - - G4bool doPrint = (m_numSteps != 0 && track->GetCurrentStepNumber() % m_numSteps == 0); - if (track->GetCurrentStepNumber() == 1) m_iStep[i] = 0; - G4double progress = m_x[i].rho(); - if (progress >= m_iStep[i] * m_step) { - m_iStep[i]++; - doPrint = true; - } - - if (doPrint) { - InfracolorForce* string[2]; - string[i] = &(quirk->GetStringIn()); - string[1-i] = string[i]->GetReactionForce(); - - G4cout.precision(14); - G4cout << "quirk " << i << " step " << track->GetCurrentStepNumber() << " status " << track->GetTrackStatus() << G4endl; - G4cout << "x0: " << m_x[0] << G4endl; - G4cout << "x1: " << m_x[1] << G4endl; - //G4cout << "x0':" << m_xprev[0] << G4endl; - //G4cout << "x1':" << m_xprev[1] << G4endl; - G4cout << "dx: " << m_x[1] - m_x[0] << G4endl; - - G4double force = string[0]->GetStringForce(); - G4LorentzVector ss[2]; - for(G4int i = 0; i < 2; i++) ss[i] = string[i]->GetSumStrings(); - G4LorentzVector dx = ss[0] - ss[1]; - G4LorentzVector ps = force * (ss[0] + ss[1]); - G4LorentzVector ptot = ps + m_p[0] + m_p[1]; - G4cout << "dx: " << dx << G4endl; - G4cout << "s0: " << ss[0] << G4endl; - G4cout << "s1: " << ss[1] << G4endl; - G4cout << "p0: " << m_p[0] << G4endl; - G4cout << "p1: " << m_p[1] << G4endl; - G4cout << "ps: " << ps << G4endl; - G4cout << "p: " << ptot << G4endl; - - G4LorentzVector p1s = m_p[1] + force * ss[1]; - G4ThreeVector L = dx.vect().cross(p1s); - G4ThreeVector Excm = p1s.t() * dx.vect() - p1s.vect() * dx.t(); - for(G4int i = 0; i < 2; i++) { - L += string[i]->GetAngMomentum(); - Excm += string[i]->GetMomentOfE(); - } - L -= Excm.cross(ptot.vect() / ptot.t()); - Excm += ptot.t() * m_x[0].vect() - ptot.vect() * m_x[0].t(); - G4cout << "L: " << L << G4endl; - G4cout << "cm: " << Excm / ptot.t() << G4endl; - - G4LorentzVector u = ptot / ptot.m(); - G4LorentzVector L4(L * u.t(), L * u.vect()); - G4double p0 = sqrt(sqr(ptot.m()/2) - sqr(quirk->GetPDGMass())); - G4cout << "p0: " << p0 << G4endl; - G4cout << "min: " << - L4.m() / p0 << G4endl; - G4cout << "max: " << (ptot.m() - 2*quirk->GetPDGMass()) / force << G4endl; - - G4cout << "n: " << string[0]->GetNStrings() << "\t" << string[1]->GetNStrings() << "\t" << string[0]->GetNStrings() + string[1]->GetNStrings() << G4endl; - G4cout << G4endl; - } - - if (false) { - G4double t1A = m_xprev[i].t(); - G4double t1B = m_xprev[1-i].t(); - G4double t2A = m_x[i].t(); - G4double t2B = m_x[1-i].t(); - G4double dtA = t2A - t1A; - G4double dtB = t2B - t1B; - if (t2B > t1A && t2A > t1B && dtA > 0 && dtB > 0) { - G4ThreeVector vA = (m_x[i].vect() - m_xprev[i].vect()) / dtA; - G4ThreeVector vB = (m_x[1-i].vect() - m_xprev[1-i].vect()) / dtB; - G4ThreeVector xA = m_xprev[i].vect(); - G4ThreeVector xB = m_xprev[1-i].vect() + vB * (t1A - t1B); - G4double dvsq = (vB - vA).mag2(); - if (dvsq > 0) { - G4double dt = - (vB - vA) * (xB - xA) / dvsq; - G4double t = t1A + dt; - if (t1A <= t && t <= t2A && t1B <= t && t <= t2B) { - G4double dist = ((xB - xA) + (vB - vA) * dt).mag(); - G4cout << "mindist: " << dist << " " << t << G4endl; - G4cout << G4endl; - } - } - } - } -} - + } + + DebugSteppingAction::~DebugSteppingAction() {} + + void DebugSteppingAction::processStep(const G4Step* step) { +#ifndef QUIRKS_STANDALONE + G4double m_step=m_config.step; + G4int m_numSteps=m_config.numSteps; +#endif + const G4Track* track = step->GetTrack(); + const G4StepPoint* ps = step->GetPostStepPoint(); + const G4ParticleDefinition* particle = track->GetParticleDefinition(); + const Quirk* quirk = dynamic_cast<const Quirk*>(particle); + if (quirk == 0) return; + + G4int i = (particle->GetPDGEncoding() > 0) ? 0 : 1; + m_xprev[i] = m_x[i]; + m_x[i] = G4LorentzVector(ps->GetPosition(), CLHEP::c_light * ps->GetGlobalTime()); + m_p[i] = track->GetDynamicParticle()->Get4Momentum(); + + G4bool doPrint = (m_numSteps != 0 && track->GetCurrentStepNumber() % m_numSteps == 0); + if (track->GetCurrentStepNumber() == 1) m_iStep[i] = 0; + G4double progress = m_x[i].rho(); + if (progress >= m_iStep[i] * m_step) { + m_iStep[i]++; + doPrint = true; + } + + if (doPrint) { + InfracolorForce* string[2]; + string[i] = &(quirk->GetStringIn()); + string[1-i] = string[i]->GetReactionForce(); + + G4cout.precision(14); + G4cout << "quirk " << i << " step " << track->GetCurrentStepNumber() << " status " << track->GetTrackStatus() << G4endl; + G4cout << "x0: " << m_x[0] << G4endl; + G4cout << "x1: " << m_x[1] << G4endl; + //G4cout << "x0':" << m_xprev[0] << G4endl; + //G4cout << "x1':" << m_xprev[1] << G4endl; + G4cout << "dx: " << m_x[1] - m_x[0] << G4endl; + + G4double force = string[0]->GetStringForce(); + G4LorentzVector ss[2]; + for(G4int i = 0; i < 2; i++) ss[i] = string[i]->GetSumStrings(); + G4LorentzVector dx = ss[0] - ss[1]; + G4LorentzVector ps = force * (ss[0] + ss[1]); + G4LorentzVector ptot = ps + m_p[0] + m_p[1]; + G4cout << "dx: " << dx << G4endl; + G4cout << "s0: " << ss[0] << G4endl; + G4cout << "s1: " << ss[1] << G4endl; + G4cout << "p0: " << m_p[0] << G4endl; + G4cout << "p1: " << m_p[1] << G4endl; + G4cout << "ps: " << ps << G4endl; + G4cout << "p: " << ptot << G4endl; + + G4LorentzVector p1s = m_p[1] + force * ss[1]; + G4ThreeVector L = dx.vect().cross(p1s); + G4ThreeVector Excm = p1s.t() * dx.vect() - p1s.vect() * dx.t(); + for(G4int i = 0; i < 2; i++) { + L += string[i]->GetAngMomentum(); + Excm += string[i]->GetMomentOfE(); + } + L -= Excm.cross(ptot.vect() / ptot.t()); + Excm += ptot.t() * m_x[0].vect() - ptot.vect() * m_x[0].t(); + G4cout << "L: " << L << G4endl; + G4cout << "cm: " << Excm / ptot.t() << G4endl; + + G4LorentzVector u = ptot / ptot.m(); + G4LorentzVector L4(L * u.t(), L * u.vect()); + G4double p0 = sqrt(sqr(ptot.m()/2) - sqr(quirk->GetPDGMass())); + G4cout << "p0: " << p0 << G4endl; + G4cout << "min: " << - L4.m() / p0 << G4endl; + G4cout << "max: " << (ptot.m() - 2*quirk->GetPDGMass()) / force << G4endl; + + G4cout << "n: " << string[0]->GetNStrings() << "\t" << string[1]->GetNStrings() << "\t" << string[0]->GetNStrings() + string[1]->GetNStrings() << G4endl; + G4cout << G4endl; + } + + if (false) { + G4double t1A = m_xprev[i].t(); + G4double t1B = m_xprev[1-i].t(); + G4double t2A = m_x[i].t(); + G4double t2B = m_x[1-i].t(); + G4double dtA = t2A - t1A; + G4double dtB = t2B - t1B; + if (t2B > t1A && t2A > t1B && dtA > 0 && dtB > 0) { + G4ThreeVector vA = (m_x[i].vect() - m_xprev[i].vect()) / dtA; + G4ThreeVector vB = (m_x[1-i].vect() - m_xprev[1-i].vect()) / dtB; + G4ThreeVector xA = m_xprev[i].vect(); + G4ThreeVector xB = m_xprev[1-i].vect() + vB * (t1A - t1B); + G4double dvsq = (vB - vA).mag2(); + if (dvsq > 0) { + G4double dt = - (vB - vA) * (xB - xA) / dvsq; + G4double t = t1A + dt; + if (t1A <= t && t <= t2A && t1B <= t && t <= t2B) { + G4double dist = ((xB - xA) + (vB - vA) * dt).mag(); + G4cout << "mindist: " << dist << " " << t << G4endl; + G4cout << G4endl; + } + } + } + } + } + + + +#ifndef QUIRKS_STANDALONE + }//namespace G4UA +#endif diff --git a/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.h b/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.h index 8838c570dae9e9059080a6df81d632af3a809476..004f49a5a9d56473503ad0dae3db3004be1f1182 100644 --- a/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.h +++ b/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.h @@ -10,37 +10,57 @@ #ifdef QUIRKS_STANDALONE #include "G4UserSteppingAction.hh" #else -//#include "FadsActions/UserAction.h" -#include "G4AtlasTools/UserActionBase.h" +#include "G4AtlasInterfaces/ISteppingAction.h" +#endif + +#ifndef QUIRKS_STANDALONE +namespace G4UA{ #endif class DebugSteppingAction : #ifdef QUIRKS_STANDALONE public G4UserSteppingAction #else - public UserActionBase + public ISteppingAction #endif { public: #ifdef QUIRKS_STANDALONE DebugSteppingAction(G4double step, G4int numSteps); #else - DebugSteppingAction(const std::string& type, const std::string& name, const IInterface* parent); - virtual StatusCode queryInterface(const InterfaceID&, void**) override; + struct Config + { + G4double step=0; + G4int numSteps=0; + }; + + DebugSteppingAction(const Config& config); #endif virtual ~DebugSteppingAction(); - virtual void Step(const G4Step* step) override; - virtual void UserSteppingAction(const G4Step* step) {Step(step);} + virtual void processStep(const G4Step* step) override; + virtual void UserSteppingAction(const G4Step* step) {processStep(step);} private: - G4int m_iStep[2]; +#ifndef QUIRKS_STANDALONE + Config m_config; +#else G4double m_step; G4int m_numSteps; +#endif + + G4int m_iStep[2]; + G4LorentzVector m_x[2]; G4LorentzVector m_p[2]; G4LorentzVector m_xprev[2]; }; + + +#ifndef QUIRKS_STANDALONE +} // namespace G4UA +#endif + #endif diff --git a/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.cxx b/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..10e1f7cf086809d38b413e0c92c51bcc46a719f2 --- /dev/null +++ b/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.cxx @@ -0,0 +1,29 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CxxUtils/make_unique.h" +#include "DebugSteppingActionTool.h" +namespace G4UA{ + + DebugSteppingActionTool::DebugSteppingActionTool(const std::string& type, const std::string& name,const IInterface* parent): + ActionToolBase<DebugSteppingAction>(type, name, parent), m_config(){ + declareProperty("DebugStep", m_config.step); + declareProperty("NumSteps", m_config.numSteps); + } + std::unique_ptr<DebugSteppingAction> DebugSteppingActionTool::makeAction(){ + ATH_MSG_DEBUG("makeAction"); + auto action = CxxUtils::make_unique<DebugSteppingAction>(m_config); + return std::move(action); + } + StatusCode DebugSteppingActionTool::queryInterface(const InterfaceID& riid, void** ppvIf){ + + if(riid == ISteppingActionTool::interfaceID()) { + *ppvIf = (ISteppingActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + return ActionToolBase<DebugSteppingAction>::queryInterface(riid, ppvIf); + } + +} // namespace G4UA diff --git a/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.h b/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.h new file mode 100644 index 0000000000000000000000000000000000000000..044007557af0faa78f9e99ed694985fd3ffedaab --- /dev/null +++ b/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.h @@ -0,0 +1,37 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef QUIRKS_G4UA__DEBUGSTEPPINGACTIONTOOL_H +#define QUIRKS_G4UA__DEBUGSTEPPINGACTIONTOOL_H +#include "G4AtlasInterfaces/ISteppingActionTool.h" +#include "G4AtlasTools/ActionToolBase.h" +#include "DebugSteppingAction.h" +namespace G4UA{ + /// @class DebugSteppingActionTool + /// @brief a class to manage the DebugSteppingAction action + /// @author Andrea Di Simone + + class DebugSteppingActionTool: + public ActionToolBase<DebugSteppingAction>, + public ISteppingActionTool + { + + public: + DebugSteppingActionTool(const std::string& type, const std::string& name,const IInterface* parent); + /// retrieves the stepping action + virtual ISteppingAction* getSteppingAction() override final + { return static_cast<ISteppingAction*>( getAction() ); } + /// gaudi interface handling + virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override; + protected: + /// creates one action per thread + virtual std::unique_ptr<DebugSteppingAction> makeAction() override final; + private: + /// the config for the action + DebugSteppingAction::Config m_config; + }; // class DebugSteppingActionTool + + +} // namespace G4UA +#endif diff --git a/Simulation/G4Extensions/Quirks/src/components/Quirks_entries.cxx b/Simulation/G4Extensions/Quirks/src/components/Quirks_entries.cxx index 03730a018515fe707330445e560c85acf1719a5a..c930fe50f9735cf636bdbde45a36fc2d8ea08859 100644 --- a/Simulation/G4Extensions/Quirks/src/components/Quirks_entries.cxx +++ b/Simulation/G4Extensions/Quirks/src/components/Quirks_entries.cxx @@ -1,14 +1,14 @@ #include "GaudiKernel/DeclareFactoryEntries.h" #include "../QuirkPhysicsTool.h" -#include "../DebugSteppingAction.h" +#include "../DebugSteppingActionTool.h" DECLARE_TOOL_FACTORY( QuirksPhysicsTool ) -DECLARE_TOOL_FACTORY( DebugSteppingAction ) +DECLARE_TOOL_FACTORY( G4UA::DebugSteppingActionTool ) DECLARE_FACTORY_ENTRIES( Quirks ) { DECLARE_TOOL( QuirksPhysicsTool ) - DECLARE_TOOL( DebugSteppingAction ) + DECLARE_TOOL( G4UA::DebugSteppingActionTool ) } diff --git a/Simulation/G4Extensions/RHadrons/CMakeLists.txt b/Simulation/G4Extensions/RHadrons/CMakeLists.txt index 9d64f721d58278360f2001ca54380a946f2ec1db..2e77e4b457c15f2b932ff7b76f3ef518defe0524 100644 --- a/Simulation/G4Extensions/RHadrons/CMakeLists.txt +++ b/Simulation/G4Extensions/RHadrons/CMakeLists.txt @@ -10,6 +10,7 @@ atlas_depends_on_subdirs( PUBLIC GaudiKernel PRIVATE Control/AthenaBaseComps + Control/CxxUtils Simulation/G4Atlas/G4AtlasInterfaces Simulation/G4Atlas/G4AtlasTools Simulation/G4Extensions/G4ExternalDecay diff --git a/Simulation/G4Extensions/RHadrons/cmt/requirements b/Simulation/G4Extensions/RHadrons/cmt/requirements index c85afaf9832dd5d3bb1d3906092c57747202e799..2d00cca0b80bf130f7b2566002a3d34b2a1ca2c5 100644 --- a/Simulation/G4Extensions/RHadrons/cmt/requirements +++ b/Simulation/G4Extensions/RHadrons/cmt/requirements @@ -9,6 +9,7 @@ use GaudiInterface GaudiInterface-* External private use AthenaBaseComps AthenaBaseComps-* Control use AtlasCLHEP AtlasCLHEP-* External +use CxxUtils CxxUtils-* Control use Geant4 Geant4-* External use G4AtlasInterfaces G4AtlasInterfaces-* Simulation/G4Atlas use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas diff --git a/Simulation/G4Extensions/RHadrons/python/RHadronsConfig.py b/Simulation/G4Extensions/RHadrons/python/RHadronsConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..7836a5cd34fd9f94476d0634ff014f945f28c769 --- /dev/null +++ b/Simulation/G4Extensions/RHadrons/python/RHadronsConfig.py @@ -0,0 +1,15 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon import CfgMgr,Logging +from G4AtlasServices import G4AtlasServicesConfig + +def getSG_StepNtupleTool(name="G4UA::SG_StepNtupleTool", **kwargs): + from AthenaCommon.ConcurrencyFlags import jobproperties as concurrencyProps + if concurrencyProps.ConcurrencyFlags.NumThreads() >1: + log=Logging.logging.getLogger(name) + log.fatal(' Attempt to run '+name+' with more than one thread, which is not supported') + #from AthenaCommon.AppMgr import theApp + #theApp.exit(1) + return False + from RHadrons.RHadronsConf import G4UA__SG_StepNtupleTool + return G4UA__SG_StepNtupleTool(name, **kwargs) diff --git a/Simulation/G4Extensions/RHadrons/python/RHadronsConfigDb.py b/Simulation/G4Extensions/RHadrons/python/RHadronsConfigDb.py index c4a40e9e6612c94a06acf1de1305618e5e41d1d6..9751a4f9f142a520f355ebb8b8d564adc7753d64 100644 --- a/Simulation/G4Extensions/RHadrons/python/RHadronsConfigDb.py +++ b/Simulation/G4Extensions/RHadrons/python/RHadronsConfigDb.py @@ -2,4 +2,5 @@ from AthenaCommon.CfgGetter import addTool -addTool("RHadrons.RHadronsToolsConf.SG_StepNtuple", "SG_StepNtuple") +addTool("RHadrons.RHadronsConfig.getSG_StepNtupleTool", "G4UA::SG_StepNtupleTool") + diff --git a/Simulation/G4Extensions/RHadrons/share/SG_StepNtuple.py b/Simulation/G4Extensions/RHadrons/share/SG_StepNtuple.py index e971c15f3b2a259b6a71c78786ecc5b95aa5d681..f4454490e5590c9fd15f4b3d0d1d675461bcea07 100644 --- a/Simulation/G4Extensions/RHadrons/share/SG_StepNtuple.py +++ b/Simulation/G4Extensions/RHadrons/share/SG_StepNtuple.py @@ -1,6 +1,7 @@ -from G4AtlasServices.G4AtlasUserActionConfig import UAStore -UAStore.addAction('SG_StepNtuple',['BeginOfEvent','EndOfEvent','Step']) +from G4AtlasApps.SimFlags import simFlags +simFlags.OptionalUserActionList.addAction('G4UA::SG_StepNtupleTool',['BeginOfRun','BeginOfEvent','EndOfEvent','Step']) + theApp.HistogramPersistency = "ROOT" NTupleSvc = Service( "NTupleSvc" ) diff --git a/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.cxx b/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.cxx index 389a26432f05e8684fcd78eb94159c0725c08275..8544dcbdc3ad83cc8177aca7ba0c945a50811228 100644 --- a/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.cxx +++ b/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.cxx @@ -12,249 +12,254 @@ #include "G4Step.hh" #include "G4Event.hh" +#include "GaudiKernel/Bootstrap.h" +#include "GaudiKernel/ISvcLocator.h" +#include "GaudiKernel/IMessageSvc.h" -void SG_StepNtuple::BeginOfEvent(const G4Event*){ - m_nsteps=0; - rhid=0;//the rhadron index (either the first or second rhadon, usually) - nevents++; m_evtid=nevents;//since it gets cleared out after every fill... -} +namespace G4UA{ -void SG_StepNtuple::EndOfEvent(const G4Event*){ - if(! ntupleSvc()->writeRecord("/NTUPLES/FILE1/StepNtuple/10").isSuccess()) - ATH_MSG_ERROR( " failed to write record for this event" ); - - //this also seems to zero out all the arrays... so beware! - +SG_StepNtuple::SG_StepNtuple():AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ),"SG_StepNtuple"){; } -void SG_StepNtuple::Step(const G4Step* aStep){ - if(m_nsteps<50000){ - int pdg = aStep->GetTrack()->GetDefinition()->GetPDGEncoding(); - bool rhad=false; - if (std::find(rhs.begin(),rhs.end(),std::abs(pdg))!=rhs.end()) { - rhad=true; - } - - // - if (!rhad && isSUSYParticle(std::abs(pdg))){ - std::cout<<"ACH139: SG_StepNtuple: other code thinks "<<pdg<<" is an Rhadron!"<<std::endl; - rhad=true; + void SG_StepNtuple::beginOfRun(const G4Run*){ + + + NTupleFilePtr file1(ntupleSvc(), "/NTUPLES/FILE1"); + + SmartDataPtr<NTuple::Directory> + ntdir(ntupleSvc(),"/NTUPLES/FILE1/StepNtuple"); + + if ( !ntdir ) ntdir = ntupleSvc()->createDirectory(file1,"StepNtuple"); + //if ( !ntdir ) log << MSG::ERROR << " failed to get ntuple directory" << endreq; + NTuplePtr nt(ntupleSvc(), "/NTUPLES/FILE1/StepNtuple/10"); + if ( !nt ) { // Check if already booked + nt = ntupleSvc()->book (ntdir.ptr(), 10,CLID_ColumnWiseTuple, "GEANT4 Step NTuple"); + if ( nt ) { + + ATH_MSG_INFO("booked step ntuple "); + + if( nt->addItem ("nstep", m_nsteps,0 ,50000)!=StatusCode::SUCCESS // WARNING!! Force limit to 50k tracks + || nt->addItem ("pdg", m_nsteps, m_pdg)!=StatusCode::SUCCESS + || nt->addItem ("charge", m_nsteps, m_charge)!=StatusCode::SUCCESS + || nt->addItem ("mass", m_nsteps, m_mass)!=StatusCode::SUCCESS + || nt->addItem ("baryon", m_nsteps, m_baryon)!=StatusCode::SUCCESS + || nt->addItem ("x1", m_nsteps, m_x1)!=StatusCode::SUCCESS + || nt->addItem ("y1", m_nsteps, m_y1)!=StatusCode::SUCCESS + || nt->addItem ("z1", m_nsteps, m_z1)!=StatusCode::SUCCESS + || nt->addItem ("t1", m_nsteps, m_t1)!=StatusCode::SUCCESS + || nt->addItem ("x2", m_nsteps, m_x2)!=StatusCode::SUCCESS + || nt->addItem ("y2", m_nsteps, m_y2)!=StatusCode::SUCCESS + || nt->addItem ("z2", m_nsteps, m_z2)!=StatusCode::SUCCESS + || nt->addItem ("t2", m_nsteps, m_t2)!=StatusCode::SUCCESS + || nt->addItem ("dep", m_nsteps, m_dep)!=StatusCode::SUCCESS + || nt->addItem ("ke1", m_nsteps, m_ke1)!=StatusCode::SUCCESS + || nt->addItem ("ke2", m_nsteps, m_ke2)!=StatusCode::SUCCESS + || nt->addItem ("rh", m_nsteps, m_rh)!=StatusCode::SUCCESS + || nt->addItem ("rhid", m_nsteps, m_rhid)!=StatusCode::SUCCESS + || nt->addItem ("step", m_nsteps, m_step)!=StatusCode::SUCCESS + || nt->addItem ("pt1", m_nsteps, m_pt1)!=StatusCode::SUCCESS + || nt->addItem ("pt2", m_nsteps, m_pt2)!=StatusCode::SUCCESS + || nt->addItem ("minA",m_nsteps, m_minA)!=StatusCode::SUCCESS + || nt->addItem ("v2",m_nsteps, m_v2)!=StatusCode::SUCCESS + || nt->addItem ("vthresh",m_nsteps, m_vthresh)!=StatusCode::SUCCESS + || nt->addItem ("vbelowthresh",m_nsteps, m_vbelowthresh)!=StatusCode::SUCCESS + || nt->addItem ("evtid", m_evtid)!=StatusCode::SUCCESS) + + ATH_MSG_ERROR("Could not configure branches "); + + } + + else ATH_MSG_ERROR("Could not book step ntuple!! "); } - // - - if (rhad){ + + //set initial values + nevents=0; + + //These are the RHadron pdg_id + + //newest codes for intermediate states + rhs.insert(1000991); + rhs.insert(1009211); + rhs.insert(1009111); + rhs.insert(1009311); + rhs.insert(1009321); + rhs.insert(1093122); + rhs.insert(1092212); + rhs.insert(1092112); + //All other Rhadron codes + rhs.insert(1000993); + rhs.insert(1009213); + rhs.insert(1009313); + rhs.insert(1009323); + rhs.insert(1009113); + rhs.insert(1009223); + rhs.insert(1009333); + rhs.insert(1091114); + rhs.insert(1092114); + rhs.insert(1092214); + rhs.insert(1092224); + rhs.insert(1093114); + rhs.insert(1093214); + rhs.insert(1093224); + rhs.insert(1093314); + rhs.insert(1093324); + rhs.insert(1093334); + //adding to stop rhadron values by pdg_id + rhs.insert(1000612); + rhs.insert(1000622); + rhs.insert(1000632); + rhs.insert(1000642); + rhs.insert(1000652); + rhs.insert(1006113); + rhs.insert(1006211); + rhs.insert(1006213); + rhs.insert(1006223); + rhs.insert(1006311); + rhs.insert(1006313); + rhs.insert(1006321); + rhs.insert(1006323); + rhs.insert(1006333); + //adding to sbottom rhadron values by pdg_id + rhs.insert(1000512); + rhs.insert(1000522); + rhs.insert(1005211); + //adding the stau by pdg_id + rhs.insert(1000015); + assert(rhs.size()==43); + + } + + void SG_StepNtuple::beginOfEvent(const G4Event*){ + m_nsteps=0; + rhid=0;//the rhadron index (either the first or second rhadon, usually) + nevents++; m_evtid=nevents;//since it gets cleared out after every fill... + + } + + void SG_StepNtuple::endOfEvent(const G4Event*){ - // - G4Material * mat = aStep->GetTrack()->GetMaterial(); - double minA=1500000.; - for (unsigned int i=0;i<mat->GetNumberOfElements();++i){ - if (mat->GetElement(i) && minA>mat->GetElement(i)->GetN()){ - minA=mat->GetElement(i)->GetN(); - } + if(! ntupleSvc()->writeRecord("/NTUPLES/FILE1/StepNtuple/10").isSuccess()) + ATH_MSG_ERROR( " failed to write record for this event" ); + + //this also seems to zero out all the arrays... so beware! + } + + void SG_StepNtuple::processStep(const G4Step* aStep){ + if(m_nsteps<50000){ + int pdg = aStep->GetTrack()->GetDefinition()->GetPDGEncoding(); + bool rhad=false; + if (std::find(rhs.begin(),rhs.end(),std::abs(pdg))!=rhs.end()) { + rhad=true; } + // - - bool firstslow = aStep->GetPostStepPoint()->GetVelocity()<0.15*std::pow(minA,-2./3.)*CLHEP::c_light; - //just save the first slow step for the rhadron - for (int i=0; i<m_nsteps; ++i){ - if (m_rhid[i]==rhid && m_vbelowthresh[i]>0) firstslow=false; + if (!rhad && isSUSYParticle(std::abs(pdg))){ + std::cout<<"ACH139: SG_StepNtuple: other code thinks "<<pdg<<" is an Rhadron!"<<std::endl; + rhad=true; } - if (firstslow || aStep->GetTrack()->GetCurrentStepNumber()<=1 || aStep->GetPostStepPoint()->GetKineticEnergy()==0.){ - - // - //int id = aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetPDGEncoding(); - int id = std::abs(aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetPDGEncoding()); - if (id>=1000000 && id<=1100000 && isSUSYParticle(id)){ - m_rh[m_nsteps] = 1;//other code agrees it's an Rhadron - } - else{ - m_rh[m_nsteps] = 0;//other code doesn't agree it's an Rhadron - } - // - - if (aStep->GetPreStepPoint()->GetGlobalTime()==0) rhid++; - m_rhid[m_nsteps]=rhid; - - m_pdg[m_nsteps]=aStep->GetTrack()->GetDefinition()->GetPDGEncoding(); - m_charge[m_nsteps]=aStep->GetTrack()->GetDefinition()->GetPDGCharge(); - m_dep[m_nsteps]=aStep->GetTotalEnergyDeposit(); - m_mass[m_nsteps]=aStep->GetTrack()->GetDefinition()->GetPDGMass(); - m_baryon[m_nsteps]=aStep->GetTrack()->GetDefinition()->GetBaryonNumber(); - m_t1[m_nsteps]=aStep->GetPreStepPoint()->GetGlobalTime(); - m_t2[m_nsteps]=aStep->GetPostStepPoint()->GetGlobalTime(); - G4ThreeVector pos1=aStep->GetPreStepPoint()->GetPosition(); - m_x1[m_nsteps]=pos1.x(); - m_y1[m_nsteps]=pos1.y(); - m_z1[m_nsteps]=pos1.z(); - G4ThreeVector pos2=aStep->GetPostStepPoint()->GetPosition(); - m_x2[m_nsteps]=pos2.x(); - m_y2[m_nsteps]=pos2.y(); - m_z2[m_nsteps]=pos2.z(); - m_ke1[m_nsteps]=aStep->GetPreStepPoint()->GetKineticEnergy(); - m_ke2[m_nsteps]=aStep->GetPostStepPoint()->GetKineticEnergy(); - m_pt1[m_nsteps]=aStep->GetPreStepPoint()->GetMomentum().perp(); - m_pt2[m_nsteps]=aStep->GetPostStepPoint()->GetMomentum().perp(); - - // - m_minA[m_nsteps]=minA; - m_v2[m_nsteps]=aStep->GetPostStepPoint()->GetVelocity(); - m_vthresh[m_nsteps]=0.15*std::pow(minA,-2./3.)*CLHEP::c_light; - m_vbelowthresh[m_nsteps]=(firstslow?1:0); - // - - m_step[m_nsteps]=m_nsteps; - ++m_nsteps; - //std::cout<<"stepping, size is "<<m_nsteps<<std::endl; - } // writing the step because it stopped or is the start of the "track" - } //rhad true - else { - - //KILL the particles here, so we don't waste time in GEANT tracking what happens to it! - if (std::abs(pdg)>1000000 && std::abs(pdg)<10000000){ - std::cout<<"ACH129: SG_StepNtuple: Killing non-rh track with pdg "<<pdg<<std::endl; - } - aStep->GetTrack()->SetTrackStatus(fKillTrackAndSecondaries); - const G4TrackVector *tv = aStep->GetSecondary(); - //if ((*tv).size()>0) std::cout<<" ... and its "<<(*tv).size()<<" secondaries"<<std::endl; - for (unsigned int i=0;i<tv->size();i++){ - G4Track *t = (*tv)[i]; - t->SetTrackStatus(fKillTrackAndSecondaries); - } - - } // not an rhad - - } //m_nsteps<50000 - -} - -StatusCode SG_StepNtuple::initialize(){ - - NTupleFilePtr file1(ntupleSvc(), "/NTUPLES/FILE1"); - - SmartDataPtr<NTuple::Directory> - ntdir(ntupleSvc(),"/NTUPLES/FILE1/StepNtuple"); - - if ( !ntdir ) ntdir = ntupleSvc()->createDirectory(file1,"StepNtuple"); - //if ( !ntdir ) log << MSG::ERROR << " failed to get ntuple directory" << endmsg; - NTuplePtr nt(ntupleSvc(), "/NTUPLES/FILE1/StepNtuple/10"); - if ( !nt ) { // Check if already booked - nt = ntupleSvc()->book (ntdir.ptr(), 10,CLID_ColumnWiseTuple, "GEANT4 Step NTuple"); - if ( nt ) { - ATH_MSG_INFO("booked step ntuple "); - CHECK(nt->addItem ("nstep", m_nsteps,0 ,50000)) ;// WARNING!! Force limit to 50k tracks - CHECK(nt->addItem ("pdg", m_nsteps, m_pdg)); - CHECK(nt->addItem ("charge", m_nsteps, m_charge)); - CHECK(nt->addItem ("mass", m_nsteps, m_mass)); - CHECK(nt->addItem ("baryon", m_nsteps, m_baryon)); - CHECK(nt->addItem ("x1", m_nsteps, m_x1)); - CHECK(nt->addItem ("y1", m_nsteps, m_y1)); - CHECK(nt->addItem ("z1", m_nsteps, m_z1)); - CHECK(nt->addItem ("t1", m_nsteps, m_t1)); - CHECK(nt->addItem ("x2", m_nsteps, m_x2)); - CHECK(nt->addItem ("y2", m_nsteps, m_y2)); - CHECK(nt->addItem ("z2", m_nsteps, m_z2)); - CHECK(nt->addItem ("t2", m_nsteps, m_t2)); - CHECK(nt->addItem ("dep", m_nsteps, m_dep)); - CHECK(nt->addItem ("ke1", m_nsteps, m_ke1)); - CHECK(nt->addItem ("ke2", m_nsteps, m_ke2)); - CHECK(nt->addItem ("rh", m_nsteps, m_rh)); - CHECK(nt->addItem ("rhid", m_nsteps, m_rhid)); - CHECK(nt->addItem ("step", m_nsteps, m_step)); - CHECK(nt->addItem ("pt1", m_nsteps, m_pt1)); - CHECK(nt->addItem ("pt2", m_nsteps, m_pt2)); - CHECK(nt->addItem ("minA",m_nsteps, m_minA)); - CHECK(nt->addItem ("v2",m_nsteps, m_v2)); - CHECK(nt->addItem ("vthresh",m_nsteps, m_vthresh)); - CHECK(nt->addItem ("vbelowthresh",m_nsteps, m_vbelowthresh)); - CHECK(nt->addItem ("evtid", m_evtid)); - } - - else ATH_MSG_ERROR("Could not book step ntuple!! "); + // + + if (rhad){ + + // + G4Material * mat = aStep->GetTrack()->GetMaterial(); + double minA=1500000.; + for (unsigned int i=0;i<mat->GetNumberOfElements();++i){ + if (mat->GetElement(i) && minA>mat->GetElement(i)->GetN()){ + minA=mat->GetElement(i)->GetN(); + } + } + // + + bool firstslow = aStep->GetPostStepPoint()->GetVelocity()<0.15*std::pow(minA,-2./3.)*CLHEP::c_light; + //just save the first slow step for the rhadron + for (int i=0; i<m_nsteps; ++i){ + if (m_rhid[i]==rhid && m_vbelowthresh[i]>0) firstslow=false; + } + if (firstslow || aStep->GetTrack()->GetCurrentStepNumber()<=1 || aStep->GetPostStepPoint()->GetKineticEnergy()==0.){ + + // + //int id = aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetPDGEncoding(); + int id = std::abs(aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetPDGEncoding()); + if (id>=1000000 && id<=1100000 && isSUSYParticle(id)){ + m_rh[m_nsteps] = 1;//other code agrees it's an Rhadron + } + else{ + m_rh[m_nsteps] = 0;//other code doesn't agree it's an Rhadron + } + // + + if (aStep->GetPreStepPoint()->GetGlobalTime()==0) rhid++; + m_rhid[m_nsteps]=rhid; + + m_pdg[m_nsteps]=aStep->GetTrack()->GetDefinition()->GetPDGEncoding(); + m_charge[m_nsteps]=aStep->GetTrack()->GetDefinition()->GetPDGCharge(); + m_dep[m_nsteps]=aStep->GetTotalEnergyDeposit(); + m_mass[m_nsteps]=aStep->GetTrack()->GetDefinition()->GetPDGMass(); + m_baryon[m_nsteps]=aStep->GetTrack()->GetDefinition()->GetBaryonNumber(); + m_t1[m_nsteps]=aStep->GetPreStepPoint()->GetGlobalTime(); + m_t2[m_nsteps]=aStep->GetPostStepPoint()->GetGlobalTime(); + G4ThreeVector pos1=aStep->GetPreStepPoint()->GetPosition(); + m_x1[m_nsteps]=pos1.x(); + m_y1[m_nsteps]=pos1.y(); + m_z1[m_nsteps]=pos1.z(); + G4ThreeVector pos2=aStep->GetPostStepPoint()->GetPosition(); + m_x2[m_nsteps]=pos2.x(); + m_y2[m_nsteps]=pos2.y(); + m_z2[m_nsteps]=pos2.z(); + m_ke1[m_nsteps]=aStep->GetPreStepPoint()->GetKineticEnergy(); + m_ke2[m_nsteps]=aStep->GetPostStepPoint()->GetKineticEnergy(); + m_pt1[m_nsteps]=aStep->GetPreStepPoint()->GetMomentum().perp(); + m_pt2[m_nsteps]=aStep->GetPostStepPoint()->GetMomentum().perp(); + + // + m_minA[m_nsteps]=minA; + m_v2[m_nsteps]=aStep->GetPostStepPoint()->GetVelocity(); + m_vthresh[m_nsteps]=0.15*std::pow(minA,-2./3.)*CLHEP::c_light; + m_vbelowthresh[m_nsteps]=(firstslow?1:0); + // + + m_step[m_nsteps]=m_nsteps; + ++m_nsteps; + //std::cout<<"stepping, size is "<<m_nsteps<<std::endl; + } // writing the step because it stopped or is the start of the "track" + } //rhad true + else { + + //KILL the particles here, so we don't waste time in GEANT tracking what happens to it! + if (std::abs(pdg)>1000000 && std::abs(pdg)<10000000){ + std::cout<<"ACH129: SG_StepNtuple: Killing non-rh track with pdg "<<pdg<<std::endl; + } + aStep->GetTrack()->SetTrackStatus(fKillTrackAndSecondaries); + const G4TrackVector *tv = aStep->GetSecondary(); + //if ((*tv).size()>0) std::cout<<" ... and its "<<(*tv).size()<<" secondaries"<<std::endl; + for (unsigned int i=0;i<tv->size();i++){ + G4Track *t = (*tv)[i]; + t->SetTrackStatus(fKillTrackAndSecondaries); + } + + } // not an rhad + + } //m_nsteps<50000 + + } - - //set initial values - nevents=0; - - //These are the RHadron pdg_id - - //newest codes for intermediate states - rhs.insert(1000991); - rhs.insert(1009211); - rhs.insert(1009111); - rhs.insert(1009311); - rhs.insert(1009321); - rhs.insert(1093122); - rhs.insert(1092212); - rhs.insert(1092112); - //All other Rhadron codes - rhs.insert(1000993); - rhs.insert(1009213); - rhs.insert(1009313); - rhs.insert(1009323); - rhs.insert(1009113); - rhs.insert(1009223); - rhs.insert(1009333); - rhs.insert(1091114); - rhs.insert(1092114); - rhs.insert(1092214); - rhs.insert(1092224); - rhs.insert(1093114); - rhs.insert(1093214); - rhs.insert(1093224); - rhs.insert(1093314); - rhs.insert(1093324); - rhs.insert(1093334); - //adding to stop rhadron values by pdg_id - rhs.insert(1000612); - rhs.insert(1000622); - rhs.insert(1000632); - rhs.insert(1000642); - rhs.insert(1000652); - rhs.insert(1006113); - rhs.insert(1006211); - rhs.insert(1006213); - rhs.insert(1006223); - rhs.insert(1006311); - rhs.insert(1006313); - rhs.insert(1006321); - rhs.insert(1006323); - rhs.insert(1006333); - //adding to sbottom rhadron values by pdg_id - rhs.insert(1000512); - rhs.insert(1000522); - rhs.insert(1005211); - //adding the stau by pdg_id - rhs.insert(1000015); - assert(rhs.size()==43); - - return StatusCode::SUCCESS; - -} - -bool SG_StepNtuple::isSUSYParticle(const int id) const -{ - if (id==1000021 || id==1000005 || id==1000006 || id==1000512 || id==1000522 || id==1000991 || id==1000993 || - id==1000612 || id==1000622 || id==1000632 || id==1000642 || id==1000652 || id==1005211 || - id==1006113 || id==1006211 || id==1006213 || id==1006223 || id==1006311 || - id==1006313 || id==1006321 || id==1006323 || id==1006333 || - id==1009111 || id==1009113 || id==1009211 || id==1009213 || id==1009311 || - id==1009313 || id==1009321 || id==1009323 || id==1009223 || id==1009333 || - id==1092112 || id==1091114 || id==1092114 || id==1092212 || id==1092214 || id==1092224 || - id==1093114 || id==1093122 || id==1093214 || id==1093224 || id==1093314 || id==1093324 || id==1093334) - return true; - return false; -} - - -StatusCode SG_StepNtuple::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); + + + bool SG_StepNtuple::isSUSYParticle(const int id) const + { + if (id==1000021 || id==1000005 || id==1000006 || id==1000512 || id==1000522 || id==1000991 || id==1000993 || + id==1000612 || id==1000622 || id==1000632 || id==1000642 || id==1000652 || id==1005211 || + id==1006113 || id==1006211 || id==1006213 || id==1006223 || id==1006311 || + id==1006313 || id==1006321 || id==1006323 || id==1006333 || + id==1009111 || id==1009113 || id==1009211 || id==1009213 || id==1009311 || + id==1009313 || id==1009321 || id==1009323 || id==1009223 || id==1009333 || + id==1092112 || id==1091114 || id==1092114 || id==1092212 || id==1092214 || id==1092224 || + id==1093114 || id==1093122 || id==1093214 || id==1093224 || id==1093314 || id==1093324 || id==1093334) + return true; + return false; } - return StatusCode::SUCCESS; -} + + +} // namespace G4UA diff --git a/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.h b/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.h index ecc11493e6ec2b43974a54c62c2cd4957110d167..111bfa2cef2ac698f3a6099d7944af3eaf98825d 100644 --- a/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.h +++ b/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.h @@ -5,37 +5,49 @@ #ifndef SG_StepNtuple_H #define SG_StepNtuple_H -#include "G4AtlasTools/UserActionBase.h" - #include <string> #include "GaudiKernel/NTuple.h" #include <vector> #include <set> -class SG_StepNtuple final: public UserActionBase { - -public: - SG_StepNtuple(const std::string& type, const std::string& name, const IInterface* parent):UserActionBase(type,name,parent), nevents(0), rhid(0) {} - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfEvent(const G4Event*) override; - virtual void Step(const G4Step*) override; - virtual StatusCode initialize() override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - -private: - - bool isSUSYParticle(const int id) const; +#include "G4AtlasInterfaces/IBeginRunAction.h" +#include "G4AtlasInterfaces/IBeginEventAction.h" +#include "G4AtlasInterfaces/IEndEventAction.h" +#include "G4AtlasInterfaces/ISteppingAction.h" +#include "AthenaBaseComps/AthMessaging.h" + +namespace G4UA{ + + + class SG_StepNtuple: + public AthMessaging, public IBeginRunAction, public IBeginEventAction, public IEndEventAction, public ISteppingAction + { + + public: + SG_StepNtuple(); + virtual void beginOfRun(const G4Run*) override; + virtual void beginOfEvent(const G4Event*) override; + virtual void endOfEvent(const G4Event*) override; + virtual void processStep(const G4Step*) override; + private: + + bool isSUSYParticle(const int id) const; + + NTuple::Item<long> m_nsteps, m_evtid; + NTuple::Array<int> m_pdg, m_charge, m_baryon; + NTuple::Array<float> m_x1, m_y1, m_z1, m_t1, m_pt1; + NTuple::Array<float> m_x2, m_y2, m_z2, m_t2, m_pt2; + NTuple::Array<float> m_minA, m_v2, m_vthresh, m_vbelowthresh; + NTuple::Array<float> m_dep, m_mass; + NTuple::Array<float> m_ke1, m_ke2; + NTuple::Array<int> m_rh, m_rhid, m_step; + std::set<int> rhs;//rhadron pdgid's + long nevents, rhid; + + + }; // class SG_StepNtuple + + +} // namespace G4UA - NTuple::Item<long> m_nsteps, m_evtid; - NTuple::Array<int> m_pdg, m_charge, m_baryon; - NTuple::Array<float> m_x1, m_y1, m_z1, m_t1, m_pt1; - NTuple::Array<float> m_x2, m_y2, m_z2, m_t2, m_pt2; - NTuple::Array<float> m_minA, m_v2, m_vthresh, m_vbelowthresh; - NTuple::Array<float> m_dep, m_mass; - NTuple::Array<float> m_ke1, m_ke2; - NTuple::Array<int> m_rh, m_rhid, m_step; - std::set<int> rhs;//rhadron pdgid's - long nevents, rhid; -}; #endif diff --git a/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.cxx b/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..5b10bdeb8fdeec6ad251d9b88d19a9925c79fbc9 --- /dev/null +++ b/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.cxx @@ -0,0 +1,44 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CxxUtils/make_unique.h" +#include "SG_StepNtupleTool.h" + +namespace G4UA{ + + + SG_StepNtupleTool::SG_StepNtupleTool(const std::string& type, const std::string& name,const IInterface* parent): + ActionToolBase<SG_StepNtuple>(type, name, parent){ + } + std::unique_ptr<SG_StepNtuple> SG_StepNtupleTool::makeAction(){ + ATH_MSG_DEBUG("makeAction"); + auto action = CxxUtils::make_unique<SG_StepNtuple>(); + return std::move(action); + } + StatusCode SG_StepNtupleTool::queryInterface(const InterfaceID& riid, void** ppvIf){ + + if(riid == IBeginRunActionTool::interfaceID()) { + *ppvIf = (IBeginRunActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == IBeginEventActionTool::interfaceID()) { + *ppvIf = (IBeginEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == IEndEventActionTool::interfaceID()) { + *ppvIf = (IEndEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == ISteppingActionTool::interfaceID()) { + *ppvIf = (ISteppingActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + return ActionToolBase<SG_StepNtuple>::queryInterface(riid, ppvIf); + } + +} // namespace G4UA diff --git a/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.h b/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.h new file mode 100644 index 0000000000000000000000000000000000000000..f077eb0569c41229ce037647802b9f4464373c0e --- /dev/null +++ b/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.h @@ -0,0 +1,52 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef RHADRONS_G4UA__SG_STEPNTUPLETOOL_H +#define RHADRONS_G4UA__SG_STEPNTUPLETOOL_H + +#include "G4AtlasInterfaces/IBeginRunActionTool.h" +#include "G4AtlasInterfaces/IBeginEventActionTool.h" +#include "G4AtlasInterfaces/IEndEventActionTool.h" +#include "G4AtlasInterfaces/ISteppingActionTool.h" +#include "G4AtlasTools/ActionToolBase.h" +#include "SG_StepNtuple.h" + +namespace G4UA{ + + /// @class SG_StepNtupleTool + /// @brief Tool which manages the SG_StepNtuple user action. + /// creates one SG_StepNtuple instance per thread + /// @author Andrea Di Simone + + class SG_StepNtupleTool: + public ActionToolBase<SG_StepNtuple>, + public IBeginRunActionTool, public IBeginEventActionTool, public IEndEventActionTool, public ISteppingActionTool + { + + public: + /// standard tool ctor + SG_StepNtupleTool(const std::string& type, const std::string& name,const IInterface* parent); + /// retrieves BoR action + virtual IBeginRunAction* getBeginRunAction() override final + { return static_cast<IBeginRunAction*>( getAction() ); } + /// retrieves BoE action + virtual IBeginEventAction* getBeginEventAction() override final + { return static_cast<IBeginEventAction*>( getAction() ); } + /// retrieves EoE action + virtual IEndEventAction* getEndEventAction() override final + { return static_cast<IEndEventAction*>( getAction() ); } + /// retrieves stepping action + virtual ISteppingAction* getSteppingAction() override final + { return static_cast<ISteppingAction*>( getAction() ); } + /// gaudi interface manipulation + virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override; + protected: + /// creates the action instances + virtual std::unique_ptr<SG_StepNtuple> makeAction() override final; + private: + }; // class SG_StepNtupleTool + + +} // namespace G4UA +#endif diff --git a/Simulation/G4Extensions/RHadrons/src/components/RHadrons_entries.cxx b/Simulation/G4Extensions/RHadrons/src/components/RHadrons_entries.cxx index d51c49034d4b8106ca1d03d82bf66b11387e277c..7ce3dfff200e1e85ef703f0dfbbd19ab5a44cbf6 100644 --- a/Simulation/G4Extensions/RHadrons/src/components/RHadrons_entries.cxx +++ b/Simulation/G4Extensions/RHadrons/src/components/RHadrons_entries.cxx @@ -1,15 +1,15 @@ #include "GaudiKernel/DeclareFactoryEntries.h" #include "../RHadronsPhysicsTool.h" -#include "../SG_StepNtuple.h" +#include "../SG_StepNtupleTool.h" DECLARE_TOOL_FACTORY( RHadronsPhysicsTool ) -DECLARE_TOOL_FACTORY( SG_StepNtuple ) +DECLARE_TOOL_FACTORY( G4UA::SG_StepNtupleTool ) DECLARE_FACTORY_ENTRIES( RHadrons ) { DECLARE_TOOL( RHadronsPhysicsTool ) - DECLARE_TOOL( SG_StepNtuple ) + DECLARE_TOOL( G4UA::SG_StepNtupleTool ) } diff --git a/Simulation/G4Extensions/Sleptons/python/SleptonsConfig.py b/Simulation/G4Extensions/Sleptons/python/SleptonsConfig.py index 3bf2b63a0b1e189e857d530040df055f5f5d24a9..b4f24f5f76e1f4c1d71177ac36458d5403309def 100644 --- a/Simulation/G4Extensions/Sleptons/python/SleptonsConfig.py +++ b/Simulation/G4Extensions/Sleptons/python/SleptonsConfig.py @@ -2,9 +2,9 @@ from AthenaCommon import CfgMgr def getSleptonsPhysicsTool(name="SleptonsPhysicsTool", **kwargs): - from G4AtlasApps import AtlasG4Eng + from G4AtlasApps.SimFlags import simFlags from AthenaCommon.SystemOfUnits import GeV,MeV,eplus,ns - GMSBStau = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration["GMSBStau"]) + GMSBStau = eval(simFlags.specialConfiguration.get_Value().get("GMSBStau", None)) kwargs.setdefault("G4STauMinusMass", GMSBStau) ##kwargs.setdefault("G4STauMinusWidth", 0.0*GeV) ##kwargs.setdefault("G4STauMinusCharge", -1.*eplus) @@ -21,8 +21,8 @@ def getSleptonsPhysicsTool(name="SleptonsPhysicsTool", **kwargs): ##kwargs.setdefault("G4STauPlusLifetime", -1) ##kwargs.setdefault("G4STauPlusShortlived", False) - if AtlasG4Eng.G4Eng.Dict_SpecialConfiguration.has_key("GMSBSlepton"): - GMSBSlepton = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration.get("GMSBSlepton", None)) + if simFlags.specialConfiguration.get_Value().has_key("GMSBSlepton"): + GMSBSlepton = eval(simFlags.specialConfiguration.get_Value().get("GMSBSlepton", None)) kwargs.setdefault("G4SElectronMinusMass", GMSBSlepton) ##kwargs.setdefault("G4SElectronMinusWidth", 0.0*GeV) @@ -56,4 +56,4 @@ def getSleptonsPhysicsTool(name="SleptonsPhysicsTool", **kwargs): ##kwargs.setdefault("G4SMuonPlusLifetime", -1) ##kwargs.setdefault("G4SMuonPlusShortlived", False) - return CfgMgr.SleptonsPhysicsToolTool(name, **kwargs) + return CfgMgr.SleptonsPhysicsTool(name, **kwargs) diff --git a/Simulation/G4Sim/MCTruthBase/python/MCTruthBaseConfig.py b/Simulation/G4Sim/MCTruthBase/python/MCTruthBaseConfig.py index 0de835d18b34eec2c42b7f77cc84f8cfcd302af7..f2bcbe091d91624a8b46102008d9e31e92e9a428 100644 --- a/Simulation/G4Sim/MCTruthBase/python/MCTruthBaseConfig.py +++ b/Simulation/G4Sim/MCTruthBase/python/MCTruthBaseConfig.py @@ -45,11 +45,7 @@ def getEnvelopeMap(): envelopeMap['MUONQ02::MUONQ02'] = 'MuonExitLayer' return envelopeMap -def getMCTruthSteppingAction(name="MCTruthSteppingAction", **kwargs): - kwargs.setdefault("VolumeCollectionMap", getEnvelopeMap()) - return CfgMgr.MCTruthSteppingAction(name, **kwargs) -# V2 MCTruthSteppingActionTool def getMCTruthSteppingActionTool(name='G4UA::MCTruthSteppingActionTool', **kwargs): """Retrieve the MCTruthSteppingActionTool""" kwargs.setdefault("VolumeCollectionMap", getEnvelopeMap()) diff --git a/Simulation/G4Sim/MCTruthBase/python/MCTruthBaseConfigDb.py b/Simulation/G4Sim/MCTruthBase/python/MCTruthBaseConfigDb.py index bed8744ee4719649d7d3714da5af4bc782eab3fb..a36785aeb7b0e4f4315d1ac4d8ed2fc3f1ba316f 100644 --- a/Simulation/G4Sim/MCTruthBase/python/MCTruthBaseConfigDb.py +++ b/Simulation/G4Sim/MCTruthBase/python/MCTruthBaseConfigDb.py @@ -1,8 +1,5 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from AthenaCommon.CfgGetter import addTool -addTool("MCTruthBase.MCTruthBaseConfig.getMCTruthSteppingAction", "MCTruthSteppingAction") - -# V2 user actions addTool("MCTruthBase.MCTruthBaseConfig.getMCTruthSteppingActionTool", "G4UA::MCTruthSteppingActionTool") diff --git a/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.cxx b/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.cxx index 2d630ca07dbc531f7b34788a43f530dbd900536a..1dd5dcca53455a46ef9a3a08ce4543c82737e9a3 100644 --- a/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.cxx +++ b/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.cxx @@ -14,128 +14,6 @@ #include <map> #include <iostream> -MCTruthSteppingAction::MCTruthSteppingAction(const std::string& type, - const std::string& name, - const IInterface* parent) - : UserActionBase(type, name, parent), m_needToInitialize(true) -{ - declareProperty("VolumeCollectionMap", m_volumeCollectionMap, - "Map of volume name to output collection name"); -} - -void MCTruthSteppingAction::BeginOfEvent (const G4Event*) -{ - if(m_needToInitialize) - { - // Fills m_recordingEnvelopes from ToolHandleArray - if(this->FillRecordingEnvelopeVector().isFailure()) - { - //bail out. TODO should we throw a G4Exception here perhaps? - return; - } - if (m_recordingEnvelopes.size() == 0) - { - ATH_MSG_WARNING("No recording envelopes found!"); - } - } - for (auto& recEnvelope : m_recordingEnvelopes) - { - recEnvelope.BeginOfEvent(); - } - return; -} - -StatusCode MCTruthSteppingAction::FillRecordingEnvelopeVector() -{ - ATH_MSG_DEBUG("Setting up " << m_volumeCollectionMap.size() << - " recording envelopes:"); - m_recordingEnvelopes.reserve( m_volumeCollectionMap.size() ); - for(const auto& volCollPair : m_volumeCollectionMap) { - ATH_MSG_DEBUG(" " << volCollPair.first << ", " << volCollPair.second); - - // Construct the helper in place on the vector - m_recordingEnvelopes.emplace_back(volCollPair.first, volCollPair.second); - RecordingEnvelope& recEnvelope = m_recordingEnvelopes.back(); - - // Make sure the RecEnvelope can initialize properly - if(!recEnvelope.Initialize()) { - //FIXME - should this be an error? - ATH_MSG_WARNING("Envelope volume " << recEnvelope.GetVolumeName() << - " not found in geometry!"); - ATH_MSG_WARNING("TrackRecordCollection " << - recEnvelope.GetTrackRecordCollectionName() << - " will NOT be recorded"); - // Throw away uninitialized RecordingEnvelope - m_recordingEnvelopes.pop_back(); - } - } - m_needToInitialize=false; - return StatusCode::SUCCESS; -} - -void MCTruthSteppingAction::Step(const G4Step* aStep) -{ - if (m_recordingEnvelopes.size() == 0) return; - TrackHelper trackHelper(aStep->GetTrack()); - if (trackHelper.IsSecondary()) return; - - G4StepPoint* preStep = aStep->GetPreStepPoint(); - G4StepPoint* postStep = aStep->GetPostStepPoint(); - - G4VPhysicalVolume* preVol = preStep->GetPhysicalVolume(); - G4VPhysicalVolume* postVol = postStep->GetPhysicalVolume(); - - if (preVol==postVol) return; - - G4TouchableHistory* preTHist = (G4TouchableHistory*) preStep->GetTouchable(); - G4TouchableHistory* postTHist = (G4TouchableHistory*) postStep->GetTouchable(); - const int preStepVolumeDepth = preTHist->GetHistoryDepth(); - const int postStepVolumeDepth = postTHist->GetHistoryDepth(); - - for (auto& recEnvelope : m_recordingEnvelopes) - { - const int envelopeLevel = recEnvelope.GetLevel(); - if (envelopeLevel <= preStepVolumeDepth) - { - //NB preTHist->GetVolume(preStepVolumeDepth) would just give us the World volume. - const G4LogicalVolume* logicalvolume1 = - preTHist->GetVolume(preStepVolumeDepth-envelopeLevel)->GetLogicalVolume(); - if (logicalvolume1 != recEnvelope.GetLogicalVolume()) continue; - - if (envelopeLevel <= postStepVolumeDepth) - { - if (logicalvolume1 == - postTHist->GetVolume(postStepVolumeDepth-envelopeLevel)->GetLogicalVolume()) - continue; - } - // We have a track crossing a recording envelope volume boundary, so make a TrackRecord - recEnvelope.AddTrackRecord(aStep); - // Done with this volume. - break; - } - } - return; -} - -// TODO: drop in favor of declareInterface -StatusCode MCTruthSteppingAction::queryInterface(const InterfaceID& riid, - void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// Version2 of the MCTruthSteppingAction for multi-threading follows -//============================================================================= - namespace G4UA { diff --git a/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.h b/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.h index 0e9ebd30a201e0e010391cf6d7a967af3f0a46be..dd5a618cedce5e86359915d688ea4406aa6beccb 100644 --- a/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.h +++ b/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.h @@ -10,64 +10,8 @@ #include <vector> #include "GaudiKernel/ToolHandle.h" -#include "G4AtlasTools/UserActionBase.h" #include "RecordingEnvelope.h" -/// @class MCTruthSteppingAction -/// @brief Action which records truth tracks in assigned volumes. -/// -/// The output TrackRecordCollections are written out by RecordingEnvelope -/// objects. -/// -/// This is the V1 user action design. For the multi-threading V2 design, see -/// below. -/// -class MCTruthSteppingAction final: public UserActionBase -{ - /// Grant private access to the TruthStrategyManager - friend class TruthStrategyManager; //FIXME can this be dropped? - - public: - - /// Standard constructor - MCTruthSteppingAction(const std::string& type, const std::string& name, - const IInterface* parent); - - /// Called at the start of each G4 event. Used to ensure that the - /// TrackRecordCollection WriteHandles are valid. - virtual void BeginOfEvent (const G4Event*) override; - - /// Process one particle step. If the step crosses a recording - /// envelope volume boundary, passes the step to the corresponding - /// RecordingEnvelope to add a TrackRecord. - virtual void Step(const G4Step* aStep) override; - - /// Gaudi boilerplate - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - private: - - /// Create the vector of RecordingEnvelopes - StatusCode FillRecordingEnvelopeVector(); - - /// Map of volume name to output collection name - std::map<std::string, std::string> m_volumeCollectionMap; - - /// Property to hold the list of names of the TrackRecordCollections - /// to be written out by the Recording Envelopes - std::vector<std::string> m_trackRecordCollectionNames; - - /// vector of recording envelopes - std::vector<RecordingEnvelope> m_recordingEnvelopes; - - /// Do we need to fill the vector of recording envelopes? - bool m_needToInitialize; -}; - - -//============================================================================= -// Version2 of the MCTruthSteppingAction for multi-threading follows -//============================================================================= #include "G4AtlasInterfaces/IBeginEventAction.h" #include "G4AtlasInterfaces/ISteppingAction.h" diff --git a/Simulation/G4Sim/MCTruthBase/src/TruthStrategyManager.cxx b/Simulation/G4Sim/MCTruthBase/src/TruthStrategyManager.cxx index 396e476814cd014157fc8ff017fad432f5914072..02ff21644a72b441d51d9e91bd3eef94acec0461 100644 --- a/Simulation/G4Sim/MCTruthBase/src/TruthStrategyManager.cxx +++ b/Simulation/G4Sim/MCTruthBase/src/TruthStrategyManager.cxx @@ -5,7 +5,6 @@ #include "MCTruthBase/TruthStrategyManager.h" #include "MCTruthBase/TruthStrategy.h" -#include "G4AtlasInterfaces/IUserAction.h" #include "MCTruth/EventInformation.h" #include "MCTruth/TrackHelper.h" #include "SimHelpers/SecondaryTracksHelper.h" diff --git a/Simulation/G4Sim/MCTruthBase/src/components/MCTruthBase_entries.cxx b/Simulation/G4Sim/MCTruthBase/src/components/MCTruthBase_entries.cxx index 3d9d8a375098c6d2fe62dc9ab36537d8bab609a9..ede325b95021366efc17074f036c056bd1c34eb2 100644 --- a/Simulation/G4Sim/MCTruthBase/src/components/MCTruthBase_entries.cxx +++ b/Simulation/G4Sim/MCTruthBase/src/components/MCTruthBase_entries.cxx @@ -1,7 +1,5 @@ #include "GaudiKernel/DeclareFactoryEntries.h" -#include "../MCTruthSteppingAction.h" #include "../MCTruthSteppingActionTool.h" -DECLARE_TOOL_FACTORY( MCTruthSteppingAction ) DECLARE_TOOL_FACTORY( G4UA::MCTruthSteppingActionTool ) diff --git a/Simulation/G4Utilities/G4ProfilingTools/python/G4ProfilingToolsConfigDb.py b/Simulation/G4Utilities/G4ProfilingTools/python/G4ProfilingToolsConfigDb.py index 5a0245296e478363211a893917fdaf9312719b01..cb56d59e2f0927b7f1873c90bdb17d66f5c5445e 100644 --- a/Simulation/G4Utilities/G4ProfilingTools/python/G4ProfilingToolsConfigDb.py +++ b/Simulation/G4Utilities/G4ProfilingTools/python/G4ProfilingToolsConfigDb.py @@ -2,12 +2,6 @@ from AthenaCommon.CfgGetter import addTool -addTool("G4ProfilingTools.G4ProfilingToolsConf.TestActionTimer", "TestActionTimer") -addTool("G4ProfilingTools.G4ProfilingToolsConf.TestActionVPTimer", "TestActionVPTimer") -addTool("G4ProfilingTools.G4ProfilingToolsConf.TestActionEHist", "TestActionEHist") - -# new MT user actions - addTool("G4ProfilingTools.G4ProfilingToolsConfig.getTestActionTimerTool", "G4UA::TestActionTimerTool") addTool("G4ProfilingTools.G4ProfilingToolsConfig.getTestActionVPTimerTool", "G4UA::TestActionVPTimerTool") addTool("G4ProfilingTools.G4ProfilingToolsConfig.getTestActionEHistTool", "G4UA::TestActionEHistTool") diff --git a/Simulation/G4Utilities/G4ProfilingTools/share/postInclude.G4ProfilingTools.py b/Simulation/G4Utilities/G4ProfilingTools/share/postInclude.G4ProfilingTools.py index 1557f378373bc756eecbb80fdb01c09cf15cc9ef..5938d31cc7bd10ef7ceb5f62cdd752a3b3621593 100644 --- a/Simulation/G4Utilities/G4ProfilingTools/share/postInclude.G4ProfilingTools.py +++ b/Simulation/G4Utilities/G4ProfilingTools/share/postInclude.G4ProfilingTools.py @@ -8,18 +8,8 @@ ServiceMgr.THistSvc.Output = ["simTime DATAFILE='g4profiling.root' OPT='RECREAT print ServiceMgr.THistSvc from G4AtlasApps.SimFlags import simFlags -if hasattr(simFlags, 'UseV2UserActions') and simFlags.UseV2UserActions(): - # configuration for MT actions - simFlags.OptionalUserActionList.addAction('G4UA::TestActionTimerTool',['BeginOfEvent','EndOfEvent','BeginOfRun','EndOfRun','Step']) - simFlags.OptionalUserActionList.addAction('G4UA::TestActionVPTimerTool',['BeginOfEvent','EndOfEvent','EndOfRun','BeginOfRun','Step']) - simFlags.OptionalUserActionList.addAction('G4UA::TestActionEHistTool',['BeginOfRun','EndOfRun','Step','BeginOfTracking','EndOfTracking']) -else: - # V1 userActions - try: - from G4AtlasServices.G4AtlasUserActionConfig import UAStore - except ImportError: - from G4AtlasServices.UserActionStore import UAStore - # add default configurable - UAStore.addAction('TestActionEHist',['BeginOfRun','EndOfRun','Step','BeginOfTracking','EndOfTracking']) - UAStore.addAction('TestActionTimer',['BeginOfRun','EndOfRun','Step','BeginOfEvent','EndOfEvent']) - UAStore.addAction('TestActionVPTimer',['EndOfRun','Step','BeginOfEvent','EndOfEvent']) +# configuration for MT actions +simFlags.OptionalUserActionList.addAction('G4UA::TestActionTimerTool',['BeginOfEvent','EndOfEvent','BeginOfRun','EndOfRun','Step']) +simFlags.OptionalUserActionList.addAction('G4UA::TestActionVPTimerTool',['BeginOfEvent','EndOfEvent','EndOfRun','BeginOfRun','Step']) +simFlags.OptionalUserActionList.addAction('G4UA::TestActionEHistTool',['BeginOfRun','EndOfRun','Step','BeginOfTracking','EndOfTracking']) + diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.cxx b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.cxx index d6725061e6105f58b1f8697430d7280c14cd480d..be116a00ba979bffd925b673323099297b291411 100644 --- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.cxx +++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.cxx @@ -37,212 +37,6 @@ using std::vector; // #define _myDebug -TestActionEHist::TestActionEHist(const std::string& type, const std::string& name, const IInterface* parent):UserActionBase(type,name,parent), - m_world(0), m_firstStep(false), m_name("default.root"), - m_dCALO(2), m_dBeam(2), m_dIDET(2), m_dMUON(2), - m_dDetail(""), m_maxhists(1000), m_maxdirs(1000), m_p_tag("") -{ - - declareProperty("ROOTFileName",m_name); - declareProperty("CaloDepth",m_dCALO); - declareProperty("BeamPipeDepth",m_dBeam); - declareProperty("InDetDepth",m_dIDET); - declareProperty("MuonDepth",m_dMUON); - declareProperty("MaxHists",m_maxhists); - declareProperty("DetailDepth",m_dDetail); - -} - -void TestActionEHist::BeginOfRun(const G4Run* /*aRun*/) -{ - - // initialize histogramming file (DON'T USE GAUDI) & directories - m_world = new TFile(m_name.c_str(), "RECREATE"); - ATH_MSG_INFO(m_name<<" initialized, in directory "<<gDirectory->GetPath()); - - return; -} - - -void TestActionEHist::EndOfRun(const G4Run* /*aRun*/) -{ - - m_world->Write(); - m_world->Close(); - delete m_world; - ATH_MSG_INFO(m_name<<" saved & closed."); - - return; -} - - -void TestActionEHist::PreTracking(const G4Track* aTrack) -{ -#ifdef _myDebug - G4cout << "#########################################" << G4endl - << "## ##" << G4endl - << "## TestActionEHist - BeginOfTrack ##" << G4endl - << "## ##" << G4endl - << "#########################################" << G4endl; -#endif -if (aTrack) { - - // Set Particle label and empty trajectory - G4ParticleDefinition* pDef = aTrack->GetDefinition(); - G4String pName = pDef->GetParticleName(); - G4String pSubType = pDef->GetParticleSubType(); - if (pName == "neutron" || pName == "proton" ) { m_p_tag = pName; } - else if (pSubType =="e" || pSubType == "pi" ) { m_p_tag = pSubType; } - else { m_p_tag = pDef->GetParticleType(); } - if (!m_trajectory.empty()) m_trajectory.clear(); -} - return; -} - - -void TestActionEHist::PostTracking(const G4Track* aTrack) -{ -#ifdef _myDebug - G4cout << "#########################################" << G4endl - << "## ##" << G4endl - << "## TestActionEHist - EndOfTrack ##" << G4endl - << "## ##" << G4endl - << "#########################################" << G4endl; -#endif -if (aTrack) { - m_trajectory.clear(); -} - return; -} - - -void TestActionEHist::Step(const G4Step* aStep) -{ -#ifdef _myDebug - G4cout << "#########################################" << G4endl - << "## ##" << G4endl - << "## TestActionEHist - Stepping ##" << G4endl - << "## ##" << G4endl - << "#########################################" << G4endl; -#endif -if (aStep) { - - // Create tree structure for current step - VolumeTreeNavigator currentTree( aStep ); - - // check for processes which don't need to be histogrammed - //if ( currentTree.KillProcesses( 2, "nKiller", "G4FastSimulationManagerProcess" ) ) return; - - // Stores a list of the names of leaf-node volumes which the track has entered - // and checks it for earlier occurences of the same volume - m_firstStep = true; - if (currentTree.GetStepNumber() > 1) { - for ( vector<string>::const_iterator it = m_trajectory.begin(); it != m_trajectory.end(); it++ ) { - if ( *it == stringify( currentTree.GetVolume()->GetName() ) ) { m_firstStep = false; break; } - } - } - - // For particles' first step in the current volume - if (m_firstStep) { - // push_back trajectory element - m_trajectory.push_back( stringify( currentTree.GetVolume()->GetName() ) ); - - // set depth cut (MUST implement Simple if Detail is used) - currentTree.SetDepthCutSimple(m_dCALO, m_dBeam, m_dIDET, m_dMUON); - // Detailed depth cut format: /Atlas::Atlas/[level 1]/[level 2]/.../[last directory level] - if ( !m_dDetail.empty() ) { - currentTree.SetDepthCutDetail( m_dDetail.c_str() ); - } - - // go to ATLAS::ATLAS - currentTree.Ascend( currentTree.GetCurrentDepth() ); - - while ( true ) { - // collect naming info for histogram - G4VPhysicalVolume* pv = currentTree.GetVolume(); - string thPV = cleanstr(pv->GetName()); - string thNoDau = stringify(pv->GetLogicalVolume()->GetNoDaughters()); - int thRep = currentTree.GetCopyNumber(); - - // construct keyname & directory title - string v_name = (thRep == 16969 ? thPV : thPV+"_"+stringify(thRep)); - string p_name = m_p_tag + ( currentTree.GetStepNumber() != 1 ? "_entred" : "_madein" ); - string title = thNoDau+" daughters, "+stringify(currentTree.GetCurrentDepth())+" from base"; - - // Build and fill histogram at bottom of tree, then build dir and cd to it - if ( currentTree.GetStepNumber() == 1 || currentTree.GetCurrentDepth() == currentTree.GetFullDepth() ) { - BuildHists(v_name, p_name, m_maxhists, currentTree.GetPreStepPoint()->GetKineticEnergy()); - } - if ( !currentTree.Descend() ) break; - if ( !BuildDirs(v_name, title, m_maxdirs) ) break; - } - - // Return to world to get ready for next step... FINALLY - m_world->cd(); - } -} - return; -} - - -// Call or create histogram & fill it; returns fill status - -void TestActionEHist::BuildHists(string vol_tag, string part_tag, int& hLeft, double xfill, - double weight, const int nbins, const int binsize) -{ - TH1F* hExists = (TH1F*)gDirectory->FindObjectAny((part_tag+"_"+vol_tag+"_hist").c_str()); - if (!hLeft && !hExists) { return; } - else if (!hExists) { - hExists = new TH1F((part_tag+"_"+vol_tag+"_hist").c_str(), - (part_tag+" KE in "+vol_tag).c_str(), - nbins,0,nbins*binsize); - hLeft--; - ATH_MSG_DEBUG("Histogram "<<gDirectory->GetPath()<<"/"<<hExists->GetName()<<" created"); - if (!hLeft) ATH_MSG_INFO("Last histogram reached"); - } - - if (xfill >= 0 && weight >= 0) { hExists->Fill(xfill,weight); } - else if (xfill >= 0) { hExists->Fill(xfill); } - else { return; } - ATH_MSG_DEBUG("KE added to "<<gDirectory->GetPath()); - return; -} - - -// Call or create directory & cd into it; returns directory-change status - -bool TestActionEHist::BuildDirs(string vol_tag, string dirTitle, int& dLeft) -{ - bool enter = false; - TDirectory* dExists = (TDirectory*)gDirectory->FindObjectAny(vol_tag.c_str()); - if (!dLeft && !dExists) { return enter; } - if (!dExists) { - dExists = new TDirectoryFile(vol_tag.c_str(), - dirTitle.c_str()); - dLeft--; - ATH_MSG_DEBUG("Directory "<<gDirectory->GetPath()<<vol_tag<<" created"); - if (!dLeft) ATH_MSG_INFO("Last directory created"); - } - - if (dExists) enter = (bool)dExists->cd(); - if (enter) ATH_MSG_DEBUG("Current directory: "<<gDirectory->GetPath()); - return enter; -} - - StatusCode TestActionEHist::queryInterface(const InterfaceID& riid, void** ppvInterface) - { - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; - } - - - namespace G4UA{ TestActionEHist::TestActionEHist(const Config& config):m_config(config), diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.h b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.h index 19f6cc6abb0464b493d9f8df85d7eec137de31f2..ed4726834d71ae0a6d226d7c45cdd87a91b0edbe 100644 --- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.h +++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.h @@ -22,7 +22,6 @@ #include "VolumeTreeNavigator.h" -#include "G4AtlasTools/UserActionBase.h" #include <string> #include <vector> @@ -37,49 +36,6 @@ class Algorithm; class IMessageSvc; class TFile; -class TestActionEHist final: public UserActionBase -{ - public: - - TestActionEHist(const std::string& type, const std::string& name, const IInterface* parent); - virtual void BeginOfRun(const G4Run*) override; //!< Action that starts the timers at the beginning of the run - virtual void EndOfRun(const G4Run*) override; //!< Action that prints all information at the end of the run - virtual void PreTracking(const G4Track*) override; //!< Tracking action called at beginning of track, stores trajectory - virtual void PostTracking(const G4Track*) override; //!< Tracking action called at end of track, stores trajectory - virtual void Step(const G4Step*) override; //!< Stepping action that increments the appropriate timer - - virtual StatusCode queryInterface(const InterfaceID&, void**); - - - private: - - //const G4VProcess* _pds; //!< Pointer to current process defining the step at postStepPoint - TFile* m_world; //!< File in which to store neutron & electron info - - bool m_firstStep; //!< Flag indicating whether step is first in current volume - - std::string m_name; //!< Name of root output file - int m_dCALO, m_dBeam, m_dIDET, m_dMUON; //!< Used for depth limits applied in jobOptions - std::string m_dDetail; //!< Path used to set detailed depth cuts - int m_maxhists, m_maxdirs; //!< Used to set maximum number of histograms/directories from jobOptions - std::string m_p_tag; //!< Used to specify current particle in tracking - std::vector<std::string> m_trajectory; //!< Used to store volume names which the current track has entered - - void BuildHists ( //!< Function to generate TH1-type histograms - std::string vol_tag, //!< Tag to identify object by volume - std::string part_tag, //!< Tag to identify object by particle - int& hLeft, //!< Amount of histogram space remaining, set by maxhists - double xfill = -1, //!< Parameter to fill histogram along x - double yfill = -1, //!< Paramteter to fill histogram along y - const int nbins = 3000, //!< Number of bins in histogram - const int binsize = 1); //!< Size of bins in histogram, in MeV - - bool BuildDirs ( //!< Function to generate TDirectory objects - std::string vol_tag, //!< Tag to identify object by volume - std::string dirTitle, //!< Directory title - int& dLeft); //!< Remaining directories to create -}; - #include "G4AtlasInterfaces/IPreTrackingAction.h" #include "G4AtlasInterfaces/IPostTrackingAction.h" diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.cxx b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.cxx index 2e2551cbf056a2ad821005565c19e0491ae7d72d..4c3252e60446e6177a5d1e9e85aa4f9a898ce2c3 100644 --- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.cxx +++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.cxx @@ -38,464 +38,6 @@ // #define _myDebug -TestActionTimer::TestActionTimer(const std::string& type, const std::string& name, const IInterface* parent):UserActionBase(type,name,parent), - m_runTimer(0), m_eventTimer(0), - m_runTime(0.), m_eventTime(0.), - m_nev(0), m_histSvc("THistSvc",name) -{ - m_timeName.resize(eMax); - - m_timeName[eEMB] = "EMB"; - m_timeName[eEMEC] = "EMEC"; - m_timeName[eFC1] = "FC1"; - m_timeName[eFC23] = "FC23"; - m_timeName[eFCO] = "FCO"; - m_timeName[eHEC] = "HEC"; - m_timeName[eCry] = "Cry"; - m_timeName[eLAr] = "LAr"; - m_timeName[eHCB] = "HCB"; - m_timeName[ePre] = "Pre"; - m_timeName[eMu] = "Mu"; - m_timeName[ePx] = "Px"; - m_timeName[eTrt] = "TRT"; - m_timeName[eSev] = "IDServ"; - m_timeName[eSct] = "SCT"; - m_timeName[eOther] = "Other"; - - m_timeName[eElec] = "Elec"; - m_timeName[ePos] = "Pos"; - m_timeName[eGam] = "Gam"; - m_timeName[eNeut] = "Neut"; - - G4cout<< "TestActionTimer::Constructor: Labels " - <<" Run Event "; - for (int i(0); i < eMax; ++i) G4cout << m_timeName[i] << " "; - G4cout << "Particle Dead" << G4endl; - - // init timers - m_runTimer = new G4Timer(); - m_runTimer->Start(); - - // create all timers, start and stop, init counters - for (int i(0); i < eMax; ++i) { - G4Timer* timer = new G4Timer(); - timer->Start(); - - m_timer.push_back(timer); - m_time.push_back(0.); - } - - PPanic(); - VPanic(); - -#ifdef _myDebug - G4cout << "TestActionTimer::Constructor done" << G4endl; -#endif -} - -void TestActionTimer::BeginOfEvent(const G4Event*) -{ -#ifdef _myDebug - G4cout << "#########################################" << G4endl - << "## ##" << G4endl - << "## TestActionTimer - BeginOfEvent ##" << G4endl - << "## ##" << G4endl - << "#########################################" << G4endl; -#endif - - m_nev++; - - if (m_eventTimer != 0) { - delete m_eventTimer; - m_eventTimer = 0; - } - m_eventTime = 0.; - m_eventTimer = new G4Timer(); - m_eventTimer->Start(); - - m_runTimer->Start(); - - return; -} - -void TestActionTimer::EndOfEvent(const G4Event*) -{ -#ifdef _myDebug - G4cout << "#########################################" << G4endl - << "## ##" << G4endl - << "## TestActionTimer - EndOfEvent ##" << G4endl - << "## ##" << G4endl - << "#########################################" << G4endl; -#endif - - m_runTime += TimerSum(m_runTimer); - m_eventTime = TimerSum(m_eventTimer); - - VPanic(); - PPanic(); - - return; -} - -void TestActionTimer::BeginOfRun(const G4Run*) -{ -#ifdef _myDebug - G4cout << "#########################################" << G4endl - << "## ##" << G4endl - << "## TestActionTimer - BeginOfRun ##" << G4endl - << "## ##" << G4endl - << "#########################################" << G4endl; -#endif - - if ( m_histSvc.retrieve().isFailure() ){ - ATH_MSG_ERROR( "Failed getting the hist svc!" ); - } - - m_runTime=0.; - m_runTimer->Start(); - - return; -} - -void TestActionTimer::EndOfRun(const G4Run*) -{ -#ifdef _myDebug - G4cout << "#########################################" << G4endl - << "## ##" << G4endl - << "## TestActionTimer - EndOfRun ##" << G4endl - << "## ##" << G4endl - << "#########################################" << G4endl; -#endif - - m_runTime += TimerSum(m_runTimer); - - VPanic(); - PPanic(); - - G4double sumVTime = 0.; - G4double sumPTime = 0.; - for (int i(0); i <= eOther; ++i) sumVTime += m_time[i]; - for (int i(eElec); i < eMax; ++i) sumPTime += m_time[i]; - - G4double DeadTime = m_runTime - sumVTime; - G4double OtherPart = m_runTime - DeadTime - sumPTime; - - G4cout << "TestActionTimer::EndOfRunAction: Timer " - << m_runTime << " " << m_eventTime << " "; - for (int i(0); i < eMax; ++i) { - G4cout << m_time[i] << " "; - } - G4cout << OtherPart << " " << DeadTime << G4endl; - - if (m_nev>0){ - G4cout << "****** TestActionTimer: Beginning timer dump ******" << G4endl; - G4cout << "Timer\tEvent\tFraction"<<G4endl; - G4cout << "EvtAve\t"<<m_runTime/m_nev<<"\t100"<< G4endl; - for (int i(0);i <= eOther; i++) { - G4cout << m_timeName[i] << "\t" << m_time[i]/m_nev << "\t" << m_time[i]/m_runTime << G4endl; - } - G4cout << "Dead\t" << DeadTime/m_nev << "\t" << DeadTime/m_runTime << G4endl; - for (int i(eElec);i < eMax; i++) { - G4cout << m_timeName[i] << "\t" << m_time[i]/m_nev << "\t" << m_time[i]/m_runTime << G4endl; - } - G4cout << "OtherPart\t" << OtherPart/m_nev << "\t" << OtherPart/m_runTime << G4endl; - - G4cout << "****** TestActionTimer: Major Subdet Times per Event *********" << G4endl; - G4cout << "EMB\t" << (m_time[eEMB])/m_nev << G4endl; - G4cout << "EMEC\t" << (m_time[eEMEC])/m_nev << G4endl; - G4cout << "FCAL\t" << (m_time[eFC1]+m_time[eFC23]+m_time[eFCO])/m_nev << G4endl; - G4cout << "HEC\t" << (m_time[eHEC])/m_nev << G4endl; - G4cout << "Tile\t" << (m_time[eHCB])/m_nev << G4endl; - G4cout << "Tracker\t" << (m_time[ePx]+m_time[eSct]+m_time[eTrt]+m_time[eSev])/m_nev << G4endl; - G4cout << "Muons\t" << (m_time[eMu])/m_nev << G4endl; - G4cout << "Oth.LAr\t" << (m_time[ePre]+m_time[eCry]+m_time[eLAr])/m_nev << G4endl; - G4cout << "Other\t" << (m_time[eOther])/m_nev << G4endl; - G4cout << "EvtAve\t" << (m_runTime)/m_nev << G4endl; - G4cout << "******* TestActionTimer: Major Subdet Frac per Event *********" << G4endl; - G4cout << "EMB\t" << (m_time[eEMB])/m_runTime*100. << G4endl; - G4cout << "EMEC\t" << (m_time[eEMEC])/m_runTime*100. << G4endl; - G4cout << "FCAL\t" << (m_time[eFC1]+m_time[eFC23]+m_time[eFCO])/m_runTime*100. << G4endl; - G4cout << "HEC\t" << (m_time[eHEC])/m_runTime*100. << G4endl; - G4cout << "Tile\t" << (m_time[eHCB])/m_runTime*100. << G4endl; - G4cout << "Tracker\t" << (m_time[ePx]+m_time[eSct]+m_time[eTrt]+m_time[eSev])/m_runTime*100. << G4endl; - G4cout << "Muons\t" << (m_time[eMu])/m_runTime*100. << G4endl; - G4cout << "Oth.LAr\t" << (m_time[ePre]+m_time[eCry]+m_time[eLAr])/m_runTime*100. << G4endl; - G4cout << "Other\t" << (m_time[eOther])/m_runTime*100. << G4endl; - G4cout << "EvtAve\t" << (m_runTime)/m_nev << G4endl; - G4cout << "******* TestActionTimer: Timer Information *********" << G4endl; - G4cout << "Timers were run over " << m_nev << " events, and the averages were taken by" << G4endl; - G4cout << "detector portion. Detectors are determined by volume name. Pieces include:" << G4endl; - G4cout << "EMB, EMEC, FCAL, HEC, Tile - the sampling portions of the calorimeters." << G4endl; - G4cout << "Pixel, SCT, TRT - the sensitive portions of the tracker only" << G4endl; - G4cout << "InDetSvc - all remaining portions of the inner detector" << G4endl; - G4cout << "Oth.LAr - all remaining portions of the LAr, including preshower, solenoid," << G4endl; - G4cout << "\tcryostats, and services." << G4endl; - G4cout << "Other - volumes not listed, including ATLAS::ATLAS and CALO::CALO" << G4endl; - G4cout << "" << G4endl; - G4cout << "Dead time includes overhead per event (file i/o, event loading, timing overhead)" << G4endl; - G4cout << "" << G4endl; - G4cout << "All times are user+system time on your processor" << G4endl; - G4cout << "******* TestActionTimer: End of timer dump *********" << G4endl; - - TH1D * r_geo = new TH1D("GeoResults","GeoResults",eOther-eEMB+1,-0.5,float(eOther-eEMB+1)-0.5); - TH1D * r_part = new TH1D("ParticleResults","ParticleResults",eMax-eElec+1,-0.5,float(eMax-eElec+1)-0.5); - - m_runTime -= DeadTime; - for (int i(0); i <= eOther; ++i){ - r_geo->Fill( i , m_time[i] / m_runTime*100. ); - r_geo->GetXaxis()->SetBinLabel( i+1 , m_timeName[i].c_str() ); - } - for (int i(eElec); i < eMax; ++i){ - r_part->Fill( i-eElec , m_time[i] / m_runTime*100. ); - r_part->GetXaxis()->SetBinLabel( i-eElec+1 , m_timeName[i].c_str() ); - } - r_part->Fill( eMax-eElec , OtherPart / m_runTime*100. ); // Other particles don't get their own timer - r_part->GetXaxis()->SetBinLabel( eMax-eElec+1 , "Others" ); - r_geo->SetXTitle("Detector Region"); - r_part->SetXTitle("Particle Type"); - r_geo->SetYTitle("Percent of Event Time"); - r_part->SetYTitle("Percent of Event Time"); - - if (m_histSvc){ - if ( m_histSvc->regHist("/simTime/GeoResults",r_geo).isFailure() || - m_histSvc->regHist("/simTime/ParticleResults",r_part).isFailure() ){ - ATH_MSG_ERROR("Could not register histograms!"); - } - } - - } else { - - G4cout << "******* TestActionTimer: Nothing to report, no events timed! *********" << G4endl; - - } - - return; -} - -void TestActionTimer::Step(const G4Step* aStep) -{ -#ifdef _myDebug - G4cout << "#########################################" << G4endl - << "## ##" << G4endl - << "## TestActionTimer - Stepping ##" << G4endl - << "## ##" << G4endl - << "#########################################" << G4endl; -#endif - // HERE IS WHERE WE BEGIN OUR CLOCKING - - // Get basic information about the event - G4Track* track = aStep->GetTrack(); - - G4String thePrePVname = track->GetVolume()->GetName(); - G4String thePostPVname; - if (track->GetNextVolume() != 0) { - thePostPVname = track->GetNextVolume()->GetName(); - } else { - thePostPVname = "OutOfWorld"; - } - - // Check what volume we are in. If the volume does not agree with the clock, kill the clock - G4Timer* timer = 0; - int preIndex = ClassifyVolume( thePrePVname ); - int postIndex=-1; - if (thePrePVname != thePostPVname){ - timer = m_timer[preIndex]; - if (!timer->IsValid()){ m_time[preIndex] += TimerSum(timer); } else { VPanic(); } - - // Now start the appropriate clock - postIndex = ClassifyVolume( thePostPVname ); - m_timer[postIndex]->Start(); - - // Otherwise it's going into "out of world" - } else { - timer = m_timer[preIndex]; - if (timer->IsValid()) { - VPanic(); timer->Start(); - } - } - - // Now for the particle based timers - if (track->GetDefinition() == G4Electron::ElectronDefinition() ){ - if ( m_timer[eElec]->IsValid() ){ - m_timer[eElec]->Start(); - } - } else if (!m_timer[eElec]->IsValid()){ - m_time[eElec] += TimerSum(m_timer[eElec]); - } - if (track->GetDefinition() == G4Positron::PositronDefinition() ){ - if ( m_timer[ePos]->IsValid() ){ - m_timer[ePos]->Start(); - } - } else if (!m_timer[ePos]->IsValid()){ - m_time[ePos] += TimerSum(m_timer[ePos]); - } - if (track->GetDefinition() == G4Gamma::GammaDefinition() && - m_timer[eGam]->IsValid()){ - m_timer[eGam]->Start(); - } else if ( !m_timer[eGam]->IsValid() ){ - m_time[eGam] += TimerSum(m_timer[eGam]); - } - if (track->GetDefinition() == G4Neutron::NeutronDefinition() && - m_timer[eNeut]->IsValid()){ - m_timer[eNeut]->Start(); - } else if ( !m_timer[eNeut]->IsValid() ){ - m_time[eNeut] += TimerSum(m_timer[eNeut]); - } - - return; -} - -double TestActionTimer::TimerSum(G4Timer* timer) const -{ - if (timer == 0) return -999.; - timer->Stop(); - return (timer->GetUserElapsed() + timer->GetSystemElapsed()); -} - -void TestActionTimer::PPanic() -{ -#ifdef _myDebug - G4cout << "TestActionTimer::PPanic" << G4endl; -#endif - - // stop all particle counters and add time - for (int i(eElec); i < eMax; ++i) { - G4Timer* timer = m_timer[i]; -#ifdef _myDebug - G4cout << "TestActionTimer::PPanic stopping counter i:" << i << " " << timer << G4endl; -#endif - if (!timer->IsValid()){ - m_time[i] += TimerSum(timer); - } - } - -#ifdef _myDebug - G4cout << "TestActionTimer::PPanic done" << G4endl; -#endif - - return; -} - -void TestActionTimer::VPanic() -{ -#ifdef _myDebug - G4cout << "TestActionTimer::VPanic" << G4endl; -#endif - - // stop all volume counters and add time - for (int i(0); i <= eOther; ++i) { - G4Timer* timer = m_timer[i]; -#ifdef _myDebug - G4cout << "TestActionTimer::VPanic stopping counter i:" << i << " " << timer << G4endl; -#endif - if (!timer->IsValid()){ - m_time[i] += TimerSum(timer); - } - } - -#ifdef _myDebug - G4cout << "TestActionTimer::VPanic done" << G4endl; -#endif - - return; -} - -int TestActionTimer::ClassifyVolume( G4String& nom ) const { - - if( nom.length() >= 17 && - nom(13,4) == "EMEC" ){ - return eEMEC; - } - else if ( nom.length() >= 16 && - nom(13,3) == "EMB" ){ - return eEMB; - } - else if( nom.length() >= 25 && - nom(21,4) == "Cryo" ) { - return eCry; - } - else if( nom.length() >= 26 && - nom(13,13) == "FCAL::Module1"){ - return eFC1; - } - else if( nom.length() >= 25 && - nom(13,12) == "FCAL::Module" ){ - return eFC23; - } - else if ( nom.length() >= 17 && - nom(13,4) == "FCAL" ){ - return eFCO; - } - else if ( nom.length() >= 16 && - nom(13,3) == "HEC" ){ - return eHEC; - } - else if( nom.length() >= 31 && - nom(21,10) == "Presampler" ) { - return ePre; - } - else if ( nom.length() >= 3 && - nom(0,3) == "LAr" ){ - return eLAr; - } - else if( ( (nom.length() >= 4 && - nom(0,4) == "Muon") || - nom(0,4) == "MUON" ) || - ( nom.length() >= 9 && - nom(0,9) == "DriftTube" ) || - nom.contains("MDT") || - ( nom.length() >= 12 && - nom(0,12) == "SensitiveGas" ) || - nom.contains("MDT") || - nom.contains("station") ){ - return eMu; - } - else if ((nom.length() >= 5 && - nom(0,5) == "Pixel") || - nom == "Outside Barrel Service"){ - return ePx; - } - else if ( nom.length() >= 3 && - nom(0,3) == "SCT" ){ - return eSct; - } - else if ( ( nom.length() >= 3 && - nom(0,3) == "TRT" ) || - nom == "GasMANeg" ){ - return eTrt; - } - else if ( nom.length() >= 4 && - nom(0,4) == "Tile"){ - return eHCB; - } - else if ( ( nom.length() >= 12 && - nom(0,12) == "InDetServMat" ) || - ( nom.length() >= 4 && - nom(0,4) == "IDET" ) || - ( nom.length() >= 8 && - nom(0,8) == "BeamPipe" ) || - ( nom.length() >= 7 && - nom(0,7) == "Section" ) || - ( nom.length() >= 3 && - ( nom(0,3) == "BLM" || - nom(0,3) == "BCM" ) ) ){ - return eSev; - } - return eOther; -} - -StatusCode TestActionTimer::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - namespace G4UA{ diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.h b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.h index b41a8759672781f9f821b2fbb11c426824268f44..55a4b21df4e1abcdc23243e2598c06fc6084c99a 100644 --- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.h +++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.h @@ -22,7 +22,6 @@ #ifndef TestActionTimer_H #define TestActionTimer_H -#include "G4AtlasTools/UserActionBase.h" #include "G4String.hh" @@ -35,43 +34,6 @@ class G4Step; class G4Timer; class ITHistSvc; -class TestActionTimer final: public UserActionBase -{ - public: - - TestActionTimer(const std::string& type, const std::string& name, const IInterface* parent); - virtual void BeginOfEvent(const G4Event*) override; //!< Action that starts the new event timers - virtual void EndOfEvent(const G4Event*) override; //!< Action that prints all available information at the end of each event - virtual void BeginOfRun(const G4Run*) override; //!< Action that starts the timers at the beginning of the run - virtual void EndOfRun(const G4Run*) override; //!< Action that prints all information at the end of the run - virtual void Step(const G4Step*) override; //!< Stepping action that increments the appropriate timer - virtual StatusCode queryInterface(const InterfaceID&, void**); - -private: - /* Enumeration for timers to be used - First timers are by subdetector, second few are by particle - These are not straightforward for the non-expert to interpret*/ - enum { eEMB, eEMEC, eFC1, eFC23, eFCO, eHEC, eCry, eLAr, eHCB, - ePre, eMu, ePx, eSct, eSev, eTrt, eOther, - eElec, ePos, eGam, eNeut, eMax }; - - G4Timer* m_runTimer; //!< Timer for the entire run - G4Timer* m_eventTimer; //!< Timer for this event - double m_runTime, m_eventTime; //!< Double for storing this event and run time - - std::vector<G4Timer*> m_timer; //!< Vector of timers for each of the enum - std::vector<double> m_time; //!< Vector of times for each of the enum - std::vector<std::string> m_timeName; //!< Vector of names for each of the timers - - double TimerSum(G4Timer* timer) const; //!< Gets the appropriate time from the timer for adding to the sum - int m_nev; - - ServiceHandle<ITHistSvc> m_histSvc; - - void PPanic(); //!< Method to shut down all particle timers - void VPanic(); //!< Method to shut down all volume timers - int ClassifyVolume( G4String& ) const; //!< Method to sort out which volume we are in -}; #include "G4AtlasInterfaces/IBeginEventAction.h" #include "G4AtlasInterfaces/IEndEventAction.h" diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.cxx b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.cxx index a3fece8751974b53af4472b5b620c5b4375e192e..a30f57c1e20a10d2356ea99ef70892382dd7b861 100644 --- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.cxx +++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.cxx @@ -37,216 +37,6 @@ using std::pair; using std::find; using std::vector; // #define _myDebug -TestActionVPTimer::TestActionVPTimer(const std::string& type, const std::string& name, const IInterface* parent):UserActionBase(type,name,parent), - m_runTimer(0), m_eventTimer(0), - m_runTime(0.), m_eventTime(0.), - dCALO(2), dBeam(2), dIDET(2), dMUON(2), dDetail(""), - m_nev(0) -{ - - declareProperty("CaloDepth",dCALO); - declareProperty("BeamPipeDepth",dBeam); - declareProperty("InDetDepth",dIDET); - declareProperty("MuonDepth",dMUON); - declareProperty("DetailDepth",dDetail); - - - - // create event & run timers - m_runTimer = new G4Timer(); - m_runTimer->Start(); - m_runTimer->Stop(); - m_eventTimer = new G4Timer(); - m_eventTimer->Start(); - m_eventTimer->Stop(); - - // create step timer - v_timer = new G4Timer(); - v_timer->Start(); - v_timer->Stop(); - -#ifdef _myDebug - G4cout << "TestActionVPTimer::Constructor done" << G4endl; -#endif -} - -void TestActionVPTimer::BeginOfEvent(const G4Event* /*anEvent*/) -{ -#ifdef _myDebug - G4cout << "#########################################" << G4endl - << "## ##" << G4endl - << "## TestActionVPTimer - BeginOfEvent ##" << G4endl - << "## ##" << G4endl - << "#########################################" << G4endl; -#endif - - m_nev++; - m_eventTimer->Start(); - - return; -} - - -void TestActionVPTimer::EndOfEvent(const G4Event* /*anEvent*/) -{ -#ifdef _myDebug - G4cout << "#########################################" << G4endl - << "## ##" << G4endl - << "## TestActionVPTimer - EndOfEvent ##" << G4endl - << "## ##" << G4endl - << "#########################################" << G4endl; -#endif - - m_eventTime += TimerSum(m_eventTimer); - - return; -} - - -void TestActionVPTimer::EndOfRun(const G4Run* /*aRun*/) -{ -#ifdef _myDebug - G4cout << "#########################################" << G4endl - << "## ##" << G4endl - << "## TestActionVPTimer - EndOfRun ##" << G4endl - << "## ##" << G4endl - << "#########################################" << G4endl; -#endif - - // this stops the timer - m_runTime += TimerSum(m_runTimer); - - std::cout<<"TestActionVPTimer::EndOfRun "<< m_runTime<<std::endl; - - VolTree topPV; - topPV.push_back(v_time_index.begin()->first.front()); - volData atlasData = v_time_index.find(topPV)->second; - G4double DeadTime = m_runTime - atlasData.tTotal; - - boost::io::ios_base_all_saver coutsave (G4cout); - G4cout.setf(ios::fixed,ios::floatfield); - G4cout.precision(2); - - G4cout << "TestActionVPTimer::EndOfRunAction: Runtime " << m_runTime - << " Last Event " << m_eventTime/m_nev << " Dead Time " << DeadTime << G4endl; - - if (m_nev != 0){ - G4cout << "******* TestActionVPTimer: Beginning timer dump *******" << G4endl; - - G4cout << setw(12) << "Time" << setw(12) << "per Event" << setw(12) - << "per Run" << setw(6) << "Depth" << " Location/Particle" << G4endl; - G4cout << vPrFmt(m_runTime, m_nev, atlasData.tTotal, -999, " Event Average") << G4endl; - G4cout << vPrFmt(DeadTime, m_nev, atlasData.tTotal, -999, " Dead/Initialization") << G4endl; - - ATH_MSG_INFO("\n******* Data by volume/select particles *******"); - ATH_MSG_INFO("Data printed in reverse tree order (mother following daughter)"); - - TreeOut(topPV, atlasData.tTotal); -// for (VolIt c = v_time_index.begin(); c != v_time_index.end(); c++) { -// TimerPrint(*c, atlasData.tTotal, c->first.size()); -// } - - ATH_MSG_INFO( "\n******* Data by particle/category *******"); - - G4cout << vPrFmt(atlasData.tElectron, m_nev, atlasData.tTotal, -999, "e+/-" ) << G4endl; - G4cout << vPrFmt(atlasData.tPhoton, m_nev, atlasData.tTotal, -999, "gamma" ) << G4endl; - G4cout << vPrFmt(atlasData.tNeutron, m_nev, atlasData.tTotal, -999, "neutron") << G4endl; - G4cout << vPrFmt(atlasData.tPion, m_nev, atlasData.tTotal, -999, "pi+/-/0") << G4endl; - G4cout << vPrFmt(atlasData.tBaryon, m_nev, atlasData.tTotal, -999, "baryon" ) << G4endl; - G4cout << vPrFmt(atlasData.tLepton, m_nev, atlasData.tTotal, -999, "lepton" ) << G4endl; - G4cout << vPrFmt(atlasData.tMeson, m_nev, atlasData.tTotal, -999, "meson" ) << G4endl; - G4cout << vPrFmt(atlasData.tOther, m_nev, atlasData.tTotal, -999, "other" ) << G4endl; - - } else { ATH_MSG_WARNING("******* No events timed! *******"); } - return; -} - - -void TestActionVPTimer::Step(const G4Step* aStep) -{ -#ifdef _myDebug - G4cout << "#########################################" << G4endl - << "## ##" << G4endl - << "## TestActionVPTimer - Stepping ##" << G4endl - << "## ##" << G4endl - << "#########################################" << G4endl; -#endif - - // HERE IS WHERE WE BEGIN OUR CLOCKING -- ONLY IF - // TIMERS ARE NOT VALID - - if (!v_timer->IsValid()) { - - // Collect the total time before processing anything else - double vtime = TimerSum(v_timer); - - // CHECKIN' OUT THA NAVIGATA - VolumeTreeNavigator currentTree( aStep ); - - // Set depth cuts here - currentTree.SetDepthCutSimple(dCALO, dBeam, dIDET, dMUON); - if ( !dDetail.empty() ) { - currentTree.SetDepthCutDetail( dDetail.c_str() ); - } - - // Store time generated in current volume, remove deepest entry in v_history, then - // repeat for the resulting VolTree (one level higher) - G4ParticleDefinition* PDef = currentTree.GetTrack()->GetDefinition(); - while ( true ) { - VolTree VHistory = currentTree.Extract(); - v_time_index[VHistory].tTotal += vtime; - if (PDef->GetParticleName() == "neutron") { v_time_index[VHistory].tNeutron += vtime; } - else if (PDef->GetParticleSubType() == "e") { v_time_index[VHistory].tElectron += vtime; } - else if (PDef->GetParticleSubType() == "pi") { v_time_index[VHistory].tPion += vtime; } - else if (PDef->GetParticleType() == "gamma") { v_time_index[VHistory].tPhoton += vtime; } - else if (PDef->GetParticleType() == "baryon") { v_time_index[VHistory].tBaryon += vtime; } - else if (PDef->GetParticleType() == "lepton") { v_time_index[VHistory].tLepton += vtime; } - else if (PDef->GetParticleType() == "meson") { v_time_index[VHistory].tMeson += vtime; } - else { v_time_index[VHistory].tOther += vtime; } - ATH_MSG_DEBUG("Time stored in "<<VHistory.back().first->GetName()); - if ( !currentTree.Ascend() ) break; - } - } - - // Restart timer - v_timer->Start(); - - return; -} - - -// printing function which sums the time of volumes below the current one in the tree by recursively calling itself, -// then starting a set of output statements at one particular leaf node and adding times as it moves upward - -void TestActionVPTimer::TreeOut(VolTree id, const double tAtlas, int depth) -{ - VolIt v = v_time_index.find(id); - if (v != v_time_index.end()) { - depth++; - for (VolIt c = v_time_index.begin(); c != v_time_index.end(); c++) { - VolTree check = c->first; - check.pop_back(); - if (id == check) TreeOut(c->first, tAtlas, depth); - } - TimerPrint(*v, tAtlas, depth); - } - return; -} - - -StatusCode TestActionVPTimer::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - namespace G4UA{ diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.h b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.h index dc3a2db10ec4c9c9a096d86cc97ba6d65270b810..13f2d27e6c54c4ddea3e637c61ae867b008b0d98 100644 --- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.h +++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.h @@ -26,7 +26,6 @@ #include "VolumeTreeNavigator.h" -#include "G4AtlasTools/UserActionBase.h" #include "G4Timer.hh" #include "G4VPhysicalVolume.hh" @@ -44,125 +43,6 @@ class G4Step; class Algorithm; -struct volData { //!< Structure of data for given volume - - public: - - volData operator+= (const volData& acc){ - this->tTotal += acc.tTotal; - this->tElectron += acc.tElectron; - this->tPhoton += acc.tPhoton; - this->tNeutron += acc.tNeutron; - this->tPion += acc.tPion; - this->tBaryon += acc.tBaryon; - this->tLepton += acc.tLepton; - this->tMeson += acc.tMeson; - this->tOther += acc.tOther; - return *this; - }; //!< Overloaded += operator - - double tTotal; //!< Total time spent in volume - double tElectron; //!< Time spent on e objects in volume - double tPhoton; //!< Time spent on photons in volume - double tNeutron; //!< Time spent on neutrons in volume - double tPion; //!< Time spent on pions in volume - double tBaryon; //!< Time spent on other baryons in volume - double tLepton; //!< Time spent on other leptons in volume - double tMeson; //!< Time spent on all mesons in volume - double tOther; //!< Time spent on all other particles in volume (mostly nuclei) - - volData(): tTotal(0.), tElectron(0.), tPhoton(0.), - tNeutron(0.), tPion(0.), tBaryon(0.), - tLepton(0.), tMeson(0.), tOther(0.) { ; } -}; - - -class TestActionVPTimer final: public UserActionBase -{ - - typedef std::map<VolTree, volData> VolMap; - typedef VolMap::const_iterator VolIt; - - public: - - TestActionVPTimer(const std::string& type, const std::string& name, const IInterface* parent); - virtual void BeginOfEvent(const G4Event*) override; //!< Action that starts the new event timers - virtual void EndOfEvent(const G4Event*) override; //!< Action that prints all available information at the end of each event - virtual void EndOfRun(const G4Run*) override; //!< Action that prints all information at the end of the run - virtual void Step(const G4Step*) override; //!< Stepping action that increments the appropriate timer - StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface); - - private: - - //std::string fName; //!< Name of output csv file - //std::ofstream file; //!< Output csv file of time data (easy import into calc, etc.) - - G4Timer* m_runTimer; //!< Timer for the entire run - G4Timer* m_eventTimer; //!< Timer for this event - G4Timer* v_timer; //!< Timer activated for each volume - double m_runTime, m_eventTime; //!< Double for storing this event and run time - int dCALO, dBeam, dIDET, dMUON; //!< Used for setting depths in jobOptions file - std::string dDetail; //!< Path to set detailed depth in jobOptions file - int m_nev; - - VolTree v_history; //!< Vector of the current volume history, used to assign times to each element - VolMap v_time_index; //!< Map of times for each volume tree, by particle - - double TimerSum(G4Timer* timer) const; //!< Gets the time from the timer for summation - void TimerPrint(std::pair<VolTree, volData>, - const double tTotal, - const int depth = 0) const; -// void TimerPrint(std::ofstream&, -// std::pair<VolTree, volData>, -// const int depth = 0) const; //!< (Modifiable) print function for a map element - void TreeOut(VolTree, const double tAtlas, int depth = 0); -// void TreeOut(std::ofstream&, VolTree, int depth = 0); //!< Accumulates a tree-structure listing of volume times -}; - - -// Stops a timer and return the elapsed time - -inline double TestActionVPTimer::TimerSum(G4Timer* timer) const -{ - if (timer == 0) return -999.; - timer->Stop(); - return (timer->GetUserElapsed() + timer->GetSystemElapsed()); -} - - -// Formats print string for timer output - -inline std::string vPrFmt (double time, double nEv, double tRun, int depth, std::string id) -{ - std::string dprnt = stringify(depth); - if (depth == -999) dprnt = " "; - std::ostringstream oss; - oss << std::setw(12) << time << std::setw(12) << time/nEv << std::setw(12) << time/tRun - << std::setw(6) << dprnt << " " << id; - return oss.str(); -} - - -// Prints information about time by particle type and volume (modify to suit) - -inline void TestActionVPTimer::TimerPrint(std::pair<VolTree, volData> vp, const double tTotal, const int depth) const -{ - G4VPhysicalVolume* pv = vp.first.back().first; - std::string physical = stringify(pv->GetName()); - std::string copyNo = stringify(vp.first.back().second); - std::string mother = ""; - if (vp.first.size() != 1) mother = stringify( (vp.first.end()-2)->first->GetName() ); - G4cout << vPrFmt(vp.second.tTotal, m_nev, tTotal, depth-1, physical+"_"+copyNo+" "+mother) << G4endl; - G4cout << vPrFmt(vp.second.tElectron, m_nev, tTotal, depth-1, " - electrons & positrons") << G4endl; - G4cout << vPrFmt(vp.second.tPhoton, m_nev, tTotal, depth-1, " - photons") << G4endl; - G4cout << vPrFmt(vp.second.tNeutron, m_nev, tTotal, depth-1, " - neutrons") << G4endl; - G4cout << vPrFmt(vp.second.tPion, m_nev, tTotal, depth-1, " - pions") << G4endl; - - double tOther = vp.second.tTotal - vp.second.tElectron - vp.second.tPhoton - vp.second.tNeutron - vp.second.tPion; - G4cout << vPrFmt(tOther, m_nev, m_runTime, depth-1, " - other particles") << G4endl; - return; -} - #include "G4AtlasInterfaces/IBeginEventAction.h" #include "G4AtlasInterfaces/IEndEventAction.h" @@ -296,8 +176,7 @@ namespace G4UA{ } - - + } // namespace G4UA diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimerTool.cxx b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimerTool.cxx index 35cf3f81a1ce5d01912360e288927c5f4d29424a..347ecbfa244a502bccf873cac04dbbb956b30f39 100644 --- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimerTool.cxx +++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimerTool.cxx @@ -16,6 +16,20 @@ using std::pair; using std::find; using std::vector; namespace G4UA{ + // Formats print string for timer output + + inline std::string vPrFmt (double time, double nEv, double tRun, int depth, std::string id) + { + std::string dprnt = stringify(depth); + if (depth == -999) dprnt = " "; + std::ostringstream oss; + oss << std::setw(12) << time << std::setw(12) << time/nEv << std::setw(12) << time/tRun + << std::setw(6) << dprnt << " " << id; + return oss.str(); + } + + + typedef std::map<VolTree, TestActionVPTimer::volumeData> VolMap; typedef VolMap::const_iterator VolIt; @@ -154,18 +168,7 @@ namespace G4UA{ return; } - // Formats print string for timer output - - inline std::string vPrFmt (double time, double nEv, double tRun, int depth, std::string id) - { - std::string dprnt = stringify(depth); - if (depth == -999) dprnt = " "; - std::ostringstream oss; - oss << std::setw(12) << time << std::setw(12) << time/nEv << std::setw(12) << time/tRun - << std::setw(6) << dprnt << " " << id; - return oss.str(); - } - + } // namespace G4UA diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/components/G4ProfilingTools_entries.cxx b/Simulation/G4Utilities/G4ProfilingTools/src/components/G4ProfilingTools_entries.cxx index d821656685d6764b6ef91ead2e1faab61270ad65..f68eba6d66fac24110e035ecd4a1db9bf97c3070 100644 --- a/Simulation/G4Utilities/G4ProfilingTools/src/components/G4ProfilingTools_entries.cxx +++ b/Simulation/G4Utilities/G4ProfilingTools/src/components/G4ProfilingTools_entries.cxx @@ -1,26 +1,17 @@ #include "GaudiKernel/DeclareFactoryEntries.h" -#include "../TestActionEHist.h" -#include "../TestActionTimer.h" #include "../TestActionTimerTool.h" #include "../TestActionVPTimerTool.h" #include "../TestActionEHistTool.h" -#include "../TestActionVPTimer.h" -DECLARE_TOOL_FACTORY( TestActionEHist ) -DECLARE_TOOL_FACTORY( TestActionTimer ) DECLARE_TOOL_FACTORY( G4UA::TestActionTimerTool ) DECLARE_TOOL_FACTORY( G4UA::TestActionVPTimerTool ) DECLARE_TOOL_FACTORY( G4UA::TestActionEHistTool ) -DECLARE_TOOL_FACTORY( TestActionVPTimer ) DECLARE_FACTORY_ENTRIES( G4ProfilingTools ) { - DECLARE_TOOL( TestActionEHist ) - DECLARE_TOOL( TestActionTimer ) DECLARE_TOOL( G4UA::TestActionTimerTool ) DECLARE_TOOL( G4UA::TestActionVPTimerTool ) DECLARE_TOOL( G4UA::TestActionEHistTool ) - DECLARE_TOOL( TestActionVPTimer ) } diff --git a/Simulation/G4Utilities/G4UserActions/CMakeLists.txt b/Simulation/G4Utilities/G4UserActions/CMakeLists.txt index b6d83ab0a1c42cf8cb75da3a2d304f3621b7184f..617cf651efbffde45b5bfde8ce70fd925344c7de 100644 --- a/Simulation/G4Utilities/G4UserActions/CMakeLists.txt +++ b/Simulation/G4Utilities/G4UserActions/CMakeLists.txt @@ -21,7 +21,9 @@ atlas_depends_on_subdirs( PUBLIC MuonSpectrometer/MuonSimEvent Simulation/G4Sim/MCTruth Simulation/G4Sim/SimHelpers - Simulation/G4Utilities/TrackWriteFastSim ) + Simulation/G4Utilities/TrackWriteFastSim + Control/AthToolSupport/AsgTools + Control/StoreGate ) # External dependencies: find_package( CLHEP ) diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/CosmicPerigeeAction.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/CosmicPerigeeAction.h index f8e4e28dc7e9a112523306b9fd6673ab67b26251..e74f8226eb06483fd95f3cffd1ec3dd16888d5d3 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/CosmicPerigeeAction.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/CosmicPerigeeAction.h @@ -5,38 +5,16 @@ #ifndef G4UserActions_CosmicPerigeeAction_H #define G4UserActions_CosmicPerigeeAction_H -#include "G4AtlasTools/UserActionBase.h" - #include "StoreGate/WriteHandle.h" #include "TrackRecord/TrackRecordCollection.h" // Can't be forward declared - it's a type def -#include <string> - -class CosmicPerigeeAction final: public UserActionBase { - - public: - CosmicPerigeeAction(const std::string& type, const std::string& name, const IInterface* parent); - - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfEvent(const G4Event*) override; - virtual void BeginOfRun(const G4Run*) override; - virtual void Step(const G4Step*) override; - - StatusCode initialize() override; - virtual StatusCode queryInterface(const InterfaceID&, void**); - - private: - SG::WriteHandle<TrackRecordCollection> m_trackRecordCollection; - double m_idZ, m_idR; - bool m_allowMods; -}; - - #include "G4AtlasInterfaces/ISteppingAction.h" #include "G4AtlasInterfaces/IBeginEventAction.h" #include "G4AtlasInterfaces/IEndEventAction.h" #include "G4AtlasInterfaces/IPreTrackingAction.h" +#include "CLHEP/Units/SystemOfUnits.h" + namespace G4UA { diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/FastIDKiller.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/FastIDKiller.h index 4df8979aeeee6d58a468736a8ca70765dd25ed4e..010a8852fc9f0d8f79b3a11f439208558f913950 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/FastIDKiller.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/FastIDKiller.h @@ -5,31 +5,6 @@ #ifndef G4UserActions_FastIDKiller_H #define G4UserActions_FastIDKiller_H -#include "G4AtlasTools/UserActionBase.h" - -#include <string> - -class FastIDKiller final: public UserActionBase { - - public: - FastIDKiller(const std::string& type, const std::string& name, const IInterface* parent); - - virtual void BeginOfRun(const G4Run*) override; - virtual void Step(const G4Step*) override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - virtual StatusCode finalize() override; - - - private: - void doInit(); //!< Initialization; zeroes variables and outputs a message - void KillParticle(const G4Step* aStep); //!< Routine for killing single particles - double m_energyCut; //!< Cut off for electron energy, below which they will be killed - unsigned long m_killCount; //!< Counts the number of particles killed - bool m_init; //!< Initialization boolean (actions don't always see 'begin of run') - double m_idR, m_idZ; //!< Edge of the inner detector envelope in R and Z - -}; - #include "G4AtlasInterfaces/IBeginRunAction.h" #include "G4AtlasInterfaces/ISteppingAction.h" diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/FluxRecorder.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/FluxRecorder.h index 12a7d445f90d63c4799d9cff024df6da972d4280..99717ffa52031238541a4406a762f5053a9ec4e5 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/FluxRecorder.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/FluxRecorder.h @@ -5,48 +5,20 @@ #ifndef G4UserActions_FluxRecorder_H #define G4UserActions_FluxRecorder_H -#include "G4AtlasTools/UserActionBase.h" -#include <string> -#include <vector> - -class TH1D; - -class FluxRecorder final: public UserActionBase { - - public: - FluxRecorder(const std::string& type, const std::string& name, const IInterface* parent): UserActionBase(type,name,parent),m_nev(0.) {;} - - virtual void EndOfEvent(const G4Event*) override; - virtual void BeginOfRun(const G4Run*) override; - virtual void EndOfRun(const G4Run*) override; - virtual void Step(const G4Step*) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - - private: - enum scoringVolume {RPCOlz,RPCOmz,RPCOhz,RPCMlz,RPCMmz,RPCMhz,MDTIlz,MDTImz,MDTIhz, - LMDTo,LMDTm,LMDTi,BMDTo,BMDTm,BMDTi,SWo,SWm,SWi,SWc,SWt, - bflz,bfhz,bslz,bshz,btlz,bthz,ffle,ffme,ffhe,fsle,fsme,fshe,ftle,ftme,fthe, - CY1,CY2,lastVol}; - TH1D * m_flux[lastVol][9][2]; - TH1D * m_fluxE[lastVol][9]; - double m_nev; - std::vector<int> m_list; - void findVolume( const double , const double , const double , const double ) ; - -}; - #include "G4AtlasInterfaces/IBeginRunAction.h" #include "G4AtlasInterfaces/IEndRunAction.h" #include "G4AtlasInterfaces/IEndEventAction.h" #include "G4AtlasInterfaces/ISteppingAction.h" -namespace G4UA{ +#include <vector> +class TH1D; + +namespace G4UA{ + class FluxRecorder: public IBeginRunAction, public IEndRunAction, public IEndEventAction, public ISteppingAction { diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimMem.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimMem.h deleted file mode 100644 index 07ece934c6627c9ecd53978f8ce3d72a95ae5d10..0000000000000000000000000000000000000000 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimMem.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef G4UserActions_G4SimMem_H -#define G4UserActions_G4SimMem_H - -#include "G4AtlasTools/UserActionBase.h" - - -#include <string> - -class G4SimMem final: public UserActionBase { - - private: - unsigned int nrOfEntries; - unsigned int runMemory_bor; - unsigned int runMemory_eor; - unsigned int event1Memory_eoe; - unsigned int event2Memory_eoe; - unsigned int event10Memory_eoe; - unsigned int eventpreviousMemory_eoe; - double accumulatedEventMemory; - double accumulatedIncrMemory; - double averageMemoryPerEvent(); - double averageMemoryIncreasePerEvent(); - - public: - G4SimMem(const std::string& type, const std::string& name, const IInterface* parent):UserActionBase(type,name,parent),nrOfEntries(0),runMemory_bor(0),runMemory_eor(0), - event1Memory_eoe(0),event2Memory_eoe(0),event10Memory_eoe(0), - eventpreviousMemory_eoe(0), accumulatedEventMemory(0), accumulatedIncrMemory(0) - {;} - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfEvent(const G4Event*) override; - virtual void BeginOfRun(const G4Run*) override; - virtual void EndOfRun(const G4Run*) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - -}; - - -#endif diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimTimer.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimTimer.h index 9c84df811b2e522483328e2b2bdd44774b1a40f6..7220c968c8cbfac5b65cbd768066dc8e103b5f97 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimTimer.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimTimer.h @@ -2,60 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef G4UserActions_G4SimTimer_H -#define G4UserActions_G4SimTimer_H - -#include "G4AtlasTools/UserActionBase.h" - -#include <string> - -#include "G4Timer.hh" - -/// Current version of the G4SimTimer user action -class G4SimTimer final: public UserActionBase { - - private: - double runTime; - double eventTime; - double accumulatedEventTime; - double accumulatedEventTimeSquared; - unsigned int nrOfEntries; - G4Timer* runTimer; - G4Timer* eventTimer; - double averageTimePerEvent(); - double Sigma(); - - public: - - G4SimTimer(const std::string& type, const std::string& name, const IInterface* parent) - : UserActionBase(type, name, parent), runTime(0), eventTime(0), - accumulatedEventTime(0), accumulatedEventTimeSquared(0), - nrOfEntries(0) - { - runTimer = new G4Timer(); - eventTimer = new G4Timer(); - } - - ~G4SimTimer() {delete runTimer; delete eventTimer;} - - virtual StatusCode initialize() override; - - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfEvent(const G4Event*) override; - virtual void BeginOfRun(const G4Run*) override; - virtual void EndOfRun(const G4Run*) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - -}; - -#endif // G4SimTimer_H - - -//============================================================================= -// New design below for multithreading -//============================================================================= - #ifndef G4USERACTIONS_G4UA_G4SIMTIMER_H #define G4USERACTIONS_G4UA_G4SIMTIMER_H diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4TrackCounter.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4TrackCounter.h index 30cc8d00be2a8085d7dba07296130e387ebf3426..9aae4a366d5d9d3fb78d4097595682f6926791cd 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4TrackCounter.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4TrackCounter.h @@ -2,44 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef G4UserActions_G4TrackCounter_H -#define G4UserActions_G4TrackCounter_H - -#include <string> - -#include "G4AtlasTools/UserActionBase.h" - - - -class G4TrackCounter final: public UserActionBase { - - private: - unsigned int ntracks; - unsigned int ntracks_tot; - unsigned int ntracks_en; - unsigned int ntracks_sec; - unsigned int nevts; - double avtracks; - double avtracks_en; - double avtracks_sec; - - public: - G4TrackCounter(const std::string& type, const std::string& name, const IInterface* parent):UserActionBase(type,name,parent), - ntracks(0),ntracks_tot(0),ntracks_en(0), - ntracks_sec(0),nevts(0),avtracks(0),avtracks_en(0),avtracks_sec(0){}; - - virtual StatusCode initialize() override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfRun(const G4Run*) override; - virtual void PreTracking(const G4Track* aTrack) override; - -}; - -#endif - - #ifndef G4USERACTIONS__G4UA_G4TRACKCOUNTER_H #define G4USERACTIONS__G4UA_G4TRACKCOUNTER_H diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPKiller.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPKiller.h index ff82599db3069b2d1cb3b7827633711f08c64a67..1262107b5bf2c6c0beaf534017b56c9b1fd9475b 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPKiller.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPKiller.h @@ -5,21 +5,6 @@ #ifndef G4UserActions_HIPKiller_H #define G4UserActions_HIPKiller_H -#include "G4AtlasTools/UserActionBase.h" -#include <string> - -class HIPKiller final: public UserActionBase { - - public: - HIPKiller(const std::string& type, const std::string& name, const IInterface* parent): UserActionBase(type,name,parent) {} - - virtual void Step(const G4Step*) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - -}; - #include "G4AtlasInterfaces/ISteppingAction.h" #include "AthenaBaseComps/AthMessaging.h" diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPLArVolumeAccept.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPLArVolumeAccept.h index 5cfea65d9f428739dab2ea41898b6aa141d2eb00..d00d046684dd0d19b0c0edc5ab34ef8c5a629299 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPLArVolumeAccept.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPLArVolumeAccept.h @@ -5,37 +5,14 @@ #ifndef G4UserActions_HIPLArVolumeAccept_H #define G4UserActions_HIPLArVolumeAccept_H -#include "G4AtlasTools/UserActionBase.h" - - -#include <string> - -class HIPLArVolumeAccept final: public UserActionBase { - - public: - HIPLArVolumeAccept(const std::string& type, const std::string& name, const IInterface* parent): UserActionBase(type,name,parent),HIPacc(0),HIPevts(0),HIPevts_failed(0) {} - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfEvent(const G4Event*) override; - virtual void BeginOfRun(const G4Run*) override; - virtual void EndOfRun(const G4Run*) override; - virtual void Step(const G4Step*) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - private: - bool HIPacc; - int HIPevts; - int HIPevts_failed; - -}; - - #include "G4AtlasInterfaces/ISteppingAction.h" #include "G4AtlasInterfaces/IBeginEventAction.h" #include "G4AtlasInterfaces/IEndEventAction.h" #include "G4AtlasInterfaces/IBeginRunAction.h" #include "G4AtlasInterfaces/IEndRunAction.h" -#include "AthenaBaseComps/AthMessaging.h" +#include "AthenaBaseComps/AthMessaging.h" + +#include "GaudiKernel/ServiceHandle.h" namespace G4UA { diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/HitWrapper.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/HitWrapper.h index c3ccb8ff3649bc13aa119854774a9f5488e58302..f52c144191fe1256689c2ecddbed0ebccc07b82e 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/HitWrapper.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/HitWrapper.h @@ -5,32 +5,11 @@ #ifndef G4UserActions_HitWrapper_H #define G4UserActions_HitWrapper_H -#include "G4AtlasTools/UserActionBase.h" - - -#include <string> - -class HitWrapper final: public UserActionBase { - - public: - HitWrapper(const std::string& type, const std::string& name, const IInterface* parent); - - virtual void EndOfEvent(const G4Event*) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - private: - - double m_time; //!< Time over which to wrap the hits - - - -}; #include "G4AtlasInterfaces/IEndEventAction.h" #include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/ServiceHandle.h" -#include "AthenaBaseComps/AthMessaging.h" +#include "AthenaBaseComps/AthMessaging.h" namespace G4UA { diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/LengthIntegrator.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/LengthIntegrator.h index a2eb180d805b667bf58d0a604889d7ddb784dcbe..c34fb2d50219a703ae492c02d2e4c7e76d149997 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/LengthIntegrator.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/LengthIntegrator.h @@ -5,8 +5,8 @@ #ifndef G4UserActions_LengthIntegrator_H #define G4UserActions_LengthIntegrator_H -#include "G4AtlasTools/UserActionBase.h" #include "GaudiKernel/ITHistSvc.h" +#include "GaudiKernel/ServiceHandle.h" #include <string> #include <map> @@ -21,58 +21,6 @@ class TProfile2D; // User action to evaluate the thickness (in %r.l. or i.l.) of all detectors // traversed by outgoing particles -class LengthIntegrator final: public UserActionBase { - - public: - LengthIntegrator(const std::string& type, const std::string& name, const IInterface* parent); - - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfEvent(const G4Event*) override; - virtual void Step(const G4Step*) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - virtual StatusCode initialize() override; - - virtual StatusCode finalize() override; - - private: - - G4Pow* m_g4pow; - - void addToDetThick(std::string, double, double); - - void regAndFillHist(const std::string&,const std::pair<double,double>&); - - double m_etaPrimary ; - double m_phiPrimary ; - std::map<std::string,std::pair<double,double>,std::less<std::string> > m_detThick; - - // profiles for rad length - TProfile2D* m_rzProfRL; - std::map<std::string,TProfile*,std::less<std::string> > m_etaMapRL; - std::map<std::string,TProfile*,std::less<std::string> > m_phiMapRL; - - // profiles for int length - TProfile2D* m_rzProfIL; - std::map<std::string,TProfile*,std::less<std::string> > m_etaMapIL; - std::map<std::string,TProfile*,std::less<std::string> > m_phiMapIL; - - ServiceHandle<ITHistSvc> m_hSvc; - - std::map<std::string,TProfile2D*,std::less<std::string> > m_rzMapRL; - std::map<std::string,TProfile2D*,std::less<std::string> > m_xyMapRL; - - std::map<std::string,TProfile2D*,std::less<std::string> > m_rzMapIL; - std::map<std::string,TProfile2D*,std::less<std::string> > m_xyMapIL; - -}; - - -//============================================================================= -// New design below for multithreading -//============================================================================= - #include "G4AtlasInterfaces/IBeginEventAction.h" #include "G4AtlasInterfaces/IEndEventAction.h" #include "G4AtlasInterfaces/ISteppingAction.h" diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/LooperKiller.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/LooperKiller.h index 435f0d3237ffd81b46c4ec72d6626ec358464464..2cdb28c650b30c0ea2bf2377114568763be0e02d 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/LooperKiller.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/LooperKiller.h @@ -2,49 +2,18 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef G4UserActions_LooperKiller_H -#define G4UserActions_LooperKiller_H - -#include "G4AtlasTools/UserActionBase.h" - -#include <string> - -class LooperKiller final: public UserActionBase { - - public: - - LooperKiller(const std::string& type, const std::string& name, const IInterface* parent); - - virtual void Step(const G4Step*) override; - - virtual StatusCode finalize() override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - private: - long m_max_steps; - int m_print_steps; - int m_count_steps; - long m_killed_tracks; - int m_verbose_level; - bool m_abortEvent, m_setError; - -}; - -#endif - -//============================================================================= -// New design below for multithreading -//============================================================================= - - #ifndef G4USERACTIONS_G4UA_LOOPERKILLER_H #define G4USERACTIONS_G4UA_LOOPERKILLER_H +#include "GaudiKernel/ServiceHandle.h" + // Infrastructure includes #include "AthenaKernel/MsgStreamMember.h" #include "G4AtlasInterfaces/ISteppingAction.h" #include "AthenaBaseComps/AthMessaging.h" +class StoreGateSvc; + namespace G4UA { @@ -59,7 +28,7 @@ namespace G4UA struct Config { int MaxSteps=1000000; - bool PrintSteps=100; + int PrintSteps=100; int VerboseLevel=1; bool AbortEvent=true; bool SetError=false; diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/MomentumConservation.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/MomentumConservation.h index 820f392ca010760c877512075260bf40ba84c86f..af1e2b964aa848b9fd5df38c6e807c9930d54136 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/MomentumConservation.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/MomentumConservation.h @@ -5,48 +5,18 @@ #ifndef G4UserActions_MomentumConservation_H #define G4UserActions_MomentumConservation_H -#include "G4AtlasTools/UserActionBase.h" - - -#include <string> - -/// User action to check for event-level momentum/energy violation -class MomentumConservation final: public UserActionBase { - - public: - - /// Constructor - MomentumConservation(const std::string& type, const std::string& name, const IInterface* parent) - : UserActionBase(type,name,parent), _sum_edep(0), _sum_eesc(0) - {;} - - /// Check that primary and deposited/escaped energy agree - virtual void EndOfEvent(const G4Event* anEvent) override; - - /// Sum the deposited/escaped energy at each step - virtual void Step(const G4Step* aStep) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - - private: - - /// Sum of energy deposited in the detector - double _sum_edep; - - /// Sum of energy escaping the detector (volume = 0) - double _sum_eesc; - -}; #include "G4AtlasInterfaces/IEndEventAction.h" #include "G4AtlasInterfaces/ISteppingAction.h" #include "AthenaKernel/MsgStreamMember.h" +#include <iostream> + namespace G4UA { - /// @brief NEEDS DOCUMENTATION + /// @class MomentumConservation + /// @brief checks momentum conservation class MomentumConservation : public IEndEventAction, public ISteppingAction { public: diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/PhotonKiller.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/PhotonKiller.h index 5fc378f3fc1b07ef23b870acfddc94755f2f66ba..d565fdf3fc8476c57d5438648c6544fdc0ee749d 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/PhotonKiller.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/PhotonKiller.h @@ -5,25 +5,6 @@ #ifndef G4UserActions_PhotonKiller_H #define G4UserActions_PhotonKiller_H -#include "G4AtlasTools/UserActionBase.h" - -#include <string> - -class PhotonKiller final: public UserActionBase { - - public: - PhotonKiller(const std::string& type, const std::string& name, const IInterface* parent): UserActionBase(type,name,parent){}; - - virtual void Step(const G4Step*) override; - - virtual StatusCode initialize() override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - private: - -}; - - #include "G4AtlasInterfaces/ISteppingAction.h" #include "G4AtlasInterfaces/IPreTrackingAction.h" diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringPlane.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringPlane.h index aac53038ef8bfed4fa9493cd8e6cf5842a93c14f..cebe447da8cffb8f9ae858df9feb956beb68185f 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringPlane.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringPlane.h @@ -5,76 +5,20 @@ #ifndef G4UserActions_ScoringPlane_H #define G4UserActions_ScoringPlane_H -#include "G4AtlasTools/UserActionBase.h" - - -#include <string> - -class TTree; - -class ScoringPlane final: public UserActionBase { - - public: - - ScoringPlane(const std::string& type, const std::string& name, const IInterface* parent); - - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfEvent(const G4Event*) override; - virtual void Step(const G4Step*) override; - - virtual StatusCode initialize() override; - virtual StatusCode finalize() override; - - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - - - private: - - TTree* m_tree0; - TTree* m_tree1; - - int m_evt; - int m_ntr; - - int m_pdg; - double m_cha; - double m_ene; - double m_vx; - double m_vy; - double m_vz; - double m_x0; - double m_y0; - double m_z0; - double m_t0; - double m_px0; - double m_py0; - double m_pz0; - double m_x1; - double m_y1; - double m_z1; - double m_t1; - double m_px1; - double m_py1; - double m_pz1; - double m_x; - double m_y; - double m_z; - double m_plane; - int m_pkill; - std::string m_fname; - -}; - - #include "G4AtlasInterfaces/IBeginRunAction.h" #include "G4AtlasInterfaces/IEndRunAction.h" #include "G4AtlasInterfaces/ISteppingAction.h" #include "G4AtlasInterfaces/IBeginEventAction.h" #include "G4AtlasInterfaces/IEndEventAction.h" + +#include <string> + + +class TTree; + namespace G4UA{ - + + class ScoringPlane: public IBeginRunAction, public IEndRunAction, public ISteppingAction, public IBeginEventAction, public IEndEventAction { diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringVolumeTrackKiller.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringVolumeTrackKiller.h index 3a39ddc1e877fde9c5527fb9bef7cb006c951a4d..267522e88f153a873831a3d811d9db35aa639b6b 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringVolumeTrackKiller.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringVolumeTrackKiller.h @@ -5,27 +5,6 @@ #ifndef G4UserActions_ScoringVolumeTrackKiller_H #define G4UserActions_ScoringVolumeTrackKiller_H -#include "G4AtlasTools/UserActionBase.h" - - -#include <string> - -class ScoringVolumeTrackKiller final: public UserActionBase { - - public: - ScoringVolumeTrackKiller(const std::string& type, const std::string& name, const IInterface* parent): - UserActionBase(type,name,parent),killCount(0) {;} - - virtual void EndOfEvent(const G4Event*) override; - virtual void Step(const G4Step*) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - - private: - unsigned long killCount; - -}; #include "G4AtlasInterfaces/IEndEventAction.h" diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/StoppedParticleAction.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/StoppedParticleAction.h index c685fc35915f4eb2998368512e83c49aee83bbfb..51bf4a44b315dd344bd952eaa155fb08cbdb8bb5 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/StoppedParticleAction.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/StoppedParticleAction.h @@ -5,34 +5,13 @@ #ifndef G4UserActions_StoppedParticleAction_h #define G4UserActions_StoppedParticleAction_h - -#include "G4AtlasTools/UserActionBase.h" - - #include <string> -class TrackFastSimSD; - -class StoppedParticleAction final: public UserActionBase { - public: - StoppedParticleAction(const std::string& type, const std::string& name, const IInterface* parent):UserActionBase(type,name,parent), - m_fsSD(0) , m_init(false) {} - - virtual void Step(const G4Step*) override; - - virtual StatusCode initialize() override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - protected: - - bool isSUSYParticle(const int) const; - TrackFastSimSD * m_fsSD; - bool m_init; - -}; #include "G4AtlasInterfaces/ISteppingAction.h" #include "AthenaBaseComps/AthMessaging.h" +class TrackFastSimSD; + namespace G4UA { diff --git a/Simulation/G4Utilities/G4UserActions/cmt/requirements b/Simulation/G4Utilities/G4UserActions/cmt/requirements index b9f0ac985c93920b2b128caaf03829ad68a04286..9df45b3a875f700e70ee13edc95fcee71229d437 100644 --- a/Simulation/G4Utilities/G4UserActions/cmt/requirements +++ b/Simulation/G4Utilities/G4UserActions/cmt/requirements @@ -11,9 +11,9 @@ use G4AtlasInterfaces G4AtlasInterfaces-* Simulation/G4Atlas use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas use StoreGate StoreGate-* Control use TrackRecord TrackRecord-* Simulation/G4Sim +use AtlasCLHEP AtlasCLHEP-* External private -use AtlasCLHEP AtlasCLHEP-* External use AtlasTBB AtlasTBB-* External use CxxUtils CxxUtils-* Control use EventInfo EventInfo-* Event @@ -22,6 +22,8 @@ use MCTruth MCTruth-* Simulation/G4Sim use MuonSimEvent MuonSimEvent-* MuonSpectrometer use SimHelpers SimHelpers-* Simulation/G4Sim use TrackWriteFastSim TrackWriteFastSim-* Simulation/G4Utilities +use AsgTools AsgTools-* Control/AthToolSupport +use StoreGate StoreGate-* Control end_private diff --git a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfig.py b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfig.py index 86a045e425ac5eb4adde65994ad0cbab16a603d4..512b0b7e7b192eaec6e68cabcf617610ee5c89f3 100644 --- a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfig.py +++ b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfig.py @@ -29,7 +29,7 @@ def getHIPLArVolumeAcceptTool(name="G4UA::HIPLArVolumeAcceptTool", **kwargs): def addHIPLArVolumeAcceptTool(name="G4UA::HIPLArVolumeAcceptTool", system=False): G4AtlasServicesConfig.addAction(theTool,['Step','BeginOfEvent','EndOfEvent'],system) - + def getLooperKillerTool(name="G4UA::LooperKillerTool", **kwargs): from G4UserActions.G4UserActionsConf import G4UA__LooperKillerTool return G4UA__LooperKillerTool(name, **kwargs) @@ -37,6 +37,12 @@ def getLooperKillerTool(name="G4UA::LooperKillerTool", **kwargs): def addLooperKillerTool(name="G4UA::LooperKillerTool", system=False): G4AtlasServicesConfig.addAction(name,['Step'],system) +def getMonopoleLooperKillerTool(name="MonopoleLooperKillerTool", **kwargs): + kwargs.setdefault("PrintSteps", 2) + kwargs.setdefault("MaxSteps", 2000000) + kwargs.setdefault("VerboseLevel", 0) + return getLooperKillerTool(name, **kwargs) + def getMomentumConservationTool(name="G4UA::MomentumConservationTool", **kwargs): from G4UserActions.G4UserActionsConf import G4UA__MomentumConservationTool return G4UA__MomentumConservationTool(name, **kwargs) diff --git a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigDb.py b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigDb.py index d7b6091cc3d8ea8cfd793e1408688e03e53604ad..311df1311b0693ff2f6d7b09c46759a499e3968f 100644 --- a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigDb.py +++ b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigDb.py @@ -15,6 +15,7 @@ addTool("G4UserActions.G4UserActionsConfig.getFastIDKillerTool", "G4UA::FastIDKi addTool("G4UserActions.G4UserActionsConfig.getHIPKillerTool", "G4UA::HIPKillerTool") addTool("G4UserActions.G4UserActionsConfig.getHIPLArVolumeAcceptTool", "G4UA::HIPLArVolumeAcceptTool") addTool("G4UserActions.G4UserActionsConfig.getLooperKillerTool", "G4UA::LooperKillerTool") +addTool("G4UserActions.G4UserActionsConfig.getMonopoleLooperKillerTool", "MonopoleLooperKillerTool") addTool("G4UserActions.G4UserActionsConfig.getMomentumConservationTool", "G4UA::MomentumConservationTool") addTool("G4UserActions.G4UserActionsConfig.getScoringVolumeTrackKillerTool", "G4UA::ScoringVolumeTrackKillerTool") @@ -22,20 +23,3 @@ addTool("G4UserActions.G4UserActionsConfig.getFluxRecorderTool", "G4UA::FluxReco addTool("G4UserActions.G4UserActionsConfig.getScoringPlaneTool", "G4UA::ScoringPlaneTool") -# old tools -addTool("G4UserActions.G4UserActionsConf.G4SimTimer", "G4SimTimer") -addTool("G4UserActions.G4UserActionsConf.G4TrackCounter", "G4TrackCounter") -addTool("G4UserActions.G4UserActionsConf.CosmicPerigeeAction", "CosmicPerigeeAction") -addTool("G4UserActions.G4UserActionsConf.PhotonKiller", "PhotonKiller") -addTool("G4UserActions.G4UserActionsConf.HitWrapper", "HitWrapper") -addTool("G4UserActions.G4UserActionsConf.StoppedParticleAction", "StoppedParticleAction") -addTool("G4UserActions.G4UserActionsConf.LooperKiller", "LooperKiller") -addTool("G4UserActions.G4UserActionsConf.HIPKiller", "HIPKiller") -addTool("G4UserActions.G4UserActionsConf.LengthIntegrator", "LengthIntegrator") -addTool("G4UserActions.G4UserActionsConf.FastIDKiller", "FastIDKiller") -addTool("G4UserActions.G4UserActionsConf.G4SimMem", "G4SimMem") -addTool("G4UserActions.G4UserActionsConf.HIPLArVolumeAccept", "HIPLArVolumeAccept") -addTool("G4UserActions.G4UserActionsConf.MomentumConservation", "MomentumConservation") -addTool("G4UserActions.G4UserActionsConf.FluxRecorder", "FluxRecorder") -addTool("G4UserActions.G4UserActionsConf.ScoringPlane", "ScoringPlane") -addTool("G4UserActions.G4UserActionsConf.ScoringVolumeTrackKiller", "ScoringVolumeTrackKiller") diff --git a/Simulation/G4Utilities/G4UserActions/share/LengthIntegrator_options.py b/Simulation/G4Utilities/G4UserActions/share/LengthIntegrator_options.py index dd127119d3a627897ffe466c9676ef318d7e6be3..e91c1e955e6785254a6e4a8bfc4f9229b763faac 100644 --- a/Simulation/G4Utilities/G4UserActions/share/LengthIntegrator_options.py +++ b/Simulation/G4Utilities/G4UserActions/share/LengthIntegrator_options.py @@ -1,17 +1,7 @@ ## Add RadLengthIntegrator to the UserActions, and produce a histogram from G4AtlasApps.SimFlags import simFlags -if hasattr(simFlags, 'UseV2UserActions') and simFlags.UseV2UserActions(): - simFlags.OptionalUserActionList.addAction('G4UA::LengthIntegratorTool',['BeginOfEvent','EndOfEvent','Step']) +simFlags.OptionalUserActionList.addAction('G4UA::LengthIntegratorTool',['BeginOfEvent','EndOfEvent','Step']) -else: - # V1 userActions - try: - from G4AtlasServices.G4AtlasUserActionConfig import UAStore - except ImportError: - from G4AtlasServices.UserActionStore import UAStore - - UAStore.addAction('LengthIntegrator',['BeginOfEvent','EndOfEvent','Step']) - from AthenaCommon.AppMgr import ServiceMgr from GaudiSvc.GaudiSvcConf import THistSvc diff --git a/Simulation/G4Utilities/G4UserActions/share/jobOptions.FastIDKiller.py b/Simulation/G4Utilities/G4UserActions/share/jobOptions.FastIDKiller.py index bbb6af179e9f243a698cd2d710981f5fabcd61a2..94c2ed656465f09f22fbe00682d634367ef50d93 100644 --- a/Simulation/G4Utilities/G4UserActions/share/jobOptions.FastIDKiller.py +++ b/Simulation/G4Utilities/G4UserActions/share/jobOptions.FastIDKiller.py @@ -8,14 +8,8 @@ # __version__="$Revision: 1.3 $" #============================================================== - -def FastIDKiller_preG4Init(): - from G4AtlasApps import PyG4Atlas,AtlasG4Eng - # Enable the FastIDKiller - MyAction = PyG4Atlas.UserAction('G4UserActions','FastIDKiller', ['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step']) - AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(MyAction) from G4AtlasApps.SimFlags import simFlags -simFlags.InitFunctions.add_function("preInitG4", FastIDKiller_preG4Init) +simFlags.OptionalUserActionList.addAction('G4UA::FastIDKillerTool',['BeginOfRun','Step']) #--- End jobOptions.FastIDKiller.py file ------------------------------ diff --git a/Simulation/G4Utilities/G4UserActions/src/CosmicPerigeeAction.cxx b/Simulation/G4Utilities/G4UserActions/src/CosmicPerigeeAction.cxx index d1d81fd2118190d7170372d62511aa5b871ca51d..abd44d7946a39368bc43eaf08e07a591bf16ecce 100644 --- a/Simulation/G4Utilities/G4UserActions/src/CosmicPerigeeAction.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/CosmicPerigeeAction.cxx @@ -15,127 +15,6 @@ //STL headers #include <iostream> -CosmicPerigeeAction::CosmicPerigeeAction(const std::string& type, const std::string& name, const IInterface* parent): - UserActionBase(type,name,parent), - m_trackRecordCollection("CosmicPerigee"), - m_idZ(3490.), // ID maximum Z coordiate by default. - m_idR(1150.), // ID outer radius by default. - m_allowMods(false) -{ - declareProperty("AllowMods",m_allowMods); - declareProperty("TrackRecordCollectionName", m_trackRecordCollection); - declareProperty("R",m_idR); - declareProperty("Z",m_idZ); -} - -void CosmicPerigeeAction::BeginOfEvent(const G4Event*) -{ -#ifdef ATHENAHIVE - // Temporary fix for Hive until isValid is fixed - m_trackRecordCollection = CxxUtils::make_unique<TrackRecordCollection>(m_trackRecordCollection.name()); -#else - if (!m_trackRecordCollection.isValid()) m_trackRecordCollection = CxxUtils::make_unique<TrackRecordCollection>(m_trackRecordCollection.name()); -#endif - - //FIXME need a nice way of getting the maximum size of the ID envelope in R and Z. - // if(m_idR==0) - // { - // EnvelopeGeometryManager *gm=EnvelopeGeometryManager::GetGeometryManager(); - // m_idR = gm->IdetOuterRadius(); - // m_idZ = gm->IdetMaxZ(); - // } - -} -void CosmicPerigeeAction::EndOfEvent(const G4Event*) -{ - -} - -void CosmicPerigeeAction::BeginOfRun(const G4Run*) -{ -} - -void CosmicPerigeeAction::Step(const G4Step* aStep) -{ - static double pMinPrimary=100*CLHEP::MeV; - static bool hasBeenSaved = false; - - // See if this is a new track - if (aStep->GetPreStepPoint()->GetStepStatus() == fUndefined) hasBeenSaved = false; - - // See if we've already saved it - if (hasBeenSaved) return; - - // Only save muons or tracks in the ID - if (aStep->GetTrack()->GetDefinition() != G4MuonPlus::Definition() && - aStep->GetTrack()->GetDefinition() != G4MuonMinus::Definition() && - ( aStep->GetPostStepPoint()->GetPosition().rho() > m_idR || - aStep->GetPostStepPoint()->GetPosition().z() > m_idZ || - aStep->GetPostStepPoint()->GetPosition().z() < -m_idZ ) ){ - // Both not a muon and not in the ID - return; - } - - // Check momentum - if (aStep->GetTrack()->GetMomentum().mag() < pMinPrimary) return; - - // First order approximation of the answer to "is this the perigee" - // if it is now moving away from the perigee and has not been saved, save it - // That is true if mom dot pos > 0 - if ( aStep->GetTrack()->GetMomentum().x() * aStep->GetPostStepPoint()->GetPosition().x() + - aStep->GetTrack()->GetMomentum().y() * aStep->GetPostStepPoint()->GetPosition().y() < 0) return; - - // Save the vertex... - hasBeenSaved = true; - - // Decide whether to save the prestep or poststep point - which one is closer to Perigee? - G4StepPoint *theStep = aStep->GetPreStepPoint(); - if ( fabs( aStep->GetPreStepPoint()->GetMomentumDirection().x() * aStep->GetPreStepPoint()->GetPosition().x() + - aStep->GetPreStepPoint()->GetMomentumDirection().y() * aStep->GetPreStepPoint()->GetPosition().y() ) > - fabs( aStep->GetPostStepPoint()->GetMomentumDirection().x() * aStep->GetPostStepPoint()->GetPosition().x() + - aStep->GetPostStepPoint()->GetMomentumDirection().y() * aStep->GetPostStepPoint()->GetPosition().y() ) ){ - // Using the post step point - theStep = aStep->GetPostStepPoint(); - } - - int pdgcode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding(); - double ener = theStep->GetTotalEnergy(); - G4ThreeVector pos = theStep->GetPosition(); - G4ThreeVector mom = theStep->GetMomentum(); - double time = theStep->GetGlobalTime(); - G4VPhysicalVolume *preVol = theStep->GetPhysicalVolume(); - - if (aStep->GetTrack()->GetDefinition() == G4Geantino::Definition() ) pdgcode=999; - if (aStep->GetTrack()->GetDefinition() == G4ChargedGeantino::Definition() ) pdgcode=998; - - //create the TimedTrackRecord - TrackHelper trHelp(aStep->GetTrack()); - int barcode = trHelp.GetBarcode(); - m_trackRecordCollection->Emplace(pdgcode,ener,mom,pos,time,barcode,preVol->GetName()); -} - -StatusCode CosmicPerigeeAction::initialize() -{ - return StatusCode::SUCCESS; -} - -StatusCode CosmicPerigeeAction::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design of user actions for multithreading -//============================================================================= - namespace G4UA { diff --git a/Simulation/G4Utilities/G4UserActions/src/FastIDKiller.cxx b/Simulation/G4Utilities/G4UserActions/src/FastIDKiller.cxx index a0312ea24207b669f13780bc6c2975f249479be3..863a86a42e902a7b748bd0cdd544843c36b32cc9 100644 --- a/Simulation/G4Utilities/G4UserActions/src/FastIDKiller.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/FastIDKiller.cxx @@ -14,162 +14,6 @@ #include "G4Step.hh" #include "G4TrackVector.hh" -FastIDKiller::FastIDKiller(const std::string& type, const std::string& name, const IInterface* parent): - UserActionBase(type,name,parent), - m_energyCut(100000000.), - m_killCount(0), - m_init(false), - m_idR(1150.), - m_idZ(3490.) -{ - declareProperty("EnergyCut", m_energyCut); - declareProperty("R",m_idR); - declareProperty("Z",m_idZ); -} - - -void FastIDKiller::BeginOfRun(const G4Run*) -{ - ATH_MSG_INFO( "Including the Fast Inner Detector Killer." << std::endl - << "\t This piece of code will kill all particles leaving the" << std::endl - << "\t inner detector region (which should be defined in your" << std::endl - << "\t job options) except those satisfying certain criteria." << std::endl - << "\t (e/gamma will not be killed above " << m_energyCut/1000. << " GeV." ); - doInit(); -} - - -StatusCode FastIDKiller::finalize() -{ - ATH_MSG_INFO( "Fast Inner Detector Killer killed " << m_killCount << " particles during this run." ); - return StatusCode::SUCCESS; -} - - -void FastIDKiller::doInit() -{ - //FIXME need a nice way of getting the maximum size of the ID envelope in R and Z. - // EnvelopeGeometryManager *gm=EnvelopeGeometryManager::GetGeometryManager(); - // if(m_idR==0.) - // m_idR = gm->IdetOuterRadius(); - // if(m_idZ==0.) - // m_idZ = gm->IdetMaxZ(); - ATH_MSG_INFO( "Fast ID Killer initialized with radius " << m_idR << " and Z " << m_idZ); - - m_init=true; -} - - -void FastIDKiller::Step(const G4Step* aStep) -{ - if (msgLvl(MSG::VERBOSE)){ - ATH_MSG_DEBUG( " ===================================================== " ); - ATH_MSG_DEBUG( " Writing out Information for debugging: " ); - ATH_MSG_DEBUG( " Track-Pointer: " << aStep->GetTrack() ); - ATH_MSG_DEBUG( " GetDefinition is in the next line " ); - ATH_MSG_DEBUG( aStep->GetTrack()->GetDefinition() ); - ATH_MSG_DEBUG( " still going on ? " ); - ATH_MSG_DEBUG( " ===================================================== " ); - } - - // First ignore muons - if (G4MuonPlus::MuonPlusDefinition() == aStep->GetTrack()->GetDefinition() || - G4MuonMinus::MuonMinusDefinition() == aStep->GetTrack()->GetDefinition() ) return; - - // Now we check if the particle is outside the Z or R edges of the inner detector envelope - if (msgLvl(MSG::VERBOSE)){ - ATH_MSG_VERBOSE( " Checking pointers ... " ); - - if ( !aStep->GetPostStepPoint() || - !aStep->GetPreStepPoint() ) - { - ATH_MSG_ERROR( " One of the pointers was null! This should never happen!!!" ); - throw "Null position pointer"; - } - } - - if ( aStep->GetPreStepPoint()->GetPosition().rho() > m_idR || - aStep->GetPreStepPoint()->GetPosition().z() > m_idZ || - aStep->GetPreStepPoint()->GetPosition().z() < -m_idZ - ) - { - return; // We started outside the ID envelope - } - - if ( aStep->GetPostStepPoint()->GetPosition().rho() < m_idR && - aStep->GetPostStepPoint()->GetPosition().z() < m_idZ && - aStep->GetPostStepPoint()->GetPosition().z() > -m_idZ - ) - { - return; // We finished inside the ID envelope - } - - // Otherwise we have a non-muon that started inside and ended outside the ID envelope! KILL IT! - - ATH_MSG_VERBOSE( " We have a " << aStep->GetTrack()->GetDefinition()->GetParticleName() - << " going from " << std::endl - << " ----> " << aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetRegion()->GetName() - << " to " - << aStep->GetPostStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetRegion()->GetName() - << std::endl - << " with attributes: " << std::endl - << " Energy: " << aStep->GetTrack()->GetTotalEnergy() - << " Eta: " << aStep->GetTrack()->GetMomentum ().getEta() - << " Pt: " << aStep->GetTrack()->GetMomentum ().perp() - << " and at coordinates: " << std::endl - << " R: " << aStep->GetPostStepPoint()->GetPosition().rho() - << " Z: " << aStep->GetPostStepPoint()->GetPosition().z() - << " Phi: " << aStep->GetPostStepPoint()->GetPosition().phi() ); - - // Ignore electrons above a certain energy - // at some point it might be interesting to see what effect this has on other particles (eg pi0) - if ( ( G4Electron::ElectronDefinition() == aStep->GetTrack()->GetDefinition() || - G4Positron::PositronDefinition() == aStep->GetTrack()->GetDefinition() || - G4Gamma::GammaDefinition() == aStep->GetTrack()->GetDefinition() ) && - m_energyCut < aStep->GetTrack()->GetTotalEnergy() ) return; - - if (msgLvl(MSG::DEBUG)){ - std::string name = aStep->GetTrack()->GetDefinition()->GetParticleName(); - ATH_MSG_DEBUG( " -------> The particle passed. It is a " << name << " and will be killed ! " ); - } - - // Otherwise kill the particle now - KillParticle( aStep ); -} - - -void FastIDKiller::KillParticle(const G4Step* aStep) -{ - aStep->GetTrack()->SetTrackStatus(fStopAndKill); - const G4TrackVector *tv = aStep->GetSecondary(); - for (unsigned int i=0;i<tv->size();i++){ - if ( (*tv)[i]->GetPosition().rho() < m_idR && - (*tv)[i]->GetPosition().z() < m_idZ && - (*tv)[i]->GetPosition().z() > -m_idZ - ) continue; - (*tv)[i]->SetTrackStatus(fStopAndKill); - } - m_killCount++; -} - - -StatusCode FastIDKiller::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design of user actions for multithreading -//============================================================================= - #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IMessageSvc.h" diff --git a/Simulation/G4Utilities/G4UserActions/src/FluxRecorder.cxx b/Simulation/G4Utilities/G4UserActions/src/FluxRecorder.cxx index 81174cb2fd9287b255f8ffe873cdc1f6a400c8aa..f0bc58741be12704464873fe51d215786004fd84 100644 --- a/Simulation/G4Utilities/G4UserActions/src/FluxRecorder.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/FluxRecorder.cxx @@ -19,176 +19,6 @@ #include "G4Step.hh" #include "G4StepPoint.hh" -void FluxRecorder::EndOfEvent(const G4Event* /*anEvent*/) -{ - m_nev+=1.; -} - -void FluxRecorder::BeginOfRun(const G4Run* /*aRun*/) -{ - char nom[120]; - double timebins[101],ebins[101]; - for (int i=0;i<101;++i){ - timebins[i] = std::pow(10.,9.*double(i)/100.); - ebins[i] = std::pow(10.,-11.+16.*double(i)/100.); - } - for (int i=0;i<lastVol;++i){ - for (int j=0;j<9;++j){ - for (int k=0;k<2;++k){ - sprintf(nom,"Flux_%i_%i_%i",i,j,k); - m_flux[i][j][k] = new TH1D(nom,"",100,timebins); - } // energy - sprintf(nom,"FluxE_%i_%i",i,j); - m_fluxE[i][j] = new TH1D(nom,"",100,ebins); - } // PDGID - } // Volume -} - -void FluxRecorder::EndOfRun(const G4Run* /*aRun*/) -{ - TFile * f = new TFile("flux.root","RECREATE"); - f->cd(); - char nom[80]; - for (int i=0;i<lastVol;++i){ - for (int j=0;j<9;++j){ - for (int k=0;k<2;++k){ - sprintf(nom,"Flux_%i_%i_%i",i,j,k); - m_flux[i][j][k]->Scale(1./m_nev); - m_flux[i][j][k]->Write(nom); - } // Energy - sprintf(nom,"FluxE_%i_%i",i,j); - m_fluxE[i][j]->Scale(1./m_nev); - m_fluxE[i][j]->Write(nom); - } // PDGID - } // Volume - f->Close(); -} -void FluxRecorder::Step(const G4Step* aStep) -{ - int pdgid = 8, energy=(aStep->GetTrack()->GetKineticEnergy()>10.)?1:0; - if (aStep->GetTrack()->GetDefinition()==G4Gamma::Definition()){ - pdgid=0; - energy = (aStep->GetTrack()->GetKineticEnergy()>0.03)?1:0; - } else if (aStep->GetTrack()->GetDefinition()==G4Proton::Definition()){ - pdgid=1; - energy = (aStep->GetTrack()->GetKineticEnergy()>10.)?1:0; - } else if (aStep->GetTrack()->GetDefinition()==G4PionPlus::Definition() || - aStep->GetTrack()->GetDefinition()==G4PionMinus::Definition()){ - pdgid=2; - energy = (aStep->GetTrack()->GetKineticEnergy()>10.)?1:0; - } else if(aStep->GetTrack()->GetDefinition()==G4MuonPlus::Definition() || - aStep->GetTrack()->GetDefinition()==G4MuonMinus::Definition()){ - pdgid=3; - energy = (aStep->GetTrack()->GetKineticEnergy()>10.)?1:0; - } else if(aStep->GetTrack()->GetDefinition()==G4Electron::Definition() || - aStep->GetTrack()->GetDefinition()==G4Positron::Definition()){ - if (aStep->GetTrack()->GetKineticEnergy()>0.5){ - pdgid=4; energy=1; - } else { - pdgid=5; - energy=(aStep->GetTrack()->GetKineticEnergy()>0.01)?1:0; - } - } else if(aStep->GetTrack()->GetDefinition()==G4Neutron::Definition()){ - if (aStep->GetTrack()->GetKineticEnergy()>10.){ - pdgid=6; energy=1; - } else { - pdgid=7; - energy=(aStep->GetTrack()->GetKineticEnergy()>0.1?1:0); - } - } else if (!aStep->GetTrack()->GetDefinition()->GetPDGCharge()) return; // Not one of those and not a primary? - - m_list.clear(); - findVolume( aStep->GetPreStepPoint()->GetPosition().rho()*0.1, std::fabs(aStep->GetPreStepPoint()->GetPosition().z()*0.1), - aStep->GetPostStepPoint()->GetPosition().rho()*0.1, std::fabs(aStep->GetPostStepPoint()->GetPosition().z()*0.1) ); // units are cm - if (m_list.size()==0) return; - - for (unsigned int i=0;i<m_list.size();++i){ - m_flux[m_list[i]][pdgid][energy]->Fill( aStep->GetTrack()->GetGlobalTime() ); - m_fluxE[m_list[i]][pdgid]->Fill( aStep->GetTrack()->GetKineticEnergy() ); - } -} - -void FluxRecorder::findVolume( const double r1 , const double z1 , const double r2 , const double z2 ) -{ - const static double dim[lastVol][4] = { - {980.,1000.,0.,400.} , {980.,1000.,400.,800.} , {980.,1000.,800.,1200.} , - {750.,770.,0.,200.} , {750.,770.,200.,450.} , {750.,770.,450.,850.} , - {480.,540.,0.,200.} , {480.,540.,200.,400.} , {480.,540.,400.,600.} , - {500.,1000.,1320.,1400.} , {280.,500.,1320.,1400.} , {180.,280.,1320.,1400.} , - {600.,1200.,2120.,2180.} , {400.,600.,2120.,2180.} , {300.,400.,2120.,2180.} , - {450.,600.,700.,760.} , {320.,450.,700.,760.} , {220.,320.,700.,760.} , {100.,200.,720.,760.} , {220.,320.,680.,700.} , - {460.,460.1,0.,350.} , {460.,460.1,350.,655.} , {750.,750.1,0.,740.} , {750.,750.1,740.,1000.} , - {1020.,1020.1,0.,740.} , {1020.,1020.1,740.,1281.} , - {370.,532.,705.,705.1} , {194.,370.,705.,705.1} , {99.,190.,730.,690.} , - {683.,1020.,1301.,1301.1} , {264.,683.,1301.,1301.1} , {176.,264.,1301.,1301.1} , - {600.,1170.,2040.,2040.1} , {447.,700.,2207.,2207.1} , {298.,447.,2207.,2207.1} , - // Extras from Charlie - {750.,770.,850.,950.} , {480.,540.,600.,720.} }; - - for (int i=0;i<lastVol;++i){ - // Crossing outward in r over r1 - int hit = 0; - if (i!=28){ - double myZ1 = z1+(r1!=r2?(z2-z1)/(r2-r1)*(dim[i][0]-r1):(z2-z1)*0.5); - double myZ2 = z1+(r1!=r2?(z2-z1)/(r2-r1)*(dim[i][1]-r1):(z2-z1)*0.5); - double myR1 = r1+(z1!=z2?(r2-r1)/(z2-z1)*(dim[i][2]-z1):(r2-r1)*0.5); - double myR2 = r1+(z1!=z2?(r2-r1)/(z2-z1)*(dim[i][3]-z1):(r2-r1)*0.5); - - // Crossing outward in r over r1 - if ( r1<dim[i][0] && r2>dim[i][0] && myZ1>dim[i][2] && myZ1<dim[i][3] ) hit = 1; - // Crossing inward in r over r2 - else if ( r1>dim[i][1] && r2<dim[i][1] && myZ2>dim[i][2] && myZ2<dim[i][3] ) hit = 2; - // Crossing rightward in z over z1 - else if ( z1<dim[i][2] && z2>dim[i][2] && myR1>dim[i][0] && myR1<dim[i][1] ) hit = 3; - // Crossing leftward in z over z2 - else if ( z1>dim[i][3] && z2<dim[i][3] && myR2>dim[i][0] && myR2<dim[i][1] ) hit = 4; - - // Special handling for stupid FLUKA slanted volume - } else { - // corner test... - if ( (r1==dim[i][0]&&z1==dim[i][2])||(r2==dim[i][0]&&r2==dim[i][2]) ) hit = 1; - else { - - double denom = (r2 - r1)*(dim[i][3] - dim[i][2]) - (z2 - z1)*(dim[i][1] - dim[i][0]); - double nume_a = (z2 - z1)*(dim[i][0] - r1) - (r2 - r1)*(dim[i][2] - z1); - double nume_b = (dim[i][3] - dim[i][2])*(dim[i][0] - r1) - (dim[i][1] - dim[i][0])*(dim[i][2] - z1); - - if(!denom){ - if(!nume_a && !nume_b) hit=1; // they are the same line - } else { - double ua = nume_a / denom; - double ub = nume_b / denom; - if(ua >= 0. && ua <= 1. && ub >= 0. && ub <= 1.) hit=2; // They intersect - } - } - } - - if (hit){ -/* - if (myIndex!=-1) - std::cout << "Particle moving from ( " << r1 << " , " << z1 << " ) to ( " << r2 << " , " << z2 - << " ) appears to cross boundaries " << myIndex << " and " << i << " with " << myZ1 - << " , " << myZ2 << " , " << myR1 << " , " << myR2 << " via " << hit << " of dim " - << dim[i][0] << " , " << dim[i][1] << " , " << dim[i][2] << " , " << dim[i][3] << std::endl; -*/ - m_list.push_back(i); - } // if we scored - } // Loop over all volumes -} - - -StatusCode FluxRecorder::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - namespace G4UA{ diff --git a/Simulation/G4Utilities/G4UserActions/src/G4SimMem.cxx b/Simulation/G4Utilities/G4UserActions/src/G4SimMem.cxx deleted file mode 100644 index 2b16c46ad99e17c7a8de2de4434d5731a1521b4a..0000000000000000000000000000000000000000 --- a/Simulation/G4Utilities/G4UserActions/src/G4SimMem.cxx +++ /dev/null @@ -1,94 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "G4UserActions/G4SimMem.h" -#include "SimHelpers/MemorySnooper.h" -#include <iostream> - - -void G4SimMem::BeginOfEvent(const G4Event*) -{ - nrOfEntries++; -} -void G4SimMem::BeginOfRun(const G4Run*) -{ - MemorySnooper Memo_bor("begin of run"); - runMemory_bor=Memo_bor.GetMemorySize(); -} -void G4SimMem::EndOfEvent(const G4Event*) -{ - MemorySnooper Memo("end of event"); - if(nrOfEntries>=1) - accumulatedEventMemory+=Memo.GetMemorySize(); - if(nrOfEntries==1) - { - event1Memory_eoe=Memo.GetMemorySize(); - eventpreviousMemory_eoe=runMemory_bor; - } - if(nrOfEntries==2) - event2Memory_eoe=Memo.GetMemorySize(); - if(nrOfEntries>=3) - accumulatedIncrMemory+=Memo.GetMemorySize()-eventpreviousMemory_eoe; - if(nrOfEntries==10) - event10Memory_eoe=Memo.GetMemorySize(); - ATH_MSG_INFO(" MemorySnooper(event,VmMem,diff-previous) kBytes: "<< - nrOfEntries <<" "<< - Memo.GetMemorySize()<<" "<< - //runMemory_bor<<" "<< - //Memo.GetMemorySize()-runMemory_bor<<" "<< - //eventpreviousMemory_eoe<<" "<< - int(Memo.GetMemorySize()-eventpreviousMemory_eoe)); - //std::cout<<"*****************************************************"<<std::endl; - eventpreviousMemory_eoe=Memo.GetMemorySize(); -} -void G4SimMem::EndOfRun(const G4Run*) -{ - MemorySnooper Memo_eor("end of run"); - runMemory_eor=Memo_eor.GetMemorySize(); - ATH_MSG_INFO("*****************************************************"); - ATH_MSG_INFO("(VmMem) MEMORY SUMMARY: (kBytes) "); - ATH_MSG_INFO("Memory begin of run : "<<runMemory_bor); - if(nrOfEntries>=1) - ATH_MSG_INFO("Memory 1st event : "<< - event1Memory_eoe); - if(nrOfEntries>=2) - ATH_MSG_INFO("Memory 2st event : "<< - event2Memory_eoe); - if(nrOfEntries>=10) - ATH_MSG_INFO("Memory 10th event : "<< - event10Memory_eoe); - ATH_MSG_INFO("Memory end of run : "<< - runMemory_eor); - if(nrOfEntries>=1) - ATH_MSG_INFO("Memory per event (average) : "<< - int(averageMemoryPerEvent())); - if(nrOfEntries>=3) - ATH_MSG_INFO("Memory increase/event (nevent>3) : "<< - int(averageMemoryIncreasePerEvent())); - ATH_MSG_INFO("*****************************************************"); - -} - -double G4SimMem::averageMemoryPerEvent() -{ - if (nrOfEntries<1) return -1; - return accumulatedEventMemory/nrOfEntries; -} -double G4SimMem::averageMemoryIncreasePerEvent() -{ - if (nrOfEntries<1) return -1; - return accumulatedIncrMemory/nrOfEntries; -} - -StatusCode G4SimMem::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} diff --git a/Simulation/G4Utilities/G4UserActions/src/G4SimTimer.cxx b/Simulation/G4Utilities/G4UserActions/src/G4SimTimer.cxx index 5ce0757fa60c8d959297e05d6d5973057e9a1637..78ede7add5888e61c84d77f4acbf3db33bb8acda 100644 --- a/Simulation/G4Utilities/G4UserActions/src/G4SimTimer.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/G4SimTimer.cxx @@ -2,80 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "G4UserActions/G4SimTimer.h" -#include <iostream> -#include <iomanip> - -// -// Current design of G4SimTimer -// - -void G4SimTimer::BeginOfEvent(const G4Event*) -{ - nrOfEntries++; - eventTimer->Start(); -} -void G4SimTimer::EndOfEvent(const G4Event*) -{ - eventTimer->Stop(); - eventTime=eventTimer->GetUserElapsed()+eventTimer->GetSystemElapsed(); - if(nrOfEntries>1){ // discard first event - accumulatedEventTime+=eventTime; - accumulatedEventTimeSquared+=eventTime*eventTime; - } - ATH_MSG_INFO("\t Event nr. "<<nrOfEntries<<" took " << std::setprecision(4) << eventTime << " s. New average " << - std::setprecision(4) << averageTimePerEvent()<<" +- "<<std::setprecision(4) << Sigma()); -} -void G4SimTimer::BeginOfRun(const G4Run*) -{ - runTimer->Start(); -} -void G4SimTimer::EndOfRun(const G4Run*) -{ - runTimer->Stop(); - runTime=runTimer->GetUserElapsed()+runTimer->GetSystemElapsed(); - ATH_MSG_INFO("*****************************************"); - ATH_MSG_INFO("** **"); - ATH_MSG_INFO(" End of run - time spent is "<<std::setprecision(4) << runTime); - ATH_MSG_INFO(" Average time per event was "<<std::setprecision(4) << averageTimePerEvent()<<" +- "<< std::setprecision(4) << Sigma()); - ATH_MSG_INFO("** **"); - ATH_MSG_INFO("*****************************************"); -} - -double G4SimTimer::averageTimePerEvent() -{ - if (nrOfEntries<2) return -1; - return accumulatedEventTime/(nrOfEntries-1); -} - -double G4SimTimer::Sigma() -{ - if (nrOfEntries<3) return -1; - return sqrt((accumulatedEventTimeSquared/(nrOfEntries-1)-averageTimePerEvent()*averageTimePerEvent())/(nrOfEntries-2)); -} - -StatusCode G4SimTimer::initialize() -{ - return StatusCode::SUCCESS; -} - - -StatusCode G4SimTimer::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design of G4SimTimer for multithreading -//============================================================================= // Local includes #include "G4UserActions/G4SimTimer.h" diff --git a/Simulation/G4Utilities/G4UserActions/src/G4TrackCounter.cxx b/Simulation/G4Utilities/G4UserActions/src/G4TrackCounter.cxx index 28886de2eebae0fae060ddcf36c83100bcb2b625..c3d2ef93a4a606deffcd0588f8ec6e80ec238cfa 100644 --- a/Simulation/G4Utilities/G4UserActions/src/G4TrackCounter.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/G4TrackCounter.cxx @@ -6,73 +6,6 @@ #include "MCTruth/TrackHelper.h" #include <iostream> -//static G4TrackCounter ts1("G4TrackCounter"); - -void G4TrackCounter::BeginOfEvent(const G4Event*) -{ - nevts++; - ATH_MSG_DEBUG("increasing nevts to "<<nevts); -} - - -void G4TrackCounter::EndOfRun(const G4Run*) -{ - if (nevts>0){ - avtracks=ntracks/(double)nevts; - avtracks_en=ntracks_en/(double)nevts; - avtracks_sec=ntracks_sec/(double)nevts; - } else { - avtracks=0; - avtracks_en=0; - avtracks_sec=0; - } - - ATH_MSG_INFO("*****************************************************"); - ATH_MSG_INFO("number of G4Events has been "<<nevts<<", total ntracks: "<<ntracks_tot); - ATH_MSG_INFO("average number of primary tracks per event has been "<<avtracks); - ATH_MSG_INFO("average number of registered secondary tracks per event has been "<<avtracks_sec); - ATH_MSG_INFO("average number of tracks with E>50MeV has been "<<avtracks_en); - ATH_MSG_INFO("*****************************************************"); -} - - -void G4TrackCounter::PreTracking(const G4Track* aTrack) -{ - - ntracks_tot++; - - TrackHelper theHelper(aTrack); - - if(theHelper.IsPrimary()|| - theHelper.IsRegeneratedPrimary()) ntracks++; - - if(theHelper.IsRegisteredSecondary()) ntracks_sec++; - - if(aTrack->GetKineticEnergy()>50) ntracks_en++; - -} - -StatusCode G4TrackCounter::initialize() -{ - return StatusCode::SUCCESS; -} - - -StatusCode G4TrackCounter::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - -//============================================================================= -// New design of G4TrackCounter for multithreading -//============================================================================= #include "G4ios.hh" diff --git a/Simulation/G4Utilities/G4UserActions/src/HIPKiller.cxx b/Simulation/G4Utilities/G4UserActions/src/HIPKiller.cxx index 6e11a38b59a3ad41253930c505d9e7ce4e7477ce..91ac66e54b7f5882872d381ae93bc6ebba4a95ef 100644 --- a/Simulation/G4Utilities/G4UserActions/src/HIPKiller.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/HIPKiller.cxx @@ -12,39 +12,6 @@ #include "CLHEP/Units/PhysicalConstants.h" -void HIPKiller::Step(const G4Step* aStep) -{ - int PDGcode=aStep->GetTrack()->GetDefinition()->GetPDGEncoding(); - - // check if PDG code compatible with HIP (Monopole:411xxx0 or Qball:100xxxx0) - if ( ((abs(PDGcode)/100000==41) && (PDGcode/10000000==0)) || ((int)(abs(PDGcode)/10000000) == 1) ) { - // std::cout<<"SB: HIPKiller Step:" << PDGcode << ", energy=" << aStep->GetTrack()->GetKineticEnergy() - // <<std::endl; - if (aStep->GetTrack()->GetKineticEnergy() < 1.0) { // Energy is less than 1MeV - aStep->GetTrack()->SetTrackStatus( fStopAndKill ); - ATH_MSG_WARNING("HIP " << PDGcode << " is being killed: kinetic energy="<< aStep->GetTrack()->GetKineticEnergy()/CLHEP::MeV << "MeV"); - } - } -} - - -StatusCode HIPKiller::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design of user actions for multithreading -//============================================================================= - #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IMessageSvc.h" diff --git a/Simulation/G4Utilities/G4UserActions/src/HIPLArVolumeAccept.cxx b/Simulation/G4Utilities/G4UserActions/src/HIPLArVolumeAccept.cxx index d8b21823bdfcd1e831c9341259a58c37f09235ff..921d1104d7ca6f320a2d30edbc36b24bb2e5774b 100644 --- a/Simulation/G4Utilities/G4UserActions/src/HIPLArVolumeAccept.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/HIPLArVolumeAccept.cxx @@ -11,95 +11,6 @@ #include "G4EventManager.hh" -void HIPLArVolumeAccept::BeginOfEvent(const G4Event*) -{ - HIPacc=0; -} -void HIPLArVolumeAccept::EndOfEvent(const G4Event*) -{ - HIPevts++; - if(!HIPacc) - { - //anEvent->SetEventAborted(); - G4RunManagerKernel *rmk = G4RunManagerKernel::GetRunManagerKernel(); - rmk->GetEventManager()->AbortCurrentEvent(); - rmk->GetEventManager()->GetNonconstCurrentEvent()->SetEventAborted(); - HIPevts_failed++; - ATH_MSG_INFO("HIPLArVolumeAccept: no HIP reach the LAr detector volumes. Event aborted."); - } -} -void HIPLArVolumeAccept::BeginOfRun(const G4Run*) -{ - ATH_MSG_INFO("#########################################"<<std::endl<< - "## ##"<<std::endl<< - "## HIPLArVolumeAccept - BeginOfRun ##"<<std::endl<< - "## ##"<<std::endl<< - "## This method will kill events where ##"<<std::endl<< - "## no highly-ionizing particle reach ##"<<std::endl<< - "## the LAr main volume ##"<<std::endl<< - "#########################################"); - -} -void HIPLArVolumeAccept::EndOfRun(const G4Run*) -{ - ATH_MSG_INFO("#########################################"<<std::endl<< - "## ##"<<std::endl<< - "## HIPLArVolumeAccept - EndOfRun ##"<<std::endl<< - "## ##"<<std::endl<< - "#########################################"); - ATH_MSG_INFO(HIPevts <<" events were processed by HIPLArVolumeAccept"); - ATH_MSG_INFO(HIPevts_failed<<" events were killed because they had no HIP in EMB or EMEC"); - double HIPfraction=1.*(HIPevts-HIPevts_failed)/HIPevts; - ATH_MSG_INFO("HIP Acceptance: "<<HIPfraction); - -} -void HIPLArVolumeAccept::Step(const G4Step* aStep) -{ - int PDGcode=aStep->GetTrack()->GetDefinition()->GetPDGEncoding(); - - // check if PDG code compatible with HIP (Monopole:411xxx0 or Qball:100xxxx0) - if(abs(PDGcode)>4000000 && abs(PDGcode)<90000000) // likely a HIP, no heavy ion - { - // in EM calorimeter barrel mother volume (beyond presampler) - if(!HIPacc && aStep->GetTrack()->GetVolume()->GetName()=="Total LAR Volume") // EMB - { - HIPacc=1; - ATH_MSG_INFO("HIPLArVolumeAccept: a particle with PDG code " - <<PDGcode - <<" entered the volume " - <<aStep->GetTrack()->GetVolume()->GetName()); - } - // in EM calorimeter endcap mother volume - if(!HIPacc && aStep->GetTrack()->GetVolume()->GetName()=="LArEndcapPos") // EMEC - { - HIPacc=1; - ATH_MSG_INFO("HIPLArVolumeAccept: a particle with PDG code " - <<PDGcode - <<" entered the volume " - <<aStep->GetTrack()->GetVolume()->GetName()); - } - } -} - - - -StatusCode HIPLArVolumeAccept::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design of user actions for multithreading -//============================================================================= - namespace G4UA { diff --git a/Simulation/G4Utilities/G4UserActions/src/HitWrapper.cxx b/Simulation/G4Utilities/G4UserActions/src/HitWrapper.cxx index f8e5f0780da2082692e4f96be0b9cd44bea74f9d..68b34b9c47579b0e56be1a21426a00d8b374c0f7 100644 --- a/Simulation/G4Utilities/G4UserActions/src/HitWrapper.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/HitWrapper.cxx @@ -2,19 +2,15 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "G4UserActions/HitWrapper.h" #include <iostream> #include <cmath> #include <cstdlib> -HitWrapper::HitWrapper(const std::string& type, const std::string& name, - const IInterface* parent) - : UserActionBase(type,name,parent), m_time(25.) -{ - declareProperty("WrapTime", m_time); -} +#include "G4UserActions/HitWrapper.h" +#include "G4Step.hh" +#include "StoreGate/WriteHandle.h" #include "MuonSimEvent/CSCSimHitCollection.h" #include "MuonSimEvent/MDTSimHitCollection.h" @@ -25,135 +21,8 @@ HitWrapper::HitWrapper(const std::string& type, const std::string& name, #include "InDetSimEvent/TRTUncompressedHitCollection.h" #include "InDetSimEvent/SiHitCollection.h" -#include "StoreGate/WriteHandle.h" - -void HitWrapper::EndOfEvent(const G4Event* /*anEvent*/) -{ - - SG::WriteHandle<CSCSimHitCollection> csc("CSC_Hits"); - SG::WriteHandle<MDTSimHitCollection> mdt("MDT_Hits"); - SG::WriteHandle<TGCSimHitCollection> tgc("TGC_Hits"); - SG::WriteHandle<RPCSimHitCollection> rpc("RPC_Hits"); - /** for nSW */ - SG::WriteHandle<GenericMuonSimHitCollection> mmhits("MicromegasSensitiveDetector"); - SG::WriteHandle<GenericMuonSimHitCollection> stgc("sTGCSensitiveDetector"); - if (!csc.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access csc hit collection" ); - else { - // std::cout << "Working on a collection of size " << cscC->size() << std::endl; - //CSCSimHitCollection * csc = const_cast< CSCSimHitCollection * > (&(*cscC)); - for (CSCSimHitCollection::iterator hit=csc->begin();hit!=csc->end();++hit){ - //std::cout << "Wrapping CSC hit with time " << (*hit).globalTime() << " to "<<fmod( (*hit).globalTime() , m_time )<<std::endl; - (*hit).setGlobalTime( fmod( (*hit).globalTime() , m_time ) ); - } - } - if ( ! mdt.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access mdt hit collection" ); - else { - // std::cout << "Working on a collection of size " << mdtC->size() << std::endl; - //MDTSimHitCollection * mdt = const_cast< MDTSimHitCollection * > (&(*mdtC)); - for (MDTSimHitCollection::iterator hit=mdt->begin();hit!=mdt->end();++hit){ - //std::cout << "Wrapping MDT hit with time " << (*hit).globalTime() << " to "<<fmod( (*hit).globalTime() , m_time )<<std::endl; - (*hit).setGlobalTime( fmod( (*hit).globalTime() , m_time ) ); - } - } - - if (! rpc.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access rpc hit collection" ); - else { - // std::cout << "Working on a collection of size " << rpcC->size() << std::endl; - //RPCSimHitCollection * rpc = const_cast< RPCSimHitCollection * > (&(*rpcC)); - for (RPCSimHitCollection::iterator hit=rpc->begin();hit!=rpc->end();++hit){ - //std::cout << "Wrapping RPC hit with time " << (*hit).globalTime() << " to "<<fmod( (*hit).globalTime() , m_time )<< std::endl; - (*hit).setGlobalTime( fmod( (*hit).globalTime() , m_time ) ); - } - } - - - if (! tgc.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access tgc hit collection" ); - else { - // std::cout << "Working on a collection of size " << tgcC->size() << std::endl; - //TGCSimHitCollection * tgc = const_cast< TGCSimHitCollection * > (&(*tgcC)); - for (TGCSimHitCollection::iterator hit=tgc->begin();hit!=tgc->end();++hit){ - //std::cout << "Wrapping TGC hit with time " << (*hit).globalTime() << " to "<<fmod( (*hit).globalTime() , m_time )<< std::endl; - (*hit).setGlobalTime( fmod( (*hit).globalTime() , m_time ) ); - } - } - - - /** for nSW */ - if (! mmhits.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access Micromegas hit collection" ); - else { - // std::cout << "Working on a collection of size " << nswC->size() << std::endl; - //GenericMuonSimHitCollection *mm = const_cast< GenericMuonSimHitCollection * > (&(*mmC)); - for (GenericMuonSimHitCollection::iterator hit=mmhits->begin();hit!=mmhits->end();++hit){ - //std::cout << "Wrapping GenericMuon hit with time " << (*hit).globalTime() << std::endl; - (*hit).setGlobalTime( fmod( (*hit).globalTime() , m_time ) ); - } - } - - if (! stgc.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access sTGC hit collection" ); - else { - // std::cout << "Working on a collection of size " << nswC->size() << std::endl; - //GenericMuonSimHitCollection *stgc = const_cast< GenericMuonSimHitCollection * > (&(*stgcC)); - for (GenericMuonSimHitCollection::iterator hit=stgc->begin();hit!=stgc->end();++hit){ - //std::cout << "Wrapping GenericMuon hit with time " << (*hit).globalTime() << std::endl; - (*hit).setGlobalTime( fmod( (*hit).globalTime() , m_time ) ); - } - } - - // Handle the inner detector next - SG::WriteHandle<TRTUncompressedHitCollection> trt("TRTUncompressedHits"); - SG::WriteHandle<SiHitCollection> pix("PixelHits"); - SG::WriteHandle<SiHitCollection> sct("SCT_Hits"); - - if (! trt.isValid()) ATH_MSG_WARNING( " HitWrapper could not access trt hit collection" ); - else { - //TRTUncompressedHitCollection * trt = const_cast< TRTUncompressedHitCollection * > (&*trtC); - for (TRTUncompressedHitCollection::iterator hit=trt->begin();hit!=trt->end();++hit){ - //std::cout << "Wrapping TRT hit with time " << (*hit).globalTime() << std::endl; - (*hit).SetGlobalTime( fmod( (*hit).GetGlobalTime() , m_time ) ); - } - } - - if (! pix.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access pix hit collection" ); - else { - //SiHitCollection * pix = const_cast<SiHitCollection *> (&*pixC); - for (SiHitCollection::iterator hit=pix->begin();hit!=pix->end();++hit){ - //std::cout << "Wrapping Pix hit with time " << (*hit).meanTime() << std::endl; - (*hit).setMeanTime( fmod( (*hit).meanTime() , m_time ) ); - } - } - - if (! sct.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access sct hit collection" ); - else { - //SiHitCollection * sct = const_cast<SiHitCollection *> (&*sctC); - for (SiHitCollection::iterator hit=sct->begin();hit!=sct->end();++hit){ - //std::cout << "Wrapping SCT hit with time " << (*hit).meanTime() << std::endl; - (*hit).setMeanTime( fmod( (*hit).meanTime() , m_time ) ); - } - } - -} - - -StatusCode HitWrapper::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design of user actions for multithreading -//============================================================================= - -#include "G4UserActions/HitWrapper.h" namespace G4UA { diff --git a/Simulation/G4Utilities/G4UserActions/src/LengthIntegrator.cxx b/Simulation/G4Utilities/G4UserActions/src/LengthIntegrator.cxx index 083527c5532f7b0eea20467d42d73b7d16298dc4..3dcb4ab604ee31c47dc8e9774b7621e8df567b19 100644 --- a/Simulation/G4Utilities/G4UserActions/src/LengthIntegrator.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/LengthIntegrator.cxx @@ -26,449 +26,6 @@ #include "G4SystemOfUnits.hh" -LengthIntegrator::LengthIntegrator(const std::string& type, const std::string& name, const IInterface* parent): UserActionBase(type,name,parent),m_g4pow(0),m_etaPrimary(0),m_phiPrimary(0),m_rzProfRL(0),m_rzProfIL(0),m_hSvc("THistSvc",name) { - - declareProperty("HistoSvc",m_hSvc); - -} - -StatusCode LengthIntegrator::initialize(){ - - CHECK(m_hSvc.retrieve()); - - // register RZ profile - // other profiles need to wait until the end of the events - // as they are created only if used - - m_rzProfRL = new TProfile2D("RZRadLen","RZRadLen",1000,-25000.,25000.,2000,0.,15000.); - CHECK(m_hSvc->regHist("/lengths/radLen/RZRadLen",m_rzProfRL)); - - m_rzProfIL = new TProfile2D("RZIntLen","RZIntLen",1000,-25000.,25000.,2000,0.,15000.); - CHECK(m_hSvc->regHist("/lengths/intLen/RZIntLen",m_rzProfIL)); - - m_g4pow = G4Pow::GetInstance(); - - return StatusCode::SUCCESS; - -} - -void LengthIntegrator::BeginOfEvent(const G4Event* anEvent) -{ - m_detThick.clear(); - G4PrimaryVertex *vert=anEvent->GetPrimaryVertex(0); - G4PrimaryParticle *part=vert->GetPrimary(); - G4ThreeVector mom=part->GetMomentum(); - m_etaPrimary=mom.eta(); - m_phiPrimary=mom.phi(); - -} - -void LengthIntegrator::regAndFillHist(const std::string& detname, const std::pair<double,double>& thicks){ - - // Eta profile - TProfile *profRL=new TProfile((detname+"_RL").c_str(),(detname+"_RL").c_str(),1000,-6.,6.); - TProfile *profIL=new TProfile((detname+"_IL").c_str(),(detname+"_IL").c_str(),1000,-6.,6.); - profRL->GetXaxis()->SetTitle("#eta"); - profRL->GetYaxis()->SetTitle("%X0"); - profIL->GetXaxis()->SetTitle("#eta"); - profIL->GetYaxis()->SetTitle("#lambda"); - // Phi profile - TProfile *profPhiRL=new TProfile((detname+"Phi_RL").c_str(),(detname+"Phi_RL").c_str(),500,-M_PI,M_PI); - TProfile *profPhiIL=new TProfile((detname+"Phi_IL").c_str(),(detname+"Phi_IL").c_str(),500,-M_PI,M_PI); - profPhiRL->GetXaxis()->SetTitle("#phi"); - profPhiRL->GetYaxis()->SetTitle("%X0"); - profPhiIL->GetXaxis()->SetTitle("#phi"); - profPhiIL->GetYaxis()->SetTitle("#lambda"); - - if(m_hSvc->regHist("/lengths/radLen/"+detname+"_RL",profRL).isSuccess()&& - m_hSvc->regHist("/lengths/intLen/"+detname+"_IL",profIL).isSuccess()&& - m_hSvc->regHist("/lengths/radLen/"+detname+"Phi_RL",profPhiRL).isSuccess()&& - m_hSvc->regHist("/lengths/intLen/"+detname+"Phi_IL",profPhiIL).isSuccess()){ - - m_etaMapRL[detname]=profRL; - m_etaMapIL[detname]=profIL; - m_phiMapRL[detname]=profPhiRL; - m_phiMapIL[detname]=profPhiIL; - - profRL->Fill(m_etaPrimary,thicks.first,1.); - profIL->Fill(m_etaPrimary,thicks.second,1.); - profPhiRL->Fill(m_phiPrimary,thicks.first,1.); - profPhiIL->Fill(m_phiPrimary,thicks.second,1.); - - } else { - - ATH_MSG_FATAL("could not register needed histograms"); - - } - - -} - -void LengthIntegrator::EndOfEvent(const G4Event*) -{ - - for (auto& it : m_detThick) { - - if (m_etaMapRL.find(it.first)!=m_etaMapRL.end()) { - m_etaMapRL[it.first]->Fill(m_etaPrimary,it.second.first,1.); - m_phiMapRL[it.first]->Fill(m_phiPrimary,it.second.first,1.); - - m_etaMapIL[it.first]->Fill(m_etaPrimary,it.second.second,1.); - m_phiMapIL[it.first]->Fill(m_phiPrimary,it.second.second,1.); - - } else { - - regAndFillHist(it.first,it.second); - - } // First event, or not? - } // Loop over detectors - -} - -void LengthIntegrator::Step(const G4Step* aStep) -{ - G4TouchableHistory* touchHist = (G4TouchableHistory*)aStep->GetPreStepPoint()->GetTouchable(); - G4LogicalVolume *lv=touchHist->GetVolume()->GetLogicalVolume(); - std::string volName=lv->GetName(); - G4Material *mat=lv->GetMaterial(); - double radl=mat->GetRadlen(); - double intl=mat->GetNuclearInterLength(); - double stepl=aStep->GetStepLength(); - - double thickstepRL= radl != 0 ? stepl/radl *100 : DBL_MAX; - double thickstepIL= intl != 0 ? stepl/intl : DBL_MAX; - - std::string::size_type npos; - std::string detName; - npos=volName.find("::"); - - if (npos!=std::string::npos) - detName=volName.substr(0,npos); - else - detName=volName; - //detName="Generic"; - - std::string matName = "M_" + lv->GetMaterial()->GetName(); - std::string detName_plus_matName = "DM_" + detName + "_" + lv->GetMaterial()->GetName(); - std::string detName_d = "D_" + detName; - double zLimit = 3512.0; // For ITk studies: 3512mm is the z-limit of the ID End-Plate Cryostat. - double zHit = aStep->GetPreStepPoint()->GetPosition().z(); - double rLimit = 1152.0; // For ITk studies: 1150mm is the R-limit of the ITk. Note, the solenoid coil is outside of this (at an R of ~1300mm, I think) - double rHit = aStep->GetPreStepPoint()->GetPosition().perp(); - - if(fabs(zHit) < zLimit && rHit < rLimit){ - - LengthIntegrator::addToDetThick(detName_d, thickstepRL, thickstepIL); - LengthIntegrator::addToDetThick(matName, thickstepRL, thickstepIL); - LengthIntegrator::addToDetThick(detName_plus_matName, thickstepRL, thickstepIL); - LengthIntegrator::addToDetThick("Total_X0", thickstepRL, thickstepIL); - - const G4ElementVector* eVec = mat->GetElementVector(); - for (size_t i=0 ; i < mat->GetNumberOfElements() ; ++i) { - std::string elementName = "E_" + (*eVec)[i]->GetName(); - std::string matName_plus_elementName = "ME_" + lv->GetMaterial()->GetName() + "_" + (*eVec)[i]->GetName(); - std::string detName_plus_elementName = "DE_" + detName + "_" + (*eVec)[i]->GetName(); - double el_thickstepRL = stepl * (mat->GetVecNbOfAtomsPerVolume())[i] * (*eVec)[i]->GetfRadTsai() * 100.0; - G4double lambda0 = 35*g/cm2; - double el_thickstepIL = stepl * amu/lambda0 * (mat->GetVecNbOfAtomsPerVolume())[i] * m_g4pow->Z23( G4int( (*eVec)[i]->GetN() + 0.5 ) ); - LengthIntegrator::addToDetThick(elementName, el_thickstepRL, el_thickstepIL); - LengthIntegrator::addToDetThick(matName_plus_elementName, el_thickstepRL, el_thickstepIL); - LengthIntegrator::addToDetThick(detName_plus_elementName, el_thickstepRL, el_thickstepIL); - } - - } - - //G4ThreeVector midPoint = (aStep->GetPreStepPoint()->GetPosition()+aStep->GetPostStepPoint()->GetPosition())*0.5; - //m_rzProfRL->Fill( midPoint.z() , midPoint.perp() , thickstepRL , 1. ); - //m_rzProfIL->Fill( midPoint.z() , midPoint.perp() , thickstepIL , 1. ); - - G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition(); - G4ThreeVector endPoint = aStep->GetPostStepPoint()->GetPosition(); - - m_rzProfRL->Fill( hitPoint.z() , hitPoint.perp() , thickstepRL , 1. ); - m_rzProfIL->Fill( hitPoint.z() , hitPoint.perp() , thickstepIL , 1. ); - m_rzProfRL->Fill( endPoint.z() , endPoint.perp() , thickstepRL , 1. ); - m_rzProfIL->Fill( endPoint.z() , endPoint.perp() , thickstepIL , 1. ); - - std::vector<std::string> L; - L.push_back(detName_d); - //L.push_back(matName); - //L.push_back(detName_plus_matName); - L.push_back("Total_X0"); - - std::string specialname = ""; - if(matName.find("Support") != std::string::npos) specialname = "CarbonFiber"; - if(matName.find("Carbon") != std::string::npos) specialname = "CarbonFiber"; - if(matName.find("Steel") != std::string::npos) specialname = "Steel"; - if(matName.find("BarrelStrip") != std::string::npos) specialname = "Services"; - if(matName.find("Brl") != std::string::npos) specialname = "Services"; - if(matName.find("Svc") != std::string::npos) specialname = "Services"; - if(matName.find("InnerIST") != std::string::npos) specialname = "Services"; - if(matName.find("InnerPST") != std::string::npos) specialname = "Services"; - if(matName.find("BarrelPixel") != std::string::npos) specialname = "Services"; - if(matName.find("EndcapPixel") != std::string::npos) specialname = "Services"; - if(matName.find("InnerPixel") != std::string::npos) specialname = "Services"; - if(matName.find("OuterPixel") != std::string::npos) specialname = "Services"; - if(matName.find("pix::Chip") != std::string::npos) specialname = "PixelChips"; - if(matName.find("pix::Hybrid") != std::string::npos) specialname = "PixelChips"; - if(specialname != ""){ - L.push_back("M_"+specialname); - }else{ - L.push_back(matName); - } - - std::string plotstring = ""; - for (auto it : L) { - plotstring = it; - - if(!m_rzMapRL[plotstring]){ - - TString rzname = "RZRadLen_"+plotstring; - m_rzMapRL[plotstring] = new TProfile2D(rzname,rzname,1000,-3512.,3512.,1000,0.,1200.); - m_rzMapRL[plotstring]->GetXaxis()->SetTitle("Z [mm]"); - m_rzMapRL[plotstring]->GetYaxis()->SetTitle("R [mm]"); - m_rzMapRL[plotstring]->GetZaxis()->SetTitle("%X0"); - std::string rznameReg = "/lengths/radLen/RZRadLen_"+plotstring; - if (m_hSvc && m_hSvc->regHist(rznameReg,m_rzMapRL[plotstring]).isFailure()){ - ATH_MSG_FATAL( "Registration of histogram " << rznameReg << " failed" ); - } - TString xyname = "XYRadLen_"+plotstring; - m_xyMapRL[plotstring] = new TProfile2D(xyname,xyname,1000,-1200.,1200.,1000,-1200.,1200.); - m_xyMapRL[plotstring]->GetXaxis()->SetTitle("X [mm]"); - m_xyMapRL[plotstring]->GetYaxis()->SetTitle("Y [mm]"); - m_xyMapRL[plotstring]->GetZaxis()->SetTitle("%X0"); - std::string xynameReg = "/lengths/radLen/XYRadLen_"+plotstring; - if (m_hSvc && m_hSvc->regHist(xynameReg,m_xyMapRL[plotstring]).isFailure()){ - ATH_MSG_FATAL( "Registration of histogram " << xynameReg << " failed" ); - } - - } - - m_rzMapRL[plotstring]->Fill( hitPoint.z() , hitPoint.perp() , thickstepRL , 1. ); - m_rzMapRL[plotstring]->Fill( endPoint.z() , endPoint.perp() , thickstepRL , 1. ); - m_xyMapRL[plotstring]->Fill( hitPoint.x() , hitPoint.y() , thickstepRL , 1. ); - m_xyMapRL[plotstring]->Fill( endPoint.x() , endPoint.y() , thickstepRL , 1. ); - - } - - for (auto it : L) { - plotstring = it; - - if(!m_rzMapIL[plotstring]){ - - TString rzname = "RZIntLen_"+plotstring; - m_rzMapIL[plotstring] = new TProfile2D(rzname,rzname,1000,-3512.,3512.,1000,0.,1200.); - m_rzMapIL[plotstring]->GetXaxis()->SetTitle("Z [mm]"); - m_rzMapIL[plotstring]->GetYaxis()->SetTitle("R [mm]"); - m_rzMapIL[plotstring]->GetZaxis()->SetTitle("#lambda"); - std::string rznameReg = "/lengths/intLen/RZIntLen_"+plotstring; - if (m_hSvc && m_hSvc->regHist(rznameReg,m_rzMapIL[plotstring]).isFailure()){ - ATH_MSG_FATAL( "Registration of histogram " << rznameReg << " failed" ); - } - TString xyname = "XYIntLen_"+plotstring; - m_xyMapIL[plotstring] = new TProfile2D(xyname,xyname,1000,-1200.,1200.,1000,-1200.,1200.); - m_xyMapIL[plotstring]->GetXaxis()->SetTitle("X [mm]"); - m_xyMapIL[plotstring]->GetYaxis()->SetTitle("Y [mm]"); - m_xyMapIL[plotstring]->GetZaxis()->SetTitle("#lambda"); - std::string xynameReg = "/lengths/intLen/XYIntLen_"+plotstring; - if (m_hSvc && m_hSvc->regHist(xynameReg,m_xyMapIL[plotstring]).isFailure()){ - ATH_MSG_FATAL( "Registration of histogram " << xynameReg << " failed" ); - } - - } - - m_rzMapIL[plotstring]->Fill( hitPoint.z() , hitPoint.perp() , thickstepIL , 1. ); - m_rzMapIL[plotstring]->Fill( endPoint.z() , endPoint.perp() , thickstepIL , 1. ); - m_xyMapIL[plotstring]->Fill( hitPoint.x() , hitPoint.y() , thickstepIL , 1. ); - m_xyMapIL[plotstring]->Fill( endPoint.x() , endPoint.y() , thickstepIL , 1. ); - - } - - const G4ElementVector* eVec = mat->GetElementVector(); - for (size_t i=0 ; i < mat->GetNumberOfElements() ; ++i) { - std::string elementName = "E_" + (*eVec)[i]->GetName(); - double el_thickstep = stepl * (mat->GetVecNbOfAtomsPerVolume())[i] * (*eVec)[i]->GetfRadTsai() * 100.0; - - if(!m_rzMapRL[elementName]){ - - TString rzname = "RZRadLen_"+elementName; - m_rzMapRL[elementName] = new TProfile2D(rzname,rzname,1000,-3512.,3512.,1000,0.,1200.); - m_rzMapRL[elementName]->GetXaxis()->SetTitle("Z [mm]"); - m_rzMapRL[elementName]->GetYaxis()->SetTitle("R [mm]"); - m_rzMapRL[elementName]->GetZaxis()->SetTitle("%X0"); - std::string rznameReg = "/lengths/radLen/RZRadLen_"+elementName; - if (m_hSvc && m_hSvc->regHist(rznameReg,m_rzMapRL[elementName]).isFailure()){ - ATH_MSG_FATAL( "Registration of histogram " << rznameReg << " failed" ); - } - - TString xyname = "XYRadLen_"+elementName; - m_xyMapRL[elementName] = new TProfile2D(xyname,xyname,1000,-1200.,1200.,1000,-1200.,1200.); - m_xyMapRL[elementName]->GetXaxis()->SetTitle("X [mm]"); - m_xyMapRL[elementName]->GetYaxis()->SetTitle("Y [mm]"); - m_xyMapRL[elementName]->GetZaxis()->SetTitle("%X0"); - std::string xynameReg = "/lengths/radLen/XYRadLen_"+elementName; - if (m_hSvc && m_hSvc->regHist(xynameReg,m_xyMapRL[elementName]).isFailure()){ - ATH_MSG_FATAL( "Registration of histogram " << xynameReg << " failed" ); - } - - } - - m_rzMapRL[elementName]->Fill( hitPoint.z() , hitPoint.perp() , el_thickstep , 1. ); - m_rzMapRL[elementName]->Fill( endPoint.z() , endPoint.perp() , el_thickstep , 1. ); - m_xyMapRL[elementName]->Fill( hitPoint.x() , hitPoint.y() , el_thickstep , 1. ); - m_xyMapRL[elementName]->Fill( endPoint.x() , endPoint.y() , el_thickstep , 1. ); - - } - - for (size_t i=0 ; i < mat->GetNumberOfElements() ; ++i) { - - std::string elementName = "E_" + (*eVec)[i]->GetName(); - G4double lambda0 = 35*g/cm2; - //G4Pow* m_g4pow = G4Pow::GetInstance(); - double el_thickstep = stepl * amu/lambda0 * (mat->GetVecNbOfAtomsPerVolume())[i] * m_g4pow->Z23( G4int( (*eVec)[i]->GetN() + 0.5 ) ); - - if(!m_rzMapIL[elementName]){ - - TString rzname = "RZIntLen_"+elementName; - m_rzMapIL[elementName] = new TProfile2D(rzname,rzname,1000,-3512.,3512.,1000,0.,1200.); - m_rzMapIL[elementName]->GetXaxis()->SetTitle("Z [mm]"); - m_rzMapIL[elementName]->GetYaxis()->SetTitle("R [mm]"); - m_rzMapIL[elementName]->GetZaxis()->SetTitle("#lambda"); - std::string rznameReg = "/lengths/intLen/RZIntLen_"+elementName; - if (m_hSvc && m_hSvc->regHist(rznameReg,m_rzMapIL[elementName]).isFailure()){ - ATH_MSG_FATAL( "Registration of histogram " << rznameReg << " failed" ); - } - - TString xyname = "XYIntLen_"+elementName; - m_xyMapIL[elementName] = new TProfile2D(xyname,xyname,1000,-1200.,1200.,1000,-1200.,1200.); - m_xyMapIL[elementName]->GetXaxis()->SetTitle("X [mm]"); - m_xyMapIL[elementName]->GetYaxis()->SetTitle("Y [mm]"); - m_xyMapIL[elementName]->GetZaxis()->SetTitle("#lambda"); - std::string xynameReg = "/lengths/intLen/XYIntLen_"+elementName; - if (m_hSvc && m_hSvc->regHist(xynameReg,m_xyMapIL[elementName]).isFailure()){ - ATH_MSG_FATAL( "Registration of histogram " << xynameReg << " failed" ); - } - - } - - m_rzMapIL[elementName]->Fill( hitPoint.z() , hitPoint.perp() , el_thickstep , 1. ); - m_rzMapIL[elementName]->Fill( endPoint.z() , endPoint.perp() , el_thickstep , 1. ); - m_xyMapIL[elementName]->Fill( hitPoint.x() , hitPoint.y() , el_thickstep , 1. ); - m_xyMapIL[elementName]->Fill( endPoint.x() , endPoint.y() , el_thickstep , 1. ); - - } - -} - -StatusCode LengthIntegrator::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - -void LengthIntegrator::addToDetThick(std::string name, double thickstepRL, double thickstepIL) -{ - auto it=m_detThick.find(name); - if(it!=m_detThick.end()){ - (*it).second.first+=thickstepRL; - (*it).second.second+=thickstepIL; - } else { - m_detThick.insert(std::map<std::string,std::pair<double,double>,std::less<std::string> >::value_type( name, std::pair<double,double>( thickstepRL, thickstepIL) ) ); - } -} - -StatusCode LengthIntegrator::finalize(){ - - // Adding zeros to TProfile bins, so that each bin contains the same number of entries, - // so that a THStack of all the material TProfile plots (or all the element plots) will equal the Total_X0 TProfile plot - // It's because each plot (for each material, say) is only filled if a Geantion hits it, not if it's not hit in an event - - TProfile* totalEtaRL = m_etaMapRL["Total_X0"]; - int nbins = totalEtaRL->GetNbinsX(); - for (auto it : m_etaMapRL){ - if( it.first != "Total_X0" ){ - TProfile* plot = m_etaMapRL[it.first]; - for(int i=0 ; i<=nbins ; i++){ - double x_value = plot->GetBinCenter(i); - int n_enties_plot = plot->GetBinEntries(i); - int n_enties_ref = totalEtaRL->GetBinEntries(i); - int n_zeros_to_be_added = n_enties_ref - n_enties_plot; - for(int j=0 ; j<n_zeros_to_be_added ; j++){ - plot->Fill(x_value,0.0); - } - } - } - } - - TProfile* totalPhiRL = m_phiMapRL["Total_X0"]; - nbins = totalPhiRL->GetNbinsX(); - for (auto it : m_phiMapRL){ - if( it.first != "Total_X0" ){ - TProfile* plot = m_phiMapRL[it.first]; - for(int i=0 ; i<=nbins ; i++){ - double x_value = plot->GetBinCenter(i); - int n_enties_plot = plot->GetBinEntries(i); - int n_enties_ref = totalPhiRL->GetBinEntries(i); - int n_zeros_to_be_added = n_enties_ref - n_enties_plot; - for(int j=0 ; j<n_zeros_to_be_added ; j++){ - plot->Fill(x_value,0.0); - } - } - } - } - - TProfile* totalEtaIL = m_etaMapIL["Total_X0"]; - nbins = totalEtaIL->GetNbinsX(); - for (auto it : m_etaMapIL){ - if( it.first != "Total_X0" ){ - TProfile* plot = m_etaMapIL[it.first]; - for(int i=0 ; i<=nbins ; i++){ - double x_value = plot->GetBinCenter(i); - int n_enties_plot = plot->GetBinEntries(i); - int n_enties_ref = totalEtaIL->GetBinEntries(i); - int n_zeros_to_be_added = n_enties_ref - n_enties_plot; - for(int j=0 ; j<n_zeros_to_be_added ; j++){ - plot->Fill(x_value,0.0); - } - } - } - } - - TProfile* totalPhiIL = m_phiMapIL["Total_X0"]; - nbins = totalPhiIL->GetNbinsX(); - for (auto it : m_phiMapIL){ - if( it.first != "Total_X0" ){ - TProfile* plot = m_phiMapIL[it.first]; - for(int i=0 ; i<=nbins ; i++){ - double x_value = plot->GetBinCenter(i); - int n_enties_plot = plot->GetBinEntries(i); - int n_enties_ref = totalPhiIL->GetBinEntries(i); - int n_zeros_to_be_added = n_enties_ref - n_enties_plot; - for(int j=0 ; j<n_zeros_to_be_added ; j++){ - plot->Fill(x_value,0.0); - } - } - } - } - - // To-do: Need to check if this can be used as-is for the AthenaMP version below (or will overloading the function break the histogram merging at the end of the job? - // Edit: I've added the above code into the AthenaMP endOfEvent function. This is a bit slower (per-job) than if it was in a finalize function, but for now at least it's safer. - - return StatusCode::SUCCESS; - -} - - -//============================================================================= -// New design below for multithreading -//============================================================================= - // System includes #include <mutex> diff --git a/Simulation/G4Utilities/G4UserActions/src/LooperKiller.cxx b/Simulation/G4Utilities/G4UserActions/src/LooperKiller.cxx index 811022b7ebb6699c3e28d020f99ce1c42946a7fd..793165e52374a4079e769f06ab6e9d1a28243dbc 100644 --- a/Simulation/G4Utilities/G4UserActions/src/LooperKiller.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/LooperKiller.cxx @@ -14,118 +14,12 @@ #include "G4EventManager.hh" #include "G4Event.hh" #include "StoreGate/WriteHandle.h" +#include "StoreGate/StoreGateSvc.h" // For setting an error state in event info #include "EventInfo/EventInfo.h" -LooperKiller::LooperKiller(const std::string& type, const std::string& name, const IInterface* parent) : - UserActionBase(type,name,parent), m_max_steps(1000000), m_print_steps(100), m_count_steps(0), - m_killed_tracks(0), m_verbose_level(1), m_abortEvent(true), - m_setError(false) { - - declareProperty("MaxSteps", m_max_steps); - declareProperty("PrintSteps",m_print_steps); - declareProperty("VerboseLevel", m_verbose_level); - declareProperty("AbortEvent", m_abortEvent); - declareProperty("SetError", m_setError); - -} - - -StatusCode LooperKiller::finalize() -{ - - ATH_MSG_INFO( "******* Report from "<< name()<< " *******"); - ATH_MSG_INFO(" Set to kill tracks over " << m_max_steps << " steps"); - ATH_MSG_INFO(" and give " << m_print_steps << " steps of verbose output"); - ATH_MSG_INFO(" We killed " << m_killed_tracks << " tracks this run."); - ATH_MSG_INFO(" Was set to " << (m_abortEvent?"":"not ") << "abort events and "); - ATH_MSG_INFO( (m_setError?"":"not ") << "set an error state." ); - - return StatusCode::SUCCESS; - -} - - -void LooperKiller::Step(const G4Step* aStep) -{ - if (aStep->GetTrack()->GetCurrentStepNumber() < m_max_steps) { - if (m_count_steps==0) return; - // Track recovered... - ATH_MSG_WARNING("Track finished on its own. Congrats. Moving on with the event."); - m_count_steps = 0; - G4TransportationManager *tm = G4TransportationManager::GetTransportationManager(); - tm->GetNavigatorForTracking()->SetVerboseLevel(0); - tm->GetPropagatorInField()->SetVerboseLevel(0); - G4RunManagerKernel *rmk = G4RunManagerKernel::GetRunManagerKernel(); - rmk->GetTrackingManager()->SetVerboseLevel(0); - rmk->GetTrackingManager()->GetSteppingManager()->SetVerboseLevel(0); - rmk->GetStackManager()->SetVerboseLevel(0); - return; - } else if (aStep->GetTrack()->GetCurrentStepNumber() == m_max_steps) { - ATH_MSG_WARNING("LooperKiller triggered!! Hold on to your hats!!!!!!!!" ); - } - - G4TransportationManager *tm = G4TransportationManager::GetTransportationManager(); - tm->GetNavigatorForTracking()->SetVerboseLevel(m_verbose_level); - tm->GetPropagatorInField()->SetVerboseLevel(m_verbose_level); - - G4RunManagerKernel *rmk = G4RunManagerKernel::GetRunManagerKernel(); - rmk->GetTrackingManager()->SetVerboseLevel(m_verbose_level); - rmk->GetTrackingManager()->GetSteppingManager()->SetVerboseLevel(m_verbose_level); - rmk->GetStackManager()->SetVerboseLevel(m_verbose_level); - - m_count_steps++; - - if (m_count_steps>m_print_steps) { - m_count_steps = 0; - m_killed_tracks++; - aStep->GetTrack()->SetTrackStatus(fStopAndKill); - tm->GetNavigatorForTracking()->SetVerboseLevel(0); - tm->GetPropagatorInField()->SetVerboseLevel(0); - rmk->GetTrackingManager()->SetVerboseLevel(0); - rmk->GetTrackingManager()->GetSteppingManager()->SetVerboseLevel(0); - rmk->GetStackManager()->SetVerboseLevel(0); - - // Bail out... - if (m_abortEvent){ - rmk->GetEventManager()->AbortCurrentEvent(); - rmk->GetEventManager()->GetNonconstCurrentEvent()->SetEventAborted(); - } - if (m_setError){ - - // Set error state in eventInfo - SG::WriteHandle<EventInfo> eic("McEventInfo"); - if (! eic.isValid() ){ - ATH_MSG_WARNING( "Failed to retrieve EventInfo" ); - } else { - eic->setErrorState(EventInfo::Core,EventInfo::Error); - ATH_MSG_WARNING( "Set error state in event info!" ); - } - - } // End of set error - } // End of handling end of error time -} - -StatusCode LooperKiller::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design of user actions for multithreading -//============================================================================= - - #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IMessageSvc.h" diff --git a/Simulation/G4Utilities/G4UserActions/src/MomentumConservation.cxx b/Simulation/G4Utilities/G4UserActions/src/MomentumConservation.cxx index 65abe1bb1c57463e23e8a9675d5022a69346fb1d..d9a5359735cf2b8faccac69e8453ea79926e1764 100644 --- a/Simulation/G4Utilities/G4UserActions/src/MomentumConservation.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/MomentumConservation.cxx @@ -10,69 +10,7 @@ //#include "G4FourVector.hh" #include <iostream> -void MomentumConservation::EndOfEvent(const G4Event* anEvent) { - // Energy conservation: - - // Get energy of primaries - double eprim = 0; - //G4FourVector p4prim; - for (int iv = 0; iv < anEvent->GetNumberOfPrimaryVertex(); ++iv) { - const G4PrimaryVertex* v = anEvent->GetPrimaryVertex(iv); - for (int ip = 0; ip < v->GetNumberOfParticle(); ++ip) { - const G4PrimaryParticle* p = v->GetPrimary(ip); - /// @todo Does G4PrimaryParticle really have no Get(Total/Kinetic)Energy methods? - /// @todo Do we need to add up the total energy at the start? - eprim += p->GetMomentum().mag(); //< Just KE - } - } - - // Get energy from neutrinos (which aren't stacked) - double eneut = 0; - //vector<G4Track*> tracks = theTruthManager->GetSecondaries(); - - // Energy conservation check - const double efinal = _sum_edep + _sum_eesc + eneut; - ATH_MSG_INFO( "Energy conservation check: " - << "initial = " << eprim/CLHEP::GeV << " GeV, " - << "final = " << efinal/CLHEP::GeV << " GeV" ); - - - // Momentum conservation: - /// @todo Everything! Use truth strategy as for neutrinos - - // Reset for next event - _sum_edep = 0; - _sum_eesc = 0; -} - - -void MomentumConservation::Step(const G4Step* aStep) { - if (aStep->GetPostStepPoint()->GetPhysicalVolume() != 0) { - const double edep = aStep->GetTotalEnergyDeposit(); - _sum_edep += edep; - } else { - /// @todo Should this be GetKineticEnergy? - const double eesc = aStep->GetPostStepPoint()->GetTotalEnergy(); - _sum_eesc += eesc; - } -} - -StatusCode MomentumConservation::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design of user actions for multithreading -//============================================================================= +#include "AsgTools/MsgStreamMacros.h" namespace G4UA { diff --git a/Simulation/G4Utilities/G4UserActions/src/PhotonKiller.cxx b/Simulation/G4Utilities/G4UserActions/src/PhotonKiller.cxx index d84f195d691f9b6c46abb0a2ecd77fd784f8545c..9c6c27ba544b2ae72a4d59250329b0197101f2c1 100644 --- a/Simulation/G4Utilities/G4UserActions/src/PhotonKiller.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/PhotonKiller.cxx @@ -6,82 +6,11 @@ #include <iostream> #include <cmath> -//static PhotonKiller phk("PhotonKiller"); - -//void PhotonKiller::BeginOfEvent(const G4Event* /*anEvent*/){;} -//void PhotonKiller::EndOfEvent(const G4Event* /*anEvent*/){;} -//void PhotonKiller::BeginOfRun(const G4Run* /*aRun*/){;} -//void PhotonKiller::EndOfRun(const G4Run* /*aRun*/){;} - #include "G4Step.hh" -#include "G4Track.hh" -#include "G4ParticleDefinition.hh" -#include "G4Gamma.hh" -#include "G4RunManagerKernel.hh" #include "G4Event.hh" -void PhotonKiller::Step(const G4Step* aStep) -{ - static G4Track * lastTrack = aStep->GetTrack(); - static int count = 0; - static double energy = 0; - - if (lastTrack != aStep->GetTrack()){ - lastTrack = aStep->GetTrack(); - count = 0; - return; - } - - if ( fabs(energy-aStep->GetTrack()->GetKineticEnergy())<0.00001 ){ - // same energy as last time - count++; - } else { - count=0; - energy = aStep->GetTrack()->GetKineticEnergy(); - return; - } - - if (aStep->GetTrack()->GetKineticEnergy() < 0.0001){ // Less than one hundred eV - if ( (count>3 && aStep->GetTrack()->GetDefinition() == G4Gamma::Gamma() ) || - (count>10000) ){ // more than three steps with less than one keV of energy... - // Drop the photon - aStep->GetTrack()->SetTrackStatus( fStopAndKill ); - } - } else if (count>1000000){ - // Looper Killer functionality - aStep->GetTrack()->SetTrackStatus( fStopAndKill ); - G4RunManagerKernel *rmk = G4RunManagerKernel::GetRunManagerKernel(); - rmk->GetEventManager()->AbortCurrentEvent(); - rmk->GetEventManager()->GetNonconstCurrentEvent()->SetEventAborted(); - } -} - - - -StatusCode PhotonKiller::initialize() -{ - return StatusCode::SUCCESS; -} - - -StatusCode PhotonKiller::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design of user actions for multithreading -//============================================================================= - -#include "G4UserActions/PhotonKiller.h" +#include "G4Gamma.hh" +#include "G4RunManagerKernel.hh" namespace G4UA { diff --git a/Simulation/G4Utilities/G4UserActions/src/ScoringPlane.cxx b/Simulation/G4Utilities/G4UserActions/src/ScoringPlane.cxx index 8c39ccf438cacdc29eb8e3a4b00e97d011df17f5..4b496404e15bc910404e2154f3ab127a3303bf7c 100644 --- a/Simulation/G4Utilities/G4UserActions/src/ScoringPlane.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/ScoringPlane.cxx @@ -9,153 +9,6 @@ #include "TFile.h" -ScoringPlane::ScoringPlane(const std::string& type, const std::string& name, const IInterface* parent):UserActionBase(type,name,parent), - m_tree0(0),m_tree1(0),m_evt(0),m_ntr(0), - m_pdg(0),m_cha(0),m_ene(0),m_vx(0),m_vy(0),m_vz(0),m_x0(0),m_y0(0),m_z0(0),m_t0(0), - m_px0(0),m_py0(0),m_pz0(0),m_x1(0),m_y1(0),m_z1(0),m_t1(0),m_px1(0),m_py1(0), - m_pz1(0),m_x(0),m_y(0),m_z(0),m_plane(22600),m_pkill(0),m_fname("ufo.root") { - - declareProperty("Plane",m_plane); - declareProperty("PKill",m_pkill); - declareProperty("FName",m_fname); - - -} - -void ScoringPlane::BeginOfEvent(const G4Event* /*anEvent*/) { - m_evt++; - m_ntr=0; -} - -void ScoringPlane::EndOfEvent(const G4Event* /*anEvent*/) { - m_tree0->Fill(); -} - -StatusCode ScoringPlane::initialize() { - - m_tree0 = new TTree("t0", "ATHENA event tree"); - - m_tree0->Branch("evt", &m_evt, "evt/I"); - m_tree0->Branch("ntr", &m_ntr, "ntr/I"); - - m_tree1 = new TTree("t1", "ATHENA particle tree"); - - m_tree1->Branch("evt", &m_evt, "evt/I"); - m_tree1->Branch("ntr", &m_ntr, "ntr/I"); - m_tree1->Branch("pdg", &m_pdg, "pdg/I"); - m_tree1->Branch("cha", &m_cha, "cha/D"); - m_tree1->Branch("ene", &m_ene, "ene/D"); - m_tree1->Branch("x0", &m_x0, "x0/D"); - m_tree1->Branch("y0", &m_y0, "y0/D"); - m_tree1->Branch("z0", &m_z0, "z0/D"); - m_tree1->Branch("t0", &m_t0, "t0/D"); - m_tree1->Branch("px0", &m_px0, "px0/D"); - m_tree1->Branch("py0", &m_py0, "py0/D"); - m_tree1->Branch("pz0", &m_pz0, "pz0/D"); - m_tree1->Branch("x1", &m_x1, "x1/D"); - m_tree1->Branch("y1", &m_y1, "y1/D"); - m_tree1->Branch("z1", &m_z1, "z1/D"); - m_tree1->Branch("t1", &m_t1, "t1/D"); - m_tree1->Branch("px1", &m_px1, "px1/D"); - m_tree1->Branch("py1", &m_py1, "py1/D"); - m_tree1->Branch("pz1", &m_pz1, "pz1/D"); - m_tree1->Branch("vx", &m_vx, "vx/D"); - m_tree1->Branch("vy", &m_vy, "vy/D"); - m_tree1->Branch("vz", &m_vz, "vz/D"); - m_tree1->Branch("x", &m_x, "x/D"); - m_tree1->Branch("y", &m_y, "y/D"); - m_tree1->Branch("z", &m_z, "z/D"); - - m_evt = 0; - - ATH_MSG_INFO( "ScoringPlane: placing scoring plane at [mm]: " << m_plane ); - ATH_MSG_INFO( "ScoringPlane: stop and kill particles: " << m_pkill ); - ATH_MSG_INFO( "ScoringPlane: output root filename: " << m_fname ); - - return StatusCode::SUCCESS; - -} - -StatusCode ScoringPlane::finalize() { - - TFile* file = new TFile(m_fname.c_str(), "RECREATE", "ATHENA ufo simulation"); - - m_tree0->Write(); - m_tree1->Write(); - - file->Close(); - - return StatusCode::SUCCESS; -} - -void ScoringPlane::Step(const G4Step* aStep) { - - m_z0 = aStep->GetPreStepPoint()->GetPosition().z(); - m_z1 = aStep->GetPostStepPoint()->GetPosition().z(); - - if (m_z0*m_plane < 0) return; // take only particles on one side - if (m_z1*m_plane < 0) return; // take only particles on one side - if (std::fabs(m_z0) < std::fabs(m_plane)) return; // take only particles flowing towards the IP - if (std::fabs(m_z1) > std::fabs(m_plane)) return; // take only particles flowing towards the IP - - m_ntr++; - - m_pdg = aStep->GetTrack()->GetDefinition()->GetPDGEncoding(); - m_cha = aStep->GetTrack()->GetDefinition()->GetPDGCharge(); - m_ene = aStep->GetTrack()->GetTotalEnergy(); - m_vx = aStep->GetTrack()->GetVertexPosition().x(); - m_vy = aStep->GetTrack()->GetVertexPosition().y(); - m_vz = aStep->GetTrack()->GetVertexPosition().z(); - - m_x0 = aStep->GetPreStepPoint()->GetPosition().x(); - m_y0 = aStep->GetPreStepPoint()->GetPosition().y(); - m_t0 = aStep->GetPreStepPoint()->GetGlobalTime()/CLHEP::ns; - m_px0 = aStep->GetPreStepPoint()->GetMomentum().x(); - m_py0 = aStep->GetPreStepPoint()->GetMomentum().y(); - m_pz0 = aStep->GetPreStepPoint()->GetMomentum().z(); - - m_x1 = aStep->GetPostStepPoint()->GetPosition().x(); - m_y1 = aStep->GetPostStepPoint()->GetPosition().y(); - m_t1 = aStep->GetPostStepPoint()->GetGlobalTime()/CLHEP::ns; - m_px1 = aStep->GetPostStepPoint()->GetMomentum().x(); - m_py1 = aStep->GetPostStepPoint()->GetMomentum().y(); - m_pz1 = aStep->GetPostStepPoint()->GetMomentum().z(); - - m_z = m_plane; - m_x = m_x0 + (m_z0!=m_z1 ? (m_x1-m_x0)/(m_z1-m_z0)*(m_z-m_z0) : (m_x1-m_x0)*0.5); - m_y = m_y0 + (m_z0!=m_z1 ? (m_y1-m_y0)/(m_z1-m_z0)*(m_z-m_z0) : (m_y1-m_y0)*0.5); - - m_tree1->Fill(); - - if (m_pkill == 1) aStep->GetTrack()->SetTrackStatus(fStopAndKill); - else if (m_pkill == 2) aStep->GetTrack()->SetTrackStatus(fKillTrackAndSecondaries); - - ATH_MSG_DEBUG( - " z0: " << std::setw(10) << m_z0 - << " z1: " << std::setw(10) << m_z1 - << " x0: " << std::setw(10) << m_x0 - << " x1: " << std::setw(10) << m_x1 - << " x: " << std::setw(10) << m_x - << " y0: " << std::setw(10) << m_y0 - << " y1: " << std::setw(10) << m_y1 - << " y: " << std::setw(10) << m_y ); -} - - - - -StatusCode ScoringPlane::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - namespace G4UA{ diff --git a/Simulation/G4Utilities/G4UserActions/src/ScoringVolumeTrackKiller.cxx b/Simulation/G4Utilities/G4UserActions/src/ScoringVolumeTrackKiller.cxx index 692bf8a87c054fd5a9e5ad648266c00999f030d7..24f7b3d98212e006e14765fb2e17664837212951 100644 --- a/Simulation/G4Utilities/G4UserActions/src/ScoringVolumeTrackKiller.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/ScoringVolumeTrackKiller.cxx @@ -11,85 +11,6 @@ #include "G4TrackVector.hh" -void ScoringVolumeTrackKiller::EndOfEvent(const G4Event*) -{ - ATH_MSG_INFO( killCount << " tracks killed in this event " ); - killCount = 0; -} - -void ScoringVolumeTrackKiller::Step(const G4Step* aStep) -{ - G4StepPoint* preStep = aStep->GetPreStepPoint(); - const G4VTouchable* preTouchable = preStep->GetTouchable(); - G4StepPoint* postStep = aStep->GetPostStepPoint(); - const G4VTouchable* postTouchable = postStep->GetTouchable(); - int preDepth = preTouchable->GetHistoryDepth(); - int postDepth = postTouchable->GetHistoryDepth(); - - std::string preName; - bool preInStation = false; - for (int i = 0; i < preDepth+1; i++) { - preName = preTouchable->GetVolume(i)->GetName(); - if (preName.find("station") != std::string::npos || - preName.find("av_") != std::string::npos) { - - preInStation = true; - break; - } - } - std::string postName; - bool postOutofStation = true; - bool outOfMother = false; - for (int i = 0; i < postDepth+1; i++) { - if (postTouchable->GetVolume(i) != 0) { - postName = postTouchable->GetVolume(i)->GetName(); - } else { - outOfMother = true; - break; - } - if (postName.find("station") != std::string::npos || - postName.find("av_") != std::string::npos) { - - postOutofStation = false; - break; - } - } - if ( (preInStation && postOutofStation) || outOfMother ) { - aStep->GetTrack()->SetTrackStatus(fStopAndKill); -// std::cout << aStep->GetTrack()->GetDefinition()->GetParticleName() << " stopped " << std::endl; -// double x = aStep->GetTrack()->GetPosition().x(); -// double y = aStep->GetTrack()->GetPosition().y(); -// double z = aStep->GetTrack()->GetPosition().z(); -// double r = std::sqrt(x*x + y*y); -// std::cout << " at r = " << r << ", z = " << z << std::endl; - killCount++; -// G4TrackVector* secVec = aStep->GetSecondary(); -// std::cout << secVec->size() << " secondaries " << std::endl; -// std::cout << " Track " << trackID << " killed at pre = " -// << preName << " and post = " << postName << std::endl; - } -} - -StatusCode ScoringVolumeTrackKiller::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design of user actions for multithreading -//============================================================================= - -#include "G4UserActions/ScoringVolumeTrackKiller.h" - - #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IMessageSvc.h" diff --git a/Simulation/G4Utilities/G4UserActions/src/StoppedParticleAction.cxx b/Simulation/G4Utilities/G4UserActions/src/StoppedParticleAction.cxx index a3f44af39412cc738e9c4ca979cda0cab52cabb8..7a19ec75d91fb1afdbc39f4658da2d883cbe88dc 100644 --- a/Simulation/G4Utilities/G4UserActions/src/StoppedParticleAction.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/StoppedParticleAction.cxx @@ -17,91 +17,6 @@ #include <cmath> -void StoppedParticleAction::Step(const G4Step* aStep) -{ - // Trigger if the energy is below our threshold or if the time is over 150 ns - int id = fabs(aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetPDGEncoding()); - if (id>=1000000 && id<=1100000 && - isSUSYParticle(id)){ - - G4Material * mat = aStep->GetTrack()->GetMaterial(); - double minA=1500000.; - for (unsigned int i=0;i<mat->GetNumberOfElements();++i){ - if (mat->GetElement(i) && - minA>mat->GetElement(i)->GetN()){ - minA=mat->GetElement(i)->GetN(); - } - } - if (aStep->GetPostStepPoint()->GetVelocity()>0.15*std::pow(minA,-2./3.)*CLHEP::c_light) return; - - if (!m_init){ - m_init = true; - - G4SDManager * g4sdm = G4SDManager::GetSDMpointer(); - if (!g4sdm) { - ATH_MSG_ERROR( "StoppedParticleFastSim could not get sensitive detector catalog." ); - } else { - G4VSensitiveDetector * g4sd = g4sdm->FindSensitiveDetector("TrackFastSimSD"); - if (!g4sd) { - ATH_MSG_ERROR( "StoppedParticleFastSim could not get TrackFastSimSD sensitive detector." ); - } else { - m_fsSD = dynamic_cast<TrackFastSimSD*>(g4sd); - if (!m_fsSD) { - ATH_MSG_ERROR( "StoppedParticleFastSim could not cast the SD." ); - } - } // found the SD - } // got the catalog - } - - if (m_fsSD) { - m_fsSD->WriteTrack( aStep->GetTrack() , false , true ); - } - } - - aStep->GetTrack()->SetTrackStatus(fStopAndKill); - const G4TrackVector *tv = aStep->GetSecondary(); - for (unsigned int i=0;i<tv->size();i++){ - (*tv)[i]->SetTrackStatus(fStopAndKill); - } -} - -bool StoppedParticleAction::isSUSYParticle(const int id) const -{ - if (id==1000021 || id==1000005 || id==1000006 || id==1000512 || id==1000522 || id==1000991 || id==1000993 || - id==1000612 || id==1000622 || id==1000632 || id==1000642 || id==1000652 || id==1005211 || - id==1006113 || id==1006211 || id==1006213 || id==1006223 || id==1006311 || - id==1006313 || id==1006321 || id==1006323 || id==1006333 || - id==1009111 || id==1009113 || id==1009211 || id==1009213 || id==1009311 || - id==1009313 || id==1009321 || id==1009323 || id==1009223 || id==1009333 || - id==1092112 || id==1091114 || id==1092114 || id==1092212 || id==1092214 || id==1092224 || - id==1093114 || id==1093122 || id==1093214 || id==1093224 || id==1093314 || id==1093324 || id==1093334) - return true; - return false; -} - -StatusCode StoppedParticleAction::initialize() -{ - return StatusCode::SUCCESS; -} - - -StatusCode StoppedParticleAction::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -//============================================================================= -// New design of user actions for multithreading -//============================================================================= - #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IMessageSvc.h" diff --git a/Simulation/G4Utilities/G4UserActions/src/components/G4UserActions_entries.cxx b/Simulation/G4Utilities/G4UserActions/src/components/G4UserActions_entries.cxx index 1dcaf9cb35da3e0c34b3ca547543d68113a8204d..7c9e486aaa685227020d289c8b842802d1b193e9 100644 --- a/Simulation/G4Utilities/G4UserActions/src/components/G4UserActions_entries.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/components/G4UserActions_entries.cxx @@ -1,6 +1,5 @@ #include "GaudiKernel/DeclareFactoryEntries.h" -// New tools #include "G4UserActions/G4SimTimerTool.h" #include "G4UserActions/G4TrackCounterTool.h" #include "G4UserActions/LooperKillerTool.h" @@ -17,25 +16,6 @@ #include "G4UserActions/FluxRecorderTool.h" #include "G4UserActions/ScoringPlaneTool.h" -// Old tools -#include "G4UserActions/G4SimTimer.h" -#include "G4UserActions/G4TrackCounter.h" -#include "G4UserActions/CosmicPerigeeAction.h" -#include "G4UserActions/PhotonKiller.h" -#include "G4UserActions/HitWrapper.h" -#include "G4UserActions/StoppedParticleAction.h" -#include "G4UserActions/LooperKiller.h" -#include "G4UserActions/HIPKiller.h" -#include "G4UserActions/LengthIntegrator.h" -#include "G4UserActions/FastIDKiller.h" -#include "G4UserActions/G4SimMem.h" -#include "G4UserActions/HIPLArVolumeAccept.h" -#include "G4UserActions/MomentumConservation.h" -#include "G4UserActions/FluxRecorder.h" -#include "G4UserActions/ScoringPlane.h" -#include "G4UserActions/ScoringVolumeTrackKiller.h" - -// New tools DECLARE_TOOL_FACTORY( G4UA::G4SimTimerTool ) DECLARE_TOOL_FACTORY( G4UA::G4TrackCounterTool ) DECLARE_TOOL_FACTORY( G4UA::LooperKillerTool ) @@ -52,26 +32,8 @@ DECLARE_TOOL_FACTORY( G4UA::StoppedParticleActionTool ) DECLARE_TOOL_FACTORY( G4UA::FluxRecorderTool ) DECLARE_TOOL_FACTORY( G4UA::ScoringPlaneTool ) -// Old tools -DECLARE_TOOL_FACTORY( G4SimTimer ) -DECLARE_TOOL_FACTORY( G4TrackCounter ) -DECLARE_TOOL_FACTORY( CosmicPerigeeAction ) -DECLARE_TOOL_FACTORY( PhotonKiller ) -DECLARE_TOOL_FACTORY( HitWrapper ) -DECLARE_TOOL_FACTORY( StoppedParticleAction ) -DECLARE_TOOL_FACTORY( LooperKiller ) -DECLARE_TOOL_FACTORY( HIPKiller ) -DECLARE_TOOL_FACTORY( LengthIntegrator ) -DECLARE_TOOL_FACTORY( FastIDKiller ) -DECLARE_TOOL_FACTORY( G4SimMem ) -DECLARE_TOOL_FACTORY( HIPLArVolumeAccept ) -DECLARE_TOOL_FACTORY( MomentumConservation ) -DECLARE_TOOL_FACTORY( FluxRecorder ) -DECLARE_TOOL_FACTORY( ScoringPlane ) -DECLARE_TOOL_FACTORY( ScoringVolumeTrackKiller ) DECLARE_FACTORY_ENTRIES( G4UserActions ) { - // New tools DECLARE_TOOL( G4UA::G4SimTimerTool ) DECLARE_TOOL( G4UA::G4TrackCounterTool ) DECLARE_TOOL( G4UA::LooperKillerTool ) @@ -88,21 +50,4 @@ DECLARE_FACTORY_ENTRIES( G4UserActions ) { DECLARE_TOOL( G4UA::FluxRecorderTool ) DECLARE_TOOL( G4UA::ScoringPlaneTool ) - // Old tools - DECLARE_TOOL( G4SimTimer ) - DECLARE_TOOL( G4TrackCounter ) - DECLARE_TOOL( CosmicPerigeeAction ) - DECLARE_TOOL( PhotonKiller ) - DECLARE_TOOL( HitWrapper ) - DECLARE_TOOL( StoppedParticleAction ) - DECLARE_TOOL( LooperKiller ) - DECLARE_TOOL( HIPKiller ) - DECLARE_TOOL( LengthIntegrator ) - DECLARE_TOOL( FastIDKiller ) - DECLARE_TOOL( G4SimMem ) - DECLARE_TOOL( HIPLArVolumeAccept ) - DECLARE_TOOL( MomentumConservation ) - DECLARE_TOOL( FluxRecorder ) - DECLARE_TOOL( ScoringPlane ) - DECLARE_TOOL( ScoringVolumeTrackKiller ) } diff --git a/Simulation/G4Utilities/Geo2G4/CMakeLists.txt b/Simulation/G4Utilities/Geo2G4/CMakeLists.txt index 380c418c8431b1811c8105559b46485ee4280785..111033d9286a6bd3ddfa038979c95ac8589512b4 100644 --- a/Simulation/G4Utilities/Geo2G4/CMakeLists.txt +++ b/Simulation/G4Utilities/Geo2G4/CMakeLists.txt @@ -7,17 +7,20 @@ atlas_subdir( Geo2G4 ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Control/AthenaKernel - DetectorDescription/GeoModel/GeoModelKernel - DetectorDescription/GeoModel/GeoModelUtilities GaudiKernel PRIVATE Control/AthenaBaseComps + Control/AthenaKernel Control/SGTools Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces + DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoSpecialShapes - Simulation/G4Sim/SimHelpers ) + DetectorDescription/GeoModel/GeoModelUtilities + Simulation/G4Atlas/G4AtlasInterfaces + Simulation/G4Atlas/G4AtlasTools + Simulation/G4Sim/SimHelpers + Simulation/G4Utilities/GeoMaterial2G4 ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) @@ -33,17 +36,17 @@ atlas_add_library( Geo2G4Lib INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps SGTools GeoSpecialShapes SimHelpers ) + LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} GaudiKernel + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps SGTools GeoSpecialShapes G4AtlasToolsLib SimHelpers GeoMaterial2G4 AthenaKernel GeoModelKernel GeoModelUtilities StoreGateLib SGtests ) atlas_add_component( Geo2G4 src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel AthenaBaseComps SGTools StoreGateLib SGtests GeoSpecialShapes SimHelpers Geo2G4Lib ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel AthenaBaseComps SGTools StoreGateLib SGtests GeoSpecialShapes G4AtlasToolsLib SimHelpers GeoMaterial2G4 Geo2G4Lib ) atlas_add_dictionary( LArWheelSolidCheckerDict src/LArWheelSolidDDProxy.h src/lcg_dict/selection.xml INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel AthenaBaseComps SGTools StoreGateLib SGtests GeoSpecialShapes SimHelpers Geo2G4Lib ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel AthenaBaseComps SGTools StoreGateLib SGtests GeoSpecialShapes SimHelpers GeoMaterial2G4 Geo2G4Lib ) diff --git a/Simulation/G4Utilities/Geo2G4/Geo2G4/Geo2G4SvcBase.h b/Simulation/G4Utilities/Geo2G4/Geo2G4/Geo2G4SvcBase.h deleted file mode 100644 index 4d6f828759d62e3e3354421cad980d9f47ec5ff0..0000000000000000000000000000000000000000 --- a/Simulation/G4Utilities/Geo2G4/Geo2G4/Geo2G4SvcBase.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef Geo2G4SvcBase_H -#define Geo2G4SvcBase_H - -class VolumeBuilder; -#include <string> - -class Geo2G4SvcBase -{ -public: - virtual void RegisterVolumeBuilder(VolumeBuilder* vb)=0; - virtual void UnregisterVolumeBuilder(VolumeBuilder* vb)=0; - virtual VolumeBuilder* GetVolumeBuilder(std::string s)=0; - virtual VolumeBuilder* GetDefaultBuilder() =0; - - virtual void SetDefaultBuilder(VolumeBuilder*)=0; - virtual void SetDefaultBuilder(std::string) =0; - virtual void ListVolumeBuilders()=0; - - virtual bool UseTopTransforms()=0; -}; -#endif diff --git a/Simulation/G4Utilities/Geo2G4/Geo2G4/IGeo2G4Svc.h b/Simulation/G4Utilities/Geo2G4/Geo2G4/IGeo2G4Svc.h deleted file mode 100644 index 340937ced61094ef0232135d1ee5201fbe4c358f..0000000000000000000000000000000000000000 --- a/Simulation/G4Utilities/Geo2G4/Geo2G4/IGeo2G4Svc.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef IGeo2G4Svc_H -#define IGeo2G4Svc_H - -#ifndef GAUDIKERNEL_IINTERFACE_H -#include "GaudiKernel/IInterface.h" -#endif -#include "Geo2G4/Geo2G4SvcBase.h" -#include <string> - -class IGeo2G4Svc: virtual public IInterface, - virtual public Geo2G4SvcBase { -public: - static const InterfaceID& intID(); -}; -inline const InterfaceID& IGeo2G4Svc::intID() -{ - static const InterfaceID _IID("IGeo2G4Svc",1,0); - return _IID; -} -#endif diff --git a/Simulation/G4Utilities/Geo2G4/Geo2G4/LogicalVolume.h b/Simulation/G4Utilities/Geo2G4/Geo2G4/LogicalVolume.h deleted file mode 100644 index 7c9eb6ce0aec6f3da7fa41037ffdb613d9bfc082..0000000000000000000000000000000000000000 --- a/Simulation/G4Utilities/Geo2G4/Geo2G4/LogicalVolume.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// placeholder for the type of logical volume one may wish to use -// -#ifndef LogicalVolume_H -#define LogicalVolume_H - -#include "G4LogicalVolume.hh" - -typedef G4LogicalVolume LogicalVolume; - -#endif diff --git a/Simulation/G4Utilities/Geo2G4/cmt/requirements b/Simulation/G4Utilities/Geo2G4/cmt/requirements index f7230870a8250903944997b766fda029fffcc838..9f0a15b273a9a16567b0e4f7c375907691780890 100755 --- a/Simulation/G4Utilities/Geo2G4/cmt/requirements +++ b/Simulation/G4Utilities/Geo2G4/cmt/requirements @@ -4,16 +4,19 @@ author ADA public use AtlasPolicy AtlasPolicy-* -use AthenaKernel AthenaKernel-* Control use GaudiInterface GaudiInterface-* External -use Geant4 Geant4-* External -use GeoModelKernel GeoModelKernel-* DetectorDescription/GeoModel -use GeoModelUtilities GeoModelUtilities-* DetectorDescription/GeoModel private use AthenaBaseComps AthenaBaseComps-* Control +use AthenaKernel AthenaKernel-* Control use AtlasBoost AtlasBoost-* External use AtlasCLHEP AtlasCLHEP-* External use AtlasROOT AtlasROOT-* External +use G4AtlasInterfaces G4AtlasInterfaces-* Simulation/G4Atlas +use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas +use Geant4 Geant4-* External +use GeoMaterial2G4 GeoMaterial2G4-* Simulation/G4Utilities +use GeoModelKernel GeoModelKernel-* DetectorDescription/GeoModel +use GeoModelUtilities GeoModelUtilities-* DetectorDescription/GeoModel use GeoSpecialShapes GeoSpecialShapes-* DetectorDescription/GeoModel use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel use StoreGate StoreGate-* Control diff --git a/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.cxx b/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.cxx index f71a79fea30806d4bba81f18d199acbbea34de00..ab3fab44298c992ecd7d67069184cb7eed0a10a0 100644 --- a/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.cxx @@ -7,7 +7,7 @@ #include "Geo2G4AssemblyVolume.h" #include "Geo2G4LVFactory.h" #include "Geo2G4STParameterisation.h" -#include "Geo2G4/LogicalVolume.h" +#include "G4LogicalVolume.hh" #include "G4PVPlacement.hh" #include "G4ReflectionFactory.hh" @@ -35,7 +35,7 @@ ExtParameterisedVolumeBuilder::ExtParameterisedVolumeBuilder(std::string n): { } -LogicalVolume* ExtParameterisedVolumeBuilder::Build(const PVConstLink theGeoPhysVolume, OpticalVolumesMap* optical_volumes) const +G4LogicalVolume* ExtParameterisedVolumeBuilder::Build(const PVConstLink theGeoPhysVolume, OpticalVolumesMap* optical_volumes) const { PVConstLink theGeoPhysChild; const GeoSerialTransformer* serialTransformerChild=0; diff --git a/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.h b/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.h index d783851b34bfc08f034081cd6e9f6d59b788e327..3e2850347574aff0e5593e243fc30df59b039fb9 100644 --- a/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.h +++ b/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.h @@ -2,10 +2,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef ExtParameterisedVolumeBuilder_H -#define ExtParameterisedVolumeBuilder_H +#ifndef GEO2G4_ExtParameterisedVolumeBuilder_H +#define GEO2G4_ExtParameterisedVolumeBuilder_H -#include "Geo2G4/VolumeBuilder.h" +#include "VolumeBuilder.h" #include "AthenaKernel/MsgStreamMember.h" #include <string> @@ -17,7 +17,7 @@ class ExtParameterisedVolumeBuilder: public VolumeBuilder public: ExtParameterisedVolumeBuilder(std::string n); /// - LogicalVolume* Build(PVConstLink pv, OpticalVolumesMap* optical_volumes = 0) const; + G4LogicalVolume* Build(PVConstLink pv, OpticalVolumesMap* optical_volumes = 0) const; /// Geo2G4AssemblyVolume* BuildAssembly(PVConstLink pv) const; /// Log a message using the Athena controlled logging system diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4AssemblyFactory.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4AssemblyFactory.h index 57fb99fe3a58cea5e3d3b4ea2831e8c159d467ba..d659181334cf5d5fb5b60032f2264b24cd608229 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4AssemblyFactory.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4AssemblyFactory.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef Geo2G4AssemblyFactory_h -#define Geo2G4AssemblyFactory_h +#ifndef GEO2G4_Geo2G4AssemblyFactory_h +#define GEO2G4_Geo2G4AssemblyFactory_h #include "GeoModelKernel/GeoVPhysVol.h" diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx index cf160366d3c02e5ff10072fb87561808c8e4f615..521b3154cfe6d73ce44a2482954e57b44b795354 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx @@ -2,9 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "Geo2G4/Geo2G4Builder.h" -#include "Geo2G4/Geo2G4SvcAccessor.h" -#include "Geo2G4/Geo2G4SvcBase.h" +#include "Geo2G4Builder.h" +#include "Geo2G4SvcAccessor.h" +#include "G4AtlasInterfaces/Geo2G4SvcBase.h" #include "Geo2G4OpticalSurfaceFactory.h" #include "GeoModelKernel/GeoVDetectorManager.h" @@ -83,9 +83,9 @@ Geo2G4Builder::Geo2G4Builder(std::string detectorName): } } -LogicalVolume* Geo2G4Builder::BuildTree() +G4LogicalVolume* Geo2G4Builder::BuildTree() { - LogicalVolume* result = 0; + G4LogicalVolume* result = 0; OpticalVolumesMap* optical_volumes = 0; const GeoBorderSurfaceContainer* surface_container = 0; @@ -139,7 +139,7 @@ LogicalVolume* Geo2G4Builder::BuildTree() if (nameTT == "ANON") nameTT = pv->getLogVol()->getName(); - LogicalVolume* g4LV = theBuilder->Build(pv,optical_volumes); + G4LogicalVolume* g4LV = theBuilder->Build(pv,optical_volumes); G4ReflectionFactory::Instance()->Place(theG4Position, nameTT, g4LV, diff --git a/Simulation/G4Utilities/Geo2G4/Geo2G4/Geo2G4Builder.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h similarity index 91% rename from Simulation/G4Utilities/Geo2G4/Geo2G4/Geo2G4Builder.h rename to Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h index b31b331a9f7a8e952aca4505d995174de6f9c34f..dbb7050dfdfe2b79d5d9247217f55402a49806c0 100644 --- a/Simulation/G4Utilities/Geo2G4/Geo2G4/Geo2G4Builder.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h @@ -2,15 +2,15 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef Geo2G4Builder_H -#define Geo2G4Builder_H +#ifndef GEO2G4_Geo2G4Builder_H +#define GEO2G4_Geo2G4Builder_H // main builder to create/position all volumes described in a GeoModel Tree // GeoVPhysVol -#include "Geo2G4/VolumeBuilder.h" +#include "VolumeBuilder.h" #include "GeoModelKernel/GeoVPhysVol.h" -#include "Geo2G4/LogicalVolume.h" +#include "G4LogicalVolume.hh" //#include "Geo2G4/GenericVolumeBuilder.h" // Typedef @@ -34,7 +34,7 @@ public: ~Geo2G4Builder() {;} // Build method - geometry - LogicalVolume* BuildTree(); + G4LogicalVolume* BuildTree(); // Build method - optical surfaces void BuildOpticalSurfaces(const GeoBorderSurfaceContainer* surface_container, diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4LVFactory.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4LVFactory.cxx index 5a35d17bff2d24b3f06784718616f09627996dab..f20c86fa89832688d602a34550882c01dd277400 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4LVFactory.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4LVFactory.cxx @@ -4,7 +4,7 @@ #include "Geo2G4LVFactory.h" #include "Geo2G4SolidFactory.h" -#include "Geo2G4/Geo2G4MaterialFactory.h" +#include "GeoMaterial2G4/Geo2G4MaterialFactory.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoFullPhysVol.h" diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4LVFactory.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4LVFactory.h index cc94b779c7a3ec8812a7b7291ed1c3cbadb89e4b..3b75b06b8b60de804c5d9ab8be22c586da5141e1 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4LVFactory.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4LVFactory.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef Geo2G4LVFactory_h -#define Geo2G4LVFactory_h +#ifndef GEO2G4_Geo2G4LVFactory_h +#define GEO2G4_Geo2G4LVFactory_h #include "GeoModelKernel/GeoVPhysVol.h" diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4LogicalVolumeFactory.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4LogicalVolumeFactory.cxx index f50afb610c79b6a4413120001f184615ab875405..f37928cf0512f288c5a5e4db0362ae4a55e3eaf7 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4LogicalVolumeFactory.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4LogicalVolumeFactory.cxx @@ -4,7 +4,7 @@ #include "Geo2G4LogicalVolumeFactory.h" #include "Geo2G4SolidFactory.h" -#include "Geo2G4/Geo2G4MaterialFactory.h" +#include "GeoMaterial2G4/Geo2G4MaterialFactory.h" #include "GeoModelKernel/GeoLogVol.h" diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4LogicalVolumeFactory.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4LogicalVolumeFactory.h index 14ef54a6d887e9e96408e2e9d4e593430ec63541..fec63969084a9f86d29de585913a595e7a153ce7 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4LogicalVolumeFactory.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4LogicalVolumeFactory.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef Geo2G4LogicalVolumeFactory_h -#define Geo2G4LogicalVolumeFactory_h +#ifndef GEO2G4_Geo2G4LogicalVolumeFactory_h +#define GEO2G4_Geo2G4LogicalVolumeFactory_h class G4LogicalVolume; class GeoLogVol; diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4OpticalSurfaceFactory.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4OpticalSurfaceFactory.cxx index 06a60853ca22cc2e5ec2c4b63f8f5b61e9712b3d..e201044e4867349828c4f90c5418867ec51d20f8 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4OpticalSurfaceFactory.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4OpticalSurfaceFactory.cxx @@ -3,7 +3,7 @@ */ #include "Geo2G4OpticalSurfaceFactory.h" -#include "Geo2G4MatPropTableFactory.h" +#include "GeoMaterial2G4/Geo2G4MatPropTableFactory.h" #include "GeoModelUtilities/GeoOpticalSurface.h" diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4OpticalSurfaceFactory.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4OpticalSurfaceFactory.h index 41b15beeb7dc973afaab19c27b23084ae2fbb6e7..82b1929799ab53f60aeecbf2729a490399359a1c 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4OpticalSurfaceFactory.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4OpticalSurfaceFactory.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef Geo2G4OpticalSurfaceFactory_h -#define Geo2G4OpticalSurfaceFactory_h +#ifndef GEO2G4_Geo2G4OpticalSurfaceFactory_h +#define GEO2G4_Geo2G4OpticalSurfaceFactory_h #include <map> diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4STParameterisation.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4STParameterisation.h index 258af11b7a9adf6a69a51f67cf43cb3a8f386959..bba003a8eef4b3e3d79e64d2d38684c77afd3b40 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4STParameterisation.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4STParameterisation.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef Geo2G4STParameterisation_H -#define Geo2G4STParameterisation_H +#ifndef GEO2G4_Geo2G4STParameterisation_H +#define GEO2G4_Geo2G4STParameterisation_H #include "globals.hh" #include "G4VPVParameterisation.hh" diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.cxx index 2fe9c7394ba05ce781441e8069e3c03eac2c0a31..366f243519398b51a4ffcfffd3de71bdb8e90da1 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.cxx @@ -27,6 +27,7 @@ #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeIntersection.h" #include "GeoModelKernel/GeoShapeSubtraction.h" +#include "AthenaBaseComps/AthMsgStreamMacros.h" #include "G4VSolid.hh" #include "G4Box.hh" @@ -57,64 +58,64 @@ typedef std::map<const GeoShape*, G4VSolid*, std::less<const GeoShape*> > shapes typedef std::map<std::string, G4VSolid*,std::less<std::string> > customSolidMap; const Geo2G4SolidFactory::LArWheelSolid_typemap Geo2G4SolidFactory::s_lwsTypes = { - { "LAr::EMEC::InnerWheel::Absorber", {InnerAbsorberWheel, 1} }, - { "LAr::EMEC::Pos::InnerWheel::Absorber", {InnerAbsorberWheel, 1} }, + { "LAr::EMEC::InnerWheel::Absorber", {InnerAbsorberWheel, 1} }, + { "LAr::EMEC::Pos::InnerWheel::Absorber", {InnerAbsorberWheel, 1} }, - { "LAr::EMEC::OuterWheel::Absorber", {OuterAbsorberWheel, 1} }, - { "LAr::EMEC::Pos::OuterWheel::Absorber", {OuterAbsorberWheel, 1} }, + { "LAr::EMEC::OuterWheel::Absorber", {OuterAbsorberWheel, 1} }, + { "LAr::EMEC::Pos::OuterWheel::Absorber", {OuterAbsorberWheel, 1} }, - { "LAr::EMEC::InnerWheel::Electrode", {InnerElectrodWheel, 1} }, - { "LAr::EMEC::Pos::InnerWheel::Electrode", {InnerElectrodWheel, 1} }, + { "LAr::EMEC::InnerWheel::Electrode", {InnerElectrodWheel, 1} }, + { "LAr::EMEC::Pos::InnerWheel::Electrode", {InnerElectrodWheel, 1} }, - { "LAr::EMEC::OuterWheel::Electrode", {OuterElectrodWheel, 1} }, - { "LAr::EMEC::Pos::OuterWheel::Electrode", {OuterElectrodWheel, 1} }, + { "LAr::EMEC::OuterWheel::Electrode", {OuterElectrodWheel, 1} }, + { "LAr::EMEC::Pos::OuterWheel::Electrode", {OuterElectrodWheel, 1} }, - { "LAr::EMEC::Neg::InnerWheel::Absorber", {InnerAbsorberWheel, -1} }, + { "LAr::EMEC::Neg::InnerWheel::Absorber", {InnerAbsorberWheel, -1} }, - { "LAr::EMEC::Neg::OuterWheel::Absorber", {OuterAbsorberWheel, -1} }, + { "LAr::EMEC::Neg::OuterWheel::Absorber", {OuterAbsorberWheel, -1} }, - { "LAr::EMEC::Neg::InnerWheel::Electrode", {InnerElectrodWheel, -1} }, + { "LAr::EMEC::Neg::InnerWheel::Electrode", {InnerElectrodWheel, -1} }, - { "LAr::EMEC::Neg::OuterWheel::Electrode", {OuterElectrodWheel, -1} }, + { "LAr::EMEC::Neg::OuterWheel::Electrode", {OuterElectrodWheel, -1} }, - { "LAr::EMEC::InnerModule::Absorber", {InnerAbsorberModule, 1} }, + { "LAr::EMEC::InnerModule::Absorber", {InnerAbsorberModule, 1} }, - { "LAr::EMEC::OuterModule::Absorber", {OuterAbsorberModule, 1} }, + { "LAr::EMEC::OuterModule::Absorber", {OuterAbsorberModule, 1} }, - { "LAr::EMEC::InnerModule::Electrode", {InnerElectrodModule, 1} }, + { "LAr::EMEC::InnerModule::Electrode", {InnerElectrodModule, 1} }, - { "LAr::EMEC::OuterModule::Electrode", {OuterElectrodModule, 1} }, + { "LAr::EMEC::OuterModule::Electrode", {OuterElectrodModule, 1} }, - { "LAr::EMEC::InnerWheel::Glue", {InnerGlueWheel, 1} }, - { "LAr::EMEC::Pos::InnerWheel::Glue", {InnerGlueWheel, 1} }, + { "LAr::EMEC::InnerWheel::Glue", {InnerGlueWheel, 1} }, + { "LAr::EMEC::Pos::InnerWheel::Glue", {InnerGlueWheel, 1} }, - { "LAr::EMEC::InnerWheel::Lead", {InnerLeadWheel, 1} }, - { "LAr::EMEC::Pos::InnerWheel::Lead", {InnerLeadWheel, 1} }, + { "LAr::EMEC::InnerWheel::Lead", {InnerLeadWheel, 1} }, + { "LAr::EMEC::Pos::InnerWheel::Lead", {InnerLeadWheel, 1} }, - { "LAr::EMEC::OuterWheel::Glue", {OuterGlueWheel, 1} }, - { "LAr::EMEC::Pos::OuterWheel::Glue", {OuterGlueWheel, 1} }, + { "LAr::EMEC::OuterWheel::Glue", {OuterGlueWheel, 1} }, + { "LAr::EMEC::Pos::OuterWheel::Glue", {OuterGlueWheel, 1} }, - { "LAr::EMEC::OuterWheel::Lead", {OuterLeadWheel, 1} }, - { "LAr::EMEC::Pos::OuterWheel::Lead", {OuterLeadWheel, 1} }, + { "LAr::EMEC::OuterWheel::Lead", {OuterLeadWheel, 1} }, + { "LAr::EMEC::Pos::OuterWheel::Lead", {OuterLeadWheel, 1} }, - { "LAr::EMEC::Neg::InnerWheel::Glue", {InnerGlueWheel, -1} }, + { "LAr::EMEC::Neg::InnerWheel::Glue", {InnerGlueWheel, -1} }, - { "LAr::EMEC::Neg::OuterWheel::Glue", {OuterGlueWheel, -1} }, + { "LAr::EMEC::Neg::OuterWheel::Glue", {OuterGlueWheel, -1} }, - { "LAr::EMEC::Neg::InnerWheel::Lead", {InnerLeadWheel, -1} }, + { "LAr::EMEC::Neg::InnerWheel::Lead", {InnerLeadWheel, -1} }, - { "LAr::EMEC::Neg::OuterWheel::Lead", {OuterLeadWheel, -1} } + { "LAr::EMEC::Neg::OuterWheel::Lead", {OuterLeadWheel, -1} } }; Geo2G4SolidFactory::Geo2G4SolidFactory() : - m_msg("Geo2G4SolidFactory"), - m_detStore( "StoreGateSvc/DetectorStore", "Geo2G4SolidFactory" ) + m_msg("Geo2G4SolidFactory"), + m_detStore( "StoreGateSvc/DetectorStore", "Geo2G4SolidFactory" ) { } G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) const { - G4VSolid* theSolid; + G4VSolid* theSolid(nullptr); static customSolidMap customSolids; static shapesMap sharedShapes; @@ -122,13 +123,13 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) return sharedShapes[geoShape]; // ------- Variables for boolean operations - G4VSolid* solidA = 0; - G4VSolid* solidB = 0; + G4VSolid* solidA(nullptr); + G4VSolid* solidB(nullptr); // ------- Variables for Pcon and Pgon int nPlanes; - double* zPlane = 0; - double* rInner = 0; - double* rOuter = 0; + double* zPlane(nullptr); + double* rInner(nullptr); + double* rOuter(nullptr); std::string n = name; @@ -138,11 +139,11 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) if(geoShape->typeID() == GeoBox::getClassTypeID() ) { const GeoBox* theBox = dynamic_cast<const GeoBox*> (geoShape); - if (0==theBox) throw std::runtime_error("TypeID did not match cast for box"); + if (nullptr==theBox) throw std::runtime_error("TypeID did not match cast for box"); if (n.empty()) n="G4Box"; - if (theBox->getXHalfLength()<=0.){ msg(MSG::WARNING) << "Box " << n << " has an x side of " << theBox->getXHalfLength() <<" - using std::abs." << endmsg;} - if (theBox->getYHalfLength()<=0.){ msg(MSG::WARNING) << "Box " << n << " has an y side of " << theBox->getYHalfLength() <<" - using std::abs." << endmsg;} - if (theBox->getZHalfLength()<=0.){ msg(MSG::WARNING) << "Box " << n << " has an z side of " << theBox->getZHalfLength() <<" - using std::abs." << endmsg;} + if (theBox->getXHalfLength()<=0.){ ATH_MSG_WARNING("Box " << n << " has an x side of " << theBox->getXHalfLength() <<" - using std::abs.");} + if (theBox->getYHalfLength()<=0.){ ATH_MSG_WARNING("Box " << n << " has an y side of " << theBox->getYHalfLength() <<" - using std::abs.");} + if (theBox->getZHalfLength()<=0.){ ATH_MSG_WARNING("Box " << n << " has an z side of " << theBox->getZHalfLength() <<" - using std::abs.");} theSolid = new G4Box(n, std::abs(theBox->getXHalfLength()), std::abs(theBox->getYHalfLength()), @@ -154,11 +155,11 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if(geoShape->typeID() == GeoTube::getClassTypeID() ) { const GeoTube* theTube = dynamic_cast<const GeoTube*> (geoShape); - if (0==theTube) throw std::runtime_error("TypeID did not match cast for tube"); + if (nullptr==theTube) throw std::runtime_error("TypeID did not match cast for tube"); if (n.empty()) n="G4Tube"; - if (theTube->getRMax()<=0.){ msg(MSG::WARNING) << "Tube " << n << " has a max radius of " << theTube->getRMax() <<" - using std::abs." << endmsg;} - if (theTube->getZHalfLength()<=0.){ msg(MSG::WARNING) << "Tube " << n << " has a z half length of " << theTube->getZHalfLength() << " - using std::abs." << endmsg;} - if (theTube->getRMax()<theTube->getRMin()){ msg(MSG::WARNING) << "Tube " << n << " has a max radius of " << theTube->getRMax() << " and a min radius of " << theTube->getRMin() << endmsg;} + if (theTube->getRMax()<=0.){ ATH_MSG_WARNING("Tube " << n << " has a max radius of " << theTube->getRMax() <<" - using std::abs.");} + if (theTube->getZHalfLength()<=0.){ ATH_MSG_WARNING("Tube " << n << " has a z half length of " << theTube->getZHalfLength() << " - using std::abs.");} + if (theTube->getRMax()<theTube->getRMin()){ ATH_MSG_WARNING("Tube " << n << " has a max radius of " << theTube->getRMax() << " and a min radius of " << theTube->getRMin());} theSolid = new G4Tubs(n, theTube->getRMin(), std::abs(theTube->getRMax()), @@ -171,13 +172,13 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if(geoShape->typeID() == GeoTubs::getClassTypeID() ) { const GeoTubs* theTubs = dynamic_cast<const GeoTubs*> (geoShape); - if (0==theTubs) throw std::runtime_error("TypeID did not match cast for tubs"); + if (nullptr==theTubs) throw std::runtime_error("TypeID did not match cast for tubs"); if (n.empty()) n="G4Tubs"; - if (theTubs->getRMin()<0.){ msg(MSG::WARNING) << "Tubs " << n << " has a min radius of " << theTubs->getRMax() << endmsg;} - if (theTubs->getRMax()<=0.){ msg(MSG::WARNING) << "Tubs " << n << " has a max radius of " << theTubs->getRMax() <<" - using std::abs." << endmsg;} - if (theTubs->getZHalfLength()<=0.){ msg(MSG::WARNING) << "Tubs " << n << " has a half length of " << theTubs->getZHalfLength() <<" - using std::abs." << endmsg;} - if (theTubs->getRMax()<theTubs->getRMin()){ msg(MSG::WARNING) << "Tubs " << n << " has a max radius of " << theTubs->getRMax() << " and a min radius of " << theTubs->getRMin() << endmsg;} - if (theTubs->getDPhi()<=0.){ msg(MSG::WARNING) << "Tubs " << n << " has a dPhi of " << theTubs->getDPhi() << endmsg;} + if (theTubs->getRMin()<0.){ ATH_MSG_WARNING("Tubs " << n << " has a min radius of " << theTubs->getRMax());} + if (theTubs->getRMax()<=0.){ ATH_MSG_WARNING("Tubs " << n << " has a max radius of " << theTubs->getRMax() <<" - using std::abs.");} + if (theTubs->getZHalfLength()<=0.){ ATH_MSG_WARNING("Tubs " << n << " has a half length of " << theTubs->getZHalfLength() <<" - using std::abs.");} + if (theTubs->getRMax()<theTubs->getRMin()){ ATH_MSG_WARNING("Tubs " << n << " has a max radius of " << theTubs->getRMax() << " and a min radius of " << theTubs->getRMin());} + if (theTubs->getDPhi()<=0.){ ATH_MSG_WARNING("Tubs " << n << " has a dPhi of " << theTubs->getDPhi());} theSolid = new G4Tubs(n, theTubs->getRMin(), std::abs(theTubs->getRMax()), @@ -191,17 +192,17 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if(geoShape->typeID() == GeoTrd::getClassTypeID() ) { const GeoTrd* theTrd = dynamic_cast<const GeoTrd*> (geoShape); - if (0==theTrd) throw std::runtime_error("TypeID did not match cast for trd"); + if (nullptr==theTrd) throw std::runtime_error("TypeID did not match cast for trd"); if (n.empty()) n="G4Trd"; - if (theTrd->getXHalfLength1()<0.){ msg(MSG::WARNING) << "Trd " << n << " has a x half length 1 of " << theTrd->getXHalfLength1() << " - using std::abs." << endmsg;} - if (theTrd->getXHalfLength2()<0.){ msg(MSG::WARNING) << "Trd " << n << " has a x half length 2 of " << theTrd->getXHalfLength2() << " - using std::abs." << endmsg;} - if (theTrd->getYHalfLength1()<0.){ msg(MSG::WARNING) << "Trd " << n << " has a y half length 1 of " << theTrd->getYHalfLength1() << " - using std::abs." << endmsg;} - if (theTrd->getYHalfLength2()<0.){ msg(MSG::WARNING) << "Trd " << n << " has a y half length 2 of " << theTrd->getYHalfLength2() << " - using std::abs." << endmsg;} - if (theTrd->getZHalfLength()<=0.){ msg(MSG::WARNING) << "Trd " << n << " has a z half length of " << theTrd->getZHalfLength() << " - using std::abs." << endmsg;} - if (theTrd->getXHalfLength1()<=0. && theTrd->getXHalfLength2()<=0.){ msg(MSG::WARNING) << "Trd " << n << " has an x half length 1 of " << theTrd->getXHalfLength1() - << " and an x half length 2 of " << theTrd->getXHalfLength2() << " - using std::abs." << endmsg;} - if (theTrd->getYHalfLength1()<=0. && theTrd->getYHalfLength2()<=0.){ msg(MSG::WARNING) << "Trd " << n << " has a y half length 1 of " << theTrd->getYHalfLength1() - << " and a y half length 2 of " << theTrd->getYHalfLength2() << " - using std::abs." << endmsg;} + if (theTrd->getXHalfLength1()<0.){ ATH_MSG_WARNING("Trd " << n << " has a x half length 1 of " << theTrd->getXHalfLength1() << " - using std::abs.");} + if (theTrd->getXHalfLength2()<0.){ ATH_MSG_WARNING("Trd " << n << " has a x half length 2 of " << theTrd->getXHalfLength2() << " - using std::abs.");} + if (theTrd->getYHalfLength1()<0.){ ATH_MSG_WARNING("Trd " << n << " has a y half length 1 of " << theTrd->getYHalfLength1() << " - using std::abs.");} + if (theTrd->getYHalfLength2()<0.){ ATH_MSG_WARNING("Trd " << n << " has a y half length 2 of " << theTrd->getYHalfLength2() << " - using std::abs.");} + if (theTrd->getZHalfLength()<=0.){ ATH_MSG_WARNING("Trd " << n << " has a z half length of " << theTrd->getZHalfLength() << " - using std::abs.");} + if (theTrd->getXHalfLength1()<=0. && theTrd->getXHalfLength2()<=0.){ ATH_MSG_WARNING("Trd " << n << " has an x half length 1 of " << theTrd->getXHalfLength1() + << " and an x half length 2 of " << theTrd->getXHalfLength2() << " - using std::abs.");} + if (theTrd->getYHalfLength1()<=0. && theTrd->getYHalfLength2()<=0.){ ATH_MSG_WARNING("Trd " << n << " has a y half length 1 of " << theTrd->getYHalfLength1() + << " and a y half length 2 of " << theTrd->getYHalfLength2() << " - using std::abs.");} theSolid = new G4Trd(n, std::abs(theTrd->getXHalfLength1()), std::abs(theTrd->getXHalfLength2()), @@ -215,7 +216,7 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if(geoShape->typeID() == GeoPcon::getClassTypeID()) { const GeoPcon* thePcon = dynamic_cast<const GeoPcon*>(geoShape); - if (0==thePcon) throw std::runtime_error("TypeID did not match cast for pcon"); + if (nullptr==thePcon) throw std::runtime_error("TypeID did not match cast for pcon"); if (n.empty()) n="G4Polycone"; nPlanes = static_cast<int>(thePcon->getNPlanes()); zPlane = new double[nPlanes]; @@ -226,9 +227,9 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) zPlane[index] = thePcon->getZPlane(index); rInner[index] = thePcon->getRMinPlane(index); rOuter[index] = thePcon->getRMaxPlane(index); - if (rInner[index]<0.){ msg(MSG::WARNING) << "PCon " << n << " has an inner radius of " << rInner[index] << " for slice " << index << " of " << nPlanes << endmsg;} + if (rInner[index]<0.){ ATH_MSG_WARNING("PCon " << n << " has an inner radius of " << rInner[index] << " for slice " << index << " of " << nPlanes);} if (rOuter[index]<=0.){ - msg(MSG::WARNING) << "PCon " << n << " has an outer radius of " << rOuter[index] << " for slice " << index << " of " << nPlanes << " - using std::abs." << endmsg; + ATH_MSG_WARNING("PCon " << n << " has an outer radius of " << rOuter[index] << " for slice " << index << " of " << nPlanes << " - using std::abs."); rOuter[index] = std::abs(rOuter[index]); } } @@ -247,15 +248,15 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if(geoShape->typeID() == GeoCons::getClassTypeID()) { const GeoCons* theCons = dynamic_cast<const GeoCons*>(geoShape); - if (0==theCons) throw std::runtime_error("TypeID did not match cast for cons"); + if (nullptr==theCons) throw std::runtime_error("TypeID did not match cast for cons"); if (n.empty()) n="G4Cons"; - if (theCons->getRMax1()<0.){ msg(MSG::WARNING) << "Cons " << n << " has a max radius 1 of " << theCons->getRMax1() << " - will use std::abs." << endmsg;} - if (theCons->getRMax2()<0.){ msg(MSG::WARNING) << "Cons " << n << " has a max radius 2 of " << theCons->getRMax2() << " - will use std::abs." << endmsg;} - if (theCons->getRMin1()<0.){ msg(MSG::WARNING) << "Cons " << n << " has a min radius 1 of " << theCons->getRMin1() << endmsg;} - if (theCons->getRMin2()<0.){ msg(MSG::WARNING) << "Cons " << n << " has a min radius 2 of " << theCons->getRMin2() << endmsg;} - if (theCons->getDZ()<=0){ msg(MSG::WARNING) << "Cons " << n << " has a DZ of " << theCons->getDZ() << " - will use std::abs." << endmsg;} - if (theCons->getRMax1()<=0. && theCons->getRMax2()<=0.){ msg(MSG::WARNING) << "Cons " << n << " has a max radius 1 of " << theCons->getRMax1() - << " and a max radius 2 of " << theCons->getRMax2() << " - will use std::abs." << endmsg;} + if (theCons->getRMax1()<0.){ ATH_MSG_WARNING("Cons " << n << " has a max radius 1 of " << theCons->getRMax1() << " - will use std::abs.");} + if (theCons->getRMax2()<0.){ ATH_MSG_WARNING("Cons " << n << " has a max radius 2 of " << theCons->getRMax2() << " - will use std::abs.");} + if (theCons->getRMin1()<0.){ ATH_MSG_WARNING("Cons " << n << " has a min radius 1 of " << theCons->getRMin1());} + if (theCons->getRMin2()<0.){ ATH_MSG_WARNING("Cons " << n << " has a min radius 2 of " << theCons->getRMin2());} + if (theCons->getDZ()<=0){ ATH_MSG_WARNING("Cons " << n << " has a DZ of " << theCons->getDZ() << " - will use std::abs.");} + if (theCons->getRMax1()<=0. && theCons->getRMax2()<=0.){ ATH_MSG_WARNING("Cons " << n << " has a max radius 1 of " << theCons->getRMax1() + << " and a max radius 2 of " << theCons->getRMax2() << " - will use std::abs.");} theSolid = new G4Cons(n, theCons->getRMin1(), std::abs(theCons->getRMax1()), @@ -271,11 +272,11 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if(geoShape->typeID() == GeoPara::getClassTypeID()) { const GeoPara* thePara = dynamic_cast<const GeoPara*>(geoShape); - if (0==thePara) throw std::runtime_error("TypeID did not match cast for para"); + if (nullptr==thePara) throw std::runtime_error("TypeID did not match cast for para"); if (n.empty()) n="G4Para"; - if (thePara->getXHalfLength()<=0.){ msg(MSG::WARNING) << "Para " << n << " has an x side of " << thePara->getXHalfLength() <<" - using std::abs." << endmsg;} - if (thePara->getYHalfLength()<=0.){ msg(MSG::WARNING) << "Para " << n << " has an y side of " << thePara->getYHalfLength() <<" - using std::abs." << endmsg;} - if (thePara->getZHalfLength()<=0.){ msg(MSG::WARNING) << "Para " << n << " has an z side of " << thePara->getZHalfLength() <<" - using std::abs." << endmsg;} + if (thePara->getXHalfLength()<=0.){ ATH_MSG_WARNING("Para " << n << " has an x side of " << thePara->getXHalfLength() <<" - using std::abs.");} + if (thePara->getYHalfLength()<=0.){ ATH_MSG_WARNING("Para " << n << " has an y side of " << thePara->getYHalfLength() <<" - using std::abs.");} + if (thePara->getZHalfLength()<=0.){ ATH_MSG_WARNING("Para " << n << " has an z side of " << thePara->getZHalfLength() <<" - using std::abs.");} theSolid = new G4Para(n, std::abs(thePara->getXHalfLength()), std::abs(thePara->getYHalfLength()), @@ -290,7 +291,7 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if(geoShape->typeID() == GeoPgon::getClassTypeID()) { const GeoPgon* thePgon = dynamic_cast<const GeoPgon*>(geoShape); - if (0==thePgon) throw std::runtime_error("TypeID did not match cast for pgon"); + if (nullptr==thePgon) throw std::runtime_error("TypeID did not match cast for pgon"); if (n.empty()) n="G4Polyhedra"; nPlanes = static_cast<int>(thePgon->getNPlanes()); zPlane = new double[nPlanes]; @@ -302,9 +303,9 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) zPlane[index] = thePgon->getZPlane(index); rInner[index] = thePgon->getRMinPlane(index)*cos(alpha); rOuter[index] = thePgon->getRMaxPlane(index)*cos(alpha); - if (rInner[index]<0.){ msg(MSG::WARNING) << "Pgon " << n << " has an inner radius of " << rInner[index] << " for slice " << index << " of " << nPlanes << endmsg;} + if (rInner[index]<0.){ ATH_MSG_WARNING("Pgon " << n << " has an inner radius of " << rInner[index] << " for slice " << index << " of " << nPlanes);} if (rOuter[index]<=0.){ - msg(MSG::WARNING) << "Pgon " << n << " has an outer radius of " << rOuter[index] << " for slice " << index << " of " << nPlanes << " - using std::abs." << endmsg; + ATH_MSG_WARNING("Pgon " << n << " has an outer radius of " << rOuter[index] << " for slice " << index << " of " << nPlanes << " - using std::abs."); rOuter[index] = std::abs(rOuter[index]); } } @@ -324,9 +325,9 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if(geoShape->typeID() == GeoTrap::getClassTypeID()) { const GeoTrap* theTrap = dynamic_cast<const GeoTrap*>(geoShape); - if (0==theTrap) throw std::runtime_error("TypeID did not match cast for trap"); + if (nullptr==theTrap) throw std::runtime_error("TypeID did not match cast for trap"); if (n.empty()) n="G4Trap"; - if (theTrap->getZHalfLength()<=0.){ msg(MSG::WARNING) << "Trap " << n << " has an z side of " << theTrap->getZHalfLength() <<" - using std::abs." << endmsg;} + if (theTrap->getZHalfLength()<=0.){ ATH_MSG_WARNING("Trap " << n << " has an z side of " << theTrap->getZHalfLength() <<" - using std::abs.");} theSolid = new G4Trap(n, std::abs(theTrap->getZHalfLength()), theTrap->getTheta(), @@ -346,7 +347,7 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if(geoShape->typeID() == GeoSimplePolygonBrep::getClassTypeID()) { const GeoSimplePolygonBrep* theBrep = dynamic_cast<const GeoSimplePolygonBrep*>(geoShape); - if (0==theBrep) throw std::runtime_error("TypeID did not match cast for brep"); + if (nullptr==theBrep) throw std::runtime_error("TypeID did not match cast for brep"); if (n.empty()) n="G4ExtrudedSolid"; double dz = theBrep->getDZ(); int nVertices = theBrep->getNVertices(); @@ -365,14 +366,14 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if(geoShape->typeID() == GeoTessellatedSolid::getClassTypeID()) { const GeoTessellatedSolid* theTessellated = dynamic_cast<const GeoTessellatedSolid*>(geoShape); - if (0==theTessellated) throw std::runtime_error("TypeID did not match cast for tessellated solid"); + if (nullptr==theTessellated) throw std::runtime_error("TypeID did not match cast for tessellated solid"); if(n.empty()) n="G4TessellatedSolid"; G4TessellatedSolid* g4Tessellated = new G4TessellatedSolid(n); for(size_t i=0; i<theTessellated->getNumberOfFacets(); ++i) { GeoFacet* geoFacet = theTessellated->getFacet(i); G4FacetVertexType vertexType = (geoFacet->getVertexType()==GeoFacet::ABSOLUTE? ABSOLUTE : RELATIVE); - G4VFacet* g4Facet(0); + G4VFacet* g4Facet(nullptr); if(geoFacet->getNumberOfVertices()==3) g4Facet = new G4TriangularFacet(geoFacet->getVertex(0), geoFacet->getVertex(1), @@ -396,12 +397,12 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if(geoShape->typeID() == GeoEllipticalTube::getClassTypeID()) { const GeoEllipticalTube* theEltube = dynamic_cast<const GeoEllipticalTube*>(geoShape); - if (0==theEltube) throw std::runtime_error("TypeID did not match cast for elliptical tube"); + if (nullptr==theEltube) throw std::runtime_error("TypeID did not match cast for elliptical tube"); if (n.empty()) n="G4EllipticalTube"; - if (theEltube->getXHalfLength()<=0.){ msg(MSG::WARNING) << "Eltube " << n << " has an x side of " << theEltube->getXHalfLength() <<" - using std::abs." << endmsg;} - if (theEltube->getYHalfLength()<=0.){ msg(MSG::WARNING) << "Eltube " << n << " has an y side of " << theEltube->getYHalfLength() <<" - using std::abs." << endmsg;} - if (theEltube->getZHalfLength()<=0.){ msg(MSG::WARNING) << "Eltube " << n << " has an z side of " << theEltube->getZHalfLength() <<" - using std::abs." << endmsg;} + if (theEltube->getXHalfLength()<=0.){ ATH_MSG_WARNING("Eltube " << n << " has an x side of " << theEltube->getXHalfLength() <<" - using std::abs.");} + if (theEltube->getYHalfLength()<=0.){ ATH_MSG_WARNING("Eltube " << n << " has an y side of " << theEltube->getYHalfLength() <<" - using std::abs.");} + if (theEltube->getZHalfLength()<=0.){ ATH_MSG_WARNING("Eltube " << n << " has an z side of " << theEltube->getZHalfLength() <<" - using std::abs.");} G4EllipticalTube* g4Eltube = new G4EllipticalTube(n ,std::abs(theEltube->getXHalfLength()) ,std::abs(theEltube->getYHalfLength()) @@ -413,24 +414,24 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) // else if(geoShape->typeID() == GeoTorus::getClassTypeID() ) { const GeoTorus* theTorus = dynamic_cast<const GeoTorus*> (geoShape); - if (0==theTorus) throw std::runtime_error("TypeID did not match cast for torus"); + if (nullptr==theTorus) throw std::runtime_error("TypeID did not match cast for torus"); if (n.empty()) n="G4Torus"; - + theSolid = new G4Torus(n, - theTorus->getRMin(), - theTorus->getRMax(), - theTorus->getRTor(), - theTorus->getSPhi(), - theTorus->getDPhi()); + theTorus->getRMin(), + theTorus->getRMax(), + theTorus->getRTor(), + theTorus->getSPhi(), + theTorus->getDPhi()); } // // Generic Trap // else if(geoShape->typeID() == GeoGenericTrap::getClassTypeID()) { const GeoGenericTrap* theGenTrap = dynamic_cast<const GeoGenericTrap*>(geoShape); - if (0==theGenTrap) throw std::runtime_error("TypeID did not match cast for generic trap"); + if (nullptr==theGenTrap) throw std::runtime_error("TypeID did not match cast for generic trap"); if (n.empty()) n="G4GenericTrap"; - if (theGenTrap->getZHalfLength()<=0.){ msg(MSG::WARNING) << "GenTrap " << n << " has an z side of " << theGenTrap->getZHalfLength() <<" - using std::abs." << endmsg;} + if (theGenTrap->getZHalfLength()<=0.){ ATH_MSG_WARNING("GenTrap " << n << " has an z side of " << theGenTrap->getZHalfLength() <<" - using std::abs.");} G4GenericTrap* g4GenTrap = new G4GenericTrap(n ,std::abs(theGenTrap->getZHalfLength()) ,theGenTrap->getVertices()); @@ -446,7 +447,7 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if (geoShape->typeID() == GeoShapeShift::getClassTypeID() ) { const GeoShapeShift* theShapeShift = dynamic_cast<const GeoShapeShift*> (geoShape); - if (0==theShapeShift) throw std::runtime_error("TypeID did not match cast for shape shift"); + if (nullptr==theShapeShift) throw std::runtime_error("TypeID did not match cast for shape shift"); if (n.empty()) n="DisplacedSolid"; G4VSolid * undisplacedSolid = Build(theShapeShift->getOp()); theSolid = new G4DisplacedSolid(n, undisplacedSolid, theShapeShift->getX()); @@ -457,7 +458,7 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if (geoShape->typeID() == GeoShapeUnion::getClassTypeID() ) { const GeoShapeUnion* theUnion = dynamic_cast<const GeoShapeUnion*> (geoShape); - if (0==theUnion) throw std::runtime_error("TypeID did not match cast for union"); + if (nullptr==theUnion) throw std::runtime_error("TypeID did not match cast for union"); if (n.empty()) n="Union"; solidA = Build(theUnion->getOpA()); solidB = Build(theUnion->getOpB()); @@ -469,7 +470,7 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if (geoShape->typeID() == GeoShapeIntersection::getClassTypeID() ) { const GeoShapeIntersection* theIntersection = dynamic_cast<const GeoShapeIntersection*>(geoShape); - if (0==theIntersection) throw std::runtime_error("TypeID did not match cast for intersection"); + if (nullptr==theIntersection) throw std::runtime_error("TypeID did not match cast for intersection"); if (n.empty()) n="Intersection"; solidA = Build(theIntersection->getOpA()); solidB = Build(theIntersection->getOpB()); @@ -481,7 +482,7 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if (geoShape->typeID() == GeoShapeSubtraction::getClassTypeID() ) { const GeoShapeSubtraction* theSubtraction = dynamic_cast<const GeoShapeSubtraction*>(geoShape); - if (0==theSubtraction) throw std::runtime_error("TypeID did not match cast for subtraction"); + if (nullptr==theSubtraction) throw std::runtime_error("TypeID did not match cast for subtraction"); if (n.empty()) n="Subtraction"; solidA = Build(theSubtraction->getOpA()); solidB = Build(theSubtraction->getOpB()); @@ -493,14 +494,14 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) else if(geoShape->typeID() == LArCustomShape::getClassTypeID()) { const LArCustomShape* customShape = dynamic_cast<const LArCustomShape*> (geoShape); - if (0==customShape) throw std::runtime_error("TypeID did not match cast for custom shape"); + if (nullptr==customShape) throw std::runtime_error("TypeID did not match cast for custom shape"); std::string customName = customShape->name(); customSolidMap::const_iterator it = customSolids.find(customName); if(it!=customSolids.end()) theSolid = it->second; else { - theSolid = 0; + theSolid = nullptr; // if(customName == "LAr::EMEC::InnerWheel::Absorber" || customName == "LAr::EMEC::Pos::InnerWheel::Absorber"){ // theSolid = new LArWheelSolid(customName, InnerAbsorberWheel, 1); // } else if(customName == "LAr::EMEC::OuterWheel::Absorber" || customName == "LAr::EMEC::Pos::OuterWheel::Absorber"){ @@ -543,13 +544,13 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) // theSolid = new LArWheelSolid(customName, OuterLeadWheel, -1); // } - theSolid = createLArWheelSolid(customName, s_lwsTypes.at(customName) ); // map.at throws std::out_of_range exception on unknown shape name - if ( 0 == theSolid ) { - std::string error = std::string("Can't create LArWheelSolid for name ") + customName + " in Geo2G4SolidFactory::Build"; - throw std::runtime_error(error); - } + theSolid = createLArWheelSolid(customName, s_lwsTypes.at(customName) ); // map.at throws std::out_of_range exception on unknown shape name + if ( nullptr == theSolid ) { + std::string error = std::string("Can't create LArWheelSolid for name ") + customName + " in Geo2G4SolidFactory::Build"; + throw std::runtime_error(error); + } - if(theSolid != 0) customSolids[customName] = theSolid; + if(theSolid != nullptr) customSolids[customName] = theSolid; } } // @@ -557,10 +558,10 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) // else { - msg(MSG::FATAL) << "Sorry this solid is not yet implemented... " <<endmsg; - msg(MSG::FATAL) << geoShape->type() << endmsg; - msg(MSG::FATAL) << "You will have a core dump..." << endmsg; - return 0; + ATH_MSG_FATAL("Sorry this solid is not yet implemented... "); + ATH_MSG_FATAL(geoShape->type()); + ATH_MSG_FATAL("You will have a core dump..."); + return nullptr; } sharedShapes[geoShape] = theSolid; @@ -568,17 +569,16 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) } G4VSolid* Geo2G4SolidFactory::createLArWheelSolid(const std::string& name, const LArWheelSolidDef_t & lwsdef) const { // LArWheelSolid_t wheelType, int zside - LArWheelSolid_t wheelType = lwsdef.first; - int zside = lwsdef.second; - + LArWheelSolid_t wheelType = lwsdef.first; + int zside = lwsdef.second; + LArWheelSolid * theLWS = new LArWheelSolid(name, wheelType, zside); - LArWheelSolidDDProxy * theLWS_p = new LArWheelSolidDDProxy(theLWS); - // ownership is passed to detStore - if ( detStore()->record(theLWS_p, name).isFailure() ) { - msg(MSG::WARNING) << "Can't store proxy for LArWheelSolid to the DetectorStore" <<endmsg; - delete theLWS_p; - } - return theLWS; + LArWheelSolidDDProxy * theLWS_p = new LArWheelSolidDDProxy(theLWS); + // ownership is passed to detStore + if ( detStore()->record(theLWS_p, name).isFailure() ) { + ATH_MSG_WARNING("Can't store proxy for LArWheelSolid to the DetectorStore"); + delete theLWS_p; + } + return theLWS; } - diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.h index 5caa38685e787420176f24cc293cc76ff4e65678..c91303d0fcee1d250e46992d4bdeb33e2e42da18 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef Geo2G4SolidFactory_h -#define Geo2G4SolidFactory_h +#ifndef GEO2G4_Geo2G4SolidFactory_h +#define GEO2G4_Geo2G4SolidFactory_h #include <map> #include <string> diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Svc.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Svc.cxx index 3f08d6f379eebbaca62c14f63d92fd592c180522..e9b97ec0cd84ef74d480ff4d27a779597a0e6dfd 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Svc.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Svc.cxx @@ -3,19 +3,15 @@ */ #include "Geo2G4Svc.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/IIncidentSvc.h" -#include "GaudiKernel/Incident.h" -#include "GaudiKernel/IIncidentListener.h" -#include "StoreGate/StoreGateSvc.h" - -#include "Geo2G4/Geo2G4SvcAccessor.h" -#include "Geo2G4/VolumeBuilder.h" +#include "VolumeBuilder.h" void InitializeBuilders(); -Geo2G4Svc::Geo2G4Svc(const std::string& n, ISvcLocator* svc): - AthService(n,svc),m_pIncSvc(0),defaultBuilder(0),m_getTopTransform(true) +Geo2G4Svc::Geo2G4Svc(const std::string& name, ISvcLocator* svcLocator) + : AthService(name,svcLocator) + , m_pIncSvc(nullptr) + , m_defaultBuilder(nullptr) + , m_getTopTransform(true) { ATH_MSG_VERBOSE ("Creating the Geo2G4Svc."); declareProperty("GetTopTransform", m_getTopTransform); @@ -27,23 +23,23 @@ StatusCode Geo2G4Svc::initialize() { static int initialized=0; if (initialized) - ATH_MSG_VERBOSE (" Geo2G4Svc already initialized."); - else { - ATH_MSG_VERBOSE ("Initializing the Geo2G4Svc."); - ATH_MSG_VERBOSE ("Creating all builders available."); - InitializeBuilders(); - - const std::string nameBuilder = "Extended_Parameterised_Volume_Builder"; //TODO Configurable property?? - SetDefaultBuilder(nameBuilder); - ATH_MSG_VERBOSE (nameBuilder << " --> set as default builder" ); - ATH_MSG_VERBOSE (nameBuilder << " --> ParamOn flag = " << defaultBuilder->GetParam()); - initialized=1; - if(msgLvl(MSG::VERBOSE)) { - ListVolumeBuilders(); - } + ATH_MSG_VERBOSE (" Geo2G4Svc already initialized."); + return StatusCode::SUCCESS; } + ATH_MSG_VERBOSE ("Initializing the Geo2G4Svc."); + ATH_MSG_VERBOSE ("Creating all builders available."); + InitializeBuilders(); // separate function not part of this class + const std::string nameBuilder = "Extended_Parameterised_Volume_Builder"; //TODO Configurable property?? + this->SetDefaultBuilder(nameBuilder); + ATH_MSG_VERBOSE (nameBuilder << " --> set as default builder" ); + ATH_MSG_VERBOSE (nameBuilder << " --> ParamOn flag = " << m_defaultBuilder->GetParam()); + initialized=1; + if(msgLvl(MSG::VERBOSE)) + { + this->ListVolumeBuilders(); + } return StatusCode::SUCCESS; } @@ -56,7 +52,7 @@ StatusCode Geo2G4Svc::finalize() StatusCode Geo2G4Svc::queryInterface(const InterfaceID& riid, void**ppvInt) { - const InterfaceID& iid=intID(); + const InterfaceID& iid=IGeo2G4Svc::interfaceID(); if (riid==iid) { *ppvInt=dynamic_cast<IGeo2G4Svc*>(this); @@ -83,16 +79,19 @@ void Geo2G4Svc::RegisterVolumeBuilder(VolumeBuilder* vb) ATH_MSG_DEBUG ("Volume builder registered "<<key); } } -void Geo2G4Svc::ListVolumeBuilders() + +void Geo2G4Svc::ListVolumeBuilders() const { - BuilderMap::const_iterator it; - std::cout<<"---- List of all Volume Builders registered with Geo2G4Svc ----"<<std::endl; - std::cout<<"---------------------------------------------------------------"<<std::endl; - for (it=m_builders.begin();it!=m_builders.end();it++) - std::cout<<" Volume Builder "<<(*it).second->GetKey()<<std::endl; - std::cout<<"---------------------------------------------------------------"<<std::endl; - std::cout<<" default builder is "<<defaultBuilder->GetKey()<<std::endl; + ATH_MSG_INFO("---- List of all Volume Builders registered with Geo2G4Svc ----"); + ATH_MSG_INFO("---------------------------------------------------------------"); + for (const auto& builder : m_builders) + { + ATH_MSG_INFO(" Volume Builder: "<<builder.second->GetKey()); + } + ATH_MSG_INFO("---------------------------------------------------------------"); + ATH_MSG_INFO(" default builder is "<<m_defaultBuilder->GetKey()); } + void Geo2G4Svc::UnregisterVolumeBuilder(VolumeBuilder* vb) { const std::string key(vb->GetKey()); @@ -107,16 +106,18 @@ void Geo2G4Svc::UnregisterVolumeBuilder(VolumeBuilder* vb) ATH_MSG_ERROR ("\t request ignored, nothing done "); } } -VolumeBuilder* Geo2G4Svc::GetVolumeBuilder(std::string s) + +VolumeBuilder* Geo2G4Svc::GetVolumeBuilder(std::string s) const { - if (m_builders.find(s)!=m_builders.end()) + const auto builderItr(m_builders.find(s)); + if (builderItr!=m_builders.end()) { - return m_builders[s]; + return builderItr->second; } else { ATH_MSG_ERROR ("Trying to retrieve a not existing builder "<<s); ATH_MSG_ERROR ("\treturning Default Builder"); } - return defaultBuilder; + return m_defaultBuilder; } diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Svc.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Svc.h index 3548c8c719b93809f5c9153f2d31d587502cbf2e..031a821fc3601daee57ac86b3a7c88fd9e1864fc 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Svc.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Svc.h @@ -2,10 +2,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef Geo2G4Svc_H -#define Geo2G4Svc_H +#ifndef GEO2G4_Geo2G4Svc_H +#define GEO2G4_Geo2G4Svc_H -#include "Geo2G4/IGeo2G4Svc.h" +#include "G4AtlasInterfaces/IGeo2G4Svc.h" #include "AthenaBaseComps/AthService.h" #include "GaudiKernel/IIncidentListener.h" @@ -16,37 +16,30 @@ class VolumeBuilder; typedef std::map< std::string, VolumeBuilder*,std::less<std::string> > BuilderMap; -class IAlgorithm; -class ISvcLocator; -class IIncident; -class IIncidentSvc; - -//template <class TYPE> class SvcFactory; - +/// @todo NEEDS DOCUMENTATION class Geo2G4Svc: virtual public IGeo2G4Svc, virtual public IIncidentListener, public AthService { public: Geo2G4Svc(const std::string& , ISvcLocator *); virtual ~Geo2G4Svc(); - StatusCode initialize(); - StatusCode finalize(); - virtual StatusCode queryInterface(const InterfaceID& , void** ppvInterface ); - - void handle(const Incident&); - - virtual void RegisterVolumeBuilder(VolumeBuilder* vb); - virtual void UnregisterVolumeBuilder(VolumeBuilder* vb); - void SetDefaultBuilder(VolumeBuilder *vb) {defaultBuilder=vb;} - void SetDefaultBuilder(std::string n) {SetDefaultBuilder(GetVolumeBuilder(n));} - VolumeBuilder* GetVolumeBuilder(std::string s); - VolumeBuilder* GetDefaultBuilder() {return defaultBuilder;} - bool UseTopTransforms() {return m_getTopTransform;} - void ListVolumeBuilders(); - //protected: - //friend class SvcFactory<Geo2G4Svc>; + /// AthService methods + StatusCode initialize() override final; + StatusCode finalize() override final; + virtual StatusCode queryInterface(const InterfaceID& , void** ppvInterface ) override final; + /// IIncidentListener methods - FIXME does this service actually need to listen for Incidents? + void handle(const Incident&) override final; + /// Geo2G4SvcBase methods + virtual void RegisterVolumeBuilder(VolumeBuilder* vb) override final; + virtual void UnregisterVolumeBuilder(VolumeBuilder* vb) override final; + void SetDefaultBuilder(VolumeBuilder *vb) override final {m_defaultBuilder=vb;} + void SetDefaultBuilder(std::string n) override final {this->SetDefaultBuilder(this->GetVolumeBuilder(n));} + VolumeBuilder* GetVolumeBuilder(std::string s) const override final; + VolumeBuilder* GetDefaultBuilder() const override final {return m_defaultBuilder;} + bool UseTopTransforms() const override final {return m_getTopTransform;} + void ListVolumeBuilders() const override final; private: - IIncidentSvc* m_pIncSvc; - VolumeBuilder *defaultBuilder; + IIncidentSvc* m_pIncSvc; // not used - remove? + VolumeBuilder *m_defaultBuilder; BuilderMap m_builders ; bool m_getTopTransform; }; diff --git a/Simulation/G4Utilities/Geo2G4/Geo2G4/Geo2G4SvcAccessor.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4SvcAccessor.h similarity index 79% rename from Simulation/G4Utilities/Geo2G4/Geo2G4/Geo2G4SvcAccessor.h rename to Simulation/G4Utilities/Geo2G4/src/Geo2G4SvcAccessor.h index 9966a8abc82a86b8738c74921f35b2d6195bba47..70a5956a653b1fa758a2aa44fbdef5d9feb838bd 100644 --- a/Simulation/G4Utilities/Geo2G4/Geo2G4/Geo2G4SvcAccessor.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4SvcAccessor.h @@ -2,11 +2,11 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef Geo2G4SvcAccessor_H -#define Geo2G4SvcAccessor_H +#ifndef GEO2G4_Geo2G4SvcAccessor_H +#define GEO2G4_Geo2G4SvcAccessor_H -#include "Geo2G4/Geo2G4SvcBase.h" -#include "Geo2G4/IGeo2G4Svc.h" +#include "G4AtlasInterfaces/Geo2G4SvcBase.h" +#include "G4AtlasInterfaces/IGeo2G4Svc.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/Bootstrap.h" diff --git a/Simulation/G4Atlas/G4AtlasTools/src/GeoDetectorTool.cxx b/Simulation/G4Utilities/Geo2G4/src/GeoDetectorTool.cxx similarity index 94% rename from Simulation/G4Atlas/G4AtlasTools/src/GeoDetectorTool.cxx rename to Simulation/G4Utilities/Geo2G4/src/GeoDetectorTool.cxx index 8bb2d36c87dc7a278e356c616a01d0fef07d414d..411aea3039c480674b7c023cca1ae8f04943126e 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/GeoDetectorTool.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/GeoDetectorTool.cxx @@ -4,11 +4,11 @@ // Base class #include "G4AtlasTools/DetectorGeometryBase.h" -#include "G4AtlasTools/GeoDetectorTool.h" -#include "Geo2G4/Geo2G4SvcAccessor.h" -#include "Geo2G4/Geo2G4SvcBase.h" -#include "Geo2G4/Geo2G4Builder.h" -#include "Geo2G4/VolumeBuilder.h" +#include "GeoDetectorTool.h" +#include "Geo2G4SvcAccessor.h" +#include "G4AtlasInterfaces/Geo2G4SvcBase.h" +#include "Geo2G4Builder.h" +#include "VolumeBuilder.h" #include "G4NistManager.hh" #include "G4LogicalVolume.hh" @@ -60,7 +60,7 @@ StatusCode GeoDetectorTool::initialize() void GeoDetectorTool::BuildGeometry() { ATH_MSG_VERBOSE( name() << " GeoDetectorTool::BuildGeometry(): Starting" ); - G4LogicalVolume* temp=Convert(); + G4LogicalVolume* temp = this->Convert(); m_envelope.theEnvelope=temp; if (this->IsTopTransform()) diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/GeoDetectorTool.h b/Simulation/G4Utilities/Geo2G4/src/GeoDetectorTool.h similarity index 95% rename from Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/GeoDetectorTool.h rename to Simulation/G4Utilities/Geo2G4/src/GeoDetectorTool.h index 5dd8f6354f3324275a20a26eaf2c86f7771bb5cc..7b5c95031aeda691a9072b2a1658a31f20b2e09c 100644 --- a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/GeoDetectorTool.h +++ b/Simulation/G4Utilities/Geo2G4/src/GeoDetectorTool.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef GeoDetectorTool_H -#define GeoDetectorTool_H +#ifndef GEO2G4_GeoDetectorTool_H +#define GEO2G4_GeoDetectorTool_H // Base classes #include "G4AtlasTools/DetectorGeometryBase.h" diff --git a/Simulation/G4Utilities/Geo2G4/src/LArWheelSolidInit.cxx b/Simulation/G4Utilities/Geo2G4/src/LArWheelSolidInit.cxx index 1f235de936eb6b58d3baf5b9c074c3b51e99bcd0..c904466e8b044bc6c32ed08fba54082ec3a5f888 100644 --- a/Simulation/G4Utilities/Geo2G4/src/LArWheelSolidInit.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/LArWheelSolidInit.cxx @@ -38,43 +38,43 @@ LArWheelSolid::LArWheelSolid(const G4String& name, LArWheelSolid_t type, ATH_MSG_INFO ( "compiled with private find_exit_point" ); #endif - LArWheelCalculator::LArWheelCalculator_t calc_type = LArWheelCalculator::LArWheelCalculator_t(0); + LArG4::LArWheelCalculator_t calc_type = LArG4::LArWheelCalculator_t(0); switch(Type){ case InnerAbsorberWheel: - calc_type = LArWheelCalculator::InnerAbsorberWheel; + calc_type = LArG4::InnerAbsorberWheel; break; case OuterAbsorberWheel: - calc_type = LArWheelCalculator::OuterAbsorberWheel; + calc_type = LArG4::OuterAbsorberWheel; break; case InnerElectrodWheel: - calc_type = LArWheelCalculator::InnerElectrodWheel; + calc_type = LArG4::InnerElectrodWheel; break; case OuterElectrodWheel: - calc_type = LArWheelCalculator::OuterElectrodWheel; + calc_type = LArG4::OuterElectrodWheel; break; case InnerAbsorberModule: - calc_type = LArWheelCalculator::InnerAbsorberModule; + calc_type = LArG4::InnerAbsorberModule; break; case OuterAbsorberModule: - calc_type = LArWheelCalculator::OuterAbsorberModule; + calc_type = LArG4::OuterAbsorberModule; break; case InnerElectrodModule: - calc_type = LArWheelCalculator::InnerElectrodModule; + calc_type = LArG4::InnerElectrodModule; break; case OuterElectrodModule: - calc_type = LArWheelCalculator::OuterElectrodModule; + calc_type = LArG4::OuterElectrodModule; break; case InnerGlueWheel: - calc_type = LArWheelCalculator::InnerGlueWheel; + calc_type = LArG4::InnerGlueWheel; break; case OuterGlueWheel: - calc_type = LArWheelCalculator::OuterGlueWheel; + calc_type = LArG4::OuterGlueWheel; break; case InnerLeadWheel: - calc_type = LArWheelCalculator::InnerLeadWheel; + calc_type = LArG4::InnerLeadWheel; break; case OuterLeadWheel: - calc_type = LArWheelCalculator::OuterLeadWheel; + calc_type = LArG4::OuterLeadWheel; break; default: G4Exception("LArWheelSolid", "UnknownSolidType", FatalException, diff --git a/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.cxx b/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.cxx index 21e6ed2d34a7554968ecd3e11cbbbdb9523af4c1..24ae0c0d63aaf074142e5dcfcd87789b10a13496 100644 --- a/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.cxx @@ -4,7 +4,7 @@ #include "SingleLogicalVolumeFactory.h" #include "Geo2G4SolidFactory.h" -#include "Geo2G4/Geo2G4MaterialFactory.h" +#include "GeoMaterial2G4/Geo2G4MaterialFactory.h" #include "GeoModelKernel/GeoLogVol.h" #include "SimHelpers/ServiceAccessor.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" diff --git a/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.h b/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.h index c66119209f30c308facda0d616c3fb7bc2bb40c9..7a089ee90146d5ce2cfeb9acc38ee129cc429fe2 100644 --- a/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.h +++ b/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef SingleLogicalVolumeFactory_h -#define SingleLogicalVolumeFactory_h +#ifndef GEO2G4_SingleLogicalVolumeFactory_h +#define GEO2G4_SingleLogicalVolumeFactory_h #include "AthenaKernel/MsgStreamMember.h" diff --git a/Simulation/G4Utilities/Geo2G4/Geo2G4/VolumeBuilder.h b/Simulation/G4Utilities/Geo2G4/src/VolumeBuilder.h similarity index 85% rename from Simulation/G4Utilities/Geo2G4/Geo2G4/VolumeBuilder.h rename to Simulation/G4Utilities/Geo2G4/src/VolumeBuilder.h index f2347e50e351397f65b634983b9a05306f82b65f..f73b38fbce2bfbd1fb24296d81168af899216e51 100644 --- a/Simulation/G4Utilities/Geo2G4/Geo2G4/VolumeBuilder.h +++ b/Simulation/G4Utilities/Geo2G4/src/VolumeBuilder.h @@ -5,8 +5,8 @@ #ifndef GEO2G4_VolumeBuilder_H #define GEO2G4_VolumeBuilder_H -#include "Geo2G4/LogicalVolume.h" -#include "Geo2G4/Geo2G4SvcAccessor.h" +#include "G4LogicalVolume.hh" +#include "Geo2G4SvcAccessor.h" #include "GeoModelUtilities/GeoOpticalPhysVol.h" @@ -41,7 +41,7 @@ class VolumeBuilder void SetParam(bool flag){paramOn = flag;} bool GetParam(){return paramOn;} - virtual LogicalVolume* Build(PVConstLink pv, OpticalVolumesMap* optical_volumes = 0) const = 0; + virtual G4LogicalVolume* Build(PVConstLink pv, OpticalVolumesMap* optical_volumes = 0) const = 0; protected: bool paramOn; diff --git a/Simulation/G4Utilities/Geo2G4/src/components/Geo2G4_entries.cxx b/Simulation/G4Utilities/Geo2G4/src/components/Geo2G4_entries.cxx index 58e5da99228cd6c8933c82e0deccdb7064775d63..9843eb915c21ff73498087075f7b84aead91d1be 100644 --- a/Simulation/G4Utilities/Geo2G4/src/components/Geo2G4_entries.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/components/Geo2G4_entries.cxx @@ -1,10 +1,7 @@ #include "GaudiKernel/DeclareFactoryEntries.h" #include "../Geo2G4Svc.h" +#include "../GeoDetectorTool.h" DECLARE_SERVICE_FACTORY(Geo2G4Svc) - -DECLARE_FACTORY_ENTRIES(Geo2G4) -{ - DECLARE_SERVICE(Geo2G4Svc) -} +DECLARE_TOOL_FACTORY( GeoDetectorTool ) diff --git a/Simulation/G4Utilities/GeoMaterial2G4/CMakeLists.txt b/Simulation/G4Utilities/GeoMaterial2G4/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..50eaded856a470af33bcabcd71c120f058f37b4d --- /dev/null +++ b/Simulation/G4Utilities/GeoMaterial2G4/CMakeLists.txt @@ -0,0 +1,26 @@ +################################################################################ +# Package: GeoMaterial2G4 +################################################################################ + +# Declare the package name: +atlas_subdir( GeoMaterial2G4 ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( PUBLIC + Control/AthenaKernel + DetectorDescription/GeoModel/GeoModelKernel + GaudiKernel + PRIVATE + Control/AthenaBaseComps + DetectorDescription/GeoModel/GeoModelUtilities ) + +# External dependencies: +find_package( Geant4 ) + +# Component(s) in the package: +atlas_add_library( GeoMaterial2G4 + src/*.cxx + PUBLIC_HEADERS GeoMaterial2G4 + INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} + LINK_LIBRARIES ${GEANT4_LIBRARIES} AthenaKernel GeoModelKernel GaudiKernel + PRIVATE_LINK_LIBRARIES AthenaBaseComps GeoModelUtilities ) diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4MatPropTableFactory.h b/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MatPropTableFactory.h similarity index 85% rename from Simulation/G4Utilities/Geo2G4/src/Geo2G4MatPropTableFactory.h rename to Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MatPropTableFactory.h index 8a892fa6d82371bd0b0d006ed03cd66007d9409e..0cea18b56d96a748122aea20b5d553ae1b88e72d 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4MatPropTableFactory.h +++ b/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MatPropTableFactory.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef Geo2G4MatPropTableFactory_h -#define Geo2G4MatPropTableFactory_h +#ifndef GEOMATERIAL2G4_Geo2G4MatPropTableFactory_h +#define GEOMATERIAL2G4_Geo2G4MatPropTableFactory_h #include <map> diff --git a/Simulation/G4Utilities/Geo2G4/Geo2G4/Geo2G4MaterialFactory.h b/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MaterialFactory.h similarity index 90% rename from Simulation/G4Utilities/Geo2G4/Geo2G4/Geo2G4MaterialFactory.h rename to Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MaterialFactory.h index 9bbc65dfb00b72dcd99c27e8505beb8749e2bd9d..1f70cdab8b63ddf34deb2bf38f6f8ce89588c81c 100644 --- a/Simulation/G4Utilities/Geo2G4/Geo2G4/Geo2G4MaterialFactory.h +++ b/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MaterialFactory.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef Geo2G4MaterialFactory_h -#define Geo2G4MaterialFactory_h +#ifndef GEOMATERIAL2G4_Geo2G4MaterialFactory_h +#define GEOMATERIAL2G4_Geo2G4MaterialFactory_h #include "G4Material.hh" #include "GeoModelKernel/GeoMaterial.h" diff --git a/Simulation/G4Utilities/GeoMaterial2G4/cmt/requirements b/Simulation/G4Utilities/GeoMaterial2G4/cmt/requirements new file mode 100644 index 0000000000000000000000000000000000000000..c7af290ffe6f518f846631052cc4a26020e6c323 --- /dev/null +++ b/Simulation/G4Utilities/GeoMaterial2G4/cmt/requirements @@ -0,0 +1,14 @@ +package GeoMaterial2G4 + +public +use AtlasPolicy AtlasPolicy-* +use AthenaKernel AthenaKernel-* Control +use Geant4 Geant4-* External +use GeoModelKernel GeoModelKernel-* DetectorDescription/GeoModel +private +use AthenaBaseComps AthenaBaseComps-* Control +use GeoModelUtilities GeoModelUtilities-* DetectorDescription/GeoModel +end_private + +library GeoMaterial2G4 *.cxx +apply_pattern installed_library \ No newline at end of file diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4ElementFactory.cxx b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4ElementFactory.cxx similarity index 100% rename from Simulation/G4Utilities/Geo2G4/src/Geo2G4ElementFactory.cxx rename to Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4ElementFactory.cxx diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4ElementFactory.h b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4ElementFactory.h similarity index 62% rename from Simulation/G4Utilities/Geo2G4/src/Geo2G4ElementFactory.h rename to Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4ElementFactory.h index 1a1456e92f690fbe8b04d38ef6332879cc4e15ec..8adbb2439bdf9fcdd34ee29bb1126eaa04e48501 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4ElementFactory.h +++ b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4ElementFactory.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef ElementFactory_H -#define ElementFactory_H +#ifndef GEOMATERIAL2G4_ElementFactory_H +#define GEOMATERIAL2G4_ElementFactory_H class G4Element; class GeoElement; @@ -14,10 +14,10 @@ typedef std::map<std::string, G4Element*, std::less<std::string> > elList; class Geo2G4ElementFactory { public: - Geo2G4ElementFactory(); - G4Element* Build(const GeoElement*); + Geo2G4ElementFactory(); + G4Element* Build(const GeoElement*); private: - elList definedElements; + elList definedElements; }; #endif diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4MatPropTableFactory.cxx b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MatPropTableFactory.cxx similarity index 97% rename from Simulation/G4Utilities/Geo2G4/src/Geo2G4MatPropTableFactory.cxx rename to Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MatPropTableFactory.cxx index be53199cf45257b3fde99132524fa2059645f1cf..a73a8ab8d2110501b056f187d16d6574997bed0d 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4MatPropTableFactory.cxx +++ b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MatPropTableFactory.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "Geo2G4MatPropTableFactory.h" +#include "GeoMaterial2G4/Geo2G4MatPropTableFactory.h" #include "G4MaterialPropertiesTable.hh" #include "G4MaterialPropertyVector.hh" diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4MaterialFactory.cxx b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MaterialFactory.cxx similarity index 96% rename from Simulation/G4Utilities/Geo2G4/src/Geo2G4MaterialFactory.cxx rename to Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MaterialFactory.cxx index 8313bc02b8287e2e8d2062f03e885c7066276cd6..d79f58da27d4d026bc9c4b953fe7975039eb4e97 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4MaterialFactory.cxx +++ b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MaterialFactory.cxx @@ -2,9 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "Geo2G4/Geo2G4MaterialFactory.h" +#include "GeoMaterial2G4/Geo2G4MaterialFactory.h" #include "Geo2G4ElementFactory.h" -#include "Geo2G4MatPropTableFactory.h" +#include "GeoMaterial2G4/Geo2G4MatPropTableFactory.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelUtilities/GeoExtendedMaterial.h" diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/CMakeLists.txt b/Simulation/ISF/ISF_Core/ISF_Algorithms/CMakeLists.txt index 72f93b25f773f4c962f2e79e92c03d7a70612120..8ef02da9e3b9b28dece87c5be66cb6f36c890af3 100644 --- a/Simulation/ISF/ISF_Core/ISF_Algorithms/CMakeLists.txt +++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/CMakeLists.txt @@ -1,3 +1,4 @@ +# $Id: CMakeLists.txt 780090 2016-10-24 15:27:10Z krasznaa $ ################################################################################ # Package: ISF_Algorithms ################################################################################ @@ -6,22 +7,22 @@ atlas_subdir( ISF_Algorithms ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - GaudiKernel - PRIVATE - Control/AthenaBaseComps - Control/StoreGate - Control/CxxUtils - DetectorDescription/AtlasDetDescr - InnerDetector/InDetSimEvent - LArCalorimeter/LArSimEvent - TileCalorimeter/TileSimEvent - MuonSpectrometer/MuonSimEvent - Generators/GeneratorObjects - Simulation/ISF/ISF_Core/ISF_Event - Simulation/ISF/ISF_Core/ISF_Interfaces - Tools/PmbCxxUtils - AtlasTest/TestTools ) +atlas_depends_on_subdirs( + PRIVATE + GaudiKernel + Control/AthenaBaseComps + Control/StoreGate + Control/CxxUtils + DetectorDescription/AtlasDetDescr + InnerDetector/InDetSimEvent + LArCalorimeter/LArSimEvent + TileCalorimeter/TileSimEvent + MuonSpectrometer/MuonSimEvent + Generators/GeneratorObjects + Simulation/ISF/ISF_Core/ISF_Event + Simulation/ISF/ISF_Core/ISF_Interfaces + Tools/PmbCxxUtils + AtlasTest/TestTools ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) @@ -31,19 +32,21 @@ find_package( GTest ) # Component(s) in the package: atlas_add_component( ISF_Algorithms - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps StoreGateLib CxxUtils AtlasDetDescr GeneratorObjects ISF_Event ISF_Interfaces PmbCxxUtils InDetSimEvent LArSimEvent TileSimEvent MuonSimEvent ) + src/*.h src/*.cxx src/components/*.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} GaudiKernel + AthenaBaseComps StoreGateLib CxxUtils AtlasDetDescr GeneratorObjects + ISF_Event ISF_Interfaces PmbCxxUtils InDetSimEvent LArSimEvent TileSimEvent + MuonSimEvent ) atlas_add_test( CollectionMerger_test - SOURCES test/CollectionMerger_test.cxx src/*.cxx - INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} #${GMOCK_INCLUDE_DIRS} - LINK_LIBRARIES TestTools GaudiKernel AthenaBaseComps AtlasDetDescr ISF_Event ISF_Interfaces PmbCxxUtils InDetSimEvent LArSimEvent TileSimEvent MuonSimEvent ${GTEST_LIBRARIES} #${GMOCK_LIBRARIES} - ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) - -# Install files from the package: -atlas_install_headers( ISF_Algorithms ) + SOURCES test/CollectionMerger_test.cxx src/CollectionMerger.h + src/CollectionMerger.cxx + INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} #${GMOCK_INCLUDE_DIRS} + LINK_LIBRARIES TestTools GaudiKernel AthenaBaseComps AtlasDetDescr + ISF_Event ISF_Interfaces PmbCxxUtils InDetSimEvent LArSimEvent TileSimEvent + MuonSimEvent ${GTEST_LIBRARIES} #${GMOCK_LIBRARIES} + ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfig.py b/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfig.py index e49026674487396f246f02f0764c4592a253a57e..2afe1ae7aee5cf97984c6edef971e04b1d36ca65 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfig.py +++ b/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfig.py @@ -48,7 +48,6 @@ def getISFEnvelopeDefSvc(name="ISF_ISFEnvelopeDefSvc", **kwargs): # ATLAS common envlope definitions kwargs.setdefault("ATLASEnvelopeDefSvc", "AtlasGeometry_EnvelopeDefSvc") return CfgMgr.ISF__ISFEnvelopeDefSvc(name, **kwargs) - return CfgMgr.ISF__ISFEnvelopeDefSvc(name, **kwargs) def getAFIIEnvelopeDefSvc(name="ISF_AFIIEnvelopeDefSvc", **kwargs): from AthenaCommon.SystemOfUnits import mm @@ -56,14 +55,12 @@ def getAFIIEnvelopeDefSvc(name="ISF_AFIIEnvelopeDefSvc", **kwargs): kwargs.setdefault("ISFEnvelopeDefSvc", "ISF_ISFEnvelopeDefSvc") kwargs.setdefault("InDetMaxExtentZ", 3549.5*mm) return CfgMgr.ISF__AFIIEnvelopeDefSvc(name, **kwargs) - return CfgMgr.ISF__AFIIEnvelopeDefSvc(name, **kwargs) def getGeoIDSvc(name="ISF_GeoIDSvc", **kwargs): # with ISF volume definitions kwargs.setdefault("EnvelopeDefSvc", "ISF_ISFEnvelopeDefSvc") return CfgMgr.ISF__GeoIDSvc(name, **kwargs) - return CfgMgr.ISF__GeoIDSvc(name, **kwargs) def getAFIIGeoIDSvc(name="ISF_AFIIGeoIDSvc", **kwargs): diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/CMakeLists.txt b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..1823478c2b2ae4c36429fe4c337d7684b4bbf2e6 --- /dev/null +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/CMakeLists.txt @@ -0,0 +1,51 @@ +################################################################################ +# Package: ISF_Geant4Event +################################################################################ + +# Declare the package name: +atlas_subdir( ISF_Geant4Event ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( PUBLIC + Simulation/ISF/ISF_Core/ISF_Event + Simulation/ISF/ISF_Core/ISF_Interfaces + Simulation/G4Sim/SimHelpers + Simulation/Barcode/BarcodeEvent + Simulation/G4Sim/MCTruth + PRIVATE + DetectorDescription/GeoPrimitives ) + + + +# External dependencies: +find_package( CLHEP ) +find_package( Eigen ) +find_package( Geant4 ) +find_package( HepMC ) +find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( XercesC ) + +# Component(s) in the package: +atlas_add_library( ISF_Geant4Event + src/*.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + ${HEPMC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} + ${EIGEN_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} + ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} + ${GEANT4_LIBRARIES} ${EIGEN_LIBRARIES} ISF_Event + SimHelpers GeoPrimitives MCTruth) + +# Install files from the package: +atlas_install_headers( ISF_Geant4Event ) + + + +#atlas_add_test(SOURCES +# INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} +# ${HEPMC_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} +# LINK_LIBRARIES +# ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} +# ${EIGEN_LIBRARIES} ISF_Event SimHelpers GeoPrimitives +# BarcodeEvent MCTruth) diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/Geant4TruthIncident.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/Geant4TruthIncident.h similarity index 94% rename from Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/Geant4TruthIncident.h rename to Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/Geant4TruthIncident.h index a32aaab9a9dd644e5c95c8a522506c98f146b9fd..c6ab411143fb6dac8bdf955f26bf93415d842590 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/Geant4TruthIncident.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/Geant4TruthIncident.h @@ -1,7 +1,3 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - /////////////////////////////////////////////////////////////////// // Geant4TruthIncident.h, (c) ATLAS Detector software /////////////////////////////////////////////////////////////////// @@ -41,11 +37,6 @@ namespace iGeant4 { @author Andreas.Schaelicke@cern.ch */ - /* comments: - renamed to Geant4TruthIncident inorder to avoid confusion with G4 internal classes. - - */ - class Geant4TruthIncident : public ISF::ITruthIncident { public: Geant4TruthIncident( const G4Step*, @@ -112,7 +103,7 @@ namespace iGeant4 { /** check if the given G4Track represents a particle that is alive in ISF or ISF-G4 */ inline bool particleAlive(const G4Track *track) const; - HepMC::GenParticle* convert(const G4Track *particle) const; //*AS* might be put static + HepMC::GenParticle* convert(const G4Track *particle, const int barcode, const bool secondary) const; //*AS* might be put static mutable bool m_positionSet; mutable HepMC::FourVector m_position; diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/ISFG4GeoHelper.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/ISFG4GeoHelper.h new file mode 100644 index 0000000000000000000000000000000000000000..8b1df7dd85940b94abf79e065f20545b28f60da1 --- /dev/null +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/ISFG4GeoHelper.h @@ -0,0 +1,24 @@ +#ifndef ISFG4GEOHELPER_H +#define ISFG4GEOHELPER_H + + +#include "AtlasDetDescr/AtlasRegion.h" +#include "G4Step.hh" +#include "ISF_Interfaces/IGeoIDSvc.h" + + +namespace iGeant4 { + +class ISFG4GeoHelper { + + public: + ISFG4GeoHelper() = delete; + + static AtlasDetDescr::AtlasRegion nextGeoId(const G4Step* aStep, int truthVolLevel,ISF::IGeoIDSvc *geoIDSvc); + static bool checkVolumeDepth(G4LogicalVolume* logicalVol, int volLevel, int depth=0); + + private: +}; + +} +#endif diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/ISFG4Helper.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/ISFG4Helper.h new file mode 100644 index 0000000000000000000000000000000000000000..97a0cfcb754caa05789fa93ebeafd45b40448aab --- /dev/null +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/ISF_Geant4Event/ISFG4Helper.h @@ -0,0 +1,60 @@ +#ifndef ISF_GEANT4TOOLS_ISFG4HELPER_H +#define ISF_GEANT4TOOLS_ISFG4HELPER_H + +// Barcode includes +#include "BarcodeEvent/Barcode.h" + +// ISF Includes +#include "ISF_Event/ISFParticle.h" + +// MCTruth includes +#include "MCTruth/VTrackInformation.h" + +// forward declarations +namespace HepMC { + class GenParticle; +} +namespace ISF { + class TruthBinding; +} +class VTrackInformation; +class TrackInformation; +class EventInformation; +class G4Track; + +namespace iGeant4 { + +class ISFG4Helper { + + public: + ISFG4Helper() = delete; + + /** convert the given G4Track into an ISFParticle */ + static ISF::ISFParticle* convertG4TrackToISFParticle(const G4Track& aTrack, + const ISF::ISFParticle& parent, + ISF::TruthBinding* truth = nullptr); + + /** return a valid UserInformation object of the G4Track for use within the ISF */ + static VTrackInformation* getISFTrackInfo(const G4Track& aTrack); + + /** link the given G4Track to the given ISFParticle */ + static void setG4TrackInfoFromBaseISFParticle( G4Track& aTrack, + const ISF::ISFParticle& baseIsp, + bool setReturnToISF=false ); + + /** attach a new TrackInformation object to the given new (!) G4Track + * (the G4Track must not have a UserInformation object attached to it) */ + static TrackInformation* attachTrackInfoToNewG4Track( G4Track& aTrack, + const ISF::ISFParticle& baseIsp, + TrackClassification classification, + HepMC::GenParticle *nonRegeneratedTruthParticle = nullptr); + + /** return pointer to current EventInformation */ + static EventInformation* getEventInformation(); + + private: + +}; +} + +#endif // ISF_GEANT4TOOLS_ISFG4HELPER_H diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/cmt/requirements b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/cmt/requirements new file mode 100644 index 0000000000000000000000000000000000000000..554b80977dc7f6e7b66cfb673f2f8cb4128167a1 --- /dev/null +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/cmt/requirements @@ -0,0 +1,32 @@ +package ISF_Geant4Event +author <Andreas.Petridis@cern.ch> + +manager Andreas Petridis <Andreas.Petridis@cern.ch> + +public +use AtlasPolicy AtlasPolicy-* +use GaudiInterface GaudiInterface-* External +use AtlasHepMC AtlasHepMC-* External +use ISF_Event ISF_Event-* Simulation/ISF/ISF_Core +use SimHelpers SimHelpers-* Simulation/G4Sim +use BarcodeEvent BarcodeEvent-* Simulation/Barcode +use MCTruth MCTruth-* Simulation/G4Sim +use Geant4 Geant4-* External +use AtlasDetDescr AtlasDetDescr-* DetectorDescription +use ISF_Interfaces ISF_Interfaces-* Simulation/ISF/ISF_Core + +private +use GeoPrimitives GeoPrimitives-* DetectorDescription +use AtlasROOT AtlasROOT-* External + + +public +library ISF_Geant4Event *.cxx +apply_pattern installed_library + +apply_pattern declare_python_modules files="*.py" + +private +# use this to enable debugging for this package +#macro cppdebugflags '$(cppdebugflags_s)' +#macro_remove componentshr_linkopts "-Wl,-s" diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/Geant4TruthIncident.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/Geant4TruthIncident.cxx similarity index 83% rename from Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/Geant4TruthIncident.cxx rename to Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/Geant4TruthIncident.cxx index df3f46eaf7895bb36e5609ea115d8c9e00c882b0..b585276b365458b71b3993bdb0c58d2d2c1d835e 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/Geant4TruthIncident.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/Geant4TruthIncident.cxx @@ -1,22 +1,19 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - /////////////////////////////////////////////////////////////////// // Geant4TruthIncident.cxx, (c) ATLAS Detector software /////////////////////////////////////////////////////////////////// // class header -#include "Geant4TruthIncident.h" +#include "ISF_Geant4Event/Geant4TruthIncident.h" // package includes -#include "ISFG4Helpers.h" +#include "ISF_Geant4Event/ISFG4Helper.h" // Atlas G4 Helpers #include "MCTruth/EventInformation.h" #include "MCTruth/TrackBarcodeInfo.h" #include "MCTruth/TrackHelper.h" #include "MCTruth/TrackInformation.h" +#include "MCTruth/PrimaryParticleInformation.h" #include "SimHelpers/SecondaryTracksHelper.h" // Units @@ -171,12 +168,10 @@ HepMC::GenParticle* iGeant4::Geant4TruthIncident::parentParticleAfterIncident(Ba if ( !m_parentParticleAfterIncident ) { // create new HepMC particle, using momentum and energy // from G4DynamicParticle (which should be equivalent to postStep) - m_parentParticleAfterIncident = convert(track); + m_parentParticleAfterIncident = convert(track, newBarcode, false); m_eventInfo->SetCurrentlyTraced( m_parentParticleAfterIncident ); - m_parentParticleAfterIncident->suggest_barcode( newBarcode ); - // store (new) hepmc particle in track's UserInformation TrackHelper tHelper(track); TrackInformation *tInfo = tHelper.GetTrackInformation(); @@ -227,38 +222,12 @@ int iGeant4::Geant4TruthIncident::childPdgCode(unsigned short i) const { return m_children[i]->GetDefinition()->GetPDGEncoding(); } -void iGeant4::Geant4TruthIncident::setAllChildrenBarcodes(Barcode::ParticleBarcode newBarcode) { - - prepareChildren(); - - unsigned short numChildren = numberOfChildren(); - for (unsigned short i=0; i<numChildren; i++) { - - G4Track *curSecondaryTrack = m_children[i]; - - // get parent if it exists in user info - auto* trackInfo = ISFG4Helpers::getISFTrackInfo( *curSecondaryTrack ); - - // update present UserInformation - if (trackInfo) { - auto* hepParticle = const_cast<HepMC::GenParticle*>( trackInfo->GetHepMCParticle() ); - - if (hepParticle) { - hepParticle->suggest_barcode( newBarcode ); - } - - // attach new UserInformation - } else { - const ISF::ISFParticle* parent = trackInfo->GetBaseISFParticle(); - TrackBarcodeInfo* bi = new TrackBarcodeInfo(newBarcode,parent); - curSecondaryTrack->SetUserInformation(bi); - } - } - - return; +void iGeant4::Geant4TruthIncident::setAllChildrenBarcodes(Barcode::ParticleBarcode) { + G4ExceptionDescription description; + description << G4String("setAllChildrenBarcodes: ") + "Shared child particle barcodes are not implemented in ISF_Geant4 at this point."; + G4Exception("iGeant4::Geant4TruthIncident", "NotImplemented", FatalException, description); } - HepMC::GenParticle* iGeant4::Geant4TruthIncident::childParticle(unsigned short i, Barcode::ParticleBarcode newBarcode) const { prepareChildren(); @@ -270,11 +239,17 @@ HepMC::GenParticle* iGeant4::Geant4TruthIncident::childParticle(unsigned short i // secondary could decay right away and create further particles which pass the // truth strategies. - HepMC::GenParticle* hepParticle = convert( thisChildTrack ); - hepParticle->suggest_barcode( newBarcode ); + HepMC::GenParticle* hepParticle = convert( thisChildTrack , newBarcode , true ); TrackHelper tHelper(thisChildTrack); TrackInformation *trackInfo = tHelper.GetTrackInformation(); + + // needed to make AtlasG4 work with ISF TruthService + if(trackInfo==nullptr) { + trackInfo = new TrackInformation( hepParticle ); + thisChildTrack->SetUserInformation( trackInfo ); + } + trackInfo->SetParticle(hepParticle); trackInfo->SetClassification(RegisteredSecondary); trackInfo->SetRegenerationNr(0); @@ -290,7 +265,7 @@ bool iGeant4::Geant4TruthIncident::particleAlive(const G4Track *track) const { // parent does not exist in G4 anymore after this step // check whether the particle was returned to ISF - auto* trackInfo = ISFG4Helpers::getISFTrackInfo( *track ); + auto* trackInfo = ISFG4Helper::getISFTrackInfo( *track ); bool returnedToISF = trackInfo ? trackInfo->GetReturnedToISF() : false; if ( !returnedToISF ) { // particle was not sent to ISF either @@ -302,7 +277,7 @@ bool iGeant4::Geant4TruthIncident::particleAlive(const G4Track *track) const { } -HepMC::GenParticle* iGeant4::Geant4TruthIncident::convert(const G4Track *track) const { +HepMC::GenParticle* iGeant4::Geant4TruthIncident::convert(const G4Track *track, const int barcode, const bool secondary) const { const G4ThreeVector & mom = track->GetMomentum(); const double energy = track->GetTotalEnergy(); @@ -312,6 +287,21 @@ HepMC::GenParticle* iGeant4::Geant4TruthIncident::convert(const G4Track *track) int status = 1; // stable particle not decayed by EventGenerator HepMC::GenParticle* newParticle = new HepMC::GenParticle(fourMomentum, pdgCode, status); + // This should be a *secondary* track. If it has a primary, it was a decay and + // we are running with quasi-stable particle simulation. Note that if the primary + // track is passed in as a secondary that survived the interaction, then this was + // *not* a decay and we should not treat it in this way + if (secondary && + track->GetDynamicParticle() && + track->GetDynamicParticle()->GetPrimaryParticle() && + track->GetDynamicParticle()->GetPrimaryParticle()->GetUserInformation()){ + // Then the new particle should use the same barcode as the old one!! + PrimaryParticleInformation* ppi = dynamic_cast<PrimaryParticleInformation*>( track->GetDynamicParticle()->GetPrimaryParticle()->GetUserInformation() ); + newParticle->suggest_barcode( ppi->GetParticleBarcode() ); + } else { + newParticle->suggest_barcode( barcode ); + } + return newParticle; } diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/ISFG4GeoHelper.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/ISFG4GeoHelper.cxx new file mode 100644 index 0000000000000000000000000000000000000000..ef6db8066eb2d860705fcaa87b988681a5a23dfc --- /dev/null +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/ISFG4GeoHelper.cxx @@ -0,0 +1,171 @@ +#include "ISF_Geant4Event/ISFG4GeoHelper.h" + +// Athena includes +#include "AtlasDetDescr/AtlasRegion.h" + +//Geant4 +#include "G4LogicalVolumeStore.hh" +#include "G4Step.hh" + +#include "G4TransportationManager.hh" +#include "SimHelpers/StepHelper.h" + +#include <iostream> + + +//________________________________________________________________________ +AtlasDetDescr::AtlasRegion +iGeant4::ISFG4GeoHelper::nextGeoId(const G4Step* aStep, int truthVolLevel, ISF::IGeoIDSvc *geoIDSvc) +{ + + static G4LogicalVolume * BPholder=0 , * IDholder=0 , * CALOholder=0 , * MUholder=0 , * TTRholder=0 ; + if (BPholder==0){ // Initialize + + G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance(); + for (size_t i=0;i<lvs->size();++i){ + + if ( !(*lvs)[i] ) continue; + if ( (*lvs)[i]->GetName() == "BeamPipe::BeamPipe" ) BPholder = (*lvs)[i]; + else if ( (*lvs)[i]->GetName() == "IDET::IDET" ) IDholder = (*lvs)[i]; + else if ( (*lvs)[i]->GetName() == "CALO::CALO" ) CALOholder = (*lvs)[i]; + else if ( (*lvs)[i]->GetName() == "MUONQ02::MUONQ02" ) MUholder = (*lvs)[i]; + else if ( (*lvs)[i]->GetName() == "TTR_BARREL::TTR_BARREL" ) TTRholder = (*lvs)[i]; + + } + + ISFG4GeoHelper::checkVolumeDepth( G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume() , truthVolLevel); + + } + + + // Static so that it will keep the value from the previous step + static AtlasDetDescr::AtlasRegion nextGeoID = truthVolLevel>1?AtlasDetDescr::fAtlasCavern:AtlasDetDescr::fUndefinedAtlasRegion; + + static const G4Track* aTrack = 0; + + StepHelper step(aStep); + + + if (aTrack != aStep->GetTrack()) { + + // First step with this track! + nextGeoID = AtlasDetDescr::fUndefinedAtlasRegion; + aTrack = aStep->GetTrack(); + + } // Otherwise use the cached value via the static + + + const G4StepPoint *postStep = aStep->GetPostStepPoint(); + + + bool leavingG4World = postStep->GetStepStatus()==fWorldBoundary; + + if ( leavingG4World ) { + + nextGeoID = AtlasDetDescr::fAtlasCavern; + + return nextGeoID; + } + + + // If in mother volume, use the ISF_GeoIDSvc to resolve the geoID + if (step.PostStepBranchDepth()<truthVolLevel){ + + const G4ThreeVector &postPos = postStep->GetPosition(); + //const G4ThreeVector &postMom = postStep->GetMomentum(); + //nextGeoID = m_geoIDSvcQuick->identifyNextGeoID( postPos.x(), + // postPos.y(), + // postPos.z(), + // postMom.x(), + // postMom.y(), + // postMom.z() ); + nextGeoID = geoIDSvc->identifyGeoID( postPos.x(), + postPos.y(), + postPos.z() ); + + return nextGeoID; + } + + // Ordering inside out (most truth in the ID anyway...) + if ( IDholder==step.GetPostStepLogicalVolume(truthVolLevel) ){ + nextGeoID = AtlasDetDescr::fAtlasID; + } else if ( CALOholder==step.GetPostStepLogicalVolume(truthVolLevel) ){ + nextGeoID = AtlasDetDescr::fAtlasCalo; + } else if ( MUholder==step.GetPostStepLogicalVolume(truthVolLevel) ){ + nextGeoID = AtlasDetDescr::fAtlasMS; + } else if ( BPholder==step.GetPostStepLogicalVolume(truthVolLevel) ){ + nextGeoID = (step.PostStepBranchDepth()>truthVolLevel && step.GetPostStepLogicalVolumeName(truthVolLevel+1)=="BeamPipe::BeamPipeCentral")?AtlasDetDescr::fAtlasID:AtlasDetDescr::fAtlasForward; + } else if ( TTRholder==step.GetPostStepLogicalVolume(truthVolLevel) ){ + nextGeoID = AtlasDetDescr::fAtlasCavern; + } else if (truthVolLevel>0 && step.GetPostStepLogicalVolumeName(truthVolLevel-1).find("CavernInfra")!=std::string::npos) { + nextGeoID = AtlasDetDescr::fAtlasCavern; + } else { + // We are in trouble + //ATH_MSG_ERROR("vol1: "<<step.GetPostStepLogicalVolumeName(1)<<", vol2: "<<step.GetPostStepLogicalVolumeName(2)<<", postname="<<postname<<", returning undefined geoID"); + G4ThreeVector myPos = aStep->GetPostStepPoint()->GetPosition(); + //ATH_MSG_ERROR("Returning undefined geoID from " << step.GetPostStepLogicalVolume() << " requesting " << step.GetPostStepLogicalVolume(truthVolLevel) << " at " << myPos.x() << " " << myPos.y() << " " << myPos.z() ); + } + + return nextGeoID; +} + +bool iGeant4::ISFG4GeoHelper::checkVolumeDepth(G4LogicalVolume* lv, int volLevel, int depth) { + + //FIXME - can replace all this code with similar methods to those in MCTruthBase/src/RecordingEnvelope.cxx + if (lv==nullptr) return false; + + bool Cavern = false; + // Check the volumes rather explicitly + + if ( lv->GetName() == "BeamPipe::BeamPipe" || + lv->GetName() == "IDET::IDET" || + lv->GetName() == "CALO::CALO" || + lv->GetName() == "MUONQ02::MUONQ02" || + lv->GetName() == "TTR_BARREL::TTR_BARREL" ){ + + if (depth==volLevel){ + //ATH_MSG_DEBUG("Volume " << lv->GetName() << " is correctly registered at depth " << depth); + } else { + //ATH_MSG_ERROR("Volume " << lv->GetName() << " at depth " << depth << " instead of depth " << volLevel); + throw "WrongDepth"; + } // Check of volume level + } else if ( lv->GetName()=="BeamPipe::BeamPipeCentral" ){ // Things that are supposed to be one deeper + if (depth==volLevel+1){ + //ATH_MSG_DEBUG("Volume " << lv->GetName() << " is correctly registered at depth " << depth); + } else { + //ATH_MSG_ERROR("Volume " << lv->GetName() << " at depth " << depth << " instead of depth " << volLevel+1); + throw "WrongDepth"; + } // Check of volume level + } else if ( lv->GetName()=="BeamPipe::BeamPipeCentral" ){ // Things that are supposed to be one deeper + if (depth==volLevel+1){ + //ATH_MSG_DEBUG("Volume " << lv->GetName() << " is correctly registered at depth " << depth); + } else { + //ATH_MSG_ERROR("Volume " << lv->GetName() << " at depth " << depth << " instead of depth " << volLevel+1); + throw "WrongDepth"; + } // Check of volume level + } else if ( lv->GetName().find("CavernInfra")!=std::string::npos ){ // Things that are supposed to be one shallower + + if (depth==volLevel-1){ + Cavern=true; + + //ATH_MSG_DEBUG("Volume " << lv->GetName() << " is correctly registered at depth " << depth); + // Note: a number of volumes exist with "CavernInfra" in the name at the wrong depth, so we just need to + // check that there's at least one at the right depth + } // Check of volume level + } // Check of volume name + + // Going through the volume depth + for (int i=0; i<lv->GetNoDaughters(); ++i){ + + Cavern = Cavern || checkVolumeDepth( lv->GetDaughter(i)->GetLogicalVolume() , volLevel , depth+1 ); + + } + + if (depth==0 && !Cavern && volLevel>1){ + + //ATH_MSG_ERROR("No CavernInfra volume registered at depth " << volLevel-1); + throw "WrongDepth"; + } + + return Cavern; +} diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFG4Helpers.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/ISFG4Helper.cxx similarity index 83% rename from Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFG4Helpers.cxx rename to Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/ISFG4Helper.cxx index 94ab5875d476acb817ffd6d9812b3e1c01646bd9..16fa9bc3e179d4318dc1f4caaa710877647323f6 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFG4Helpers.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/src/ISFG4Helper.cxx @@ -1,13 +1,9 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - /////////////////////////////////////////////////////// -// ISFG4Helpers.cxx, (c) ATLAS Detector software +// ISFG4Helper.cxx, (c) ATLAS Detector software /////////////////////////////////////////////////////// // class header -#include "ISFG4Helpers.h" +#include "ISF_Geant4Event/ISFG4Helper.h" // Geant4 includes #include "G4Track.hh" @@ -27,21 +23,9 @@ #include "GeoPrimitives/GeoPrimitives.h" -/** empty dummy constructor */ -iGeant4::ISFG4Helpers::ISFG4Helpers() -{ - -} - -/** empty dummy destructor */ -iGeant4::ISFG4Helpers::~ISFG4Helpers() -{ - -} - /** convert the given G4Track into an ISFParticle */ ISF::ISFParticle* -iGeant4::ISFG4Helpers::convertG4TrackToISFParticle(const G4Track& aTrack, +iGeant4::ISFG4Helper::convertG4TrackToISFParticle(const G4Track& aTrack, const ISF::ISFParticle& parent, ISF::TruthBinding* truth) { @@ -77,7 +61,7 @@ iGeant4::ISFG4Helpers::convertG4TrackToISFParticle(const G4Track& aTrack, /** return a valid UserInformation object of the G4Track for use within the ISF */ VTrackInformation * -iGeant4::ISFG4Helpers::getISFTrackInfo(const G4Track& aTrack) +iGeant4::ISFG4Helper::getISFTrackInfo(const G4Track& aTrack) { VTrackInformation* trackInfo = static_cast<VTrackInformation*>(aTrack.GetUserInformation()); return trackInfo; @@ -86,7 +70,7 @@ iGeant4::ISFG4Helpers::getISFTrackInfo(const G4Track& aTrack) /** link the given G4Track to the given ISFParticle */ TrackInformation* -iGeant4::ISFG4Helpers::attachTrackInfoToNewG4Track( G4Track& aTrack, +iGeant4::ISFG4Helper::attachTrackInfoToNewG4Track( G4Track& aTrack, const ISF::ISFParticle& baseIsp, TrackClassification classification, HepMC::GenParticle *nonRegeneratedTruthParticle) @@ -97,7 +81,7 @@ iGeant4::ISFG4Helpers::attachTrackInfoToNewG4Track( G4Track& aTrack, << "Trying to attach new TrackInformation object to G4Track which already has a TrackUserInformation attached (trackID: " << aTrack.GetTrackID() << ", track pos: "<<aTrack.GetPosition() << ", mom: "<<aTrack.GetMomentum() << ", parentID " << aTrack.GetParentID() << ")"; - G4Exception("ISFG4Helpers::attachTrackInfoToNewG4Track", "TrackUserInformationAlreadyExists", FatalException, description); + G4Exception("ISFG4Helper::attachTrackInfoToNewG4Track", "TrackUserInformationAlreadyExists", FatalException, description); return nullptr; } @@ -108,7 +92,7 @@ iGeant4::ISFG4Helpers::attachTrackInfoToNewG4Track( G4Track& aTrack, << "No TruthBinding present in base ISFParticle (trackID: " << aTrack.GetTrackID() << ", track pos: "<<aTrack.GetPosition() << ", mom: "<<aTrack.GetMomentum() << ", parentID " << aTrack.GetParentID() << ", ISFParticle: "<<baseIsp<<")"; - G4Exception("ISFG4Helpers::attachTrackInfoToNewG4Track", "NoISFTruthBinding", FatalException, description); + G4Exception("ISFG4Helper::attachTrackInfoToNewG4Track", "NoISFTruthBinding", FatalException, description); return nullptr; } @@ -124,7 +108,7 @@ iGeant4::ISFG4Helpers::attachTrackInfoToNewG4Track( G4Track& aTrack, /** return pointer to current EventInformation */ EventInformation* -iGeant4::ISFG4Helpers::getEventInformation() +iGeant4::ISFG4Helper::getEventInformation() { return ( static_cast<EventInformation*> (G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetUserInformation()) ); } diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/CMakeLists.txt b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/CMakeLists.txt index a0c7cd55653d92c4231e5fe4d2a059711400d344..b22d00164bbc3deb6d4dbd9dc32edccc64cc2a41 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/CMakeLists.txt +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/CMakeLists.txt @@ -11,11 +11,11 @@ atlas_depends_on_subdirs( PUBLIC GaudiKernel Simulation/G4Atlas/G4AtlasInterfaces PRIVATE + Control/AthToolSupport/AsgTools Control/AthenaBaseComps Control/CxxUtils Control/StoreGate DetectorDescription/AtlasDetDescr - DetectorDescription/GeoPrimitives Generators/GeneratorObjects Simulation/Barcode/BarcodeEvent Simulation/Barcode/BarcodeInterfaces @@ -24,6 +24,7 @@ atlas_depends_on_subdirs( PUBLIC Simulation/G4Sim/SimHelpers Simulation/ISF/ISF_Core/ISF_Event Simulation/ISF/ISF_Core/ISF_Interfaces + Simulation/ISF/ISF_Geant4/ISF_Geant4Event Simulation/ISF/ISF_Geant4/ISF_Geant4Interfaces Simulation/ISF/ISF_HepMC/ISF_HepMC_Event ) @@ -39,8 +40,8 @@ find_package( XercesC ) atlas_add_component( ISF_Geant4Tools src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${GEANT4_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel GaudiKernel G4AtlasInterfaces AthenaBaseComps CxxUtils StoreGateLib SGtests AtlasDetDescr GeoPrimitives GeneratorObjects G4AtlasToolsLib MCTruth SimHelpers ISF_Event ISF_Interfaces ) + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} BarcodeEvent + LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${GEANT4_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel GaudiKernel G4AtlasInterfaces AthenaBaseComps CxxUtils StoreGateLib SGtests AtlasDetDescr GeneratorObjects G4AtlasToolsLib MCTruth SimHelpers ISF_Event ISF_Interfaces ISF_Geant4Event ) # Install files from the package: atlas_install_headers( ISF_Geant4Tools ) diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/cmt/requirements b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/cmt/requirements index 2cc0515c23121c06f69a21856692f4bd39b59cc0..dfdd8e332c796d1306a1be8e594b2430f068f8e6 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/cmt/requirements +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/cmt/requirements @@ -9,10 +9,10 @@ use Geant4 Geant4-* External use G4AtlasInterfaces G4AtlasInterfaces-* Simulation/G4Atlas private +use AsgTools AsgTools-* Control/AthToolSupport use AthenaBaseComps AthenaBaseComps-* Control use AtlasCLHEP AtlasCLHEP-* External use AtlasDetDescr AtlasDetDescr-* DetectorDescription -use GeoPrimitives GeoPrimitives-* DetectorDescription use AtlasHepMC AtlasHepMC-* External use AtlasROOT AtlasROOT-* External use BarcodeEvent BarcodeEvent-* Simulation/Barcode @@ -20,6 +20,7 @@ use BarcodeInterfaces BarcodeInterfaces-* Simulation/Barcode use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas use GeneratorObjects GeneratorObjects-* Generators use ISF_Event ISF_Event-* Simulation/ISF/ISF_Core +use ISF_Geant4Event ISF_Geant4Event-* Simulation/ISF/ISF_Geant4 use ISF_Geant4Interfaces ISF_Geant4Interfaces-* Simulation/ISF/ISF_Geant4 use ISF_Interfaces ISF_Interfaces-* Simulation/ISF/ISF_Core use MCTruth MCTruth-* Simulation/G4Sim diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfig.py b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfig.py index 1d41cd086d9d60044ffd97600fc8efa5ae6c89ac..7814e5742afafdc4a6d736f946a662c6f4ca1cc2 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfig.py +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfig.py @@ -2,12 +2,6 @@ ## ----------------------------------------------------------------------------- ### Base Version -def getMCTruthUserAction(name='ISFMCTruthUserAction', **kwargs): - # get the non-MT action - from ISF_Config.ISF_jobProperties import ISF_Flags - kwargs.setdefault('TruthRecordSvc', ISF_Flags.TruthService.get_Value()) - from ISF_Geant4Tools.ISF_Geant4ToolsConf import iGeant4__MCTruthUserAction - return iGeant4__MCTruthUserAction(name, **kwargs) def getMCTruthUserActionTool(name='ISFMCTruthUserActionTool', **kwargs): # get the MT action @@ -22,32 +16,25 @@ def addMCTruthUserActionTool(name="ISFMCTruthUserActionTool",system=False): ## ----------------------------------------------------------------------------- ### Base Version -def getPhysicsValidationUserAction(name="ISFG4PhysicsValidationUserAction", **kwargs): +def getPhysicsValidationUserActionTool(name="ISFG4PhysicsValidationUserActionTool", **kwargs): kwargs.setdefault('ParticleBroker' , 'ISF_ParticleBrokerSvc') - from ISF_Geant4Tools.ISF_Geant4ToolsConf import iGeant4__PhysicsValidationUserAction - return iGeant4__PhysicsValidationUserAction(name, **kwargs) + from ISF_Geant4Tools.ISF_Geant4ToolsConf import G4UA__iGeant4__PhysicsValidationUserActionTool + return G4UA__iGeant4__PhysicsValidationUserActionTool(name, **kwargs) ### Specialized Versions -def getG4OnlyPhysicsValidationUserAction(name="G4OnlyPhysicsValidationUserAction", **kwargs): +def getG4OnlyPhysicsValidationUserActionTool(name="G4OnlyPhysicsValidationUserActionTool", **kwargs): kwargs.setdefault('ParticleBroker' , 'ISF_ParticleBrokerSvcNoOrdering') - return getPhysicsValidationUserAction(name, **kwargs) + return getPhysicsValidationUserActionTool(name, **kwargs) -def getAFII_G4PhysicsValidationUserAction(name="AFII_G4PhysicsValidationUserAction", **kwargs): +def getAFII_G4PhysicsValidationUserActionTool(name="AFII_G4PhysicsValidationUserActionTool", **kwargs): kwargs.setdefault('ParticleBroker' , 'ISF_AFIIParticleBrokerSvc') - return getPhysicsValidationUserAction(name, **kwargs) + return getPhysicsValidationUserActionTool(name, **kwargs) -def getQuasiStableG4PhysicsValidationUserAction(name="QuasiStableG4PhysicsValidationUserAction", **kwargs): +def getQuasiStableG4PhysicsValidationUserActionTool(name="QuasiStableG4PhysicsValidationUserActionTool", **kwargs): kwargs.setdefault('ParticleBroker' , 'ISF_LongLivedParticleBrokerSvc') - return getPhysicsValidationUserAction(name, **kwargs) + return getPhysicsValidationUserActionTool(name, **kwargs) ## ----------------------------------------------------------------------------- ### Base Version -def getTrackProcessorUserAction(name="ISFG4TrackProcessorUserAction", **kwargs): - from AthenaCommon.BeamFlags import jobproperties - from G4AtlasApps.SimFlags import simFlags - kwargs.setdefault('ParticleBroker', 'ISF_ParticleBrokerSvc') - kwargs.setdefault('GeoIDSvc', 'ISF_GeoIDSvc' ) - from ISF_Geant4Tools.ISF_Geant4ToolsConf import iGeant4__TrackProcessorUserActionPassBack - return iGeant4__TrackProcessorUserActionPassBack(name, **kwargs) def getTrackProcessorUserActionTool(name="ISFG4TrackProcessorUserActionTool", **kwargs): from AthenaCommon.BeamFlags import jobproperties @@ -59,16 +46,6 @@ def getTrackProcessorUserActionTool(name="ISFG4TrackProcessorUserActionTool", ** ### Specialized Versions -def getFullG4TrackProcessorUserAction(name='FullG4TrackProcessorUserAction', **kwargs): - kwargs.setdefault('EntryLayerTool', 'ISF_EntryLayerTool') - kwargs.setdefault('GeoIDSvc', 'ISF_GeoIDSvc' ) - from AthenaCommon.BeamFlags import jobproperties - from G4AtlasApps.SimFlags import simFlags - if jobproperties.Beam.beamType() == 'cosmics' or \ - (simFlags.CavernBG.statusOn and not 'Signal' in simFlags.CavernBG.get_Value() ): - kwargs.setdefault('TruthVolumeLevel', 2) - from ISF_Geant4Tools.ISF_Geant4ToolsConf import iGeant4__TrackProcessorUserActionFullG4 - return iGeant4__TrackProcessorUserActionFullG4(name, **kwargs) def getFullG4TrackProcessorUserActionTool(name='FullG4TrackProcessorUserActionTool', **kwargs): kwargs.setdefault('EntryLayerTool', 'ISF_EntryLayerTool') @@ -81,23 +58,10 @@ def getFullG4TrackProcessorUserActionTool(name='FullG4TrackProcessorUserActionTo from ISF_Geant4Tools.ISF_Geant4ToolsConf import G4UA__iGeant4__TrackProcessorUserActionFullG4Tool return G4UA__iGeant4__TrackProcessorUserActionFullG4Tool(name, **kwargs) -def getPassBackG4TrackProcessorUserAction(name='PassBackG4TrackProcessorUserAction', **kwargs): - kwargs.setdefault('ParticleBroker', 'ISF_ParticleBrokerSvcNoOrdering') - return getTrackProcessorUserAction(name, **kwargs) - def getPassBackG4TrackProcessorUserActionTool(name='PassBackG4TrackProcessorUserActionTool', **kwargs): kwargs.setdefault('ParticleBroker', 'ISF_ParticleBrokerSvcNoOrdering') return getTrackProcessorUserActionTool(name, **kwargs) -def getAFII_G4TrackProcessorUserAction(name='AFII_G4TrackProcessorUserAction', **kwargs): - from AthenaCommon.SystemOfUnits import MeV - kwargs.setdefault('ParticleBroker' , 'ISF_AFIIParticleBrokerSvc') - kwargs.setdefault('GeoIDSvc' , 'ISF_AFIIGeoIDSvc' ) - kwargs.setdefault('PassBackEkinThreshold' , 0.05*MeV ) - kwargs.setdefault('KillBoundaryParticlesBelowThreshold', True ) - return getPassBackG4TrackProcessorUserAction(name, **kwargs) - - def getAFII_G4TrackProcessorUserActionTool(name='AFII_G4TrackProcessorUserActionTool', **kwargs): from AthenaCommon.SystemOfUnits import MeV kwargs.setdefault('ParticleBroker' , 'ISF_AFIIParticleBrokerSvc') @@ -120,15 +84,9 @@ def getG4TransportTool(name='ISFG4TransportTool', **kwargs): kwargs.setdefault('BarcodeSvc', ISF_Flags.BarcodeService() ) kwargs.setdefault('RandomGenerator', 'athena') kwargs.setdefault('RandomNumberService', simFlags.RandomSvc()) - # Until we fully migrate to V2 user actions, we disable the unused version via switch - if simFlags.UseV2UserActions.get_Value() == True: - kwargs.setdefault('UserActionSvc', '') - kwargs.setdefault('UserActionSvcV2','G4UA::ISFUserActionSvc') - else: - kwargs.setdefault('UserActionSvc','ISFUserActionSvc') - kwargs.setdefault('UserActionSvcV2', '') - if hasattr(simFlags, 'RecordFlux') and simFlags.RecordFlux.statusOn: - kwargs.setdefault('RecordFlux',simFlags.RecordFlux()) + + kwargs.setdefault('UserActionSvc','G4UA::ISFUserActionSvc') + # Multi-threading settinggs from AthenaCommon.ConcurrencyFlags import jobproperties as concurrencyProps if concurrencyProps.ConcurrencyFlags.NumThreads() > 0: @@ -136,51 +94,25 @@ def getG4TransportTool(name='ISFG4TransportTool', **kwargs): else: is_hive = False kwargs.setdefault('MultiThreading', is_hive) + # Set commands for the G4AtlasAlg + kwargs.setdefault("G4Commands", simFlags.G4Commands.get_Value()) from ISF_Geant4Tools.ISF_Geant4ToolsConf import iGeant4__G4TransportTool return iGeant4__G4TransportTool(name, **kwargs) ### Specialized Versions def getFullG4TransportTool(name='FullG4TransportTool', **kwargs): - # Until we fully migrate to V2 user actions, we disable the unused version via switch - from G4AtlasApps.SimFlags import simFlags - if simFlags.UseV2UserActions.get_Value() == True: - kwargs.setdefault('UserActionSvc', '') - kwargs.setdefault('UserActionSvcV2','G4UA::ISFFullUserActionSvc') - else: - kwargs.setdefault('UserActionSvc','ISFFullUserActionSvc') - kwargs.setdefault('UserActionSvcV2', '') + kwargs.setdefault('UserActionSvc','G4UA::ISFFullUserActionSvc') return getG4TransportTool(name, **kwargs) def getPassBackG4TransportTool(name='PassBackG4TransportTool', **kwargs): - # Until we fully migrate to V2 user actions, we disable the unused version via switch - from G4AtlasApps.SimFlags import simFlags - if simFlags.UseV2UserActions.get_Value() == True: - kwargs.setdefault('UserActionSvc', '') - kwargs.setdefault('UserActionSvcV2','G4UA::ISFPassBackUserActionSvc') - else: - kwargs.setdefault('UserActionSvc','ISFPassBackUserActionSvc') - kwargs.setdefault('UserActionSvcV2', '') + kwargs.setdefault('UserActionSvc','G4UA::ISFPassBackUserActionSvc') return getG4TransportTool(name, **kwargs) def getAFII_G4TransportTool(name='AFII_G4TransportTool', **kwargs): - # Until we fully migrate to V2 user actions, we disable the unused version via switch - from G4AtlasApps.SimFlags import simFlags - if simFlags.UseV2UserActions.get_Value() == True: - kwargs.setdefault('UserActionSvc', '') - kwargs.setdefault('UserActionSvcV2','G4UA::ISF_AFIIUserActionSvc') - else: - kwargs.setdefault('UserActionSvc','ISF_AFIIUserActionSvc') - kwargs.setdefault('UserActionSvcV2', '') + kwargs.setdefault('UserActionSvc','G4UA::ISF_AFIIUserActionSvc') return getG4TransportTool(name, **kwargs) def getQuasiStableG4TransportTool(name='QuasiStableG4TransportTool', **kwargs): - # Until we fully migrate to V2 user actions, we disable the unused version via switch - from G4AtlasApps.SimFlags import simFlags - if simFlags.UseV2UserActions.get_Value() == True: - kwargs.setdefault('UserActionSvc', '') - kwargs.setdefault('UserActionSvcV2','G4UA::ISFQuasiStableUserActionSvc') - else: - kwargs.setdefault('UserActionSvc','ISFQuasiStableUserActionSvc') - kwargs.setdefault('UserActionSvcV2', '') + kwargs.setdefault('UserActionSvc','G4UA::ISFQuasiStableUserActionSvc') kwargs.setdefault('QuasiStableParticlesIncluded', True) return getG4TransportTool(name, **kwargs) diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfigDb.py b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfigDb.py index 8c9f8f9c9cf78acc692939cce71331aeee9783cd..d0da9840d9f161f305f3de4e36e3654bd4a3e562 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfigDb.py +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfigDb.py @@ -1,18 +1,13 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from AthenaCommon.CfgGetter import addTool -addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getMCTruthUserAction" , "ISFMCTruthUserAction") -addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getMCTruthUserActionTool" , "ISFMCTruthUserActionTool") -addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getPhysicsValidationUserAction" , "ISFG4PhysicsValidationUserAction") -addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getG4OnlyPhysicsValidationUserAction" , "G4OnlyPhysicsValidationUserAction") -addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getAFII_G4PhysicsValidationUserAction" , "AFII_G4PhysicsValidationUserAction") -addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getQuasiStableG4PhysicsValidationUserAction" , "QuasiStableG4PhysicsValidationUserAction") +addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getMCTruthUserActionTool" , "ISFMCTruthUserActionTool") -addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getTrackProcessorUserAction" , "ISFG4TrackProcessorUserAction") -addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getFullG4TrackProcessorUserAction" , "FullG4TrackProcessorUserAction") -addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getPassBackG4TrackProcessorUserAction" , "PassBackG4TrackProcessorUserAction") -addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getAFII_G4TrackProcessorUserAction" , "AFII_G4TrackProcessorUserAction") +addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getPhysicsValidationUserActionTool" , "ISFG4PhysicsValidationUserActionTool") +addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getG4OnlyPhysicsValidationUserActionTool" , "G4OnlyPhysicsValidationUserActionTool") +addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getAFII_G4PhysicsValidationUserActionTool" , "AFII_G4PhysicsValidationUserActionTool") +addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getQuasiStableG4PhysicsValidationUserActionTool" , "QuasiStableG4PhysicsValidationUserActionTool") addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getTrackProcessorUserActionTool" , "ISFG4TrackProcessorUserActionTool") addTool("ISF_Geant4Tools.ISF_Geant4ToolsConfig.getFullG4TrackProcessorUserActionTool" , "FullG4TrackProcessorUserActionTool") diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4AtlasRunManager.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4AtlasRunManager.cxx index 83c60aceeb12980c8aaa533ae2047225b120e060..1eec2398e8817275a41f248c4876c6741ec800eb 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4AtlasRunManager.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/G4AtlasRunManager.cxx @@ -20,6 +20,7 @@ #include "G4UImanager.hh" #include "G4UserRunAction.hh" #include "G4Version.hh" +#include "G4HCofThisEvent.hh" //________________________________________________________________________ iGeant4::G4AtlasRunManager::G4AtlasRunManager() @@ -133,8 +134,20 @@ void iGeant4::G4AtlasRunManager::InitializeGeometry() //________________________________________________________________________ void iGeant4::G4AtlasRunManager::EndEvent() { + G4ScoringManager* ScM = G4ScoringManager::GetScoringManagerIfExist(); + if(ScM){ + G4int nPar = ScM->GetNumberOfMesh(); + G4HCofThisEvent* HCE = currentEvent->GetHCofThisEvent(); + if(HCE && nPar>0){ + G4int nColl = HCE->GetCapacity(); + for(G4int i=0;i<nColl;i++) + { + G4VHitsCollection* HC = HCE->GetHC(i); + if(HC) ScM->Accumulate(HC); + } + } + } ATH_MSG_DEBUG( "G4AtlasRunManager::EndEvent" ); - // ZLM Note 1.12.2016: This function is not called } //________________________________________________________________________ @@ -248,7 +261,8 @@ void iGeant4::G4AtlasRunManager::InitializePhysics() } // Do flux recording // kernel->RunInitialization(); - RunInitialization(); + // the following line has been commented to solve an early initialization issue. see ATLASSIM-3078 + //RunInitialization(); //std::cout<<"*AS* run init <<< "<<std::endl; return; } @@ -278,22 +292,6 @@ bool iGeant4::G4AtlasRunManager::ProcessEvent(G4Event* event) return true; } - if (m_recordFlux){ - G4ScoringManager* ScM = G4ScoringManager::GetScoringManagerIfExist(); - if(ScM){ - G4int nPar = ScM->GetNumberOfMesh(); - G4HCofThisEvent* HCE = currentEvent->GetHCofThisEvent(); - if(HCE && nPar>0){; - G4int nColl = HCE->GetCapacity(); - for(G4int i=0;i<nColl;i++) - { - G4VHitsCollection* HC = HCE->GetHC(i); - if(HC) ScM->Accumulate(HC); - } - } - } - } - // stateManager->SetNewState(G4State_GeomClosed); StackPreviousEvent(currentEvent); bool abort=currentEvent->IsAborted(); @@ -306,6 +304,7 @@ bool iGeant4::G4AtlasRunManager::ProcessEvent(G4Event* event) //________________________________________________________________________ void iGeant4::G4AtlasRunManager::RunTermination() { + // std::cout<<" this is G4AtlasRunManager::RunTermination() "<<std::endl; if (m_recordFlux){ G4UImanager *ui=G4UImanager::GetUIpointer(); ui->ApplyCommand("/score/dumpQuantityToFile cylMesh_1 eDep edep.txt"); @@ -315,7 +314,6 @@ void iGeant4::G4AtlasRunManager::RunTermination() ui->ApplyCommand("/score/dumpQuantityToFile cylMesh_1 dose dose.txt"); } - // std::cout<<" this is G4AtlasRunManager::RunTermination() "<<std::endl; #if G4VERSION_NUMBER < 1010 for (size_t itr=0;itr<previousEvents->size();itr++) { delete (*previousEvents)[itr]; } #else diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFG4Helpers.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFG4Helpers.h deleted file mode 100644 index 14c4add800967c278983c79a00616b564788c1e4..0000000000000000000000000000000000000000 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFG4Helpers.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef ISF_GEANT4TOOLS_ISFG4HELPERS_H -#define ISF_GEANT4TOOLS_ISFG4HELPERS_H - -// Barcode includes -#include "BarcodeEvent/Barcode.h" - -// ISF Includes -#include "ISF_Event/ISFParticle.h" - -// MCTruth includes -#include "MCTruth/VTrackInformation.h" - -// forward declarations -namespace HepMC { - class GenParticle; -} -namespace ISF { - class TruthBinding; -} -class VTrackInformation; -class TrackInformation; -class EventInformation; -class G4Track; - -namespace iGeant4 { - - class ISFG4Helpers { - - public: - /** dummy constructor */ - ISFG4Helpers(); - /** dummy destructor */ - ~ISFG4Helpers(); - - /** convert the given G4Track into an ISFParticle */ - static ISF::ISFParticle* convertG4TrackToISFParticle(const G4Track& aTrack, - const ISF::ISFParticle& parent, - ISF::TruthBinding* truth = nullptr); - - /** return a valid UserInformation object of the G4Track for use within the ISF */ - static VTrackInformation* getISFTrackInfo(const G4Track& aTrack); - - /** link the given G4Track to the given ISFParticle */ - static void setG4TrackInfoFromBaseISFParticle( G4Track& aTrack, - const ISF::ISFParticle& baseIsp, - bool setReturnToISF=false ); - - /** attach a new TrackInformation object to the given new (!) G4Track - * (the G4Track must not have a UserInformation object attached to it) */ - static TrackInformation* attachTrackInfoToNewG4Track( G4Track& aTrack, - const ISF::ISFParticle& baseIsp, - TrackClassification classification, - HepMC::GenParticle *nonRegeneratedTruthParticle = nullptr); - - /** return pointer to current EventInformation */ - static EventInformation* getEventInformation(); - - private: - - }; -} - -#endif // ISF_GEANT4TOOLS_ISFG4HELPERS_H diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFTrajectory.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFTrajectory.cxx index 3e64d72e4ef2f1f5d0b582387cb782da4c93a436..31ef6c377f6b9562284dd22d1fe0295b3aa38ebf 100755 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFTrajectory.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFTrajectory.cxx @@ -9,14 +9,14 @@ // class header #include "ISFTrajectory.h" -// package includes -#include "Geant4TruthIncident.h" -#include "ISFG4Helpers.h" - // ISF includes -#include "ISF_Interfaces/ITruthSvc.h" #include "ISF_Event/ISFParticle.h" #include "ISF_Event/TruthBinding.h" +#include "ISF_Interfaces/ITruthSvc.h" + +// ISF Geant4 includes +#include "ISF_Geant4Event/ISFG4Helper.h" +#include "ISF_Geant4Event/Geant4TruthIncident.h" // Athena includes //#include "FadsActions/TrackingAction.h" @@ -79,7 +79,7 @@ void iGeant4::ISFTrajectory::AppendStep(const G4Step* aStep) } // get base ISFParticle - auto* trackInfo = ISFG4Helpers::getISFTrackInfo(*track); + auto* trackInfo = ISFG4Helper::getISFTrackInfo(*track); if (!trackInfo) { G4ExceptionDescription description; description << G4String("AppendStep: ") + "No VTrackInformation associated with G4Track (trackID: " @@ -101,7 +101,7 @@ void iGeant4::ISFTrajectory::AppendStep(const G4Step* aStep) AtlasDetDescr::AtlasRegion geoID = baseIsp->nextGeoID(); - auto* eventInfo = ISFG4Helpers::getEventInformation(); + auto* eventInfo = ISFG4Helper::getEventInformation(); iGeant4::Geant4TruthIncident truth(aStep, *baseIsp, geoID, numSecondaries, m_sHelper, eventInfo); if (m_truthRecordSvcQuick) { diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.cxx index 886383dfd858f891ad9abd48f2efe42b1e654a23..2e095163ca3443f2768e7d75a8b2d843b86f0f74 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.cxx @@ -10,14 +10,16 @@ #include "MCTruthUserAction.h" // package includes -#include "Geant4TruthIncident.h" #include "ISFTrajectory.h" // ISF includes +#include "ISF_Event/ISFParticle.h" + #include "ISF_Interfaces/ITruthSvc.h" #include "ISF_Interfaces/IParticleBroker.h" -#include "ISF_Event/ISFParticle.h" +// ISF Geant4 includes +#include "ISF_Geant4Event/Geant4TruthIncident.h" // Athena includes #include "MCTruth/TrackInformation.h" @@ -26,97 +28,10 @@ #include "SimHelpers/StepHelper.h" +#include "G4EventManager.hh" // Atlas G4 Helpers -iGeant4::MCTruthUserAction::MCTruthUserAction(const std::string& type, - const std::string& name, - const IInterface* parent) - : UserActionBase(type,name,parent), - m_sHelper(), - m_truthRecordSvc("ISF_TruthRecordSvc", name), - m_truthRecordSvcQuick(nullptr) -{ - - //declareInterface<IUserAction>(this); - - declareProperty("TruthRecordSvc", m_truthRecordSvc, "ISF Particle Truth Svc"); - - declareProperty("SecondarySavingLevel", m_ilevel=2); - -} - -StatusCode iGeant4::MCTruthUserAction::initialize() -{ - ATH_MSG_INFO("Initializing iGeant4::MCTruthUserAction"); - - if (m_truthRecordSvc.retrieve().isFailure()){ - ATH_MSG_FATAL( "Could not retrieve " << m_truthRecordSvc ); - return StatusCode::FAILURE; - } - - m_sHelper=SecondaryTracksHelper(G4EventManager::GetEventManager()->GetTrackingManager()); - - // store a pointer directly to the truth service class - // by doing so, the Gaudi overhead can be minimized - m_truthRecordSvcQuick = &(*m_truthRecordSvc); - - return StatusCode::SUCCESS; -} - -StatusCode iGeant4::MCTruthUserAction::finalize() -{ - return StatusCode::SUCCESS; -} - -void iGeant4::MCTruthUserAction::PreTracking(const G4Track* inTrack) -{ - - //std::cout<<"in MCTruthUserAction::PreUserTrackingAction, m_ilevel="<<m_ilevel<<std::endl; - - //m_sHelper.ResetNrOfSecondaries(); - - G4Track* inT = const_cast<G4Track*> (inTrack); - TrackHelper trackHelper(inT); - - if (trackHelper.IsPrimary() || - (trackHelper.IsRegisteredSecondary()&&m_ilevel>1) || - (trackHelper.IsSecondary()&&m_ilevel>2)) { - - G4Trajectory *temp=new iGeant4::ISFTrajectory(inTrack, m_truthRecordSvcQuick); - m_fpTrackingManager->SetStoreTrajectory(true); - m_fpTrackingManager->SetTrajectory(temp); - // @TODO check that the G4TrackingManager deletes the 'temp' - // object after G4TrackingManager::SetStoreTrajectory(false) - // is executed. - } - -} - -void iGeant4::MCTruthUserAction::PostTracking(const G4Track* ) -{ - // We are done tracking this particle, so reset the trajectory. - m_fpTrackingManager->SetStoreTrajectory(false); - -} - -iGeant4::MCTruthUserAction::~MCTruthUserAction() -{} - - - -StatusCode iGeant4::MCTruthUserAction::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - namespace G4UA{ diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.h index 844f0f75feb77e482fc2d7e8e7d34209e667bf04..7f0fc88c9f112398e4fa1f00370b06d9fd324274 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.h @@ -14,7 +14,6 @@ #include "GaudiKernel/ToolHandle.h" #include "AthenaBaseComps/AthAlgTool.h" -#include "G4AtlasTools/UserActionBase.h" #include "ISF_Interfaces/ITruthSvc.h" // Atlas G4 Helpers @@ -34,44 +33,6 @@ Thus it is defined as a AlgTool, to get these assigned easily via python. */ -namespace iGeant4 { - - class ITransportTool; - - class MCTruthUserAction : public UserActionBase { - - public: - MCTruthUserAction(const std::string& type, - const std::string& name, - const IInterface* parent); - ~MCTruthUserAction(); - - StatusCode initialize(); - StatusCode finalize(); - - //void BeginOfEventAction(const G4Event*); - //void EndOfEventAction(const G4Event*); - //void BeginOfRunAction(const G4Run*); - //void EndOfRunAction(const G4Run*); - void PreTracking(const G4Track* aTrack); - void PostTracking(const G4Track* aTrack); - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - private: - - SecondaryTracksHelper m_sHelper; - - /** the ISF truth service */ - ServiceHandle<ISF::ITruthSvc> m_truthRecordSvc; - ISF::ITruthSvc *m_truthRecordSvcQuick; //!< used for faster access - - int m_ilevel; // secondary saving level - - }; - -} // namespace iGeant4 - #include "G4AtlasInterfaces/IPreTrackingAction.h" #include "G4AtlasInterfaces/IPostTrackingAction.h" diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.cxx index 8eacfbe62ae5c0b2afbe155bebdcde7bbbaaba51..4cdb56d7276c71578d0c8733dbce13107ab1a013 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.cxx @@ -2,6 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ + /////////////////////////////////////////////////////////////////// // PhysicsValidationUserAction.cxx, (c) ATLAS Detector software /////////////////////////////////////////////////////////////////// @@ -9,16 +10,16 @@ // class header #include "PhysicsValidationUserAction.h" -// package includes -#include "Geant4TruthIncident.h" - -//ISF includes +// ISF includes #include "ISF_Event/ISFParticle.h" #include "ISF_Event/ParticleClipboard.h" #include "ISF_Interfaces/IParticleBroker.h" #include "ISF_Interfaces/IParticleHelper.h" +// ISF Geant4 includes +#include "ISF_Geant4Event/Geant4TruthIncident.h" + //Athena includes #include "AtlasDetDescr/AtlasRegion.h" #include "MCTruth/EventInformation.h" @@ -30,6 +31,7 @@ #include "G4DynamicParticle.hh" #include "G4TouchableHistory.hh" #include "G4Event.hh" +#include "G4EventManager.hh" #include "G4Step.hh" #include "G4TransportationManager.hh" @@ -39,556 +41,28 @@ #include "TTree.h" // STL includes #include <iostream> - -iGeant4::PhysicsValidationUserAction::PhysicsValidationUserAction(const std::string& type, - const std::string& name, - const IInterface* parent) - : UserActionBase(type,name,parent), - m_UASvc("UserActionSvc",name), - m_particleBroker("ISF::ParticleBroker/ISF_ParticleStackService",name), - m_particleHelper("ISF::ParticleHelper/ISF_ParticleHelper"), - m_geoIDSvc("ISF::GeoIDSvc/ISF_GeoIDSvc",name), - m_geoIDSvcQuick(0), - m_validationOutput(true), - m_thistSvc("THistSvc",name), - //m_validationStream("ISFMaterial"), - m_validationStream("ISFG4SimKernel"), - // branches - m_wzOaTr(0), m_thIn(0), m_phIn(0), m_dIn(0), - m_thEnd(0), m_phEnd(0), m_dEnd(0), - m_X0(0), m_L0(0), m_wZ(0), m_dt(0), - // more branches - m_interactions(nullptr), - m_process(0), m_pdg_mother(0), m_gen_mother(0), m_nChild(0), - m_vtx_dist(0), m_vtx_theta(0), m_vtx_phi(0), m_vtx_e_diff(0), - m_vtx_p_diff(0), m_vtx_plong_diff(0), m_vtx_pperp_diff(0), - m_p_mother(0), m_radLength(0), - //Values taken from G4DetectorEnvelopes/EnvelopeGeometryManager.h - m_idR(1150.-1.e-5), m_idZ(3490.), - m_caloRmean(0.5*(40.+4250.)), m_caloZmean(0.5*(3490.+6740.)), - m_muonRmean(0.5*(60.+30000.)), m_muonZmean(0.5*(6740.+30000.)), - m_cavernRmean(300000.0), m_cavernZmean(300000.0), - m_volumeOffset(1), - m_minHistoryDepth(0), - m_currentTrack(0) -{ - - ATH_MSG_DEBUG("create PhysicsValidationUserAction name: "<<name); - - //declareInterface<IUserAction>(this); - - // validation output section - declareProperty( "ValidationOutput", - m_validationOutput = true, - "If turned on, write out a ROOT tree."); - declareProperty("ValidationStreamName", - m_validationStream = "ISFG4SimKernel", - "Name of the output stream" ); - declareProperty("THistService", - m_thistSvc, - "The THistSvc" ); - declareProperty("ParticleBroker", m_particleBroker, "ISF Particle Broker Svc"); - declareProperty("ParticleHelper", m_particleHelper, "ISF Particle Helper" ); - declareProperty("GeoIDSvc" , m_geoIDSvc , "ISF GeoID Svc" ); - declareProperty("UserActionSvc",m_UASvc); - declareProperty("ID_Rmax",m_idR); - declareProperty("ID_Zmax",m_idZ); - declareProperty("CaloRmean",m_caloRmean); - declareProperty("CaloZmean",m_caloZmean); - declareProperty("MuonRmean",m_muonRmean); - declareProperty("MuonZmean",m_muonZmean); - declareProperty("CavernRmean",m_cavernRmean); - declareProperty("CavernZmean",m_cavernZmean); - -} - -StatusCode iGeant4::PhysicsValidationUserAction::initialize() -{ - ATH_MSG_DEBUG("Initializing PhysicsValidationUserAction"); - - if (m_particleBroker.retrieve().isFailure()) { - ATH_MSG_FATAL("Could not retrieve ISF Particle Broker: " << m_particleBroker); - return StatusCode::FAILURE; - } - - if (m_particleHelper.retrieve().isFailure()) { - ATH_MSG_FATAL("Could not retrieve " << m_particleHelper->name()); - return StatusCode::FAILURE; - } - - if (m_geoIDSvc.retrieve().isFailure()) { - ATH_MSG_FATAL("Could not retrieve ISF GeoID Svc: " << m_geoIDSvc); - } - - if (m_particleBroker.retrieve().isFailure()) { - ATH_MSG_FATAL("Could not retrieve stackSvc"); - return StatusCode::FAILURE; - } - - if (m_UASvc.retrieve().isFailure()) { - ATH_MSG_FATAL("Could not retrieve UserActionSvc"); - return StatusCode::FAILURE; - } - - - m_sHelper=SecondaryTracksHelper(m_UASvc->TrackingManager()); - - m_geoIDSvcQuick = &(*m_geoIDSvc); - - // setup for validation mode - if ( m_validationOutput) { - - // retrieve the histogram service - if ( m_thistSvc.retrieve().isSuccess() ) { - // Create the prefix of histogram names for the THistSvc - const char *treeName="particles"; - const std::string prefix = "/" + m_validationStream + "/"+ treeName; - m_particles = new TTree( treeName, treeName ); - m_particles->Branch("pdg" , &m_pdg , "pdg/I" ); // pdg id - m_particles->Branch("scIn" , &m_scIn , "scIn/I" ); // input process - m_particles->Branch("scOut" , &m_scEnd , "scOut/I" ); // endpoint process - m_particles->Branch("gen" , &m_gen , "gen/I" ); // generation (0 for primary) - m_particles->Branch("geoID" , &m_geoID , "geoID/I" ); // subdetector id - m_particles->Branch("pth" , &m_pth , "pth/F" ); // input momentum polar angle - m_particles->Branch("pph" , &m_pph , "pph/F" ); // input momemtum azimuthal angle - m_particles->Branch("p" , &m_p , "p/F" ); // input momentum - m_particles->Branch("eloss" , &m_eloss , "eloss/F" ); // energy loss - m_particles->Branch("radloss" , &m_radloss , "radloss/F" ); // radiative eloss - m_particles->Branch("ionloss" , &m_ionloss , "ionloss/F" ); // ionization eloss - m_particles->Branch("wzOaTr" , &m_wzOaTr , "wzOaTr/F" ); // zOverZtimesRho times dInX0 - m_particles->Branch("X0" , &m_X0 , "X0/F" ); // dInX0 (material thickness) - m_particles->Branch("L0" , &m_L0 , "L0/F" ); // dInL0 - m_particles->Branch("wZ" , &m_wZ , "wZ/F" ); // averageZ time dInX0 - m_particles->Branch("dt" , &m_dt , "dt/F" ); // time interval - m_particles->Branch("thIn" , &m_thIn , "thIn/F" ); // polar angle input position - m_particles->Branch("phIn" , &m_phIn , "phIn/F" ); // azimuthal angle input position - m_particles->Branch("dIn" , &m_dIn , "dIn/F" ); // distance input position - m_particles->Branch("thEnd" , &m_thEnd , "thEnd/F" ); // polar angle exit position - m_particles->Branch("phEnd" , &m_phEnd , "phEnd/F" ); // azimuthal angle exit position - m_particles->Branch("dEnd" , &m_dEnd , "dEnd/F" ); // distance exit position - - // register the Tree to the THistSvc and return it's StatusCode - ATH_CHECK(m_thistSvc->regTree( prefix, m_particles) ); - - m_X0=0.; - m_L0=0.; - m_wZ=0.; - m_wzOaTr=0.; - - const char *treeNameInt="interactions"; - const std::string prefixInt = "/" + m_validationStream + "/"+ treeNameInt; - m_interactions = new TTree( treeNameInt, treeNameInt ); - m_interactions->Branch("process" , &m_process , "process/I" ); - m_interactions->Branch("pdg_mother" , &m_pdg_mother , "pdg_mother/I" ); - m_interactions->Branch("gen_mother" , &m_gen_mother , "gen_mother/I" ); - m_interactions->Branch("nChild" , &m_nChild , "nch/I" ); - m_interactions->Branch("vtx_dist" , &m_vtx_dist , "vtx_dist/F" ); - m_interactions->Branch("vtx_theta" , &m_vtx_theta , "vtx_theta/F" ); - m_interactions->Branch("vtx_phi" , &m_vtx_phi , "vtx_phi/F" ); - m_interactions->Branch("vtx_e_diff" , &m_vtx_e_diff , "vtx_e_diff/F" ); - m_interactions->Branch("vtx_p_diff" , &m_vtx_p_diff , "vtx_p_diff/F" ); - m_interactions->Branch("vtx_plong_diff" , &m_vtx_plong_diff , "vtx_plong_diff/F" ); - m_interactions->Branch("vtx_pperp_diff" , &m_vtx_pperp_diff , "vtx_pperp_diff/F" ); - m_interactions->Branch("radLength" , &m_radLength , "radLength/F" ); - m_interactions->Branch("p_mother" , &m_p_mother , "p_mother/F" ); - m_interactions->Branch("pdg_child" , m_pdg_child , "pdg_child[nch]/I" ); - m_interactions->Branch("fp_child" , m_fp_child , "fp_child[nch]/F" ); - m_interactions->Branch("oa_child" , m_oa_child , "oa_child[nch]/F" ); - // register the Tree to the THistSvc and return it's StatusCode - ATH_CHECK(m_thistSvc->regTree( prefixInt, m_interactions) ); - - m_radLength = 0.; - - } - } - - return StatusCode::SUCCESS; -} - -StatusCode iGeant4::PhysicsValidationUserAction::finalize() -{ - return StatusCode::SUCCESS; -} - - -void iGeant4::PhysicsValidationUserAction::BeginOfRun(const G4Run*) -{ - // get the geometry manager and check how many layers are present. - G4TransportationManager *transportationManager(G4TransportationManager::GetTransportationManager()); - G4LogicalVolume *world((*(transportationManager->GetWorldsIterator()))->GetLogicalVolume()); - ATH_MSG_VERBOSE("World G4LogicalVolume Name: " << world->GetName() << " has " << world->GetNoDaughters() << " daughters."); - if ("World::World"==world->GetName()) - { - ATH_MSG_INFO("Atlas::Atlas is not the world volume, so assume we are in a cosmics job."); - //Cosmics-specific configuration. - m_volumeOffset=2; - m_minHistoryDepth=1; - } -} - -void iGeant4::PhysicsValidationUserAction::BeginOfEvent(const G4Event*) -{ - - ATH_MSG_VERBOSE("m_idRmax: "<<m_idR <<", m_idZmax: "<<m_idZ); - ATH_MSG_VERBOSE("m_caloR : "<<m_caloRmean<<", m_caloZ : "<<m_caloZmean); - ATH_MSG_VERBOSE("m_muonR : "<<m_muonRmean<<", m_muonZ : "<<m_muonZmean); - ATH_MSG_VERBOSE("m_muonR : "<<m_cavernRmean<<", m_muonZ : "<<m_cavernZmean); - ATH_MSG_VERBOSE("m_cavernR : "<<m_cavernRmean<<", m_cavernZ : "<<m_cavernZmean); - - m_currentTrack = -1; - m_trackGenMap.clear(); - //m_idToStackParticleMap.clear(); - -} - -void iGeant4::PhysicsValidationUserAction::EndOfEvent(const G4Event*) -{ - m_X0=0.; - m_L0=0.; - m_wZ=0.; - m_wzOaTr=0.; - - m_radLength=0; -} - - -void iGeant4::PhysicsValidationUserAction::Step(const G4Step* aStep) -{ - //std::cout<<"PhysicsValidationUserAction::SteppingAction"<<std::endl; - - // process identification - const G4VProcess * process = aStep->GetPostStepPoint()->GetProcessDefinedStep(); - - // material info - G4StepPoint *preStep=aStep->GetPreStepPoint(); - G4StepPoint *postStep=aStep->GetPostStepPoint(); - - // parent - //const ISF::ISFParticle* parent= ISF::ParticleClipboard::getInstance().getParticle(); - // something is seriously wrong if there is no parent particle - //assert(parent); - - G4ThreeVector mom = preStep->GetMomentum(); - G4ThreeVector pos = preStep->GetPosition(); - - // info about generating particle - G4Track * track = aStep->GetTrack(); - - int trackID=track->GetTrackID(); - - //std::cout <<"processing track:"<< trackID<<":"<< mom.mag()<< std::endl; - - if (trackID != m_currentTrack) { // for new G4Track only - - m_pdg = track->GetDefinition()->GetPDGEncoding(); - const G4VProcess* creation = track->GetCreatorProcess(); - m_scIn = creation? creation->GetProcessSubType() : -1; - - VTrackInformation * trackInfo= static_cast<VTrackInformation*>(track->GetUserInformation()); - HepMC::GenParticle* genpart= trackInfo ? const_cast<HepMC::GenParticle*>(trackInfo->GetHepMCParticle()):0; - HepMC::GenVertex* vtx = genpart ? genpart->production_vertex() : 0; - m_gen = genpart? 0 : -1; - - if (genpart) { // mc truth known - while (genpart && vtx ) { - int pdgID=genpart->pdg_id(); - HepMC::GenParticle* genmom = vtx->particles_in_size()>0 ? *(vtx->particles_in_const_begin()) : 0; - if ( genmom && pdgID!=genmom->pdg_id() ) m_gen++; - else if (vtx->particles_out_size()>0 && genpart!=*(vtx->particles_out_const_begin())) m_gen++; - vtx = genmom ? genmom->production_vertex() : 0; - genpart = genmom; - } - } else { - // retrieve info from parent track - int parentID=track->GetParentID(); - std::map<int, int>::iterator genIt = m_trackGenMap.find(parentID); - if ( genIt != m_trackGenMap.end()) m_gen = (genIt->second >= 0) ? genIt->second+1 : genIt->second-1; - } - - if (m_trackGenMap.find(trackID)==m_trackGenMap.end()) m_trackGenMap[trackID]=m_gen; - - m_currentTrack=trackID; - - m_radLength = 0.; - } - - AtlasDetDescr::AtlasRegion geoID = m_geoIDSvcQuick->identifyNextGeoID( pos.x(), - pos.y(), - pos.z(), - mom.x(), - mom.y(), - mom.z() ); - - - - double stepLength = aStep->GetStepLength(); - double radLengthInX0 = preStep->GetMaterial()->GetRadlen(); - double l0 = preStep->GetMaterial()->GetNuclearInterLength(); - float stepInX0 = stepLength/radLengthInX0; - - if (stepInX0>1.e-06) { - - m_X0 += stepInX0; - m_radLength += stepInX0; - - if (l0>0.) { - m_L0 += stepLength/l0; - // average Z/A over fraction of atoms rather than weight fraction - // const G4double* fVec = preStep->GetMaterial()->GetFractionVector(); // mass fraction - double totNA = preStep->GetMaterial()->GetTotNbOfAtomsPerVolume(); - const G4ElementVector* eVec = preStep->GetMaterial()->GetElementVector(); - const G4double* atVector = preStep->GetMaterial() ->GetVecNbOfAtomsPerVolume(); - float mFactor =stepInX0* preStep->GetMaterial()->GetDensity(); - - float zOverA = 0.; float frSum = 0.; - for (unsigned int i=0; i<eVec->size(); i++) { - float fEl = atVector ? atVector[i]/totNA : 0.; - m_wZ += stepInX0*fEl*((*eVec)[i]->GetZ()); - //std::cout <<"elements:"<<i<<","<<fVec[i]<<":"<<(*eVec)[i]->GetZ()<< ","<<m_wZ<<","<<m_wZ/m_X0<<std::endl; - //m_wA += stepInX0*fVec[i]*((*eVec)[i]->GetA()); - zOverA += fEl*((*eVec)[i]->GetZ())/((*eVec)[i]->GetA()); - frSum += fEl; - } - if (fabs(frSum-1.)>0.01) ATH_MSG_DEBUG("G4 material description inconsistent, sum of element fractions:"<< frSum); - m_wzOaTr += mFactor*zOverA; - } - - } - - - // save interaction info (if any) - if ( process && process->GetProcessSubType()>0 && process->GetProcessSubType()!=91) { - - float eloss = postStep->GetMomentum().mag()-preStep->GetMomentum().mag(); - - if (process->GetProcessSubType()==2 ) m_ionloss+=eloss; - if (process->GetProcessSubType()==3 ) m_radloss+=eloss; - - EventInformation* eventInfo = static_cast<EventInformation*> (G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetUserInformation()); - VTrackInformation * trackInfo = static_cast<VTrackInformation*>(track->GetUserInformation()); - const auto baseISP = const_cast<ISF::ISFParticle*>( trackInfo->GetBaseISFParticle() ); - iGeant4::Geant4TruthIncident truth( aStep, *baseISP, geoID, m_sHelper.NrOfNewSecondaries(), m_sHelper, eventInfo); - unsigned int nSec = truth.numberOfChildren(); - if (nSec>0 || track->GetTrackStatus()!=fAlive ) { // save interaction info - //std::cout <<"interaction:"<< process->GetProcessSubType() <<":"<<nSec<< std::endl; - m_process=process->GetProcessSubType(); - m_pdg_mother = track->GetDefinition()->GetPDGEncoding(); - //VTrackInformation * trackInfo= static_cast<VTrackInformation*>(track->GetUserInformation()); - //m_gen_mother = (trackInfo && (trackInfo->GetHepMCParticle() || - // dynamic_cast<TrackBarcodeInfo*>(trackInfo))) ? - //int(trackInfo->GetParticleBarcode()/1.e08) : -1; - m_gen_mother = m_gen; - G4ThreeVector mom = preStep->GetMomentum(); - m_p_mother = mom.mag(); - - m_vtx_dist = postStep->GetPosition().mag(); - m_vtx_theta = postStep->GetPosition().theta(); - m_vtx_phi = postStep->GetPosition().phi(); - - int iPrimSurv = track->GetTrackStatus()!=fAlive ? 0 : 1; - m_nChild = nSec+iPrimSurv; - - G4ThreeVector pbal(mom); - - if (iPrimSurv>0) { - m_pdg_child[0] = m_pdg_mother; - m_fp_child[0] = postStep->GetMomentum().mag()/m_p_mother; - m_oa_child[0] = mom*postStep->GetMomentum()/m_p_mother/postStep->GetMomentum().mag(); - pbal -= postStep->GetMomentum(); - } - - unsigned int nSecMax = nSec+iPrimSurv> MAXCHILDREN ? MAXCHILDREN-iPrimSurv : nSec; - for (unsigned int isec=0; isec< nSec; isec++) { - G4ThreeVector secMom = truth.childP(isec); - if (isec<nSecMax) { - m_pdg_child[isec+iPrimSurv] = truth.childPdgCode(isec); - m_fp_child[isec+iPrimSurv] = secMom.mag()/m_p_mother; - m_oa_child[isec+iPrimSurv] = secMom*mom/m_p_mother/secMom.mag(); - } - pbal -= secMom; - } - - m_vtx_p_diff = pbal.mag(); - m_vtx_plong_diff = pbal*mom/m_p_mother; - m_vtx_pperp_diff = sqrt(m_vtx_p_diff*m_vtx_p_diff-m_vtx_plong_diff*m_vtx_plong_diff); - - m_interactions->Fill(); - - // reset the radiation length - if (m_process==3) m_radLength = 0.; - } - } - - // crossing subdetector boundary ? - G4VPhysicalVolume *preVol=preStep->GetPhysicalVolume(); - G4VPhysicalVolume *postVol=postStep->GetPhysicalVolume(); - - if (postVol==0) { - // left world -save info - m_scEnd = 0; - m_geoID = geoID; - m_dt = track->GetLocalTime(); - - m_pth = track->GetVertexMomentumDirection().theta(); - m_pph = track->GetVertexMomentumDirection().phi(); - m_p = track->GetVertexKineticEnergy(); - m_eloss = track->GetKineticEnergy()-m_p; - - m_thIn= track->GetVertexPosition().theta(); - m_phIn= track->GetVertexPosition().phi(); - m_dIn= track->GetVertexPosition().mag(); - - m_thEnd=postStep->GetPosition().theta(); - m_phEnd=postStep->GetPosition().phi(); - m_dEnd=postStep->GetPosition().mag(); - - m_particles->Fill(); - m_X0 = 0.; - m_L0 = 0.; - m_wZ = 0.; - m_wzOaTr = 0.; - - m_radloss = 0.; - m_ionloss = 0.; - - return; - } - - // if particle killed, save the info - if ( track->GetTrackStatus()!=fAlive ) { - m_scEnd = process? process->GetProcessSubType() : -1; - m_geoID = geoID; - m_dt = track->GetLocalTime(); - - m_pth = track->GetVertexMomentumDirection().theta(); - m_pph = track->GetVertexMomentumDirection().phi(); - m_p = track->GetVertexKineticEnergy(); - m_eloss = track->GetKineticEnergy()-m_p; - - m_thIn= track->GetVertexPosition().theta(); - m_phIn= track->GetVertexPosition().phi(); - m_dIn= track->GetVertexPosition().mag(); - - m_thEnd=postStep->GetPosition().theta(); - m_phEnd=postStep->GetPosition().phi(); - m_dEnd=postStep->GetPosition().mag(); - - m_particles->Fill(); - m_X0 = 0.; - m_L0 = 0.; - m_wZ = 0.; - m_radloss = 0.; - m_ionloss = 0.; - m_wzOaTr = 0.; - m_radLength = 0.; - } - - if ( preVol==postVol ) return; // assume boundaries do not cross G4Volumes - - // Detector boundaries defined by central GeoIDSvc - const G4ThreeVector &postPos = postStep->GetPosition(); - const G4ThreeVector &postMom = postStep->GetMomentum(); - AtlasDetDescr::AtlasRegion nextGeoID = m_geoIDSvcQuick->identifyNextGeoID( postPos.x(), - postPos.y(), - postPos.z(), - postMom.x(), - postMom.y(), - postMom.z() ); - - // save info if leaving the subdetector - if ( nextGeoID == geoID) { - ATH_MSG_DEBUG("track stays inside "<<geoID); - } else { - ATH_MSG_DEBUG("track moves from "<<geoID<<" to "<<nextGeoID); - - // Don't save if doing a zero step ? - //if (aStep->GetTrack()->GetTrackLength() == 0.) { - if (aStep->GetStepLength() == 0.) { - return; - } - - // don't change geometry assignment for validation ntuple - m_geoID = geoID; - - //4ParticleDefinition* particleDefinition = track->GetDefinition(); - - const G4ThreeVector g4pos = track->GetPosition(); - //const double gTime = track->GetGlobalTime(); - const HepGeom::Point3D<double> position(g4pos.x(),g4pos.y(),g4pos.z()); - - G4ThreeVector g4mom = track->GetMomentum(); - const HepGeom::Vector3D<double> momentum(g4mom.x(),g4mom.y(),g4mom.z()); - - //double mass = particleDefinition->GetPDGMass(); - //double charge = particleDefinition->GetPDGCharge(); - //int pdgID = particleDefinition->GetPDGEncoding(); - - if (m_particleBroker) { - - // *AS* why ask stackSvc for current(), shouldn't better the TransportTool keep track? - bool dead=false; - if (track->GetTrackStatus()==fStopAndKill) { - dead=true; - } - - if (!dead) { - - // track info - //VTrackInformation * trackInfo= static_cast<VTrackInformation*>(track->GetUserInformation()); - m_scEnd = 0; - m_dt = track->GetLocalTime(); - - m_pth = track->GetVertexMomentumDirection().theta(); - m_pph = track->GetVertexMomentumDirection().phi(); - m_p = track->GetVertexKineticEnergy(); - m_eloss = track->GetKineticEnergy()-m_p; - - m_thIn= track->GetVertexPosition().theta(); - m_phIn= track->GetVertexPosition().phi(); - m_dIn= track->GetVertexPosition().mag(); - - m_thEnd=postStep->GetPosition().theta(); - m_phEnd=postStep->GetPosition().phi(); - m_dEnd=postStep->GetPosition().mag(); - - m_particles->Fill(); - m_X0 = 0.; - m_L0 = 0.; - m_wZ = 0.; - m_radloss = 0.; - m_ionloss = 0.; - m_wzOaTr= 0.; - } - m_X0=0.; - } - } -} - -void iGeant4::PhysicsValidationUserAction::PreTracking(const G4Track*) -{ - m_sHelper.ResetNrOfSecondaries(); -} - - -StatusCode iGeant4::PhysicsValidationUserAction::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - +#include "GaudiKernel/ISvcLocator.h" +#include "AsgTools/MsgStreamMacros.h" namespace G4UA{ namespace iGeant4 { - PhysicsValidationUserAction::PhysicsValidationUserAction(const Config& config): - m_config(config) + PhysicsValidationUserAction::PhysicsValidationUserAction(const Config& config):AthMessaging(Gaudi::svcLocator()->service<IMessageSvc>("MessageSvc"), "PhysicsValidationUserAction"), + m_config(config),m_geoIDSvcQuick(0), + // branches + m_wzOaTr(0), m_thIn(0), m_phIn(0), m_dIn(0), + m_thEnd(0), m_phEnd(0), m_dEnd(0), + m_X0(0), m_L0(0), m_wZ(0), m_dt(0), + // more branches + m_interactions(nullptr), + m_process(0), m_pdg_mother(0), m_gen_mother(0), m_nChild(0), + m_vtx_dist(0), m_vtx_theta(0), m_vtx_phi(0), m_vtx_e_diff(0), + m_vtx_p_diff(0), m_vtx_plong_diff(0), m_vtx_pperp_diff(0), + m_p_mother(0), m_radLength(0), + m_volumeOffset(1), + m_minHistoryDepth(0), + m_currentTrack(0) { if(4<m_config.verboseLevel) { @@ -598,41 +72,465 @@ namespace G4UA{ void PhysicsValidationUserAction::beginOfEvent(const G4Event*) { - G4ExceptionDescription description; - description << G4String("beginOfEvent: ") + " - this action has not been implemented yet."; - G4Exception("G4UA::iGeant4::PhysicsValidationUserAction", "ActionNotImplemented", JustWarning, description); - return; + + + ATH_MSG_VERBOSE("idRmax: "<<m_config.idR <<", idZmax: "<<m_config.idZ); + ATH_MSG_VERBOSE("caloR : "<<m_config.caloRmean<<", caloZ : "<<m_config.caloZmean); + ATH_MSG_VERBOSE("muonR : "<<m_config.muonRmean<<", muonZ : "<<m_config.muonZmean); + ATH_MSG_VERBOSE("muonR : "<<m_config.cavernRmean<<", muonZ : "<<m_config.cavernZmean); + ATH_MSG_VERBOSE("cavernR : "<<m_config.cavernRmean<<", cavernZ : "<<m_config.cavernZmean); + + m_currentTrack = -1; + m_trackGenMap.clear(); + //m_idToStackParticleMap.clear(); + + } void PhysicsValidationUserAction::endOfEvent(const G4Event*) { - G4ExceptionDescription description; - description << G4String("endOfEvent: ") + " - this action has not been implemented yet."; - G4Exception("G4UA::iGeant4::PhysicsValidationUserAction", "ActionNotImplemented", JustWarning, description); + + m_X0=0.; + m_L0=0.; + m_wZ=0.; + m_wzOaTr=0.; + + m_radLength=0; + return; } void PhysicsValidationUserAction::beginOfRun(const G4Run*) { - G4ExceptionDescription description; - description << G4String("beginOfRun: ") + " - this action has not been implemented yet."; - G4Exception("G4UA::iGeant4::PhysicsValidationUserAction", "ActionNotImplemented", JustWarning, description); - return; - } + + if (m_config.particleBroker.retrieve().isFailure()) { + ATH_MSG_FATAL("Could not retrieve ISF Particle Broker: " << m_config.particleBroker); + return; + } + + if (m_config.particleHelper.retrieve().isFailure()) { + ATH_MSG_FATAL("Could not retrieve " << m_config.particleHelper->name()); + return; + } + + if (m_config.geoIDSvc.retrieve().isFailure()) { + ATH_MSG_FATAL("Could not retrieve ISF GeoID Svc: " << m_config.geoIDSvc); + return; + } + + if (m_config.UASvc.retrieve().isFailure()) { + ATH_MSG_FATAL("Could not retrieve UserActionSvc "<<m_config.UASvc); + return; + } + - void PhysicsValidationUserAction::processStep(const G4Step*) + m_sHelper=SecondaryTracksHelper(G4EventManager::GetEventManager()->GetTrackingManager()); + + m_geoIDSvcQuick = &(*m_config.geoIDSvc); + + // setup for validation mode + if ( m_config.validationOutput) { + + // retrieve the histogram service + if ( m_config.thistSvc.retrieve().isSuccess() ) { + // Create the prefix of histogram names for the THistSvc + const char *treeName="particles"; + const std::string prefix = "/" + m_config.validationStream + "/"+ treeName; + m_particles = new TTree( treeName, treeName ); + m_particles->Branch("pdg" , &m_pdg , "pdg/I" ); // pdg id + m_particles->Branch("scIn" , &m_scIn , "scIn/I" ); // input process + m_particles->Branch("scOut" , &m_scEnd , "scOut/I" ); // endpoint process + m_particles->Branch("gen" , &m_gen , "gen/I" ); // generation (0 for primary) + m_particles->Branch("geoID" , &m_geoID , "geoID/I" ); // subdetector id + m_particles->Branch("pth" , &m_pth , "pth/F" ); // input momentum polar angle + m_particles->Branch("pph" , &m_pph , "pph/F" ); // input momemtum azimuthal angle + m_particles->Branch("p" , &m_p , "p/F" ); // input momentum + m_particles->Branch("eloss" , &m_eloss , "eloss/F" ); // energy loss + m_particles->Branch("radloss" , &m_radloss , "radloss/F" ); // radiative eloss + m_particles->Branch("ionloss" , &m_ionloss , "ionloss/F" ); // ionization eloss + m_particles->Branch("wzOaTr" , &m_wzOaTr , "wzOaTr/F" ); // zOverZtimesRho times dInX0 + m_particles->Branch("X0" , &m_X0 , "X0/F" ); // dInX0 (material thickness) + m_particles->Branch("L0" , &m_L0 , "L0/F" ); // dInL0 + m_particles->Branch("wZ" , &m_wZ , "wZ/F" ); // averageZ time dInX0 + m_particles->Branch("dt" , &m_dt , "dt/F" ); // time interval + m_particles->Branch("thIn" , &m_thIn , "thIn/F" ); // polar angle input position + m_particles->Branch("phIn" , &m_phIn , "phIn/F" ); // azimuthal angle input position + m_particles->Branch("dIn" , &m_dIn , "dIn/F" ); // distance input position + m_particles->Branch("thEnd" , &m_thEnd , "thEnd/F" ); // polar angle exit position + m_particles->Branch("phEnd" , &m_phEnd , "phEnd/F" ); // azimuthal angle exit position + m_particles->Branch("dEnd" , &m_dEnd , "dEnd/F" ); // distance exit position + + // register the Tree to the THistSvc and return it's StatusCode + if(m_config.thistSvc->regTree( prefix, m_particles)!=StatusCode::SUCCESS){ + ATH_MSG_ERROR("Cannot register validation tree"); + } + + m_X0=0.; + m_L0=0.; + m_wZ=0.; + m_wzOaTr=0.; + + const char *treeNameInt="interactions"; + const std::string prefixInt = "/" + m_config.validationStream + "/"+ treeNameInt; + m_interactions = new TTree( treeNameInt, treeNameInt ); + m_interactions->Branch("process" , &m_process , "process/I" ); + m_interactions->Branch("pdg_mother" , &m_pdg_mother , "pdg_mother/I" ); + m_interactions->Branch("gen_mother" , &m_gen_mother , "gen_mother/I" ); + m_interactions->Branch("nChild" , &m_nChild , "nch/I" ); + m_interactions->Branch("vtx_dist" , &m_vtx_dist , "vtx_dist/F" ); + m_interactions->Branch("vtx_theta" , &m_vtx_theta , "vtx_theta/F" ); + m_interactions->Branch("vtx_phi" , &m_vtx_phi , "vtx_phi/F" ); + m_interactions->Branch("vtx_e_diff" , &m_vtx_e_diff , "vtx_e_diff/F" ); + m_interactions->Branch("vtx_p_diff" , &m_vtx_p_diff , "vtx_p_diff/F" ); + m_interactions->Branch("vtx_plong_diff" , &m_vtx_plong_diff , "vtx_plong_diff/F" ); + m_interactions->Branch("vtx_pperp_diff" , &m_vtx_pperp_diff , "vtx_pperp_diff/F" ); + m_interactions->Branch("radLength" , &m_radLength , "radLength/F" ); + m_interactions->Branch("p_mother" , &m_p_mother , "p_mother/F" ); + m_interactions->Branch("pdg_child" , m_pdg_child , "pdg_child[nch]/I" ); + m_interactions->Branch("fp_child" , m_fp_child , "fp_child[nch]/F" ); + m_interactions->Branch("oa_child" , m_oa_child , "oa_child[nch]/F" ); + // register the Tree to the THistSvc and return it's StatusCode + if(m_config.thistSvc->regTree( prefixInt, m_interactions)!=StatusCode::SUCCESS){ + ATH_MSG_ERROR("Cannot register validation tree"); + } + + m_radLength = 0.; + + } + } + + + // get the geometry manager and check how many layers are present. + G4TransportationManager *transportationManager(G4TransportationManager::GetTransportationManager()); + G4LogicalVolume *world((*(transportationManager->GetWorldsIterator()))->GetLogicalVolume()); + ATH_MSG_VERBOSE("World G4LogicalVolume Name: " << world->GetName() << " has " << world->GetNoDaughters() << " daughters."); + if ("World::World"==world->GetName()) + { + ATH_MSG_INFO("Atlas::Atlas is not the world volume, so assume we are in a cosmics job."); + //Cosmics-specific configuration. + m_volumeOffset=2; + m_minHistoryDepth=1; + } + + } + + void PhysicsValidationUserAction::processStep(const G4Step* aStep) { - G4ExceptionDescription description; - description << G4String("processStep: ") + " - this action has not been implemented yet."; - G4Exception("G4UA::iGeant4::PhysicsValidationUserAction", "ActionNotImplemented", JustWarning, description); - return; + //std::cout<<"PhysicsValidationUserAction::SteppingAction"<<std::endl; + + // process identification + const G4VProcess * process = aStep->GetPostStepPoint()->GetProcessDefinedStep(); + + // material info + G4StepPoint *preStep=aStep->GetPreStepPoint(); + G4StepPoint *postStep=aStep->GetPostStepPoint(); + + // parent + //const ISF::ISFParticle* parent= ISF::ParticleClipboard::getInstance().getParticle(); + // something is seriously wrong if there is no parent particle + //assert(parent); + + G4ThreeVector mom = preStep->GetMomentum(); + G4ThreeVector pos = preStep->GetPosition(); + + // info about generating particle + G4Track * track = aStep->GetTrack(); + + int trackID=track->GetTrackID(); + + //std::cout <<"processing track:"<< trackID<<":"<< mom.mag()<< std::endl; + + if (trackID != m_currentTrack) { // for new G4Track only + + m_pdg = track->GetDefinition()->GetPDGEncoding(); + const G4VProcess* creation = track->GetCreatorProcess(); + m_scIn = creation? creation->GetProcessSubType() : -1; + + VTrackInformation * trackInfo= static_cast<VTrackInformation*>(track->GetUserInformation()); + HepMC::GenParticle* genpart= trackInfo ? const_cast<HepMC::GenParticle*>(trackInfo->GetHepMCParticle()):0; + HepMC::GenVertex* vtx = genpart ? genpart->production_vertex() : 0; + m_gen = genpart? 0 : -1; + + if (genpart) { // mc truth known + while (genpart && vtx ) { + int pdgID=genpart->pdg_id(); + HepMC::GenParticle* genmom = vtx->particles_in_size()>0 ? *(vtx->particles_in_const_begin()) : 0; + if ( genmom && pdgID!=genmom->pdg_id() ) m_gen++; + else if (vtx->particles_out_size()>0 && genpart!=*(vtx->particles_out_const_begin())) m_gen++; + vtx = genmom ? genmom->production_vertex() : 0; + genpart = genmom; + } + } else { + // retrieve info from parent track + int parentID=track->GetParentID(); + std::map<int, int>::iterator genIt = m_trackGenMap.find(parentID); + if ( genIt != m_trackGenMap.end()) m_gen = (genIt->second >= 0) ? genIt->second+1 : genIt->second-1; + } + + if (m_trackGenMap.find(trackID)==m_trackGenMap.end()) m_trackGenMap[trackID]=m_gen; + + m_currentTrack=trackID; + + m_radLength = 0.; + } + + AtlasDetDescr::AtlasRegion geoID = m_geoIDSvcQuick->identifyNextGeoID( pos.x(), + pos.y(), + pos.z(), + mom.x(), + mom.y(), + mom.z() ); + + + + double stepLength = aStep->GetStepLength(); + double radLengthInX0 = preStep->GetMaterial()->GetRadlen(); + double l0 = preStep->GetMaterial()->GetNuclearInterLength(); + float stepInX0 = stepLength/radLengthInX0; + + if (stepInX0>1.e-06) { + + m_X0 += stepInX0; + m_radLength += stepInX0; + + if (l0>0.) { + m_L0 += stepLength/l0; + // average Z/A over fraction of atoms rather than weight fraction + // const G4double* fVec = preStep->GetMaterial()->GetFractionVector(); // mass fraction + double totNA = preStep->GetMaterial()->GetTotNbOfAtomsPerVolume(); + const G4ElementVector* eVec = preStep->GetMaterial()->GetElementVector(); + const G4double* atVector = preStep->GetMaterial() ->GetVecNbOfAtomsPerVolume(); + float mFactor =stepInX0* preStep->GetMaterial()->GetDensity(); + + float zOverA = 0.; float frSum = 0.; + for (unsigned int i=0; i<eVec->size(); i++) { + float fEl = atVector ? atVector[i]/totNA : 0.; + m_wZ += stepInX0*fEl*((*eVec)[i]->GetZ()); + //std::cout <<"elements:"<<i<<","<<fVec[i]<<":"<<(*eVec)[i]->GetZ()<< ","<<m_wZ<<","<<m_wZ/m_X0<<std::endl; + //m_wA += stepInX0*fVec[i]*((*eVec)[i]->GetA()); + zOverA += fEl*((*eVec)[i]->GetZ())/((*eVec)[i]->GetA()); + frSum += fEl; + } + if (fabs(frSum-1.)>0.01) ATH_MSG_DEBUG("G4 material description inconsistent, sum of element fractions:"<< frSum); + m_wzOaTr += mFactor*zOverA; + } + + } + + + // save interaction info (if any) + if ( process && process->GetProcessSubType()>0 && process->GetProcessSubType()!=91) { + + float eloss = postStep->GetMomentum().mag()-preStep->GetMomentum().mag(); + + if (process->GetProcessSubType()==2 ) m_ionloss+=eloss; + if (process->GetProcessSubType()==3 ) m_radloss+=eloss; + + EventInformation* eventInfo = static_cast<EventInformation*> (G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetUserInformation()); + VTrackInformation * trackInfo = static_cast<VTrackInformation*>(track->GetUserInformation()); + const auto baseISP = const_cast<ISF::ISFParticle*>( trackInfo->GetBaseISFParticle() ); + ::iGeant4::Geant4TruthIncident truth( aStep, *baseISP, geoID, m_sHelper.NrOfNewSecondaries(), m_sHelper, eventInfo); + unsigned int nSec = truth.numberOfChildren(); + if (nSec>0 || track->GetTrackStatus()!=fAlive ) { // save interaction info + //std::cout <<"interaction:"<< process->GetProcessSubType() <<":"<<nSec<< std::endl; + m_process=process->GetProcessSubType(); + m_pdg_mother = track->GetDefinition()->GetPDGEncoding(); + //VTrackInformation * trackInfo= static_cast<VTrackInformation*>(track->GetUserInformation()); + //m_gen_mother = (trackInfo && (trackInfo->GetHepMCParticle() || + // dynamic_cast<TrackBarcodeInfo*>(trackInfo))) ? + //int(trackInfo->GetParticleBarcode()/1.e08) : -1; + m_gen_mother = m_gen; + G4ThreeVector mom = preStep->GetMomentum(); + m_p_mother = mom.mag(); + + m_vtx_dist = postStep->GetPosition().mag(); + m_vtx_theta = postStep->GetPosition().theta(); + m_vtx_phi = postStep->GetPosition().phi(); + + int iPrimSurv = track->GetTrackStatus()!=fAlive ? 0 : 1; + m_nChild = nSec+iPrimSurv; + + G4ThreeVector pbal(mom); + + if (iPrimSurv>0) { + m_pdg_child[0] = m_pdg_mother; + m_fp_child[0] = postStep->GetMomentum().mag()/m_p_mother; + m_oa_child[0] = mom*postStep->GetMomentum()/m_p_mother/postStep->GetMomentum().mag(); + pbal -= postStep->GetMomentum(); + } + + unsigned int nSecMax = nSec+iPrimSurv> MAXCHILDREN ? MAXCHILDREN-iPrimSurv : nSec; + for (unsigned int isec=0; isec< nSec; isec++) { + G4ThreeVector secMom = truth.childP(isec); + if (isec<nSecMax) { + m_pdg_child[isec+iPrimSurv] = truth.childPdgCode(isec); + m_fp_child[isec+iPrimSurv] = secMom.mag()/m_p_mother; + m_oa_child[isec+iPrimSurv] = secMom*mom/m_p_mother/secMom.mag(); + } + pbal -= secMom; + } + + m_vtx_p_diff = pbal.mag(); + m_vtx_plong_diff = pbal*mom/m_p_mother; + m_vtx_pperp_diff = sqrt(m_vtx_p_diff*m_vtx_p_diff-m_vtx_plong_diff*m_vtx_plong_diff); + + m_interactions->Fill(); + + // reset the radiation length + if (m_process==3) m_radLength = 0.; + } + } + + // crossing subdetector boundary ? + G4VPhysicalVolume *preVol=preStep->GetPhysicalVolume(); + G4VPhysicalVolume *postVol=postStep->GetPhysicalVolume(); + + if (postVol==0) { + // left world -save info + m_scEnd = 0; + m_geoID = geoID; + m_dt = track->GetLocalTime(); + + m_pth = track->GetVertexMomentumDirection().theta(); + m_pph = track->GetVertexMomentumDirection().phi(); + m_p = track->GetVertexKineticEnergy(); + m_eloss = track->GetKineticEnergy()-m_p; + + m_thIn= track->GetVertexPosition().theta(); + m_phIn= track->GetVertexPosition().phi(); + m_dIn= track->GetVertexPosition().mag(); + + m_thEnd=postStep->GetPosition().theta(); + m_phEnd=postStep->GetPosition().phi(); + m_dEnd=postStep->GetPosition().mag(); + + m_particles->Fill(); + m_X0 = 0.; + m_L0 = 0.; + m_wZ = 0.; + m_wzOaTr = 0.; + + m_radloss = 0.; + m_ionloss = 0.; + + return; + } + + // if particle killed, save the info + if ( track->GetTrackStatus()!=fAlive ) { + m_scEnd = process? process->GetProcessSubType() : -1; + m_geoID = geoID; + m_dt = track->GetLocalTime(); + + m_pth = track->GetVertexMomentumDirection().theta(); + m_pph = track->GetVertexMomentumDirection().phi(); + m_p = track->GetVertexKineticEnergy(); + m_eloss = track->GetKineticEnergy()-m_p; + + m_thIn= track->GetVertexPosition().theta(); + m_phIn= track->GetVertexPosition().phi(); + m_dIn= track->GetVertexPosition().mag(); + + m_thEnd=postStep->GetPosition().theta(); + m_phEnd=postStep->GetPosition().phi(); + m_dEnd=postStep->GetPosition().mag(); + + m_particles->Fill(); + m_X0 = 0.; + m_L0 = 0.; + m_wZ = 0.; + m_radloss = 0.; + m_ionloss = 0.; + m_wzOaTr = 0.; + m_radLength = 0.; + } + + if ( preVol==postVol ) return; // assume boundaries do not cross G4Volumes + + // Detector boundaries defined by central GeoIDSvc + const G4ThreeVector &postPos = postStep->GetPosition(); + const G4ThreeVector &postMom = postStep->GetMomentum(); + AtlasDetDescr::AtlasRegion nextGeoID = m_geoIDSvcQuick->identifyNextGeoID( postPos.x(), + postPos.y(), + postPos.z(), + postMom.x(), + postMom.y(), + postMom.z() ); + + // save info if leaving the subdetector + if ( nextGeoID == geoID) { + ATH_MSG_DEBUG("track stays inside "<<geoID); + } else { + ATH_MSG_DEBUG("track moves from "<<geoID<<" to "<<nextGeoID); + + // Don't save if doing a zero step ? + //if (aStep->GetTrack()->GetTrackLength() == 0.) { + if (aStep->GetStepLength() == 0.) { + return; + } + + // don't change geometry assignment for validation ntuple + m_geoID = geoID; + + //4ParticleDefinition* particleDefinition = track->GetDefinition(); + + const G4ThreeVector g4pos = track->GetPosition(); + //const double gTime = track->GetGlobalTime(); + const HepGeom::Point3D<double> position(g4pos.x(),g4pos.y(),g4pos.z()); + + G4ThreeVector g4mom = track->GetMomentum(); + const HepGeom::Vector3D<double> momentum(g4mom.x(),g4mom.y(),g4mom.z()); + + //double mass = particleDefinition->GetPDGMass(); + //double charge = particleDefinition->GetPDGCharge(); + //int pdgID = particleDefinition->GetPDGEncoding(); + + if (m_config.particleBroker) { + + // *AS* why ask stackSvc for current(), shouldn't better the TransportTool keep track? + bool dead=false; + if (track->GetTrackStatus()==fStopAndKill) { + dead=true; + } + + if (!dead) { + + // track info + //VTrackInformation * trackInfo= static_cast<VTrackInformation*>(track->GetUserInformation()); + m_scEnd = 0; + m_dt = track->GetLocalTime(); + + m_pth = track->GetVertexMomentumDirection().theta(); + m_pph = track->GetVertexMomentumDirection().phi(); + m_p = track->GetVertexKineticEnergy(); + m_eloss = track->GetKineticEnergy()-m_p; + + m_thIn= track->GetVertexPosition().theta(); + m_phIn= track->GetVertexPosition().phi(); + m_dIn= track->GetVertexPosition().mag(); + + m_thEnd=postStep->GetPosition().theta(); + m_phEnd=postStep->GetPosition().phi(); + m_dEnd=postStep->GetPosition().mag(); + + m_particles->Fill(); + m_X0 = 0.; + m_L0 = 0.; + m_wZ = 0.; + m_radloss = 0.; + m_ionloss = 0.; + m_wzOaTr= 0.; + } + m_X0=0.; + } + } + } - + void PhysicsValidationUserAction::preTracking(const G4Track*) { - G4ExceptionDescription description; - description << G4String("preTracking: ") + " - this action has not been implemented yet."; - G4Exception("G4UA::iGeant4::PhysicsValidationUserAction", "ActionNotImplemented", JustWarning, description); + + m_sHelper.ResetNrOfSecondaries(); return; } diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.h index d7fb1cf9b39138450a0a304738edb6cf19022fb5..77d72bfdf053543a149b99b8cfc643df8ccf05a2 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.h @@ -7,11 +7,7 @@ #include "AthenaBaseComps/AthAlgTool.h" -//#include "FadsActions/UserAction.h" -//#include "FadsActions/TrackingAction.h" - #include "G4AtlasInterfaces/IUserActionSvc.h" -#include "G4AtlasTools/UserActionBase.h" #include "ISF_Interfaces/IParticleBroker.h" #include "ISF_Interfaces/IParticleHelper.h" @@ -40,115 +36,16 @@ namespace ISF { class IParticleBroker; } -namespace iGeant4 { - - class PhysicsValidationUserAction final: public UserActionBase { - - public: - PhysicsValidationUserAction(const std::string& type, - const std::string& name, - const IInterface* parent); - virtual ~PhysicsValidationUserAction() {} - - StatusCode initialize(); - StatusCode finalize(); - - void BeginOfEvent(const G4Event*) override; - void EndOfEvent(const G4Event*) override; - void BeginOfRun(const G4Run*) override; - - void Step(const G4Step*) override; - - void PreTracking(const G4Track* aTrack) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - private: - ServiceHandle<IUserActionSvc> m_UASvc; - - SecondaryTracksHelper m_sHelper; - - ServiceHandle<ISF::IParticleBroker> m_particleBroker; - ToolHandle<ISF::IParticleHelper> m_particleHelper; - - /** access to the central ISF GeoID serice*/ - ServiceHandle<ISF::IGeoIDSvc> m_geoIDSvc; //!< athena service handle - ISF::IGeoIDSvc *m_geoIDSvcQuick; //!< quickaccess avoiding gaudi ovehead - - - /** Validation output with histogram service */ - bool m_validationOutput; //!< turn validation mode on/off - ServiceHandle<ITHistSvc> m_thistSvc; //!< the histogram service - std::string m_validationStream; //!< validation THist stream name - - TTree *m_particles; //!< ROOT tree containing track info - int m_pdg; - int m_scIn; - int m_scEnd; - int m_gen; - int m_geoID; - float m_theta; - float m_pth; - float m_pph; - float m_p; - float m_eloss; - float m_radloss; - float m_ionloss; - float m_wzOaTr; - float m_thIn; - float m_phIn; - float m_dIn; - float m_thEnd; - float m_phEnd; - float m_dEnd; - float m_X0; - float m_L0; - float m_wZ; - float m_dt; - - TTree *m_interactions; //!< ROOT tree containing vertex info - mutable int m_process; - mutable int m_pdg_mother; - mutable int m_gen_mother; - mutable int m_nChild; - mutable float m_vtx_dist; - mutable float m_vtx_theta; - mutable float m_vtx_phi; - mutable float m_vtx_e_diff; - mutable float m_vtx_p_diff; - mutable float m_vtx_plong_diff; - mutable float m_vtx_pperp_diff; - mutable float m_p_mother; - mutable float m_radLength; - mutable int m_pdg_child[MAXCHILDREN]; // decay product pdg code - mutable float m_fp_child[MAXCHILDREN]; // fraction of incoming momentum - mutable float m_oa_child[MAXCHILDREN]; // opening angle wrt the mother - - - /** GeoIDSvc needs these? */ - double m_idR, m_idZ; - double m_caloRmean, m_caloZmean; - double m_muonRmean, m_muonZmean; - double m_cavernRmean, m_cavernZmean; - int m_volumeOffset; - int m_minHistoryDepth; - - mutable int m_currentTrack; - std::map<int, int> m_trackGenMap; - - }; - -} - #include "G4AtlasInterfaces/IBeginEventAction.h" #include "G4AtlasInterfaces/IEndEventAction.h" #include "G4AtlasInterfaces/IBeginRunAction.h" #include "G4AtlasInterfaces/ISteppingAction.h" #include "G4AtlasInterfaces/IPreTrackingAction.h" +#include "AthenaBaseComps/AthMessaging.h" namespace G4UA{ namespace iGeant4 { - class PhysicsValidationUserAction: public IBeginEventAction, public IEndEventAction, public IBeginRunAction, public ISteppingAction, public IPreTrackingAction + class PhysicsValidationUserAction: public IBeginEventAction, public IEndEventAction, public IBeginRunAction, public ISteppingAction, public IPreTrackingAction, public AthMessaging { public: @@ -156,6 +53,27 @@ namespace G4UA{ struct Config { unsigned int verboseLevel=0; + bool validationOutput = true; + std::string validationStream="ISFG4SimKernel"; + ServiceHandle<ITHistSvc> thistSvc=ServiceHandle<ITHistSvc>("THistSvc", "PhysicsValidationUserAction"); + ServiceHandle<ISF::IParticleBroker> particleBroker= + ServiceHandle<ISF::IParticleBroker>("ISF::ParticleBroker/ISF_ParticleStackService", "PhysicsValidationUserAction"); + ToolHandle<ISF::IParticleHelper> particleHelper= + ToolHandle<ISF::IParticleHelper>("ISF::ParticleHelper/ISF_ParticleHelper"); + ServiceHandle<ISF::IGeoIDSvc> geoIDSvc= + ServiceHandle<ISF::IGeoIDSvc>("ISF::GeoIDSvc/ISF_GeoIDSvc", "PhysicsValidationUserAction"); + + ServiceHandle<G4UA::IUserActionSvc> UASvc= + ServiceHandle<G4UA::IUserActionSvc>("G4UA::UserActionService","PhysicsValidationUserAction"); + double idR=1150.-1.e-5; + double idZ=3490.; + double caloRmean=0.5*(40.+4250.); + double caloZmean=0.5*(3490.+6740.); + double muonRmean=0.5*(60.+30000.); + double muonZmean=0.5*(6740.+30000.); + double cavernRmean=300000.0; + double cavernZmean=300000.0; + }; PhysicsValidationUserAction(const Config& config); @@ -165,7 +83,64 @@ namespace G4UA{ virtual void processStep(const G4Step*) override final; virtual void preTracking(const G4Track*) override final; private: + Config m_config; + + SecondaryTracksHelper m_sHelper; + + /** access to the central ISF GeoID serice*/ + ISF::IGeoIDSvc *m_geoIDSvcQuick; //!< quickaccess avoiding gaudi ovehead + + TTree *m_particles; //!< ROOT tree containing track info + int m_pdg; + int m_scIn; + int m_scEnd; + int m_gen; + int m_geoID; + float m_theta; + float m_pth; + float m_pph; + float m_p; + float m_eloss; + float m_radloss; + float m_ionloss; + float m_wzOaTr; + float m_thIn; + float m_phIn; + float m_dIn; + float m_thEnd; + float m_phEnd; + float m_dEnd; + float m_X0; + float m_L0; + float m_wZ; + float m_dt; + + TTree *m_interactions; //!< ROOT tree containing vertex info + mutable int m_process; + mutable int m_pdg_mother; + mutable int m_gen_mother; + mutable int m_nChild; + mutable float m_vtx_dist; + mutable float m_vtx_theta; + mutable float m_vtx_phi; + mutable float m_vtx_e_diff; + mutable float m_vtx_p_diff; + mutable float m_vtx_plong_diff; + mutable float m_vtx_pperp_diff; + mutable float m_p_mother; + mutable float m_radLength; + mutable int m_pdg_child[MAXCHILDREN]; // decay product pdg code + mutable float m_fp_child[MAXCHILDREN]; // fraction of incoming momentum + mutable float m_oa_child[MAXCHILDREN]; // opening angle wrt the mother + + + int m_volumeOffset; + int m_minHistoryDepth; + + mutable int m_currentTrack; + std::map<int, int> m_trackGenMap; + }; // class PhysicsValidationUserAction } // namespace iGeant4 diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.cxx index 304b3b0098638e5677f22a48cae6a13354160156..9a17c5eafff0970e9d11be051a5158d8f37c761f 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.cxx @@ -6,13 +6,37 @@ #include "PhysicsValidationUserActionTool.h" namespace G4UA{ - + namespace iGeant4{ - + PhysicsValidationUserActionTool::PhysicsValidationUserActionTool(const std::string& type, const std::string& name,const IInterface* parent): ActionToolBase<PhysicsValidationUserAction>(type, name, parent), m_config(){ + + + declareProperty( "ValidationOutput", + m_config.validationOutput, + "If turned on, write out a ROOT tree."); + declareProperty("ValidationStreamName", + m_config.validationStream, + "Name of the output stream" ); + declareProperty("THistService", + m_config.thistSvc, + "The THistSvc" ); + declareProperty("ParticleBroker", m_config.particleBroker, "ISF Particle Broker Svc"); + declareProperty("ParticleHelper", m_config.particleHelper, "ISF Particle Helper" ); + declareProperty("GeoIDSvc" , m_config.geoIDSvc , "ISF GeoID Svc" ); + declareProperty("UserActionSvc",m_config.UASvc); + declareProperty("ID_Rmax",m_config.idR); + declareProperty("ID_Zmax",m_config.idZ); + declareProperty("CaloRmean",m_config.caloRmean); + declareProperty("CaloZmean",m_config.caloZmean); + declareProperty("MuonRmean",m_config.muonRmean); + declareProperty("MuonZmean",m_config.muonZmean); + declareProperty("CavernRmean",m_config.cavernRmean); + declareProperty("CavernZmean",m_config.cavernZmean); + } - + std::unique_ptr<PhysicsValidationUserAction> PhysicsValidationUserActionTool::makeAction(){ ATH_MSG_DEBUG("makeAction"); if(msgLvl(MSG::VERBOSE)) { m_config.verboseLevel = 10; } diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.h index 81e7807f338d044ddf19c995b2d6bbee8e402d82..32401815201449e66699a55323222c7d1bdf564b 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.h @@ -13,21 +13,21 @@ #include "PhysicsValidationUserAction.h" namespace G4UA{ - + namespace iGeant4{ - - + + /// @class PhysicsValidationUserActionTool /// @brief Place holder tool /// /// @author John Chapman /// - + class PhysicsValidationUserActionTool: - public ActionToolBase<PhysicsValidationUserAction>, + public ActionToolBase<PhysicsValidationUserAction>, public IBeginEventActionTool, public IEndEventActionTool, public IBeginRunActionTool, public ISteppingActionTool, public IPreTrackingActionTool { - + public: /// Standard constructor PhysicsValidationUserActionTool(const std::string& type, const std::string& name,const IInterface* parent); @@ -46,7 +46,7 @@ namespace G4UA{ /// Retrieve the preTracking action virtual IPreTrackingAction* getPreTrackingAction() override final { return static_cast<IPreTrackingAction*>( getAction() ); } - + /// Query interface for gaudi virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override; protected: @@ -56,7 +56,7 @@ namespace G4UA{ /// Configuration parameters PhysicsValidationUserAction::Config m_config; }; // class PhysicsValidationUserActionTool - + }// iGeant4 } // namespace G4UA #endif //ISF_GEANT4TOOLS_G4UA__PHYSICSVALIATIONUSERACTIONTOOL_H diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.cxx index 262de7f0b1032c7f02f925279daa28cbda1d8bff..b359cfa98237ff7a18970632b8382f3a19660e27 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.cxx @@ -9,15 +9,15 @@ // class header #include "TrackProcessorUserActionBase.h" -// local package includes -#include "ISFG4Helpers.h" - // ISF includes #include "ISF_Event/ISFParticle.h" #include "ISF_Event/EntryLayer.h" #include "ISF_Interfaces/IParticleBroker.h" +// ISF Geant4 includes +#include "ISF_Geant4Event/ISFG4Helper.h" + // Athena includes #include "AtlasDetDescr/AtlasRegion.h" @@ -25,7 +25,6 @@ #include "MCTruth/PrimaryParticleInformation.h" #include "MCTruth/TrackHelper.h" #include "MCTruth/TrackInformation.h" -#include "MCTruth/VTrackInformation.h" #include "SimHelpers/StepHelper.h" #include "StoreGate/StoreGateSvc.h" @@ -46,31 +45,31 @@ #include <iostream> -iGeant4::TrackProcessorUserActionBase::TrackProcessorUserActionBase(const std::string& type, const std::string& name, const IInterface* parent) - : UserActionBase(type,name,parent), - m_eventInfo(nullptr), - m_curBaseISP(nullptr) - //TODO ELLI , AthMessaging( msgSvc(), name) -{ - // declareInterface<IUserAction>(this); +namespace G4UA { - //TODO ELLI ATH_MSG_DEBUG("create TrackProcessorUserActionBase name: "<<name); +namespace iGeant4 { +TrackProcessorUserActionBase::TrackProcessorUserActionBase(): + m_eventInfo(nullptr), + m_curBaseISP(nullptr) +{; } -void iGeant4::TrackProcessorUserActionBase::BeginOfEvent(const G4Event*) +void TrackProcessorUserActionBase::beginOfEvent(const G4Event*) { m_curBaseISP = nullptr; - m_eventInfo = ISFG4Helpers::getEventInformation(); + m_eventInfo = ::iGeant4::ISFG4Helper::getEventInformation(); + return; } -void iGeant4::TrackProcessorUserActionBase::EndOfEvent(const G4Event*) +void TrackProcessorUserActionBase::endOfEvent(const G4Event*) { m_curBaseISP = nullptr; - m_eventInfo = nullptr; + m_eventInfo = nullptr; + return; } -void iGeant4::TrackProcessorUserActionBase::Step(const G4Step* aStep) +void TrackProcessorUserActionBase::processStep(const G4Step* aStep) { // get geoID from parent //TODO ELLI AtlasDetDescr::AtlasRegion curGeoID = m_curBaseISP->nextGeoID(); @@ -90,302 +89,157 @@ void iGeant4::TrackProcessorUserActionBase::Step(const G4Step* aStep) // get a non-const G4Track for current secondary (nasty!) G4Track* aSecondaryTrack = const_cast<G4Track*>( aConstSecondaryTrack ); - auto *trackInfo = ISFG4Helpers::getISFTrackInfo(*aSecondaryTrack); + auto *trackInfo = ::iGeant4::ISFG4Helper::getISFTrackInfo(*aSecondaryTrack); // G4Tracks aready returned to ISF will have a TrackInformation attached to them bool particleReturnedToISF = trackInfo && trackInfo->GetReturnedToISF(); if (!particleReturnedToISF) { HepMC::GenParticle* generationZeroTruthParticle = nullptr; - ISFG4Helpers::attachTrackInfoToNewG4Track( *aSecondaryTrack, - *m_curBaseISP, - Secondary, - generationZeroTruthParticle ); + ::iGeant4::ISFG4Helper::attachTrackInfoToNewG4Track( *aSecondaryTrack, + *m_curBaseISP, + Secondary, + generationZeroTruthParticle ); } } // <- loop over secondaries from this step return; } -void iGeant4::TrackProcessorUserActionBase::PreTracking(const G4Track* aTrack) +void TrackProcessorUserActionBase::preTracking(const G4Track* aTrack) { - // what a great way to start a function... :) - G4Track* inT = const_cast<G4Track*> (aTrack); - - auto *trackInfo = ISFG4Helpers::getISFTrackInfo(*aTrack); - - // will be filled later on - HepMC::GenParticle *currentlyTracedHepPart = nullptr; + bool isPrimary = ! aTrack->GetParentID(); + if (isPrimary) { + G4Track* nonConstTrack = const_cast<G4Track*> (aTrack); // love it :) + setupPrimary(*nonConstTrack); + } else { + setupSecondary(*aTrack); + } + return; +} +void TrackProcessorUserActionBase::setupPrimary(G4Track& aTrack) +{ // // Get PrimaryParticleInformation from G4PrimaryParticle (assigned by TransportTool::addPrimaryVertex) - // The ISFParticle should always exist, and the HepMC::GenParticle should exist if a primary EvGen particle (secondaries passed from G4 back to ISF for subsequent processing with G4 will have null pointer for HepMC::GenParticle) // - // see if primary particle - int parentID = aTrack->GetParentID(); - bool isPrimary = !parentID; - - if (isPrimary) { - if ( trackInfo ) { - G4ExceptionDescription description; - description << G4String("PreUserTrackingAction: ") - << "Started simulating primary particle which already has a TrackInformation/TrackBarcodeInfo object attached (trackID: " - << aTrack->GetTrackID() << ", track pos: "<<aTrack->GetPosition() << ", mom: "<<aTrack->GetMomentum() - << ", parentID " << aTrack->GetParentID() << ")"; - G4Exception("iGeant4::TrackProcessorUserActionBase", "TrackInformationAlreadyExists", FatalException, description); - return; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. - } - - auto ppInfo = dynamic_cast <PrimaryParticleInformation*> (aTrack->GetDynamicParticle()->GetPrimaryParticle()->GetUserInformation()); - if (!ppInfo) { - G4ExceptionDescription description; - description << G4String("PreUserTrackingAction: ") + "NULL PrimaryParticleInformation pointer for current G4Step (trackID " - << aTrack->GetTrackID() << ", track pos: "<<aTrack->GetPosition() << ", mom: "<<aTrack->GetMomentum() - << ", parentID " << parentID << ")"; - G4Exception("iGeant4::TrackProcessorUserActionBase", "NoPPInfo", FatalException, description); - return; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. - } - - // get base ISFParticle and link to TrackInformation - auto baseISP = ppInfo->GetISFParticle(); - if (!baseISP) { - G4ExceptionDescription description; - description << G4String("PreUserTrackingAction: ") + "No ISFParticle associated with primary particle (trackID: " - << aTrack->GetTrackID() << ", track pos: "<<aTrack->GetPosition() << ", mom: "<<aTrack->GetMomentum() - << ", parentID " << parentID << ")"; - G4Exception("iGeant4::TrackProcessorUserActionBase", "NoISFParticle", FatalException, description); - return; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. - } - - auto truthBinding = baseISP->getTruthBinding(); - if (!truthBinding) { - G4ExceptionDescription description; - description << G4String("PreUserTrackingAction: ") + "No ISF::TruthBinding associated with primary particle (trackID: " - << aTrack->GetTrackID() << ", track pos: "<<aTrack->GetPosition() << ", mom: "<<aTrack->GetMomentum() - << ", parentID " << parentID << ")"; - G4Exception("iGeant4::TrackProcessorUserActionBase", "NoISFTruthBinding", FatalException, description); - return; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. - } - - int regenerationNr = ppInfo->GetRegenerationNr(); - auto* primaryTruthParticle = truthBinding->getGenerationZeroTruthParticle(); - auto* generationZeroTruthParticle = truthBinding->getGenerationZeroTruthParticle(); - currentlyTracedHepPart = truthBinding->getTruthParticle(); - - TrackClassification classification = Secondary; - // if particle points to a non-zero truth particle it can not just be a 'simple' Secondary - if (currentlyTracedHepPart) { - if (currentlyTracedHepPart==primaryTruthParticle) { classification = Primary; } - else if (generationZeroTruthParticle==primaryTruthParticle && regenerationNr>0) { classification = RegeneratedPrimary; } - else { classification = RegisteredSecondary; } - } + auto* trackInfo = ::iGeant4::ISFG4Helper::getISFTrackInfo(aTrack); + if ( trackInfo ) { + G4ExceptionDescription description; + description << G4String("PreUserTrackingAction: ") + << "Started simulation of primary particle which already has a TrackInformation/TrackBarcodeInfo object attached (trackID: " + << aTrack.GetTrackID() << ", track pos: "<<aTrack.GetPosition() << ", mom: "<<aTrack.GetMomentum() + << ", parentID " << aTrack.GetParentID() << ")"; + G4Exception("iGeant4::TrackProcessorUserActionBase", "TrackInformationAlreadyExists", FatalException, description); + return; // The G4Exception call above should abort the job, but Coverity does not seem to pick this up. + } - auto* newTrackInfo = ISFG4Helpers::attachTrackInfoToNewG4Track( *inT, - *baseISP, - classification, - generationZeroTruthParticle ); - newTrackInfo->SetRegenerationNr(regenerationNr); - trackInfo = newTrackInfo; - } else { - // secondary particle (why does TrackInformation return a const object!?) - currentlyTracedHepPart = const_cast<HepMC::GenParticle*>( trackInfo->GetHepMCParticle() ); + auto* ppInfo = dynamic_cast <PrimaryParticleInformation*> (aTrack.GetDynamicParticle()->GetPrimaryParticle()->GetUserInformation()); + if (!ppInfo) { + G4ExceptionDescription description; + description << G4String("PreUserTrackingAction: ") + "NULL PrimaryParticleInformation pointer for current G4Step (trackID " + << aTrack.GetTrackID() << ", track pos: "<<aTrack.GetPosition() << ", mom: "<<aTrack.GetMomentum() + << ", parentID " << aTrack.GetParentID() << ")"; + G4Exception("iGeant4::TrackProcessorUserActionBase", "NoPPInfo", FatalException, description); + return; // The G4Exception call above should abort the job, but Coverity does not seem to pick this up. } - // why does TrackInformation return a const object!? - auto primaryTruthParticle = const_cast<HepMC::GenParticle*>( trackInfo->GetPrimaryHepMCParticle() ); - m_eventInfo->SetCurrentlyTraced( currentlyTracedHepPart ); - m_eventInfo->SetCurrentPrimary ( primaryTruthParticle ); + // get base ISFParticle and link to TrackInformation + auto* baseISP = ppInfo->GetISFParticle(); + if (!baseISP) { + G4ExceptionDescription description; + description << G4String("PreUserTrackingAction: ") + "No ISFParticle associated with primary particle (trackID: " + << aTrack.GetTrackID() << ", track pos: "<<aTrack.GetPosition() << ", mom: "<<aTrack.GetMomentum() + << ", parentID " << aTrack.GetParentID() << ")"; + G4Exception("iGeant4::TrackProcessorUserActionBase", "NoISFParticle", FatalException, description); + return; // The G4Exception call above should abort the job, but Coverity does not seem to pick this up. + } - // get link to base ISFParticle from G4Track user information - m_curBaseISP = const_cast<ISF::ISFParticle*>( trackInfo->GetBaseISFParticle() ); + auto* truthBinding = baseISP->getTruthBinding(); + if (!truthBinding) { + G4ExceptionDescription description; + description << G4String("PreUserTrackingAction: ") + "No ISF::TruthBinding associated with primary particle (trackID: " + << aTrack.GetTrackID() << ", track pos: "<<aTrack.GetPosition() << ", mom: "<<aTrack.GetMomentum() + << ", parentID " << aTrack.GetParentID() << ")"; + G4Exception("iGeant4::TrackProcessorUserActionBase", "NoISFTruthBinding", FatalException, description); + return; // The G4Exception call above should abort the job, but Coverity does not seem to pick this up. + } + int regenerationNr = ppInfo->GetRegenerationNr(); + auto* primaryTruthParticle = truthBinding->getGenerationZeroTruthParticle(); + auto* generationZeroTruthParticle = truthBinding->getGenerationZeroTruthParticle(); + auto* currentlyTracedHepPart = truthBinding->getTruthParticle(); + auto classification = classify(primaryTruthParticle, + generationZeroTruthParticle, + currentlyTracedHepPart, + regenerationNr); + + auto* newTrackInfo = ::iGeant4::ISFG4Helper::attachTrackInfoToNewG4Track(aTrack, + *baseISP, + classification, + generationZeroTruthParticle ); + newTrackInfo->SetRegenerationNr(regenerationNr); + + setCurrentParticle(const_cast<ISF::ISFParticle*>(baseISP), + primaryTruthParticle, + currentlyTracedHepPart); return; } - -void iGeant4::TrackProcessorUserActionBase::PostTracking(const G4Track*) +void TrackProcessorUserActionBase::setupSecondary(const G4Track& aTrack) { - m_curBaseISP = nullptr; + auto* trackInfo = ::iGeant4::ISFG4Helper::getISFTrackInfo(aTrack); + + // why does TrackInformation return *const* GenParticle and ISFParticle objects!? + auto* currentlyTracedTruthParticle = const_cast<HepMC::GenParticle*>( trackInfo->GetHepMCParticle() ); + auto* primaryTruthParticle = const_cast<HepMC::GenParticle*>( trackInfo->GetPrimaryHepMCParticle() ); + auto* baseISFParticle = const_cast<ISF::ISFParticle*>( trackInfo->GetBaseISFParticle() ); + setCurrentParticle(baseISFParticle, primaryTruthParticle, currentlyTracedTruthParticle); return; } - -StatusCode iGeant4::TrackProcessorUserActionBase::queryInterface(const InterfaceID& riid, void** ppvInterface) +void TrackProcessorUserActionBase::setCurrentParticle(ISF::ISFParticle* baseISFParticle, + HepMC::GenParticle* truthPrimary, + HepMC::GenParticle* truthCurrentlyTraced) { - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; + m_curBaseISP = baseISFParticle; + m_eventInfo->SetCurrentPrimary( truthPrimary ); + m_eventInfo->SetCurrentlyTraced( truthCurrentlyTraced ); + return; } - -namespace G4UA{ - - namespace iGeant4{ - - TrackProcessorUserActionBase::TrackProcessorUserActionBase(): - m_eventInfo(nullptr), - m_curBaseISP(nullptr) - {; +/// Classify the particle represented by the given set of truth links +TrackClassification TrackProcessorUserActionBase::classify(const HepMC::GenParticle* primaryTruthParticle, + const HepMC::GenParticle* generationZeroTruthParticle, + const HepMC::GenParticle* currentlyTracedHepPart, + int regenerationNumber) const +{ + // if particle points to a non-zero truth particle it can not just be a 'simple' Secondary + if (currentlyTracedHepPart) { + if (currentlyTracedHepPart==primaryTruthParticle) { + return Primary; } - - void TrackProcessorUserActionBase::beginOfEvent(const G4Event*) - { - m_curBaseISP = nullptr; - m_eventInfo = ::iGeant4::ISFG4Helpers::getEventInformation(); - return; + else if (generationZeroTruthParticle==primaryTruthParticle && regenerationNumber>0) { + return RegeneratedPrimary; } - - void TrackProcessorUserActionBase::endOfEvent(const G4Event*) - { - m_curBaseISP = nullptr; - m_eventInfo = nullptr; - return; + else { + return RegisteredSecondary; } + } - void TrackProcessorUserActionBase::processStep(const G4Step* aStep) - { - // get geoID from parent - //TODO ELLI AtlasDetDescr::AtlasRegion curGeoID = m_curBaseISP->nextGeoID(); - //TODO ELLI ATH_MSG_DEBUG( "Currently simulating TrackID = " << aStep->GetTrack()->GetTrackID() << - //TODO ELLI " inside geoID = " << curGeoID ); - - // - // call the ISFSteppingAction method of the implementation - // - ISFSteppingAction( aStep, m_curBaseISP ); - - // - // propagate the current ISFParticle link to all secondaries - // - const std::vector<const G4Track*> *secondaryVector = aStep->GetSecondaryInCurrentStep(); - for ( auto* aConstSecondaryTrack : *secondaryVector ) { - // get a non-const G4Track for current secondary (nasty!) - G4Track* aSecondaryTrack = const_cast<G4Track*>( aConstSecondaryTrack ); - - auto *trackInfo = ::iGeant4::ISFG4Helpers::getISFTrackInfo(*aSecondaryTrack); - - // G4Tracks aready returned to ISF will have a TrackInformation attached to them - bool particleReturnedToISF = trackInfo && trackInfo->GetReturnedToISF(); - if (!particleReturnedToISF) { - HepMC::GenParticle* generationZeroTruthParticle = nullptr; - ::iGeant4::ISFG4Helpers::attachTrackInfoToNewG4Track( *aSecondaryTrack, - *m_curBaseISP, - Secondary, - generationZeroTruthParticle ); - } - } // <- loop over secondaries from this step - - return; - } + return Secondary; +} - void TrackProcessorUserActionBase::preTracking(const G4Track* aTrack) - { - // what a great way to start a function... :) - G4Track* inT = const_cast<G4Track*> (aTrack); - - auto *trackInfo = ::iGeant4::ISFG4Helpers::getISFTrackInfo(*aTrack); - - // will be filled later on - HepMC::GenParticle *currentlyTracedHepPart = nullptr; - - - // - // Get PrimaryParticleInformation from G4PrimaryParticle (assigned by TransportTool::addPrimaryVertex) - // The ISFParticle should always exist, and the HepMC::GenParticle should exist if a primary EvGen particle (secondaries passed from G4 back to ISF for subsequent processing with G4 will have null pointer for HepMC::GenParticle) - // - - // see if primary particle - int parentID = aTrack->GetParentID(); - bool isPrimary = !parentID; - - if (isPrimary) { - if ( trackInfo ) { - G4ExceptionDescription description; - description << G4String("PreUserTrackingAction: ") - << "Started simulating primary particle which already has a TrackInformation/TrackBarcodeInfo object attached (trackID: " - << aTrack->GetTrackID() << ", track pos: "<<aTrack->GetPosition() << ", mom: "<<aTrack->GetMomentum() - << ", parentID " << aTrack->GetParentID() << ")"; - G4Exception("iGeant4::TrackProcessorUserActionBase", "TrackInformationAlreadyExists", FatalException, description); - return; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. - } - - auto ppInfo = dynamic_cast <PrimaryParticleInformation*> (aTrack->GetDynamicParticle()->GetPrimaryParticle()->GetUserInformation()); - if (!ppInfo) { - G4ExceptionDescription description; - description << G4String("PreUserTrackingAction: ") + "NULL PrimaryParticleInformation pointer for current G4Step (trackID " - << aTrack->GetTrackID() << ", track pos: "<<aTrack->GetPosition() << ", mom: "<<aTrack->GetMomentum() - << ", parentID " << parentID << ")"; - G4Exception("iGeant4::TrackProcessorUserActionBase", "NoPPInfo", FatalException, description); - return; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. - } - - // get base ISFParticle and link to TrackInformation - auto baseISP = ppInfo->GetISFParticle(); - if (!baseISP) { - G4ExceptionDescription description; - description << G4String("PreUserTrackingAction: ") + "No ISFParticle associated with primary particle (trackID: " - << aTrack->GetTrackID() << ", track pos: "<<aTrack->GetPosition() << ", mom: "<<aTrack->GetMomentum() - << ", parentID " << parentID << ")"; - G4Exception("iGeant4::TrackProcessorUserActionBase", "NoISFParticle", FatalException, description); - return; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. - } - - auto truthBinding = baseISP->getTruthBinding(); - if (!truthBinding) { - G4ExceptionDescription description; - description << G4String("PreUserTrackingAction: ") + "No ISF::TruthBinding associated with primary particle (trackID: " - << aTrack->GetTrackID() << ", track pos: "<<aTrack->GetPosition() << ", mom: "<<aTrack->GetMomentum() - << ", parentID " << parentID << ")"; - G4Exception("iGeant4::TrackProcessorUserActionBase", "NoISFTruthBinding", FatalException, description); - return; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. - } - - int regenerationNr = ppInfo->GetRegenerationNr(); - auto* primaryTruthParticle = truthBinding->getGenerationZeroTruthParticle(); - auto* generationZeroTruthParticle = truthBinding->getGenerationZeroTruthParticle(); - currentlyTracedHepPart = truthBinding->getTruthParticle(); - - TrackClassification classification = Secondary; - // if particle points to a non-zero truth particle it can not just be a 'simple' Secondary - if (currentlyTracedHepPart) { - if (currentlyTracedHepPart==primaryTruthParticle) { classification = Primary; } - else if (generationZeroTruthParticle==primaryTruthParticle && regenerationNr>0) { classification = RegeneratedPrimary; } - else { classification = RegisteredSecondary; } - } - - auto* newTrackInfo = ::iGeant4::ISFG4Helpers::attachTrackInfoToNewG4Track( *inT, - *baseISP, - classification, - generationZeroTruthParticle ); - newTrackInfo->SetRegenerationNr(regenerationNr); - trackInfo = newTrackInfo; - } else { - // secondary particle (why does TrackInformation return a const object!?) - currentlyTracedHepPart = const_cast<HepMC::GenParticle*>( trackInfo->GetHepMCParticle() ); - } - - // why does TrackInformation return a const object!? - auto primaryTruthParticle = const_cast<HepMC::GenParticle*>( trackInfo->GetPrimaryHepMCParticle() ); - m_eventInfo->SetCurrentlyTraced( currentlyTracedHepPart ); - m_eventInfo->SetCurrentPrimary ( primaryTruthParticle ); - - // get link to base ISFParticle from G4Track user information - m_curBaseISP = const_cast<ISF::ISFParticle*>( trackInfo->GetBaseISFParticle() ); - - return; - } - void TrackProcessorUserActionBase::postTracking(const G4Track*) - { - m_curBaseISP = nullptr; - return; - } - } // iGeant4 + + +void TrackProcessorUserActionBase::postTracking(const G4Track*) +{ + m_curBaseISP = nullptr; + return; +} + +} // namespace iGeant4 } // namespace G4UA diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.h index 6ec520626544dda1388dad99f32de964444de5e3..8e95e581b16e424cfb58c6fcf56cc422cbb6c43c 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.h @@ -5,12 +5,19 @@ #ifndef ISF_GEANT4TOOLS_TRACKPROCESSORUSERACTIONBASE_H #define ISF_GEANT4TOOLS_TRACKPROCESSORUSERACTIONBASE_H -#include "G4AtlasTools/UserActionBase.h" - //#include "ISF_Geant4Interfaces/ITrackProcessorUserAction.h" #include <string> +#include "G4AtlasInterfaces/IPreTrackingAction.h" +#include "G4AtlasInterfaces/ISteppingAction.h" +#include "G4AtlasInterfaces/IBeginEventAction.h" +#include "G4AtlasInterfaces/IEndEventAction.h" +#include "G4AtlasInterfaces/IPostTrackingAction.h" + +#include "MCTruth/VTrackInformation.h" + + // forward declarations class EventInformation; @@ -22,80 +29,57 @@ namespace ISF { class ISFParticle; } -namespace iGeant4 { - - class TrackProcessorUserActionBase: public UserActionBase { - - public: - TrackProcessorUserActionBase(const std::string& type, const std::string& name, const IInterface* parent); - virtual ~TrackProcessorUserActionBase() {} - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - virtual void BeginOfEvent(const G4Event*) override final; - virtual void EndOfEvent(const G4Event*) override final; - - virtual void PreTracking(const G4Track* aTrack) override final; - virtual void PostTracking(const G4Track*) override final; - - virtual void Step(const G4Step*) override final; - - protected: - EventInformation *m_eventInfo; //!< event-global G4 UserInformation - - /** This method is called by TrackProcessorUserActionBase after the - * G4Track->ISFParticle association has been established for the current G4Track */ - virtual void ISFSteppingAction(const G4Step*, ISF::ISFParticle*) = 0; - - private: - /** for keeping track of the currently processed G4Track and its corresponding ISFParticle */ - ISF::ISFParticle *m_curBaseISP; //!< the corresponding ISFParticle to this G4Track - }; - -} - -#include "G4AtlasInterfaces/IPreTrackingAction.h" -#include "G4AtlasInterfaces/ISteppingAction.h" -#include "G4AtlasInterfaces/IBeginEventAction.h" -#include "G4AtlasInterfaces/IEndEventAction.h" -#include "G4AtlasInterfaces/IPostTrackingAction.h" - namespace G4UA{ - namespace iGeant4 { +namespace iGeant4 { + +class TrackProcessorUserActionBase: public IPreTrackingAction, public ISteppingAction, + public IBeginEventAction, public IEndEventAction, + public IPostTrackingAction +{ - class TrackProcessorUserActionBase: - public IPreTrackingAction, public ISteppingAction, public IBeginEventAction, public IEndEventAction, public IPostTrackingAction - { +public: + TrackProcessorUserActionBase(); + virtual void beginOfEvent(const G4Event*) override final; + virtual void endOfEvent(const G4Event*) override final; - public: + virtual void preTracking(const G4Track*) override; + virtual void postTracking(const G4Track*) override final; - TrackProcessorUserActionBase(); - virtual void beginOfEvent(const G4Event*) override final; - virtual void endOfEvent(const G4Event*) override final; + virtual void processStep(const G4Step*) override final; - virtual void preTracking(const G4Track*) override; - virtual void postTracking(const G4Track*) override final; +protected: + EventInformation* m_eventInfo; //!< event-global G4 UserInformation - virtual void processStep(const G4Step*) override final; + /** This method is called by TrackProcessorUserActionBase after the + * G4Track->ISFParticle association has been established for the current G4Track */ + virtual void ISFSteppingAction(const G4Step*, ISF::ISFParticle*) = 0; - protected: - EventInformation *m_eventInfo; //!< event-global G4 UserInformation +private: + /// Setup the given G4Track as the current primary particle which we'll process + void setupPrimary(G4Track&); - /** This method is called by TrackProcessorUserActionBase after the - * G4Track->ISFParticle association has been established for the current G4Track */ - virtual void ISFSteppingAction(const G4Step*, ISF::ISFParticle*) = 0; + /// Setup the given G4Track as the current secondary particle which we'll process + void setupSecondary(const G4Track&); - private: - /** for keeping track of the currently processed G4Track and its corresponding ISFParticle */ - ISF::ISFParticle *m_curBaseISP; //!< the corresponding ISFParticle to this G4Track - }; // class TrackProcessorUserActionBase + /// Set the following information as the currently traced particle + void setCurrentParticle(ISF::ISFParticle* baseISFParticle, + HepMC::GenParticle* truthPrimary, + HepMC::GenParticle* truthCurrentlyTraced); + /// Classify the particle represented by the given set of truth links + TrackClassification classify(const HepMC::GenParticle* primaryTruthParticle, + const HepMC::GenParticle* generationZeroTruthParticle, + const HepMC::GenParticle* currentlyTracedHepPart, + int regenerationNumber) const; + /// The most recent ISFParticle ancestor that triggers the currently processed G4Track + ISF::ISFParticle* m_curBaseISP; +}; // class TrackProcessorUserActionBase - }// iGeant4 +}// iGeant4 }// G4UA diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.cxx index a18f6f7a91e32d8fd2de2cd398888dd05e55f9f7..8ae9fb8eabe2811b9298f65cf7c3595fc82d09e3 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.cxx @@ -9,15 +9,16 @@ // class header #include "TrackProcessorUserActionFullG4.h" -// includes from this package -#include "ISFG4Helpers.h" - // ISF includes #include "ISF_Event/ISFParticle.h" #include "ISF_Event/EntryLayer.h" #include "ISF_Interfaces/IParticleBroker.h" +// ISF Geant4 includes +#include "ISF_Geant4Event/ISFG4Helper.h" +#include "ISF_Geant4Event/ISFG4GeoHelper.h" + // Athena includes #include "AtlasDetDescr/AtlasRegion.h" @@ -36,312 +37,6 @@ #include <iostream> -iGeant4::TrackProcessorUserActionFullG4::TrackProcessorUserActionFullG4(const std::string& type, - const std::string& name, - const IInterface* parent) - : TrackProcessorUserActionBase(type,name,parent), - m_entryLayerTool(""), - m_entryLayerToolQuick(nullptr), - m_geoIDSvc("",name), - m_geoIDSvcQuick(nullptr), - m_hasCavern(true) -{ - - ATH_MSG_DEBUG("create TrackProcessorUserActionFullG4 name: "<<name); - - declareProperty("EntryLayerTool", m_entryLayerTool, "ISF Entry Layer Tool" ); - declareProperty("GeoIDSvc", m_geoIDSvc, "ISF GeoIDService" ); - declareProperty("TruthVolumeLevel", m_truthVolLevel=1, "Level in geo hierarchy for the truth volumes"); -} - -StatusCode iGeant4::TrackProcessorUserActionFullG4::initialize() -{ - ATH_MSG_DEBUG("Initializing TrackProcessorUserActionFullG4"); - - if ( !m_entryLayerTool.empty() ) { - if ( m_entryLayerTool.retrieve().isFailure()) { - ATH_MSG_FATAL("Could not retrieve ISF Entry Layer Tool: " << m_entryLayerTool); - return StatusCode::FAILURE; - } - m_entryLayerToolQuick = &(*m_entryLayerTool); - } - - if ( !m_geoIDSvc.empty() ) { - if ( m_geoIDSvc.retrieve().isFailure()) { - ATH_MSG_FATAL("Could not retrieve ISF GeoID Svc: " << m_geoIDSvc); - return StatusCode::FAILURE; - } - m_geoIDSvcQuick = &(*m_geoIDSvc); - } - - m_entryLayerMap["CALO::CALO"] = m_truthVolLevel+1; - m_entryLayerMap["MUONQ02::MUONQ02"] = m_truthVolLevel+1; - m_entryLayerMap["IDET::IDET"] = m_truthVolLevel+1; - - return StatusCode::SUCCESS; -} - -StatusCode iGeant4::TrackProcessorUserActionFullG4::finalize() -{ - return StatusCode::SUCCESS; -} - - -void iGeant4::TrackProcessorUserActionFullG4::ISFSteppingAction(const G4Step* aStep, ISF::ISFParticle *curISP) -{ - G4Track* aTrack = aStep->GetTrack(); - int aTrackID = aTrack->GetTrackID(); - G4TrackStatus aTrackStatus = aTrack->GetTrackStatus(); - - const G4StepPoint *preStep = aStep->GetPreStepPoint(); - const G4StepPoint *postStep = aStep->GetPostStepPoint(); - - AtlasDetDescr::AtlasRegion nextG4GeoID = nextGeoId(aStep); - if ( curISP->nextGeoID()!=nextG4GeoID ) { - curISP->setNextGeoID( nextG4GeoID ); - } - - // check if dead track - if ( aTrackStatus==fStopAndKill ) { - ATH_MSG_DEBUG("Stepping dead G4Track, returning. TrackLength="<<aTrack->GetTrackLength()<< - " TrackEkin="<<aTrack->GetKineticEnergy()<<" TrackID="<<aTrackID); - return; - } - - const G4VPhysicalVolume *preVol = preStep->GetPhysicalVolume(); - const G4VPhysicalVolume *postVol = postStep->GetPhysicalVolume(); - - // check if particle left detector volume - if ( postVol==0 ) { - ATH_MSG_DEBUG("G4Step not in physical volume, returning. TrackLength="<< - aTrack->GetTrackLength()<<" TrackEkin="<<aTrack->GetKineticEnergy()<< - " TrackID="<<aTrackID); - // left world - return; - } - - // check if particle is within same physical volume - if ( preVol==postVol ) { - ATH_MSG_DEBUG("G4Track stays inside current volume"); - return; - } - - // - // this point is only reached if particle has crossed - // a sub-det boundary in the Geant4-only mode - // - - TrackHelper tHelp(aTrack); - - // only process particle at entry layer if primary or registered secondary - - if ( ! tHelp.IsSecondary() ) { - - // get entry layer - ISF::EntryLayer layer = entryLayer(aStep); - - if (layer!=ISF::fUnsetEntryLayer) { - - AtlasDetDescr::AtlasRegion nextGeoID = nextGeoId(aStep); - - ISF::ISFParticle *tmpISP = ::iGeant4::ISFG4Helpers::convertG4TrackToISFParticle( *aTrack, - *curISP, - nullptr // truthBinding - ); - tmpISP->setNextGeoID(nextGeoID); - tmpISP->setNextSimID(ISF::fUndefinedSimID); - - auto generationZeroBarcode = tHelp.GetBarcode(); - tmpISP->setBarcode(generationZeroBarcode); - - tmpISP->setNextGeoID( nextGeoID ); - - // inform the entry layer tool about this particle - m_entryLayerToolQuick->registerParticle( *tmpISP, layer); - - delete tmpISP; - } - - } - - return; -} - -//________________________________________________________________________ -ISF::EntryLayer -iGeant4::TrackProcessorUserActionFullG4::entryLayer(const G4Step* aStep) -{ - // - // this is the same prescription for getting the entry layer as in - // MCTruth/MCTruthSteppingAction - // - - const G4StepPoint *preStep =aStep->GetPreStepPoint(); - const G4StepPoint *postStep=aStep->GetPostStepPoint(); - - G4TouchableHistory *preTHist=(G4TouchableHistory *)preStep->GetTouchable(); - G4TouchableHistory *postTHist=(G4TouchableHistory *)postStep->GetTouchable(); - int nLev1 = preTHist->GetHistoryDepth(); - int nLev2 = postTHist->GetHistoryDepth(); - - std::map<std::string, int, std::less<std::string> >::const_iterator it; - - std::string vname1; - bool pass=false; - for (it=m_entryLayerMap.begin(); it!=m_entryLayerMap.end(); it++) { - - int il=(*it).second; - - if (il<=(nLev1+1)) { - vname1=preTHist->GetVolume(nLev1-il+1)->GetName(); - - if (vname1!=(*it).first) continue; - - if (il<=(nLev2+1)) { - if (vname1==postTHist->GetVolume(nLev2-il+1)->GetName()) continue; - } - - pass=true; - break; - } - } - - - ISF::EntryLayer layer=ISF::fUnsetEntryLayer; - if (pass) { - if (vname1=="IDET::IDET") layer=ISF::fAtlasCaloEntry; - else if (vname1=="CALO::CALO") layer=ISF::fAtlasMuonEntry; - else if (vname1=="MUONQ02::MUONQ02") layer=ISF::fAtlasMuonExit; - } - - return layer; -} - - -//________________________________________________________________________ -AtlasDetDescr::AtlasRegion -iGeant4::TrackProcessorUserActionFullG4::nextGeoId(const G4Step* aStep) -{ - static G4LogicalVolume * BPholder=0 , * IDholder=0 , * CALOholder=0 , * MUholder=0 , * TTRholder=0 ; - if (BPholder==0){ // Initialize - m_hasCavern=false; - G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance(); - for (size_t i=0;i<lvs->size();++i){ - if ( !(*lvs)[i] ) continue; - if ( (*lvs)[i]->GetName() == "BeamPipe::BeamPipe" ) BPholder = (*lvs)[i]; - else if ( (*lvs)[i]->GetName() == "IDET::IDET" ) IDholder = (*lvs)[i]; - else if ( (*lvs)[i]->GetName() == "CALO::CALO" ) CALOholder = (*lvs)[i]; - else if ( (*lvs)[i]->GetName() == "MUONQ02::MUONQ02" ) MUholder = (*lvs)[i]; - else if ( (*lvs)[i]->GetName() == "TTR_BARREL::TTR_BARREL" ) TTRholder = (*lvs)[i]; - } - this->checkVolumeDepth( G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume() , m_truthVolLevel ); - } - - // Static so that it will keep the value from the previous step - static AtlasDetDescr::AtlasRegion nextGeoID = m_truthVolLevel>1?AtlasDetDescr::fAtlasCavern:AtlasDetDescr::fUndefinedAtlasRegion; - static const G4Track* aTrack = 0; - StepHelper step(aStep); - - if (aTrack != aStep->GetTrack()) { - // First step with this track! - nextGeoID = AtlasDetDescr::fUndefinedAtlasRegion; - aTrack = aStep->GetTrack(); - } // Otherwise use the cached value via the static - - const G4StepPoint *postStep = aStep->GetPostStepPoint(); - - bool leavingG4World = postStep->GetStepStatus()==fWorldBoundary; - bool simulatingCollisions = !m_hasCavern; - if ( simulatingCollisions && leavingG4World ) { - nextGeoID = AtlasDetDescr::fAtlasCavern; - return nextGeoID; - } - - // If in mother volume, use the ISF_GeoIDSvc to resolve the geoID - if (step.PostStepBranchDepth()<m_truthVolLevel){ - const G4ThreeVector &postPos = postStep->GetPosition(); - //const G4ThreeVector &postMom = postStep->GetMomentum(); - //nextGeoID = m_geoIDSvcQuick->identifyNextGeoID( postPos.x(), - // postPos.y(), - // postPos.z(), - // postMom.x(), - // postMom.y(), - // postMom.z() ); - nextGeoID = m_geoIDSvcQuick->identifyGeoID( postPos.x(), - postPos.y(), - postPos.z() ); - return nextGeoID; - } - - // Ordering inside out (most truth in the ID anyway...) - if ( IDholder==step.GetPostStepLogicalVolume(m_truthVolLevel) ){ - nextGeoID = AtlasDetDescr::fAtlasID; - } else if ( CALOholder==step.GetPostStepLogicalVolume(m_truthVolLevel) ){ - nextGeoID = AtlasDetDescr::fAtlasCalo; - } else if ( MUholder==step.GetPostStepLogicalVolume(m_truthVolLevel) ){ - nextGeoID = AtlasDetDescr::fAtlasMS; - } else if ( BPholder==step.GetPostStepLogicalVolume(m_truthVolLevel) ){ - nextGeoID = (step.PostStepBranchDepth()>m_truthVolLevel && step.GetPostStepLogicalVolumeName(m_truthVolLevel+1)=="BeamPipe::BeamPipeCentral")?AtlasDetDescr::fAtlasID:AtlasDetDescr::fAtlasForward; - } else if ( TTRholder==step.GetPostStepLogicalVolume(m_truthVolLevel) ){ - nextGeoID = AtlasDetDescr::fAtlasCavern; - } else if (m_hasCavern && step.GetPostStepLogicalVolumeName(m_truthVolLevel-1).find("CavernInfra")!=std::string::npos) { - nextGeoID = AtlasDetDescr::fAtlasCavern; - } else { - // We are in trouble - //ATH_MSG_ERROR("vol1: "<<step.GetPostStepLogicalVolumeName(1)<<", vol2: "<<step.GetPostStepLogicalVolumeName(2)<<", postname="<<postname<<", returning undefined geoID"); - G4ThreeVector myPos = aStep->GetPostStepPoint()->GetPosition(); - ATH_MSG_ERROR("Returning undefined geoID from " << step.GetPostStepLogicalVolume() << " requesting " << step.GetPostStepLogicalVolume(m_truthVolLevel) << " at " << myPos.x() << " " << myPos.y() << " " << myPos.z() ); - } - - return nextGeoID; -} - -bool iGeant4::TrackProcessorUserActionFullG4::checkVolumeDepth( G4LogicalVolume * lv , int volLevel , int d ) { - //FIXME - can replace all this code with similar methods to those in MCTruthBase/src/RecordingEnvelope.cxx - - if (lv==0) return false; - bool Cavern = false; - - // Check the volumes rather explicitly - if ( lv->GetName() == "BeamPipe::BeamPipe" || - lv->GetName() == "IDET::IDET" || - lv->GetName() == "CALO::CALO" || - lv->GetName() == "MUONQ02::MUONQ02" || - lv->GetName() == "TTR_BARREL::TTR_BARREL" ){ - if (d==volLevel){ - ATH_MSG_DEBUG("Volume " << lv->GetName() << " is correctly registered at depth " << d); - } else { - ATH_MSG_ERROR("Volume " << lv->GetName() << " at depth " << d << " instead of depth " << volLevel); - throw "WrongDepth"; - } // Check of volume level - } else if ( lv->GetName()=="BeamPipe::BeamPipeCentral" ){ // Things that are supposed to be one deeper - if (d==volLevel+1){ - ATH_MSG_DEBUG("Volume " << lv->GetName() << " is correctly registered at depth " << d); - } else { - ATH_MSG_ERROR("Volume " << lv->GetName() << " at depth " << d << " instead of depth " << volLevel+1); - throw "WrongDepth"; - } // Check of volume level - } else if ( lv->GetName().find("CavernInfra")!=std::string::npos ){ // Things that are supposed to be one shallower - m_hasCavern=true; - if (d==volLevel-1){ - Cavern=true; - ATH_MSG_DEBUG("Volume " << lv->GetName() << " is correctly registered at depth " << d); - // Note: a number of volumes exist with "CavernInfra" in the name at the wrong depth, so we just need to - // check that there's at least one at the right depth - } // Check of volume level - } // Check of volume name - - // Going through the volume depth - for (int i=0; i<lv->GetNoDaughters(); ++i){ - Cavern = Cavern || checkVolumeDepth( lv->GetDaughter(i)->GetLogicalVolume() , volLevel , d+1 ); - } - if (d==0 && !Cavern && volLevel>1){ - ATH_MSG_ERROR("No CavernInfra volume registered at depth " << volLevel-1); - throw "WrongDepth"; - } - return Cavern; -} - namespace G4UA{ namespace iGeant4{ @@ -350,11 +45,9 @@ namespace G4UA{ : TrackProcessorUserActionBase(),m_config(config), m_entryLayerToolQuick(nullptr), m_geoIDSvcQuick(nullptr), - m_hasCavern(true), - m_currentTrack(nullptr), - m_BPholder(nullptr), m_IDholder(nullptr), m_CALOholder(nullptr) , m_MUholder(nullptr), m_TTRholder(nullptr) + m_currentTrack(nullptr) { - + if(4<m_config.verboseLevel) { G4cout << "create TrackProcessorUserActionFullG4" << G4endl; @@ -387,17 +80,7 @@ namespace G4UA{ m_entryLayerMap["MUONQ02::MUONQ02"] = m_config.truthVolLevel+1; m_entryLayerMap["IDET::IDET"] = m_config.truthVolLevel+1; - m_hasCavern=false; - G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance(); - for (size_t i=0;i<lvs->size();++i){ - if ( !(*lvs)[i] ) continue; - if ( (*lvs)[i]->GetName() == "BeamPipe::BeamPipe" ) m_BPholder = (*lvs)[i]; - else if ( (*lvs)[i]->GetName() == "IDET::IDET" ) m_IDholder = (*lvs)[i]; - else if ( (*lvs)[i]->GetName() == "CALO::CALO" ) m_CALOholder = (*lvs)[i]; - else if ( (*lvs)[i]->GetName() == "MUONQ02::MUONQ02" ) m_MUholder = (*lvs)[i]; - else if ( (*lvs)[i]->GetName() == "TTR_BARREL::TTR_BARREL" ) m_TTRholder = (*lvs)[i]; - } - this->checkVolumeDepth( G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume() , m_config.truthVolLevel ); + ::iGeant4::ISFG4GeoHelper::checkVolumeDepth( G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume() , m_config.truthVolLevel); } void TrackProcessorUserActionFullG4::ISFSteppingAction(const G4Step* aStep, ISF::ISFParticle *curISP) @@ -409,7 +92,11 @@ namespace G4UA{ const G4StepPoint *preStep = aStep->GetPreStepPoint(); const G4StepPoint *postStep = aStep->GetPostStepPoint(); - AtlasDetDescr::AtlasRegion nextG4GeoID = nextGeoId(aStep); + + AtlasDetDescr::AtlasRegion nextG4GeoID = ::iGeant4::ISFG4GeoHelper::nextGeoId(aStep, + m_config. + truthVolLevel, + m_geoIDSvcQuick); if ( curISP->nextGeoID()!=nextG4GeoID ) { curISP->setNextGeoID( nextG4GeoID ); } @@ -455,9 +142,12 @@ namespace G4UA{ if (layer!=ISF::fUnsetEntryLayer) { - AtlasDetDescr::AtlasRegion nextGeoID = nextGeoId(aStep); - ISF::ISFParticle *tmpISP = ::iGeant4::ISFG4Helpers::convertG4TrackToISFParticle( *aTrack, + AtlasDetDescr::AtlasRegion nextGeoID = ::iGeant4::ISFG4GeoHelper::nextGeoId(aStep, + m_config.truthVolLevel, + m_geoIDSvcQuick); + + ISF::ISFParticle *tmpISP = ::iGeant4::ISFG4Helper::convertG4TrackToISFParticle( *aTrack, *curISP, nullptr // truthBinding ); @@ -536,117 +226,6 @@ namespace G4UA{ return; } - AtlasDetDescr::AtlasRegion TrackProcessorUserActionFullG4::nextGeoId(const G4Step* aStep) - { - StepHelper step(aStep); - - if (m_currentTrack != aStep->GetTrack()) { - // First step with this track! - m_nextGeoID = AtlasDetDescr::fUndefinedAtlasRegion; - m_currentTrack = aStep->GetTrack(); - } // Otherwise use the cached value via the member variable - - const G4StepPoint *postStep = aStep->GetPostStepPoint(); - - bool leavingG4World = postStep->GetStepStatus()==fWorldBoundary; - bool simulatingCollisions = !m_hasCavern; - if ( simulatingCollisions && leavingG4World ) { - m_nextGeoID = AtlasDetDescr::fAtlasCavern; - return m_nextGeoID; - } - - // If in mother volume, use the ISF_GeoIDSvc to resolve the geoID - if (step.PostStepBranchDepth()<m_config.truthVolLevel){ - const G4ThreeVector &postPos = postStep->GetPosition(); - //const G4ThreeVector &postMom = postStep->GetMomentum(); - //m_nextGeoID = m_geoIDSvcQuick->identifyNextGeoID( postPos.x(), - // postPos.y(), - // postPos.z(), - // postMom.x(), - // postMom.y(), - // postMom.z() ); - m_nextGeoID = m_geoIDSvcQuick->identifyGeoID( postPos.x(), - postPos.y(), - postPos.z() ); - return m_nextGeoID; - } - - // Ordering inside out (most truth in the ID anyway...) - if ( m_IDholder==step.GetPostStepLogicalVolume(m_config.truthVolLevel) ){ - m_nextGeoID = AtlasDetDescr::fAtlasID; - } else if ( m_CALOholder==step.GetPostStepLogicalVolume(m_config.truthVolLevel) ){ - m_nextGeoID = AtlasDetDescr::fAtlasCalo; - } else if ( m_MUholder==step.GetPostStepLogicalVolume(m_config.truthVolLevel) ){ - m_nextGeoID = AtlasDetDescr::fAtlasMS; - } else if ( m_BPholder==step.GetPostStepLogicalVolume(m_config.truthVolLevel) ){ - m_nextGeoID = (step.PostStepBranchDepth()>m_config.truthVolLevel && step.GetPostStepLogicalVolumeName(m_config.truthVolLevel+1)=="BeamPipe::BeamPipeCentral")?AtlasDetDescr::fAtlasID:AtlasDetDescr::fAtlasForward; - } else if ( m_TTRholder==step.GetPostStepLogicalVolume(m_config.truthVolLevel) ){ - m_nextGeoID = AtlasDetDescr::fAtlasCavern; - } else if (m_hasCavern && step.GetPostStepLogicalVolumeName(m_config.truthVolLevel-1).find("CavernInfra")!=std::string::npos) { - m_nextGeoID = AtlasDetDescr::fAtlasCavern; - } else { - // We are in trouble - G4ThreeVector myPos = aStep->GetPostStepPoint()->GetPosition(); - G4ExceptionDescription description; - description << G4String("nextGeoId: ") + "Returning undefined geoID from " << step.GetPostStepLogicalVolume() << " requesting " << step.GetPostStepLogicalVolume(m_config.truthVolLevel) << " at " << myPos.x() << " " << myPos.y() << " " << myPos.z(); - G4Exception("G4UA::iGeant4::TrackProcessorUserActionFullG4", "UndefinedGeoID", JustWarning, description); - } - - return m_nextGeoID; - } - - bool TrackProcessorUserActionFullG4::checkVolumeDepth( G4LogicalVolume * lv , int volLevel , int d ) { - //FIXME - can replace all this code with similar methods to those in MCTruthBase/src/RecordingEnvelope.cxx - - if (lv==0) return false; - bool Cavern = false; - - // Check the volumes rather explicitly - if ( lv->GetName() == "BeamPipe::BeamPipe" || - lv->GetName() == "IDET::IDET" || - lv->GetName() == "CALO::CALO" || - lv->GetName() == "MUONQ02::MUONQ02" || - lv->GetName() == "TTR_BARREL::TTR_BARREL" ){ - if (d==volLevel){ - ;//ATH_MSG_DEBUG("Volume " << lv->GetName() << " is correctly registered at depth " << d); - } else { - G4ExceptionDescription description; - description << G4String("checkVolumeDepth: ") + "Volume " << lv->GetName() << " at depth " << d << " instead of depth " << volLevel; - G4Exception("G4UA::iGeant4::TrackProcessorUserActionFullG4", "WrongDepth", FatalException, description); - return false; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. - } // Check of volume level - } else if ( lv->GetName()=="BeamPipe::BeamPipeCentral" ){ // Things that are supposed to be one deeper - if (d==volLevel+1){ - ;//ATH_MSG_DEBUG("Volume " << lv->GetName() << " is correctly registered at depth " << d); - } else { - G4ExceptionDescription description; - description << G4String("checkVolumeDepth: ") + "Volume " << lv->GetName() << " at depth " << d << " instead of depth " << volLevel+1; - G4Exception("G4UA::iGeant4::TrackProcessorUserActionFullG4", "WrongDepth", FatalException, description); - return false; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. - } // Check of volume level - } else if ( lv->GetName().find("CavernInfra")!=std::string::npos ){ // Things that are supposed to be one shallower - m_hasCavern=true; - if (d==volLevel-1){ - Cavern=true; - //ATH_MSG_DEBUG("Volume " << lv->GetName() << " is correctly registered at depth " << d); - // Note: a number of volumes exist with "CavernInfra" in the name at the wrong depth, so we just need to - // check that there's at least one at the right depth - } // Check of volume level - } // Check of volume name - - // Going through the volume depth - for (int i=0; i<lv->GetNoDaughters(); ++i){ - Cavern = Cavern || checkVolumeDepth( lv->GetDaughter(i)->GetLogicalVolume() , volLevel , d+1 ); - } - if (d==0 && !Cavern && volLevel>1){ - G4ExceptionDescription description; - description << G4String("checkVolumeDepth: ") + "No CavernInfra volume registered at depth " << volLevel-1; - G4Exception("G4UA::iGeant4::TrackProcessorUserActionFullG4", "WrongDepth", FatalException, description); - return false; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. - } - return Cavern; - } - } // iGeant4 } //G4UA diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.h index e8e705619953d2d553efe2bc541ec05bb5427356..b90df01e748e43b7ef72f80f01f6eb45feeb0857 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.h @@ -2,6 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ + #ifndef ISF_GEANT4TOOLS_TRACKPROCESSORUSERACTIONFULLG4_H #define ISF_GEANT4TOOLS_TRACKPROCESSORUSERACTIONFULLG4_H @@ -26,47 +27,6 @@ // Geant4 class G4LogicalVolume; -namespace iGeant4 { - - class TrackProcessorUserActionFullG4 final: public TrackProcessorUserActionBase { - - public: - TrackProcessorUserActionFullG4(const std::string& type, - const std::string& name, - const IInterface* parent); - virtual ~TrackProcessorUserActionFullG4() {} - - StatusCode initialize(); - StatusCode finalize(); - - private: - /** Called by the base class after the G4Track->ISFParticle association - * has been established */ - void ISFSteppingAction(const G4Step*, ISF::ISFParticle *curISP) override final; - - ISF::EntryLayer entryLayer(const G4Step* aStep); - - AtlasDetDescr::AtlasRegion nextGeoId(const G4Step* aStep); - - bool checkVolumeDepth( G4LogicalVolume * , int , int d=0 ); - - /** access to the ISF Entry Layer tool which is used to record entry-layer collections */ - ToolHandle<ISF::IEntryLayerTool> m_entryLayerTool; //!< athena tool handle - ISF::IEntryLayerTool *m_entryLayerToolQuick; //!< quickaccess avoiding gaudi ovehead - - /** access to the central ISF GeoID serice*/ - ServiceHandle<ISF::IGeoIDSvc> m_geoIDSvc; //!< athena service handle - ISF::IGeoIDSvc *m_geoIDSvcQuick; //!< quickaccess avoiding gaudi ovehead - - bool m_hasCavern; - - int m_truthVolLevel; //!< Which level in the hierarchy are our truth volumes? - - std::map<std::string, int, std::less<std::string> > m_entryLayerMap; - }; - -} - namespace G4UA{ namespace iGeant4{ @@ -102,23 +62,18 @@ namespace G4UA{ ISF::EntryLayer entryLayer(const G4Step* aStep); - AtlasDetDescr::AtlasRegion nextGeoId(const G4Step* aStep); - - bool checkVolumeDepth( G4LogicalVolume * , int , int d=0 ); - /** access to the ISF Entry Layer tool which is used to record entry-layer collections */ ISF::IEntryLayerTool *m_entryLayerToolQuick; //!< quickaccess avoiding gaudi ovehead /** access to the central ISF GeoID serice*/ ISF::IGeoIDSvc *m_geoIDSvcQuick; //!< quickaccess avoiding gaudi ovehead - bool m_hasCavern; - + std::map<std::string, int, std::less<std::string> > m_entryLayerMap; AtlasDetDescr::AtlasRegion m_nextGeoID; const G4Track* m_currentTrack; - G4LogicalVolume * m_BPholder, * m_IDholder, * m_CALOholder , * m_MUholder, * m_TTRholder; + }; // class TrackProcessorUserActionFullG4 }// iGeant4 diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.cxx index 7997acb953906d6c74845875e1e01f91f8a9b64f..07c6674ccb9ccbce2394fe3b31416d327e870933 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.cxx @@ -9,15 +9,15 @@ // class header #include "TrackProcessorUserActionPassBack.h" -// includes from this package -#include "ISFG4Helpers.h" - // ISF includes #include "ISF_Event/ISFParticle.h" #include "ISF_Event/EntryLayer.h" #include "ISF_Interfaces/IParticleBroker.h" +// ISF Geant4 includes +#include "ISF_Geant4Event/ISFG4Helper.h" + // Athena includes #include "AtlasDetDescr/AtlasRegion.h" @@ -42,280 +42,6 @@ #include <iostream> -iGeant4::TrackProcessorUserActionPassBack::TrackProcessorUserActionPassBack(const std::string& type, - const std::string& name, - const IInterface* parent) - : TrackProcessorUserActionBase(type,name,parent), - m_particleBroker("",name), - m_particleBrokerQuick(0), - m_geoIDSvc("",name), - m_geoIDSvcQuick(0), - m_passBackEkinThreshold(0.05), //TODO: should we add units here (MeV)? - m_killBoundaryParticlesBelowThreshold(false) -{ - - ATH_MSG_DEBUG("create TrackProcessorUserActionPassBack name: "<<name); - - declareProperty("ParticleBroker", m_particleBroker, "ISF Particle Broker Svc"); - declareProperty("GeoIDSvc" , m_geoIDSvc , "ISF GeoID Svc" ); - - declareProperty("PassBackEkinThreshold", - m_passBackEkinThreshold=0.05, //TODO: should we add units here (MeV)? - "Ekin cut-off for particles returned to ISF"); - declareProperty("KillBoundaryParticlesBelowThreshold", - m_killBoundaryParticlesBelowThreshold=false, - "Kill particles at boundary which are below Ekin cut-off rather than continue their simulation in G4"); -} - -StatusCode iGeant4::TrackProcessorUserActionPassBack::initialize() -{ - ATH_MSG_DEBUG("Initializing TrackProcessorUserActionPassBack"); - - if ( !m_particleBroker.empty() ) { - if (m_particleBroker.retrieve().isFailure()) { - ATH_MSG_FATAL("Could not retrieve ISF Particle Broker: " << m_particleBroker); - return StatusCode::FAILURE; - } - m_particleBrokerQuick = &(*m_particleBroker); - } - - if ( !m_geoIDSvc.empty() ) { - if ( m_geoIDSvc.retrieve().isFailure()) { - ATH_MSG_FATAL("Could not retrieve ISF GeoID Svc: " << m_geoIDSvc); - return StatusCode::FAILURE; - } - m_geoIDSvcQuick = &(*m_geoIDSvc); - } - - return StatusCode::SUCCESS; -} - -StatusCode iGeant4::TrackProcessorUserActionPassBack::finalize() -{ - return StatusCode::SUCCESS; -} - - -void iGeant4::TrackProcessorUserActionPassBack::ISFSteppingAction(const G4Step* aStep, - ISF::ISFParticle *curISP) -{ - G4Track* aTrack = aStep->GetTrack(); - G4TrackStatus aTrackStatus = aTrack->GetTrackStatus(); - - const G4StepPoint *preStep = aStep->GetPreStepPoint(); //Only used for DEBUG messages - const G4StepPoint *postStep = aStep->GetPostStepPoint(); - - // get geoID from parent - AtlasDetDescr::AtlasRegion curGeoID = curISP->nextGeoID(); - - //std::cout<<"retrieved isp "<<curISP<<" for trackID "<<curISP<<std::endl; - - // check geoID of postStep - const G4ThreeVector &postPos = postStep->GetPosition(); - //const G4ThreeVector &postMom = postStep->GetMomentum(); - //AtlasDetDescr::AtlasRegion nextGeoID = m_geoIDSvcQuick->identifyNextGeoID( postPos.x(), - // postPos.y(), - // postPos.z(), - // postMom.x(), - // postMom.y(), - // postMom.z() ); - AtlasDetDescr::AtlasRegion nextGeoID = m_geoIDSvcQuick->identifyGeoID( postPos.x(), - postPos.y(), - postPos.z() ); - - ATH_MSG_DEBUG("PostStep point resolved to geoID = "<<nextGeoID); - - // return if particle did NOT cross boundary - if ( nextGeoID==curGeoID ) { - ATH_MSG_DEBUG(" -> G4Track stays inside geoID = "<<curGeoID); - - // - // for debugging: - // - if ( msgLvl(MSG::DEBUG) ) { - const G4ThreeVector &prePos = preStep->GetPosition(); - AtlasDetDescr::AtlasRegion preStepGeoID = m_geoIDSvcQuick->identifyGeoID( prePos.x(), - prePos.y(), - prePos.z() ); - AtlasDetDescr::AtlasRegion postStepGeoID = m_geoIDSvcQuick->identifyGeoID( postPos.x(), - postPos.y(), - postPos.z() ); - - if( preStepGeoID!=postStepGeoID ) { - const G4VPhysicalVolume *preVol = preStep->GetPhysicalVolume(); - const G4VPhysicalVolume *postVol = postStep->GetPhysicalVolume(); - const G4ThreeVector &preMom = preStep->GetMomentum(); - const G4ThreeVector &postMom = postStep->GetMomentum(); - const G4TrackVector *secondaryVector = aStep->GetSecondary(); - const G4ThreeVector& aTrack_pos = aTrack->GetPosition(); - const G4ThreeVector& aTrack_mom = aTrack->GetMomentum(); - int pdgID=aTrack->GetDefinition()->GetPDGEncoding(); - int bc=0; - int aTrackID = aTrack->GetTrackID(); - TrackInformation* trackInfo=dynamic_cast<TrackInformation*>(aTrack->GetUserInformation()); - if (trackInfo) { - bc=trackInfo->GetParticleBarcode(); - } - - ATH_MSG_WARNING("pre "<<preVol->GetName()<<" x="<<prePos.x()<<" y="<<prePos.y()<<" z="<<prePos.z()<<" p="<<preMom.mag()<<" geoID="<<preStepGeoID<<"; post "<<postVol->GetName()<<" x="<<postPos.x()<<" y="<<postPos.y()<<" z="<<postPos.z()<<" p="<<postMom.mag()<<" geoID="<<nextGeoID<<"; length="<<aStep->GetStepLength()<<"; n2nd="<<secondaryVector->size()<<" track x="<<aTrack_pos.x()<<" y="<<aTrack_pos.y()<<" z="<<aTrack_pos.z()<<" p="<<aTrack_mom.mag()<<" curgeoID="<<curGeoID<<" pdgid="<<pdgID<<" bc="<<bc<<" trackID="<<aTrackID<<" ISF="<<curISP<<"; ploss="<<(postMom-preMom).mag()); - } - } - - return; - } - - - // - // this point is only reached if particle has crossed - // a sub-det boundary in the non-Geant4-only mode - // - - if ( aTrack->GetKineticEnergy() < m_passBackEkinThreshold ) { - // kinetic energy of primary particle below threshold - ATH_MSG_DEBUG(" -> G4Track enters geoID = " << nextGeoID << - " but is below Ekin threshold. Not returned to ISF."); - if ( m_killBoundaryParticlesBelowThreshold ) { - aTrack->SetTrackStatus( fStopAndKill ); - } else { - // TODO: link G4Track to ISF particle with the new GeoID - } - } else if ( aTrackStatus!=fAlive ) { - // particle is killed by G4 in this step - // TODO: do we need to handle this case specifically? - ATH_MSG_DEBUG(" -> G4Track enters geoID = " << nextGeoID << - " but is destroyed in this step. Not returned to ISF."); - - } else { - // particle is above kinetic energy threshold and alive after this step - // -> push new ISFParticle back to ISF particle broker - ATH_MSG_DEBUG(" -> G4Track enters geoID = " << nextGeoID << - " and is returned to ISF."); - - const ISF::ISFParticle* parent = curISP; - HepMC::GenParticle* truthParticle = m_eventInfo->GetCurrentlyTraced(); - this->returnParticleToISF(aTrack, parent, truthParticle, nextGeoID); - } - - // - // handle secondaries that were created in this G4Step - // - const std::vector<const G4Track*> *secondaryVector = aStep->GetSecondaryInCurrentStep(); - // loop over new secondaries - for ( auto* aConstTrack_2nd : *secondaryVector ) { - // get a non-const G4Track for current secondary (nasty!) - G4Track *aTrack_2nd = const_cast<G4Track*>( aConstTrack_2nd ); - - // check if new secondary position is behind boundary - const G4ThreeVector& pos_2nd = aTrack_2nd->GetPosition(); - AtlasDetDescr::AtlasRegion nextGeoID_2nd = m_geoIDSvcQuick->identifyGeoID( pos_2nd.x(), - pos_2nd.y(), - pos_2nd.z() ); - if( nextGeoID_2nd!=curGeoID ) { - // secondary was generated in this step and has - // a different geoID than the currently tracked one - - if ( aTrack_2nd->GetKineticEnergy() < m_passBackEkinThreshold ) { - // kinetic energy of secondary particle below threshold - ATH_MSG_DEBUG(" -> Secondary particle generated in this G4Step does not pass Ekin cut." << - " Not returned to ISF."); - if ( m_killBoundaryParticlesBelowThreshold ) { - // TODO: should we use fKillTrackAndSecondaries instead? - aTrack_2nd->SetTrackStatus( fStopAndKill ); - } else { - // TODO: link G4Track to ISF particle with the new GeoID - } - } else { - // secondary particle is above kinetic energy threshold - // -> return it to ISF - ATH_MSG_DEBUG(" -> Secondary particle generated in this G4Step is returned to ISF."); - - // attach TrackInformation instance to the new secondary G4Track - const ISF::ISFParticle *parent = curISP; - HepMC::GenParticle* generationZeroTruthParticle = nullptr; - ::iGeant4::ISFG4Helpers::attachTrackInfoToNewG4Track( *aTrack_2nd, - *parent, - Secondary, - generationZeroTruthParticle ); - - HepMC::GenParticle* truthParticle = nullptr; - this->returnParticleToISF(aTrack_2nd, parent, truthParticle, nextGeoID_2nd); - } - } - - } // <-- end loop over new secondaries - - return; -} - - -//________________________________________________________________________ -ISF::TruthBinding* -iGeant4::TrackProcessorUserActionPassBack::newTruthBinding(const G4Track* aTrack, HepMC::GenParticle* truthParticle) const -{ - auto* trackInfo = ::iGeant4::ISFG4Helpers::getISFTrackInfo(*aTrack); - if (!trackInfo) { - G4ExceptionDescription description; - description << G4String("newTruthBinding: ") + "No TrackInformation associated with G4Track (trackID: " - << aTrack->GetTrackID() << ", track pos: "<<aTrack->GetPosition() << ", mom: "<<aTrack->GetMomentum() - << ", parentID " << aTrack->GetParentID() << ")"; - G4Exception("iGeant4::TrackProcessorUserActionPassBack", "NoTrackInformation", FatalException, description); - return nullptr; //The G4Exception call above should abort the job, but Coverity does not seem to pick this up. - } - - HepMC::GenParticle* primaryHepParticle = const_cast<HepMC::GenParticle*>(trackInfo->GetPrimaryHepMCParticle()); - HepMC::GenParticle* generationZeroHepParticle = const_cast<HepMC::GenParticle*>(trackInfo->GetHepMCParticle()); - - ISF::TruthBinding* tBinding = new ISF::TruthBinding(truthParticle, primaryHepParticle, generationZeroHepParticle); - - return tBinding; -} - -//________________________________________________________________________ -ISF::ISFParticle* -iGeant4::TrackProcessorUserActionPassBack::newISFParticle(G4Track* aTrack, - const ISF::ISFParticle* parentISP, - HepMC::GenParticle* truthParticle, - AtlasDetDescr::AtlasRegion nextGeoID) -{ - ISF::TruthBinding* tBinding = newTruthBinding(aTrack, truthParticle); - - ISF::ISFParticle* isp = ::iGeant4::ISFG4Helpers::convertG4TrackToISFParticle( *aTrack, - *parentISP, - tBinding ); - - if (nextGeoID!=AtlasDetDescr::fUndefinedAtlasRegion) { - isp->setNextGeoID( AtlasDetDescr::AtlasRegion(nextGeoID) ); - isp->setNextSimID( parentISP->nextSimID() ); - } - - return isp; -} - - -//________________________________________________________________________ -void -iGeant4::TrackProcessorUserActionPassBack::returnParticleToISF( G4Track *aTrack, - const ISF::ISFParticle* parentISP, - HepMC::GenParticle* truthParticle, - AtlasDetDescr::AtlasRegion nextGeoID ) -{ - // kill track inside G4 - aTrack->SetTrackStatus( fStopAndKill ); - - // create new ISFParticle and attach it to current G4Track - ISF::ISFParticle *newISP = newISFParticle( aTrack, parentISP, truthParticle, nextGeoID ); - - // update TrackInformation - auto trackInfo = ::iGeant4::ISFG4Helpers::getISFTrackInfo(*aTrack); - trackInfo->SetReturnedToISF( true ); - trackInfo->SetBaseISFParticle( newISP ); - - // push the particle back to ISF - m_particleBrokerQuick->push(newISP, parentISP); - - return; -} - namespace G4UA { namespace iGeant4{ @@ -489,7 +215,7 @@ namespace G4UA { // attach TrackInformation instance to the new secondary G4Track const ISF::ISFParticle *parent = curISP; HepMC::GenParticle* generationZeroTruthParticle = nullptr; - ::iGeant4::ISFG4Helpers::attachTrackInfoToNewG4Track( *aTrack_2nd, + ::iGeant4::ISFG4Helper::attachTrackInfoToNewG4Track( *aTrack_2nd, *parent, Secondary, generationZeroTruthParticle ); @@ -506,7 +232,7 @@ namespace G4UA { ISF::TruthBinding* TrackProcessorUserActionPassBack::newTruthBinding(const G4Track* aTrack, HepMC::GenParticle* truthParticle) const { - auto* trackInfo = ::iGeant4::ISFG4Helpers::getISFTrackInfo(*aTrack); + auto* trackInfo = ::iGeant4::ISFG4Helper::getISFTrackInfo(*aTrack); if (!trackInfo) { G4ExceptionDescription description; description << G4String("newTruthBinding: ") + "No TrackInformation associated with G4Track (trackID: " @@ -531,7 +257,7 @@ namespace G4UA { { ISF::TruthBinding* tBinding = newTruthBinding(aTrack, truthParticle); - ISF::ISFParticle* isp = ::iGeant4::ISFG4Helpers::convertG4TrackToISFParticle( *aTrack, + ISF::ISFParticle* isp = ::iGeant4::ISFG4Helper::convertG4TrackToISFParticle( *aTrack, *parentISP, tBinding ); @@ -555,7 +281,7 @@ namespace G4UA { ISF::ISFParticle *newISP = newISFParticle( aTrack, parentISP, truthParticle, nextGeoID ); // update TrackInformation - auto trackInfo = ::iGeant4::ISFG4Helpers::getISFTrackInfo(*aTrack); + auto trackInfo = ::iGeant4::ISFG4Helper::getISFTrackInfo(*aTrack); trackInfo->SetReturnedToISF( true ); trackInfo->SetBaseISFParticle( newISP ); diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.h index f5425953f09b088ec6b838436874e8d5c468463b..bcfc9635269181dfc4782889631a00a98bdd24dc 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBack.h @@ -29,54 +29,6 @@ namespace HepMC { class GenParticle; } -namespace iGeant4 { - - class TrackProcessorUserActionPassBack final: public TrackProcessorUserActionBase { - - public: - TrackProcessorUserActionPassBack(const std::string& type, - const std::string& name, - const IInterface* parent); - virtual ~TrackProcessorUserActionPassBack() {} - - StatusCode initialize(); - StatusCode finalize(); - - private: - /** Called by the base class after the G4Track->ISFParticle association - * has been established */ - void ISFSteppingAction(const G4Step*, ISF::ISFParticle *curISP) override final; - - /** create a new TruthBinding object for the given G4Track (may return 0 if unable) */ - ISF::TruthBinding* newTruthBinding(const G4Track* aTrack, HepMC::GenParticle* truthParticle) const; - - ISF::ISFParticle* newISFParticle(G4Track* aTrack, - const ISF::ISFParticle* parent, - HepMC::GenParticle* truthParticle, - AtlasDetDescr::AtlasRegion nextGeoID); - - /** kills the given G4Track, converts it into an ISFParticle and returns it to the ISF particle broker */ - void returnParticleToISF( G4Track* aTrack, - const ISF::ISFParticle* parentISP, - HepMC::GenParticle* truthParticle, - AtlasDetDescr::AtlasRegion nextGeoID ); - - /** handle for the ISF Particle Broker to allow us to push back particles to the ISF */ - ServiceHandle<ISF::IParticleBroker> m_particleBroker; //!< athena tool handle - ISF::IParticleBroker *m_particleBrokerQuick; //!< quickaccess avoiding gaudi ovehead - - /** access to the central ISF GeoID serice*/ - ServiceHandle<ISF::IGeoIDSvc> m_geoIDSvc; //!< athena service handle - ISF::IGeoIDSvc *m_geoIDSvcQuick; //!< quickaccess avoiding gaudi ovehead - - /** properties to define which particles are returned to ISF */ - double m_passBackEkinThreshold; - bool m_killBoundaryParticlesBelowThreshold; - - }; - -} - namespace G4UA{ namespace iGeant4{ diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.cxx index b057bb45447766f4fd19ee1e40d0b174dbb5f4cd..ffc4f45030f7206843eace1d565ff7cb0c827d51 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.cxx @@ -47,8 +47,6 @@ iGeant4::G4TransportTool::G4TransportTool(const std::string& t, const IInterface* p ) : AthAlgTool(t,n,p), m_useMT(false), - m_pRunMgr(nullptr), - m_UASvc("",n), m_userActionSvc("",n), m_rndmGenSvc("AtDSFMTGenSvc",n), m_barcodeSvc("",n), @@ -57,7 +55,7 @@ iGeant4::G4TransportTool::G4TransportTool(const std::string& t, m_physListTool("PhysicsListToolBase"), m_mcEventCollectionName("TruthEvent"), m_quasiStableParticlesIncluded(false), - m_worldSolid(nullptr) + m_worldSolid(0) { declareInterface<ITransportTool>(this); @@ -82,25 +80,13 @@ iGeant4::G4TransportTool::G4TransportTool(const std::string& t, declareProperty( "PhysicsListTool", m_physListTool); declareProperty( "G4RunManagerHelper", m_g4RunManagerHelper); declareProperty( "QuasiStableParticlesIncluded", m_quasiStableParticlesIncluded); - declareProperty( "UserActionSvc", m_UASvc); - declareProperty( "UserActionSvcV2", m_userActionSvc); + declareProperty( "UserActionSvc", m_userActionSvc); // Multi-threading specific settings declareProperty("MultiThreading", m_useMT=false); // Commands to send to the G4UI declareProperty("G4Commands", m_g4commands); -} - -//________________________________________________________________________ -iGeant4::G4TransportTool::~G4TransportTool() -{} - -//________________________________________________________________________ -StatusCode iGeant4::G4TransportTool::initialize() -{ - ATH_MSG_VERBOSE("initialize"); - // get G4AtlasRunManager ATH_MSG_DEBUG("initialize G4AtlasRunManager"); @@ -110,14 +96,24 @@ StatusCode iGeant4::G4TransportTool::initialize() ATH_MSG_FATAL("Could not get "<<m_g4RunManagerHelper); } - //m_pRunMgr = G4AtlasRunManager::GetG4AtlasRunManager(); // clashes with use of G4HadIntProcessor - m_pRunMgr = m_g4RunManagerHelper ? m_g4RunManagerHelper->g4RunManager() : 0; + //p_runMgr = G4AtlasRunManager::GetG4AtlasRunManager(); // clashes with use of G4HadIntProcessor + p_runMgr = m_g4RunManagerHelper ? m_g4RunManagerHelper->g4RunManager() : 0; if(m_physListTool.retrieve().isFailure()) { ATH_MSG_FATAL("Could not get PhysicsListToolBase"); } m_physListTool->SetPhysicsList(); +} + +//________________________________________________________________________ +iGeant4::G4TransportTool::~G4TransportTool() +{} + +//________________________________________________________________________ +StatusCode iGeant4::G4TransportTool::initialize() +{ + ATH_MSG_VERBOSE("initialize"); // retrieve BarcodeSvc if ( m_barcodeSvc.retrieve().isFailure() ) { @@ -130,31 +126,8 @@ StatusCode iGeant4::G4TransportTool::initialize() return StatusCode::FAILURE; } - // For now, we decide which user action service to setup based on which - // handle has a non-empty name configured. Then we can steer it from the - // configuration layer. This will go away when we drop V1 actions. - - // V1 user action service - if( !m_UASvc.name().empty() ) { - ATH_CHECK( m_UASvc.retrieve() ); - - // Make sure only one user action version is used at a time. - if( !m_userActionSvc.name().empty() ) { - ATH_MSG_ERROR("Configured to use both V1 and V2 user actions, " << - "which isn't supported!"); - return StatusCode::FAILURE; - } - if(m_useMT) { - ATH_MSG_ERROR("Using V1 user action design, which won't work in MT"); - return StatusCode::FAILURE; - } - } - - // V2 user action service - if( !m_userActionSvc.name().empty() ) { - ATH_CHECK( m_userActionSvc.retrieve() ); - m_pRunMgr->SetUserActionSvc( m_userActionSvc.typeAndName() ); - } + ATH_CHECK( m_userActionSvc.retrieve() ); + p_runMgr->SetUserActionSvc( m_userActionSvc.typeAndName() ); if(m_useMT) { // Retrieve the python service to trigger its initialization. This is done @@ -188,11 +161,11 @@ StatusCode iGeant4::G4TransportTool::initialize() ui->ApplyCommand("/MagneticField/Initialize"); } - m_pRunMgr->SetReleaseGeo( m_releaseGeoModel ); - m_pRunMgr->SetRecordFlux( m_recordFlux ); + p_runMgr->SetReleaseGeo( m_releaseGeoModel ); + p_runMgr->SetRecordFlux( m_recordFlux ); // *AS* TEST: - // *AS* m_pRunMgr->Initialize(); + // *AS* p_runMgr->Initialize(); // *AS* but this is a good place @@ -230,7 +203,7 @@ StatusCode iGeant4::G4TransportTool::initialize() ATH_MSG_FATAL("Could not get "<<m_particleBroker); return StatusCode::FAILURE; } - //m_pRunMgr->setParticleBroker(&m_particleBroker); + //p_runMgr->setParticleBroker(&m_particleBroker); if (m_particleHelper.retrieve().isSuccess()) ATH_MSG_DEBUG("retrieved "<<m_particleHelper); @@ -238,7 +211,7 @@ StatusCode iGeant4::G4TransportTool::initialize() ATH_MSG_FATAL("Could not get "<<m_particleHelper); return StatusCode::FAILURE; } - //m_pRunMgr->setParticleHelper(&m_particleHelper); + //p_runMgr->setParticleHelper(&m_particleHelper); */ /* if (m_configTool.retrieve().isSuccess()) @@ -258,7 +231,7 @@ StatusCode iGeant4::G4TransportTool::finalize() ATH_MSG_DEBUG("\t terminating the current G4 run"); - m_pRunMgr->RunTermination(); + p_runMgr->RunTermination(); return StatusCode::SUCCESS; } @@ -273,7 +246,7 @@ StatusCode iGeant4::G4TransportTool::process(const ISF::ISFParticle& isp) G4Event* inputEvent=ISF_to_G4Event(isp); if (inputEvent) { - bool abort = m_pRunMgr->ProcessEvent(inputEvent); + bool abort = p_runMgr->ProcessEvent(inputEvent); if (abort) { ATH_MSG_WARNING("Event was aborted !! "); @@ -311,7 +284,7 @@ StatusCode iGeant4::G4TransportTool::processVector(const ISF::ConstISFParticleVe G4Event* inputEvent = ISF_to_G4Event(ispVector); if (inputEvent) { - bool abort = m_pRunMgr->ProcessEvent(inputEvent); + bool abort = p_runMgr->ProcessEvent(inputEvent); if (abort) { ATH_MSG_WARNING("Event was aborted !! "); @@ -436,6 +409,11 @@ G4PrimaryParticle* iGeant4::G4TransportTool::getPrimaryParticle(const HepMC::Gen particle->SetProperTime( (lv1-lv0).mag()/CLHEP::c_light ); } + // Set the user information for this primary to point to the HepMcParticleLink... + PrimaryParticleInformation* ppi = new PrimaryParticleInformation(&gp); + particle->SetUserInformation(ppi); + std::cout << "ZLM making primary down the line with " << ppi->GetParticleBarcode() << std::endl; + return particle; } diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.h index 6f46f5377c72c61299f78adf4218d5597d4b2bd0..c8b397826c28ebc625c9ba6a5713b71c3f03c41f 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.h @@ -20,7 +20,7 @@ #include "ISF_Geant4Interfaces/ITransportTool.h" #include "ISF_Geant4Tools/IG4RunManagerHelper.h" #include "G4AtlasInterfaces/IPhysicsListTool.h" -//#include "G4AtlasInterfaces/IUserAction.h" + #include "G4AtlasInterfaces/IUserActionSvc.h" #include <string> @@ -94,13 +94,11 @@ namespace iGeant4 HepMC::GenEvent* genEvent() const; - G4AtlasRunManager * m_pRunMgr; + G4AtlasRunManager * p_runMgr; /// Activate multi-threading configuration bool m_useMT; - /// First user action service implementation - ServiceHandle<IUserActionSvc> m_UASvc; - /// New user action service implementation + /// user action service ServiceHandle<G4UA::IUserActionSvc> m_userActionSvc; // Random number service diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/components/ISF_Geant4Tools_entries.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/components/ISF_Geant4Tools_entries.cxx index 2107d9c67dd15c49ac8ab4832ba25b424782c525..c2d9ae6a39ef4c8b8b7f60666b300e118f2628c1 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/components/ISF_Geant4Tools_entries.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/components/ISF_Geant4Tools_entries.cxx @@ -1,12 +1,8 @@ #include "GaudiKernel/DeclareFactoryEntries.h" #include "../TransportTool.h" -#include "../TrackProcessorUserActionPassBack.h" #include "../TrackProcessorUserActionPassBackTool.h" -#include "../TrackProcessorUserActionFullG4.h" #include "../TrackProcessorUserActionFullG4Tool.h" -#include "../MCTruthUserAction.h" #include "../MCTruthUserActionTool.h" -#include "../PhysicsValidationUserAction.h" #include "../PhysicsValidationUserActionTool.h" #include "../G4RunManagerHelper.h" @@ -15,12 +11,8 @@ //arranged alphabetically, as this now determines the order in which //genConf is run. DECLARE_NAMESPACE_TOOL_FACTORY( iGeant4 , G4TransportTool ) -DECLARE_NAMESPACE_TOOL_FACTORY( iGeant4 , TrackProcessorUserActionPassBack ) DECLARE_NAMESPACE_TOOL_FACTORY( G4UA::iGeant4 , TrackProcessorUserActionPassBackTool ) -DECLARE_NAMESPACE_TOOL_FACTORY( iGeant4 , TrackProcessorUserActionFullG4 ) DECLARE_NAMESPACE_TOOL_FACTORY( G4UA::iGeant4 , TrackProcessorUserActionFullG4Tool ) -DECLARE_NAMESPACE_TOOL_FACTORY( iGeant4 , MCTruthUserAction ) DECLARE_NAMESPACE_TOOL_FACTORY( G4UA::iGeant4 , MCTruthUserActionTool ) -DECLARE_NAMESPACE_TOOL_FACTORY( iGeant4 , PhysicsValidationUserAction ) DECLARE_NAMESPACE_TOOL_FACTORY( G4UA::iGeant4 , PhysicsValidationUserActionTool ) DECLARE_NAMESPACE_TOOL_FACTORY( iGeant4 , G4RunManagerHelper ) diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/CMakeLists.txt b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/CMakeLists.txt index 5058790f0c82c45f7d03e0e61b23edb2f0a6f1c5..7a02122f42e1378a653da2d6ba7a48801a94b01d 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/CMakeLists.txt +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/CMakeLists.txt @@ -17,11 +17,7 @@ atlas_depends_on_subdirs( PUBLIC Control/CxxUtils Control/AthenaBaseComps Generators/GeneratorObjects - LArCalorimeter/LArG4/LArG4Barrel LArCalorimeter/LArG4/LArG4Code - LArCalorimeter/LArG4/LArG4EC - LArCalorimeter/LArG4/LArG4FCAL - LArCalorimeter/LArG4/LArG4HEC Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent TileCalorimeter/TileG4/TileGeoG4SD ) @@ -36,7 +32,7 @@ atlas_add_component( ISF_Geant4UserActions src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GaudiKernel G4AtlasInterfaces G4AtlasToolsLib CaloDetDescrLib CaloIdentifier CxxUtils GeneratorObjects LArG4Barrel LArG4Code LArG4EC LArG4FCAL LArG4HEC ISF_FastCaloSimEvent TileGeoG4SDLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GaudiKernel G4AtlasInterfaces G4AtlasToolsLib CaloDetDescrLib CaloIdentifier CxxUtils GeneratorObjects LArG4Code ISF_FastCaloSimEvent TileGeoG4SDLib ) # Install files from the package: atlas_install_headers( ISF_Geant4UserActions ) diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamAction.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamAction.h index b281ad60ba31c297adf034746e37ac4dc759d26e..d706af05b15ef6694276f44e6bb64b16731107ad 100755 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamAction.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamAction.h @@ -10,7 +10,7 @@ #include <vector> // athena simulation includes -#include "G4AtlasTools/UserActionBase.h" + #include "GaudiKernel/ServiceHandle.h" // forward declarations in namespaces @@ -21,7 +21,7 @@ namespace HepMC { class GenParticle; } // forward declarations in global namespace -class LArVCalculator; +class ILArCalculatorSvc; class G4VSolid; class G4AffineTransform; class LArG4SimpleSD; @@ -29,88 +29,20 @@ class LArIdentifierConverter; class TileGeoG4SDCalc; class CaloDetDescrManager; class LArEM_ID; - /** - * - * @short Class for collecting G4 hit information - * - * Collect and store Geant4 hit information, i.e. - * position, deposited energy and time, from hits - * - * @author Wolfgang Ehrenfeld, University of Hamburg, Germany - * @author Sasha Glazov, DESY Hamburg, Germany - * @author Zdenek Hubacek, CERN - * @author Geoffrey Gilles, Clermont-Ferrand, France - * - * - */ - -class FastCaloSimParamAction: public UserActionBase { - - public: - - //! default constructor - FastCaloSimParamAction(const std::string& type, const std::string& name, const IInterface* parent); - - ~FastCaloSimParamAction(); - - //! run code at begin of event - virtual void BeginOfEvent(const G4Event*) override; - //! run code at end of event - virtual void EndOfEvent(const G4Event*) override; - //! run code at begin of run - virtual void BeginOfRun(const G4Run*) override; - //! run code at end of event - virtual void EndOfRun(const G4Run*) override; - //! run code after each step - virtual void Step(const G4Step*) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - - private: - - /* data members */ - - LArVCalculator* m_current_calculator; - TileGeoG4SDCalc* m_current_calculator_Tile; - - G4VSolid* m_current_solid; - G4AffineTransform* m_current_transform; - - // calculators - LArVCalculator* m_calculator_EMECIW_pos; //!< pointer to EMEC inner wheel calculator - LArVCalculator* m_calculator_EMECIW_neg; //!< pointer to EMEC inner wheel calculator - - LArVCalculator* m_calculator_EMECOW_pos; //!< pointer to EMEC outer wheel calculator - LArVCalculator* m_calculator_EMECOW_neg; - - //LArVCalculator* m_calculator_BIB; //!< BackInnerBarrette - LArVCalculator* m_calculator_BOB; //!< BackOuterBarrette - - LArVCalculator* m_calculator_EMB; - LArVCalculator* m_calculator_FCAL1; - LArVCalculator* m_calculator_FCAL2; - LArVCalculator* m_calculator_FCAL3; - LArVCalculator* m_calculator_HEC; - LArVCalculator* m_calculator_EMBPS; //!< calculators for presampler - LArVCalculator* m_calculator_EMEPS; - - //LArVCalculator* m_calculator_HECLocal; - TileGeoG4SDCalc* m_calculator_Tile; - - // helper - LArG4SimpleSD* m_lar_helper; - const LArEM_ID *m_lar_emID; - const CaloDetDescrManager* m_calo_dd_man; - - ISF_FCS_Parametrization::FCS_StepInfoCollection* m_eventSteps; //!< collection of StepInfo - std::map<std::string,int> m_detectormap; - std::set<std::string> m_unuseddetector; - int m_ndetectors; - - bool m_shift_lar_subhit; - bool m_shorten_lar_step; - -}; +/** + * + * @short Class for collecting G4 hit information + * + * Collect and store Geant4 hit information, i.e. + * position, deposited energy and time, from hits + * + * @author Wolfgang Ehrenfeld, University of Hamburg, Germany + * @author Sasha Glazov, DESY Hamburg, Germany + * @author Zdenek Hubacek, CERN + * @author Geoffrey Gilles, Clermont-Ferrand, France + * + * + */ #include "G4AtlasInterfaces/IBeginRunAction.h" #include "G4AtlasInterfaces/IEndRunAction.h" @@ -127,18 +59,33 @@ namespace G4UA{ class FastCaloSimParamAction: - public IBeginRunAction, public IEndRunAction, public IBeginEventAction, public IEndEventAction, public ISteppingAction + public IBeginRunAction, public IEndRunAction, public IBeginEventAction, public IEndEventAction, public ISteppingAction { - + public: - + struct Config { bool shift_lar_subhit=true; bool shorten_lar_step=false; - + // calculators + ILArCalculatorSvc* calculator_EMECIW_pos=nullptr; //!< pointer to EMEC positive inner wheel calculator + ILArCalculatorSvc* calculator_EMECIW_neg=nullptr; //!< pointer to EMEC negative inner wheel calculator + ILArCalculatorSvc* calculator_EMECOW_pos=nullptr; //!< pointer to EMEC positive outer wheel calculator + ILArCalculatorSvc* calculator_EMECOW_neg=nullptr; //!< pointer to EMEC negative outer wheel calculator + //ILArCalculatorSvc* calculator_BIB=nullptr; //!< pointer to EMEC Back Inner Barrette wheel calculator + ILArCalculatorSvc* calculator_BOB=nullptr; //!< pointer to EMEC Back Outer Barrette wheel calculator + ILArCalculatorSvc* calculator_EMB=nullptr; //!< pointer to barrel calculator + ILArCalculatorSvc* calculator_FCAL1=nullptr; + ILArCalculatorSvc* calculator_FCAL2=nullptr; + ILArCalculatorSvc* calculator_FCAL3=nullptr; + ILArCalculatorSvc* calculator_HEC=nullptr; + ILArCalculatorSvc* calculator_EMBPS=nullptr; //!< pointer to barrel presampler calculator + ILArCalculatorSvc* calculator_EMEPS=nullptr; //!< pointer to endcap presampler calculator + //ILArCalculatorSvc* calculator_HECLocal=nullptr; + }; - + FastCaloSimParamAction(const Config& config); virtual void beginOfRun(const G4Run*) override; virtual void endOfRun(const G4Run*) override; @@ -147,58 +94,40 @@ namespace G4UA{ virtual void processStep(const G4Step*) override; private: Config m_config; - + typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t; /// Pointer to StoreGate (event store by default) mutable StoreGateSvc_t m_evtStore; /// Pointer to StoreGate (detector store by default) mutable StoreGateSvc_t m_detStore; - - + + /* data members */ - - LArVCalculator* m_current_calculator; - TileGeoG4SDCalc* m_current_calculator_Tile; - - G4VSolid* m_current_solid; - G4AffineTransform* m_current_transform; - + + ILArCalculatorSvc *m_current_calculator; + TileGeoG4SDCalc *m_current_calculator_Tile; + + G4VSolid *m_current_solid; + G4AffineTransform *m_current_transform; + // calculators - LArVCalculator* m_calculator_EMECIW_pos; //!< pointer to EMEC inner wheel calculator - LArVCalculator* m_calculator_EMECIW_neg; //!< pointer to EMEC inner wheel calculator - - LArVCalculator* m_calculator_EMECOW_pos; //!< pointer to EMEC outer wheel calculator - LArVCalculator* m_calculator_EMECOW_neg; - - //LArVCalculator* m_calculator_BIB; //!< BackInnerBarrette - LArVCalculator* m_calculator_BOB; //!< BackOuterBarrette - - LArVCalculator* m_calculator_EMB; - LArVCalculator* m_calculator_FCAL1; - LArVCalculator* m_calculator_FCAL2; - LArVCalculator* m_calculator_FCAL3; - LArVCalculator* m_calculator_HEC; - LArVCalculator* m_calculator_EMBPS; //!< calculators for presampler - LArVCalculator* m_calculator_EMEPS; - - //LArVCalculator* m_calculator_HECLocal; - TileGeoG4SDCalc* m_calculator_Tile; - + TileGeoG4SDCalc *m_calculator_Tile; + // helper - LArG4SimpleSD* m_lar_helper; + LArG4SimpleSD *m_lar_helper; const LArEM_ID *m_lar_emID; - const CaloDetDescrManager* m_calo_dd_man; - - ISF_FCS_Parametrization::FCS_StepInfoCollection* m_eventSteps; //!< collection of StepInfo + const CaloDetDescrManager *m_calo_dd_man; + + ISF_FCS_Parametrization::FCS_StepInfoCollection *m_eventSteps; //!< collection of StepInfo std::map<std::string,int> m_detectormap; std::set<std::string> m_unuseddetector; int m_ndetectors; - - + + }; // class FastCaloSimParamAction - - -} // namespace G4UA + + +} // namespace G4UA diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamActionTool.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamActionTool.h index 70b39d88a89a9867aa47491e41194726e003ed5c..dde4313197ca8f3dc407a1d4dba6e789b7c28f3c 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamActionTool.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamActionTool.h @@ -2,17 +2,20 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef ISF_GEANT4USERACTIONS_G4UA__FASTCALOSIMPARAMACTIONTOOL_H -#define ISF_GEANT4USERACTIONS_G4UA__FASTCALOSIMPARAMACTIONTOOL_H +#ifndef ISF_GEANT4USERACTIONS_G4UA__FASTCALOSIMPARAMACTIONTOOL_H +#define ISF_GEANT4USERACTIONS_G4UA__FASTCALOSIMPARAMACTIONTOOL_H #include "G4AtlasInterfaces/IBeginRunActionTool.h" #include "G4AtlasInterfaces/IEndRunActionTool.h" #include "G4AtlasInterfaces/IBeginEventActionTool.h" #include "G4AtlasInterfaces/IEndEventActionTool.h" #include "G4AtlasInterfaces/ISteppingActionTool.h" + #include "G4AtlasTools/ActionToolBase.h" + #include "ISF_Geant4UserActions/FastCaloSimParamAction.h" -namespace G4UA{ +class ILArCalculatorSvc; +namespace G4UA{ /// @class FastCaloSimParamActionTool /// @brief Tool which manages the FastCaloSimParamAction @@ -20,28 +23,30 @@ namespace G4UA{ /// @author Andrea Di Simone /// - class FastCaloSimParamActionTool: + class FastCaloSimParamActionTool: public ActionToolBase<FastCaloSimParamAction>, public IBeginRunActionTool, public IEndRunActionTool, public IBeginEventActionTool, public IEndEventActionTool, public ISteppingActionTool { - + public: /// Standard constructor FastCaloSimParamActionTool(const std::string& type, const std::string& name,const IInterface* parent); + /// Intialize Athena components + StatusCode initialize() override final; /// Retrieve the BoR action - virtual IBeginRunAction* getBeginRunAction() override final + virtual IBeginRunAction* getBeginRunAction() override final { return static_cast<IBeginRunAction*>( getAction() ); } /// Retrieve the EoR action - virtual IEndRunAction* getEndRunAction() override final + virtual IEndRunAction* getEndRunAction() override final { return static_cast<IEndRunAction*>( getAction() ); } /// Retrieve the BoE action - virtual IBeginEventAction* getBeginEventAction() override final + virtual IBeginEventAction* getBeginEventAction() override final { return static_cast<IBeginEventAction*>( getAction() ); } /// Retrieve the EoE action - virtual IEndEventAction* getEndEventAction() override final + virtual IEndEventAction* getEndEventAction() override final { return static_cast<IEndEventAction*>( getAction() ); } /// Retrieve the stepping action - virtual ISteppingAction* getSteppingAction() override final + virtual ISteppingAction* getSteppingAction() override final { return static_cast<ISteppingAction*>( getAction() ); } virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override; protected: @@ -50,8 +55,22 @@ namespace G4UA{ private: /// Configuration parameters FastCaloSimParamAction::Config m_config; + + ServiceHandle<ILArCalculatorSvc> m_emepiwcalc; //!< EMEC positive inner wheel calculator + ServiceHandle<ILArCalculatorSvc> m_emeniwcalc; //!< EMEC negative inner wheel calculator + ServiceHandle<ILArCalculatorSvc> m_emepowcalc; //!< EMEC positive outer wheel calculator + ServiceHandle<ILArCalculatorSvc> m_emenowcalc; //!< EMEC negative outer wheel calculator + ServiceHandle<ILArCalculatorSvc> m_emeobarcalc; //!< EMEC Back Outer Barrette wheel calculator + ServiceHandle<ILArCalculatorSvc> m_embcalc; //!< Barrel calculator + ServiceHandle<ILArCalculatorSvc> m_fcal1calc; //!< FCAL1 calculator + ServiceHandle<ILArCalculatorSvc> m_fcal2calc; //!< FCAL2 calculator + ServiceHandle<ILArCalculatorSvc> m_fcal3calc; //!< FCAL3 calculator + ServiceHandle<ILArCalculatorSvc> m_heccalc; //!< HEC wheel calculator + ServiceHandle<ILArCalculatorSvc> m_pscalc; //!< Barrel presampler calculator + ServiceHandle<ILArCalculatorSvc> m_emepscalc; //!< Endcap presampler calculator + }; // class FastCaloSimParamActionTool - - -} // namespace G4UA + + +} // namespace G4UA #endif diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/cmt/requirements b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/cmt/requirements index ba24b39a3923a6f3d5a6fd61ac6c760694fb878f..07a7cd43c8a26607fbaa44542b5763e01da500b4 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/cmt/requirements +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/cmt/requirements @@ -14,11 +14,7 @@ use CaloIdentifier CaloIdentifier-* Calorimeter use Geant4 Geant4-* External use GeneratorObjects GeneratorObjects-* Generators use ISF_FastCaloSimEvent ISF_FastCaloSimEvent-* Simulation/ISF/ISF_FastCaloSim -use LArG4Barrel LArG4Barrel-* LArCalorimeter/LArG4 use LArG4Code LArG4Code-* LArCalorimeter/LArG4 -use LArG4EC LArG4EC-* LArCalorimeter/LArG4 -use LArG4FCAL LArG4FCAL-* LArCalorimeter/LArG4 -use LArG4HEC LArG4HEC-* LArCalorimeter/LArG4 use TileGeoG4SD TileGeoG4SD-* TileCalorimeter/TileG4 use CxxUtils CxxUtils-* Control use AthenaBaseComps AthenaBaseComps-* Control diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/python/ISF_Geant4UserActionsConfigDb.py b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/python/ISF_Geant4UserActionsConfigDb.py index 9cc6bb2c08f052affd1dc3ca5632d77a440406eb..307c3c259baa9ba6f72e6b0e3e55db4475f8dd72 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/python/ISF_Geant4UserActionsConfigDb.py +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/python/ISF_Geant4UserActionsConfigDb.py @@ -2,8 +2,6 @@ from AthenaCommon.CfgGetter import addTool -addTool("ISF_Geant4UserActions.ISF_Geant4UserActionsConf.FastCaloSimParamAction", "FastCaloSimParamAction") addTool("ISF_Geant4UserActions.ISF_Geant4UserActionsConfig.getFastCaloSimParamActionTool", "G4UA::FastCaloSimParamActionTool") -addTool("ISF_Geant4UserActions.ISF_Geant4UserActionsConf.iGeant4__TestBoundariesUserAction", "iGeant4__TestBoundariesUserAction") addTool("ISF_Geant4UserActions.ISF_Geant4UserActionsConfig.getTestBoundariesUserActionTool", "G4UA::iGeant4::TestBoundariesUserActionTool") diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx index 106045bf108c41ab57c375a6987bedd9079c6dc4..c3bada4392c51fdc5ecca1e8a78e066968d58201 100755 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx @@ -16,18 +16,8 @@ #include "G4EventManager.hh" #include "G4ThreeVector.hh" -// all the LAr calculators -#include "LArG4Code/LArVCalculator.h" -#include "LArG4Barrel/LArBarrelCalculator.h" -#include "LArG4EC/EnergyCalculator.h" -#include "LArG4FCAL/LArFCAL1Calculator.h" -#include "LArG4FCAL/LArFCAL2Calculator.h" -#include "LArG4FCAL/LArFCAL3Calculator.h" -//#include "LArG4HEC/LArHECCalculator.h" -#include "LArG4HEC/LArHECWheelCalculator.h" -//#include "LArG4HEC/LArHECLocalCalculator.h" -#include "LArG4EC/LArEndcapPresamplerCalculator.h" -#include "LArG4Barrel/LArBarrelPresamplerCalculator.h" +// LAr calculator interface +#include "LArG4Code/ILArCalculatorSvc.h" // For the identifiers #include "LArG4Code/LArG4SimpleSD.h" @@ -48,863 +38,7 @@ // For MC Truth information: #include "GeneratorObjects/McEventCollection.h" -FastCaloSimParamAction::FastCaloSimParamAction(const std::string& type, const std::string& name, const IInterface* parent): - UserActionBase(type,name,parent), - m_current_calculator(0), - m_current_calculator_Tile(0), - m_current_solid(0), - m_current_transform(0), - m_calculator_EMECIW_pos(0), - m_calculator_EMECIW_neg(0), - m_calculator_EMECOW_pos(0), - m_calculator_EMECOW_neg(0), - //m_calculator_BIB(0), - m_calculator_BOB(0), - m_calculator_EMB(0), - m_calculator_FCAL1(0), - m_calculator_FCAL2(0), - m_calculator_FCAL3(0), - m_calculator_HEC(0), - //m_calculator_HECLocal(0), - m_calculator_EMBPS(0), - m_calculator_EMEPS(0), - m_calculator_Tile(0), - m_lar_helper(0), - m_lar_emID(0), - m_calo_dd_man(0), - m_eventSteps(0), - m_ndetectors(0), - m_shift_lar_subhit(true), - m_shorten_lar_step(false) -{ -#ifdef _myDEBUG_ - G4cout << "############################################" << G4endl - << "## FastCaloSimParamAction - Constructor ##" << G4endl - << "############################################" << G4endl; -#endif - declareProperty("shift_lar_subhit",m_shift_lar_subhit, ""); - declareProperty("shorten_lar_step",m_shorten_lar_step, ""); -} - -FastCaloSimParamAction::~FastCaloSimParamAction() -{ -} - -void FastCaloSimParamAction::BeginOfEvent(const G4Event* ) -{ - //G4cout << "############################################" << G4endl - // << "## FastCaloSimParamAction - BeginOfEvent ##" << G4endl - // << "############################################" << G4endl; - - // init calculator - if (m_calculator_EMECIW_pos == 0) - m_calculator_EMECIW_pos = new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, 1); - if (m_calculator_EMECOW_pos == 0) - m_calculator_EMECOW_pos = new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, 1); - - if (m_calculator_EMECIW_neg == 0) - m_calculator_EMECIW_neg = new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, -1); - if (m_calculator_EMECOW_neg == 0) - m_calculator_EMECOW_neg = new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, -1); - //if (m_calculator_BIB == 0) - // m_calculator_BIB = new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackInnerBarretteWheel); - if (m_calculator_BOB == 0) - m_calculator_BOB = new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteWheel); - if (m_calculator_FCAL1 == 0) - m_calculator_FCAL1 = LArFCAL1Calculator::GetInstance(); - if (m_calculator_FCAL2 == 0) - m_calculator_FCAL2 = LArFCAL2Calculator::GetInstance(); - if (m_calculator_FCAL3 == 0) - m_calculator_FCAL3 = LArFCAL3Calculator::GetInstance(); - if (m_calculator_HEC == 0) - m_calculator_HEC = LArHECWheelCalculator::GetCalculator(); - //if (m_calculator_HECLocal == 0) - // m_calculator_HECLocal = LArHECLocalCalculator::GetCalculator(); - if (m_calculator_EMB == 0) - m_calculator_EMB = LArBarrelCalculator::GetCalculator(); - if (m_calculator_EMBPS == 0) - m_calculator_EMBPS = LArBarrelPresamplerCalculator::GetCalculator(); - if (m_calculator_EMEPS == 0) - m_calculator_EMEPS = LArEndcapPresamplerCalculator::GetCalculator(); - if (m_calculator_Tile == 0) - { - // Get the tile calculator from the SD - G4SDManager *sdManager = G4SDManager::GetSDMpointer(); - TileGeoG4SD * tileSD = dynamic_cast<TileGeoG4SD*>( sdManager->FindSensitiveDetector("TileGeoG4SD") ); - if (tileSD){ - m_calculator_Tile = tileSD->GetCalculator(); - } else { - G4ExceptionDescription description; - description << "FastCaloSimParamAction::BeginOfEventAction - can't find TileGeoG4SDCalc"; - G4Exception("FastCaloSimParamAction", "NoTileGeoG4SDCalc", FatalException, description); - abort(); - } - } - - if (m_current_transform == 0) - m_current_transform = new G4AffineTransform (); - - - m_eventSteps = new ISF_FCS_Parametrization::FCS_StepInfoCollection(); - //G4cout << "############################################" << G4endl - // << "## FastCaloSimParamAction - BeginOfEvent2 ##" << G4endl - // << "############################################" << G4endl; - - - return; -} - -void FastCaloSimParamAction::EndOfEvent(const G4Event* ) -{ - - //G4cout << "############################################" << G4endl - // << "## FastCaloSimParamAction - EndOfEvent ##" << G4endl - // << "## ##" << G4endl - // << "############################################" << G4endl; - - // - // Zero order cleanup - // combine hits from the same spot (distance < 1 mm^2) - // only necessary for large number of spots (> 500) - // - //const double dsame = 1.; // 1mm^2 - //don't need it at the moment -#ifdef _myDEBUG_ - G4cout << "FastCaloSimParamAction::EndOfEventAction: Before initial cleanup, N=" << m_eventSteps->size() << G4endl; -#endif - - // G4cout << "FastCaloSimParamAction::EndOfEventAction: After initial cleanup, N=" << m_eventSteps->size() << G4endl; - if (m_eventSteps->size()==0) return; //don't need to play with it - G4cout << "FastCaloSimParamAction::EndOfEventAction: After initial cleanup, N=" << m_eventSteps->size() << G4endl; - - // - // Put eventSteps into event store - // - std::string location("ZHEventSteps"); - ISF_FCS_Parametrization::FCS_StepInfoCollection* test; - // std::cout <<"Check if already in StoreGate:"<<std::endl; - if (evtStore()->contains<ISF_FCS_Parametrization::FCS_StepInfoCollection>(location)) - { - StatusCode check = evtStore()->retrieve(test,location); - if (check.isSuccess()) - { - //std::cout <<"ZH, Already have in StoreGate : "<<test->size()<<std::endl; - //want to merge and overwrite! - for (ISF_FCS_Parametrization::FCS_StepInfoCollection::iterator iter = m_eventSteps->begin();iter != m_eventSteps->end();iter++) - { - test->push_back((*iter)); - } - //std::cout <<"Now have: "<<test->size()<<std::endl; - // StatusCode sc = evtStore()->remove( - //check - check = evtStore()->retrieve(test,location); - if (check.isSuccess()) - { - std::cout <<"ZH, check in StoreGate : "<<test->size()<<std::endl; - } - /* - StatusCode sc = evtStore()->record( test, location); //want to overwrite? but current release doesn't have this method??? - if( sc.isFailure() ) { - G4cout << "Error: Couldn't store EventSteps object in event store at location: " << location << G4endl;// - } else { - - G4cout << "Info: Stored EventSteps object (size: " << test->size() << ")" - << " in event store at location: " << location << G4endl; - } - */ - } - else - { - std::cout <<"ZH WTF ??"<<std::endl; - } - } - else - { - StatusCode sc = evtStore()->record( m_eventSteps, location, true ); - if( sc.isFailure() ) { - G4cout << "Error: Couldn't store EventSteps object in event store at location: " << location << G4endl; - } else { - G4cout << "Info: Stored EventSteps object (size: " << m_eventSteps->size() << ")" - << " in event store at location: " << location << G4endl; - } - } - return; -} - -void FastCaloSimParamAction::BeginOfRun(const G4Run* ) -{ - //G4cout << "############################################" << G4endl - // << "## FastCaloSimParamAction - BeginOfRun ##" << G4endl - // << "############################################" << G4endl; - // ?? Ok, where do I need this?? - // init calculator - if (m_calculator_EMECIW_pos == 0) - m_calculator_EMECIW_pos = new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, 1); - if (m_calculator_EMECOW_pos == 0) - m_calculator_EMECOW_pos = new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, 1); - if (m_calculator_EMECIW_neg == 0) - m_calculator_EMECIW_neg = new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, -1); - if (m_calculator_EMECOW_neg == 0) - m_calculator_EMECOW_neg = new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, -1); - //if (m_calculator_BIB == 0) - // m_calculator_BIB = new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackInnerBarretteWheel); - if (m_calculator_BOB == 0) - m_calculator_BOB = new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteWheel); - if (m_calculator_FCAL1 == 0) - m_calculator_FCAL1 = LArFCAL1Calculator::GetInstance(); - if (m_calculator_FCAL2 == 0) - m_calculator_FCAL2 = LArFCAL2Calculator::GetInstance(); - if (m_calculator_FCAL3 == 0) - m_calculator_FCAL3 = LArFCAL3Calculator::GetInstance(); - if (m_calculator_HEC == 0) - m_calculator_HEC = LArHECWheelCalculator::GetCalculator(); - //if (m_calculator_HECLocal == 0) - // m_calculator_HECLocal = LArHECLocalCalculator::GetCalculator(); - if (m_calculator_EMB ==0) - m_calculator_EMB = LArBarrelCalculator::GetCalculator(); - if (m_calculator_EMBPS == 0) - m_calculator_EMBPS = LArBarrelPresamplerCalculator::GetCalculator(); - if (m_calculator_EMEPS == 0) - m_calculator_EMEPS = LArEndcapPresamplerCalculator::GetCalculator(); - if (m_calculator_Tile ==0) - { - // Get the tile calculator from the SD - G4SDManager *sdManager = G4SDManager::GetSDMpointer(); - TileGeoG4SD * tileSD = dynamic_cast<TileGeoG4SD*>( sdManager->FindSensitiveDetector("TileGeoG4SD") ); - if (tileSD){ - m_calculator_Tile = tileSD->GetCalculator(); - } else { - G4ExceptionDescription description; - description << "FastCaloSimParamAction::BeginOfRunAction - can't find TileGeoG4SDCalc"; - G4Exception("FastCaloSimParamAction", "NoTileGeoG4SDCalc", FatalException, description); - abort(); - } - } - - if (m_current_transform == 0) - m_current_transform = new G4AffineTransform (); - - m_lar_helper = new LArG4SimpleSD( "IDHelper" , &(*detStore()) ); - - //get also lar em helper - m_calo_dd_man = CaloDetDescrManager::instance(); - - const DataHandle<CaloIdManager> caloIdManager; - StatusCode sc=detStore()->retrieve(caloIdManager); - if(sc.isSuccess()) - std::cout<<"CaloIDManager retrieved."<<std::endl; - else - throw std::runtime_error("ISF_HitAnalysis: Unable to retrieve CaloIDManeger"); - - m_lar_emID=caloIdManager->getEM_ID(); - return; -} - -void FastCaloSimParamAction::EndOfRun(const G4Run* ) -{ - G4cout << "############################################" << G4endl - << "## FastCaloSimParamAction - EndOfRun ##" << G4endl - << "## deleting calculators ##" << G4endl - << "############################################" << G4endl; - - if (m_calculator_EMECIW_pos != 0) { - delete m_calculator_EMECIW_pos; - m_calculator_EMECIW_pos = 0; - } - if (m_calculator_EMECIW_neg != 0) { - delete m_calculator_EMECIW_neg; - m_calculator_EMECIW_neg = 0; - } - if (m_calculator_EMECOW_pos != 0) { - delete m_calculator_EMECOW_pos; - m_calculator_EMECOW_pos = 0; - } - if (m_calculator_EMECOW_neg != 0) { - delete m_calculator_EMECOW_neg; - m_calculator_EMECOW_neg = 0; - } - //if (m_calculator_BIB != 0) { - // delete m_calculator_BIB; - // m_calculator_BIB=0; - //} - if (m_calculator_BOB != 0) { - delete m_calculator_BOB; - m_calculator_BOB=0; - } - if (m_calculator_EMB !=0) { - delete m_calculator_EMB; - m_calculator_EMB = 0; - } - - if (m_calculator_FCAL1 !=0) { - delete m_calculator_FCAL1; - m_calculator_FCAL1 = 0; - } - - if (m_calculator_FCAL2 !=0) { - delete m_calculator_FCAL2; - m_calculator_FCAL2 = 0; - } - - if (m_calculator_FCAL3 !=0) { - delete m_calculator_FCAL3; - m_calculator_FCAL3 = 0; - } - - if (m_calculator_HEC !=0) { - delete m_calculator_HEC; - m_calculator_HEC = 0; - } - std::cout <<"ZH EM PS calculators: "<<std::endl; - - if (m_calculator_EMBPS !=0) { - delete m_calculator_EMBPS; - m_calculator_EMBPS = 0; - } - /* - if (m_calculator_EMEPS !=0) { - delete m_calculator_EMEPS; - m_calculator_EMEPS = 0; - } - */ - //if (m_calculator_HECLocal !=0) { - // delete m_calculator_HECLocal; - // m_calculator_HECLocal = 0; - //} - - if (m_calculator_Tile !=0) { - delete m_calculator_Tile; - m_calculator_Tile = 0; - - } - - std::cout <<"ZH good detector map: "<<std::endl; - for (std::map<std::string, int>::iterator it = m_detectormap.begin(); it!= m_detectormap.end(); ++it) - { - std::cout <<it->second<<" "<<it->first<<std::endl; - } - std::cout <<"-----------------------------------------------"<<std::endl; - std::cout <<"List of unused parts :"<<std::endl; - for (std::set<std::string>::iterator it = m_unuseddetector.begin(); it!=m_unuseddetector.end(); it++) - { - std::cout <<(*it)<<" "; - } - std::cout <<std::endl; - - - G4cout << "############################################" << G4endl - << "## FastCaloSimParamAction - EndOfRun ##" << G4endl - << "############################################" << G4endl; - - return; -} - -void FastCaloSimParamAction::Step(const G4Step* aStep) -{ - //G4cout <<"FastCaloSimParamAction - SteppingAction"<<G4endl; - m_current_calculator = NULL; - m_current_calculator_Tile = NULL; - - G4ThreeVector position1 = aStep->GetPreStepPoint()->GetPosition(); //pre step is the position i'm interested in - G4ThreeVector position2 = aStep->GetPostStepPoint()->GetPosition(); - G4ThreeVector pos = 0.5*(position1+position2); - // std::cout <<" === NEW STEP ==="<<std::endl; - - G4TouchableHistory* theTouchable = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable()); //this has all the history depth - if (!theTouchable) - { - //This shouldn't happen anyway - //std::cout <<"ZH Missing touchable??"<<std::endl; - return; - } - int depth = theTouchable->GetHistoryDepth(); - G4VPhysicalVolume *pCurrentVolume = aStep->GetPreStepPoint()->GetPhysicalVolume(); - if (!pCurrentVolume) - { - //std::cout <<"ZH Missing current volume??"<<std::endl; - return; - } - - G4LogicalVolume* pCurrentLogicalVolume = pCurrentVolume->GetLogicalVolume(); - if (!pCurrentLogicalVolume) - { - //std::cout <<"ZH Missing current logical volume"<<std::endl; - return; - } - - if (!pCurrentLogicalVolume->GetSensitiveDetector()) - { - //std::cout <<"No SD"<<std::endl; - //this volume doesn't have a sensitive detector -> not interested - return; - } - std::string CurrentLogicalVolumeName = pCurrentLogicalVolume->GetName(); - std::string OrigLogicalVolumeName = CurrentLogicalVolumeName; - // std::cout <<"ZH Step length: "<<aStep->GetStepLength() /CLHEP::mm <<" in "<<OrigLogicalVolumeName<<std::endl; - double StepLength = aStep->GetStepLength()/ CLHEP::mm;; - //std::cout <<"ZH Step: "<<StepLength<<std::endl; - //std::cout <<"Current : "<<CurrentLogicalVolumeName<<std::endl; - - std::string tilestring("Tile"); - - for (int idepth = 0; idepth<depth; idepth++) - { - pCurrentVolume = theTouchable->GetVolume(idepth); - pCurrentLogicalVolume = pCurrentVolume->GetLogicalVolume(); - CurrentLogicalVolumeName = pCurrentLogicalVolume->GetName(); - //std::cout <<CurrentLogicalVolumeName<<" depth: "<<idepth<<std::endl; - if(CurrentLogicalVolumeName == "LArMgr::LAr::FCAL::Module1::Absorber") - { - // shower is inside FCAL1 - m_current_calculator = m_calculator_FCAL1; - //m_current_calculator = NULL; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::FCAL::Module2::Absorber") - { - // shower is inside FCAL2 - m_current_calculator = m_calculator_FCAL2; - //m_current_calculator = NULL; //try disable.. - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::FCAL::Module3::Absorber") - { - // shower is inside FCAL3 - m_current_calculator = m_calculator_FCAL3; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Pos::InnerWheel") - { - m_current_calculator = m_calculator_EMECIW_pos; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Neg::InnerWheel") - { - // shower is inside inner EMEC - m_current_calculator = m_calculator_EMECIW_neg; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Pos::OuterWheel") - { - m_current_calculator = m_calculator_EMECOW_pos; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Neg::OuterWheel") - { - // shower is inside outer EMEC positive - m_current_calculator = m_calculator_EMECOW_neg; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMB::STAC") - { - // shower is inside EMB positive - m_current_calculator = m_calculator_EMB; - break; - } - //else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::FrontInnerBarrette::Module::Phidiv") - // { - // m_current_calculator = m_calculator_BIB; - // break; - // } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::BackOuterBarrette::Module::Phidiv") - { - m_current_calculator = m_calculator_BOB; - break; - } - //else if (CurrentLogicalVolumeName == "LArMgr::LAr::HEC::Module::Depth::Slice::Local") - //{ - // m_current_calculator = m_calculator_HECLocal; - // break; - //} //doesn't exist anymore - else if (CurrentLogicalVolumeName == "LArMgr::LAr::HEC::Module::Depth::Slice") - { - m_current_calculator = m_calculator_HEC; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::Barrel::Presampler::Module") - { - m_current_calculator = m_calculator_EMBPS; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::Endcap::Presampler::LiquidArgon") - { - m_current_calculator = m_calculator_EMEPS; - } - else if (CurrentLogicalVolumeName.find(tilestring)!= std::string::npos) - { - m_current_calculator_Tile = m_calculator_Tile; - break; - } - - } - //std::cout <<"--- END SEARCHING ---"<<std::endl; - - if (m_current_calculator || m_current_calculator_Tile) - { - //Good detector - if (m_detectormap.find(OrigLogicalVolumeName) == m_detectormap.end()) - { - m_detectormap.insert(std::pair<std::string,int>(OrigLogicalVolumeName,m_ndetectors)); - m_ndetectors++; - std::cout <<"ZH I have added new detector: "<<OrigLogicalVolumeName<<" because I know a calculator for: "<<CurrentLogicalVolumeName<<std::endl; - } - } - else - { - //Unused - if ( m_unuseddetector.insert(OrigLogicalVolumeName).second) - { - std::cout <<"ZH I don't have a calculator for: "<<OrigLogicalVolumeName<<" and I'm here for the first time"<<std::endl; - } - //std::cout <<"End here"<<std::endl; - return; - } - //std::cout <<"Continue"<<std::endl; - - //////////////////////////////////////////////////////////// - // Calculation and storage of LAr/Tile Hit information - //////////////////////////////////////////////////////////// - - if (aStep->GetTotalEnergyDeposit()>0) { - /* - std::cout <<" === NEW STEP ==="<<std::endl; - std::cout <<"Prestep pos: "<<position1.x()<<" "<<position1.y()<<" "<<position1.z()<<std::endl; - std::cout <<"Poststep pos: "<<position2.x()<<" "<<position2.y()<<" "<<position2.z()<<std::endl; - std::cout <<"Step pos: "<<pos.x()<<" "<<pos.y()<<" "<<pos.z()<<std::endl; - - std::cout <<"ZH Step length: "<<aStep->GetStepLength() /CLHEP::mm <<" in "<<OrigLogicalVolumeName<<std::endl; - */ - /* - G4VPhysicalVolume *pNextVolume = aStep->GetPostStepPoint()->GetPhysicalVolume(); - if (!pNextVolume) - { - //std::cout <<"ZH Missing next volume??"<<std::endl; - //return; - } - - G4LogicalVolume* pNextLogicalVolume = pNextVolume->GetLogicalVolume(); - if (!pNextLogicalVolume) - { - //std::cout <<"ZH Missing next logical volume"<<std::endl; - //return; - } - - if (!pNextLogicalVolume->GetSensitiveDetector()) - { - //std::cout <<"ZH Missing next SD"<<std::endl; - //return; - } - if (pNextLogicalVolume) - { - //std::cout <<"ZH Missing volume: "<<pNextLogicalVolume->GetName()<<std::endl; - } - */ - //std::cout <<"ZH calculator should do something"<<OrigLogicalVolumeName<<" "<<m_current_calculator<<std::endl; - - ///////////////////// - //Do LAr Stuff - ///////////////////// - if (m_current_calculator) { - - double et = 0; // Total collected charge - //G4cout << m_current_calculator << " " << position << G4endl; - - std::vector<const G4Step*> steps; - //bool shortstep = false; - if (m_shorten_lar_step && StepLength>0.2) - { - //create smaller substeps instead - G4int nsub_step=(int) (StepLength/0.2) + 1; - G4double delta=1./((double) nsub_step); - //std::cout <<"Orig prestep: "<<aStep->GetPreStepPoint()->GetPosition()<<std::endl; - for (G4int i=0;i<nsub_step;i++) { - // G4double fraction=(((G4double) i)+0.5)*delta; - G4double fraction1 = ((G4double) i)*delta; - G4double fraction2 = (((G4double) i) + 1.)*delta; - G4ThreeVector subpoint1=position1*(1-fraction1) + position2*fraction1; - G4ThreeVector subpoint2=position1*(1-fraction2) + position2*fraction2; - - //G4StepPoint *startpoint = 0; - //startpoint = const_cast<G4StepPoint*>(aStep->GetPreStepPoint()); - //startpoint->SetPosition(subpoint1); - //G4StepPoint *endpoint = 0; - //endpoint = const_cast<G4StepPoint*>(aStep->GetPostStepPoint()); - //endpoint->SetPosition(subpoint2); - - G4StepPoint *startpoint = new G4StepPoint(*(aStep->GetPreStepPoint())); - G4StepPoint *endpoint = new G4StepPoint(*(aStep->GetPostStepPoint())); - startpoint->SetPosition(subpoint1); - endpoint->SetPosition(subpoint2); - - //std::cout <<"ZH substep: "<<i<<" Pos: "<<subpoint1<<" "<<subpoint2<<std::endl; - G4Step* newstep = new G4Step(*aStep); - //newstep = const_cast<G4Step*>(aStep); - if(newstep->GetPreStepPoint()) delete newstep->GetPreStepPoint(); - if(newstep->GetPostStepPoint()) delete newstep->GetPostStepPoint(); - newstep->SetPreStepPoint(startpoint); - newstep->SetPostStepPoint(endpoint); - newstep->SetStepLength( (subpoint1-subpoint2).mag()); - newstep->SetTotalEnergyDeposit(aStep->GetTotalEnergyDeposit()/nsub_step); - //std::cout <<"ZH substep: "<<newstep->GetPreStepPoint()->GetPosition()<<" "<<newstep->GetPostStepPoint()->GetPosition()<<" / "<<0.5*(newstep->GetPreStepPoint()->GetPosition()+newstep->GetPostStepPoint()->GetPosition())<<std::endl; - steps.push_back(newstep); - } - //std::cout <<"Orig poststep"<<aStep->GetPostStepPoint()->GetPosition()<<std::endl; - //shortstep = true; - } - else - { - steps.push_back(aStep); - } - - //std::cout <<"ZH Step size: "<<steps.size()<<" full step length "<<StepLength<<std::endl; - for (unsigned int istep = 0; istep <steps.size(); istep++) - { - //need to update the position! - pos = 0.5*(steps[istep]->GetPreStepPoint()->GetPosition()+steps[istep]->GetPostStepPoint()->GetPosition()); - //std::cout <<"ZH Processing step: "<<istep<<" at position "<<pos<<std::endl; - - if (m_current_calculator->Process(steps[istep])) - { - //if (!shortstep) G4cout <<"ZH process step ok: "<<m_current_calculator->getNumHits()<<G4endl; - int nlarh = m_current_calculator->getNumHits(); - for (int i=0; i<nlarh; ++i) - { - et += (m_current_calculator->energy(i)); - //std::cout <<"ZH Hit: "<<i<<" E: "<<m_current_calculator->energy(i)<<" in: "<<(std::string) m_current_calculator->identifier(i)<<std::endl; - } - } - else - { - //Maybe 0 hits or something like that... - //G4cout << "ZH: Error: Hit not processed by calculator! " << istep<<" / "<<steps.size()<<" shortstep: "<<shortstep<<G4endl; - //G4cout << "ZH: calculator not processed: Volume: "<< pCurrentVolume->GetName()<<" "<<m_current_calculator<< " position: "<<pos<<" SL: "<<StepLength<<G4endl; - //G4cout <<"ZH: Orig position: "<<steps[istep]->GetPreStepPoint()->GetPosition()<<" / "<<steps[istep]->GetPostStepPoint()->GetPosition()<<"and SL: "<<StepLength<<" step: "<<aStep->GetPreStepPoint()->GetPosition()<<" / "<<aStep->GetPostStepPoint()->GetPosition()<<G4endl; - return; - } - - // drop hits with zero deposited energy (could still happen with negative corrections from calculator) - //Or if total energy is <0 - if (et <= 0.) - { - std::cout <<"ZH: Total negative energy: "<<et<<" not processing..."<<std::endl; - return; - } - - int nlarh = m_current_calculator->getNumHits(); - std::vector<G4ThreeVector> subhitcells; - subhitcells.resize(nlarh); - G4ThreeVector origpos = pos; - double e_subhitmax = -999.; - int e_subhitmaxindex =-1; - if (nlarh>0) - { - e_subhitmax = m_current_calculator->energy(0); - e_subhitmaxindex = 0; - } - //Figure out the subhit with most energy - for (int i=1; i<nlarh; ++i) - { - if (e_subhitmax< m_current_calculator->energy(i)) - { - e_subhitmax = m_current_calculator->energy(i); - e_subhitmaxindex = i; - } - } - //Identifier for the subhit with max energy - LArG4Identifier e_subhitmax_ident = m_current_calculator->identifier(e_subhitmaxindex); - Identifier e_subhitmax_id = m_lar_helper->ConvertID(e_subhitmax_ident); - - for (int i=0; i<nlarh; ++i) - { - LArG4Identifier ident = m_current_calculator->identifier(i); - Identifier id = m_lar_helper->ConvertID(ident); - - Identifier inv_id; - if (id == inv_id) - { - std::cout <<"Something wrong with identifier (LAr): "<<(std::string) ident; - std::cout <<" "<<id<<" "<<id.getString()<<" "<<CurrentLogicalVolumeName <<" nhit: "<<nlarh<<std::endl; - std::cout <<inv_id<<std::endl; - } - - //std::cout <<"Subhit: "<<i<<std::endl; - //std::cout <<"LArIdent "<<(std::string) ident<<std::endl; - //std::cout <<"Ident "<<id.getString()<<std::endl; - //std::cout <<"ZH Step: LAr: "<<StepLength<<std::endl; - //need to get the cell information - - if (nlarh>1) - { - //it didn't seem to happen outside em_barrel - if (m_lar_emID->is_em_barrel(id)) - { - if (m_shift_lar_subhit) - { - //find subhit with largest energy - - if (e_subhitmaxindex == -1) - { - std::cout <<"ZH no subhit index with e>-999??? "<<std::endl; - return; - } - else - { - //std::cout <<"ZH shifting subhits: largest energy subhit index is "<<e_subhitmaxindex<<" E: "<<e_subhitmax<<" identifier: "<<e_subhitmax_id.getString()<<std::endl; - } - //from sampling, hit_eta, hit_phi (simple geometry) - //CaloDetDescrElement *bestcell = m_calo_dd_man->get_element(m_calo_dd_man->get_element(id)->getSampling(),origpos.eta(), origpos.phi()); - CaloDetDescrElement *highestcell = m_calo_dd_man->get_element(e_subhitmax_id); - //from identifier - CaloDetDescrElement *thiscell = m_calo_dd_man->get_element(id); - //delete them afterwards? - if (!highestcell) - { - //How often does this happen, do not shift - std::cout <<"ZH highestEcell failed: "<<e_subhitmax_id.getString()<<std::endl; - //" "<<m_calo_dd_man->get_element(id)->getSampling()<<" "<<origpos.eta()<<" "<< origpos.phi()<<std::endl; - //do no shift? - pos = origpos; - } - else if (highestcell == thiscell) - { - //the cells match, do not shift this hit - //std::cout <<"No shift: index: "<<i<<std::endl; - //std::cout <<"Orig pos: "<<origpos.x()<<" "<<origpos.y()<<" "<<origpos.z()<<std::endl; - //std::cout <<"This cell: "<<thiscell->x()<<" "<<thiscell->y()<<" "<<thiscell->z()<<std::endl; - //std::cout <<"No shift"<<std::endl; - pos = origpos; - } - else - { - //the two cells do not match => shift - //std::cout <<"Orig pos: "<<origpos.x()<<" "<<origpos.y()<<" "<<origpos.z()<<std::endl; - G4ThreeVector diff(thiscell->x()-highestcell->x(), thiscell->y()-highestcell->y(), thiscell->z()-highestcell->z()); - pos = origpos+diff; - //std::cout <<"Shift: ! index: "<<i<<std::endl; - //std::cout <<"This cell: "<<thiscell->x()<<" "<<thiscell->y()<<" "<<thiscell->z()<<std::endl; - //std::cout <<"Highest E cell: "<<highestcell->x()<<" "<<highestcell->y()<<" "<<highestcell->z()<<std::endl; - //std::cout <<"(Best cell: "<<bestcell->x()<<" "<<bestcell->y()<<" "<<bestcell->z()<<")"<<std::endl; - //std::cout <<"Shift pos: "<<pos.x()<<" "<<pos.y()<<" "<<pos.z()<<std::endl; - } - //delete highestcell; - //delete thiscell; - } - } - else - { - //Does this happen? - std::cout <<"More subhits, but not in LAr barrel "<<(std::string) ident<<std::endl; - } - } - - /* - //This was only for testing purposes that the shifted hits match to the right cells - CaloDetDescrElement *pcell = m_calo_dd_man->get_element(id); - if (pcell) - { - G4ThreeVector cellvec(pcell->x(),pcell->y(), pcell->z()); - std::cout <<"Hit-cell dist: "<<(pos-cellvec).mag()<<" in: "<<i<<" "<<(std::string) ident<<" sampling: "<<pcell->getSampling()<<" "<<id.getString()<<std::endl; - CaloDetDescrElement *testcell = m_calo_dd_man->get_element(pcell->getSampling(),pos.eta(), pos.phi()); - if (testcell) - { - G4ThreeVector testvec(testcell->x(),testcell->y(), testcell->z()); - std::cout <<"Test cell: "<<testcell->x()<<" "<<testcell->y()<<" "<<testcell->z()<<" "<<testcell->identify().getString()<<std::endl; - std::cout <<"Hit-test cell dist: "<<(pos-testvec).mag()<<" in: "<<i<<" sampling: "<<testcell->getSampling()<<std::endl; - } - else - { - std::cout <<"Test cell failed: "<<pcell->getSampling()<<" "<<pos.eta()<<" "<<pos.phi()<<std::endl; - } - } - else - { - std::cout <<"pcell failed: "<<id.getString()<<std::endl; - } - */ - //Finalize time for LAr hits?: NO - //double time = m_current_calculator->energy(i)==0 ? 0. : (double) m_current_calculator->time(i)/m_current_calculator->energy(i)/CLHEP::ns; - double time = m_current_calculator->time(i); - double energy = m_current_calculator->energy(i)/CLHEP::MeV; - - ISF_FCS_Parametrization::FCS_StepInfo* theInfo = new ISF_FCS_Parametrization::FCS_StepInfo(pos, id, energy, time, true, nlarh); //store nlarh as info - //This one stores also StepLength, but it is not yet in SVN... - // ISF_FCS_Parametrization::FCS_StepInfo* theInfo = new ISF_FCS_Parametrization::FCS_StepInfo(pos, id, (double) m_current_calculator->energy(i), (double) m_current_calculator->time(i), true, nlarh, StepLength); //store nlarh as info - //std::cout <<"Adding new step info: "<<i<<" at: "<<pos<<" Id: "<<id<<" E: "<<energy<<" time: "<<time<<std::endl; - m_eventSteps->push_back(theInfo); - }//nlarh - //std::cout <<"----"<<std::endl; - } //istep - - //Delete steps? - if (steps.size()>1) - { - //only when doing substeps, don't want to delete the original a4step - while(!steps.empty()) delete steps.back(), steps.pop_back(); - } - } - //////////////////////// - //Do TileCal Stuff - //////////////////////// - - else if (m_current_calculator_Tile) - { - //std::cout<<"GG: Hello" << std::endl; - - //calculation of MicroHit with aStep - TileMicroHit micHit = m_calculator_Tile->TileGeoG4SDCalc::GetTileMicroHit(aStep); - Identifier m_invalid_id; - - //Check if MicroHit is not in scintillator - if ((micHit.pmt_up == m_invalid_id) && (micHit.pmt_down == m_invalid_id)) { - std::cout <<"Invalid hit in Tile??"<<std::endl; - return;} - else { - // Store TileHits Information - //std::cout <<"ZH Step: Tile: "<<StepLength<<std::endl; - if ((micHit.pmt_up == m_invalid_id) || (micHit.pmt_down == m_invalid_id)) - { - //std::cout <<"Something wrong in identifier: One tile pmt: "<<micHit.pmt_up<<" "<<micHit.pmt_down<<std::endl; - //std::cout <<"E up: "<<micHit.e_up<<" E down: "<<micHit.e_down<<" T up: "<<micHit.time_up<<" T down: "<<micHit.time_down<<std::endl; - } - ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_up = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_up, micHit.e_up, micHit.time_up, true,1); - //Commented out version needs ISF_Event which is not yet in SVN.. - // ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_up = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_up, micHit.e_up, micHit.time_up, true,1,StepLength); - m_eventSteps->push_back(theInfo_Tile_up); - - ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_down = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_down, micHit.e_down,micHit.time_down , true,1); - //ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_down = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_down, micHit.e_down,micHit.time_down , true,1,StepLength); - m_eventSteps->push_back(theInfo_Tile_down); - - //std::cout << "GG: GetTileMicroHit: pmtID_up,pmtID_down,edep_up,edep_down,scin_Time_up,scin_Time_down:\t" << micHit.pmt_up <<";\t"<< micHit.pmt_down <<";\t"<< micHit.e_up <<";\t"<< micHit.e_down <<";\t" << micHit.time_up <<";\t"<< micHit.time_down << std::endl; - - } - - } - else - { - //Shouldn't be here anyway.. - G4cout <<"ZH ???"<<aStep->GetTotalEnergyDeposit() << G4endl; - } - //std::cout <<"End of step"<<std::endl; - return; - } - return; -} - -StatusCode FastCaloSimParamAction::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - -#include "ISF_Geant4UserActions/FastCaloSimParamAction.h" namespace G4UA{ @@ -912,281 +46,146 @@ namespace G4UA{ m_config(config), m_evtStore("StoreGateSvc/StoreGateSvc","FastCaloSimParamAction"), m_detStore("StoreGateSvc/DetectorStore","FastCaloSimParamAction"), - m_current_calculator(0), - m_current_calculator_Tile(0), - m_current_solid(0), - m_current_transform(0), - m_calculator_EMECIW_pos(0), - m_calculator_EMECIW_neg(0), - m_calculator_EMECOW_pos(0), - m_calculator_EMECOW_neg(0), - //m_calculator_BIB(0), - m_calculator_BOB(0), - m_calculator_EMB(0), - m_calculator_FCAL1(0), - m_calculator_FCAL2(0), - m_calculator_FCAL3(0), - m_calculator_HEC(0), - //m_calculator_HECLocal(0), - m_calculator_EMBPS(0), - m_calculator_EMEPS(0), - m_calculator_Tile(0), - m_lar_helper(0), - m_lar_emID(0), - m_calo_dd_man(0), - m_eventSteps(0), + m_current_calculator(nullptr), + m_current_calculator_Tile(nullptr), + m_current_solid(nullptr), + m_current_transform(nullptr), + m_calculator_Tile(nullptr), + m_lar_helper(nullptr), + m_lar_emID(nullptr), + m_calo_dd_man(nullptr), + m_eventSteps(nullptr), m_ndetectors(0){ #ifdef _myDEBUG_ G4cout << "############################################" << G4endl - << "## FastCaloSimParamAction - Constructor ##" << G4endl - << "############################################" << G4endl; + << "## FastCaloSimParamAction - Constructor ##" << G4endl + << "############################################" << G4endl; #endif - + } void FastCaloSimParamAction::beginOfRun(const G4Run*){ - + //G4cout << "############################################" << G4endl // << "## FastCaloSimParamAction - BeginOfRun ##" << G4endl // << "############################################" << G4endl; // ?? Ok, where do I need this?? - // init calculator - if (m_calculator_EMECIW_pos == 0) - m_calculator_EMECIW_pos = new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, 1); - if (m_calculator_EMECOW_pos == 0) - m_calculator_EMECOW_pos = new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, 1); - if (m_calculator_EMECIW_neg == 0) - m_calculator_EMECIW_neg = new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, -1); - if (m_calculator_EMECOW_neg == 0) - m_calculator_EMECOW_neg = new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, -1); - //if (m_calculator_BIB == 0) - // m_calculator_BIB = new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackInnerBarretteWheel); - if (m_calculator_BOB == 0) - m_calculator_BOB = new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteWheel); - if (m_calculator_FCAL1 == 0) - m_calculator_FCAL1 = LArFCAL1Calculator::GetInstance(); - if (m_calculator_FCAL2 == 0) - m_calculator_FCAL2 = LArFCAL2Calculator::GetInstance(); - if (m_calculator_FCAL3 == 0) - m_calculator_FCAL3 = LArFCAL3Calculator::GetInstance(); - if (m_calculator_HEC == 0) - m_calculator_HEC = LArHECWheelCalculator::GetCalculator(); - //if (m_calculator_HECLocal == 0) - // m_calculator_HECLocal = LArHECLocalCalculator::GetCalculator(); - if (m_calculator_EMB ==0) - m_calculator_EMB = LArBarrelCalculator::GetCalculator(); - if (m_calculator_EMBPS == 0) - m_calculator_EMBPS = LArBarrelPresamplerCalculator::GetCalculator(); - if (m_calculator_EMEPS == 0) - m_calculator_EMEPS = LArEndcapPresamplerCalculator::GetCalculator(); - if (m_calculator_Tile ==0) + // init tile calculator + if (m_calculator_Tile == nullptr) { - // Get the tile calculator from the SD - G4SDManager *sdManager = G4SDManager::GetSDMpointer(); - TileGeoG4SD * tileSD = dynamic_cast<TileGeoG4SD*>( sdManager->FindSensitiveDetector("TileGeoG4SD") ); - if (tileSD){ - m_calculator_Tile = tileSD->GetCalculator(); - } else { - G4ExceptionDescription description; - description << "FastCaloSimParamAction::BeginOfRunAction - can't find TileGeoG4SDCalc"; - G4Exception("FastCaloSimParamAction", "NoTileGeoG4SDCalc", FatalException, description); - abort(); - } + // Get the tile calculator from the SD + G4SDManager *sdManager = G4SDManager::GetSDMpointer(); + TileGeoG4SD * tileSD = dynamic_cast<TileGeoG4SD*>( sdManager->FindSensitiveDetector("TileGeoG4SD") ); + if (tileSD){ + m_calculator_Tile = tileSD->GetCalculator(); + } else { + G4ExceptionDescription description; + description << "FastCaloSimParamAction::BeginOfRunAction - can't find TileGeoG4SDCalc"; + G4Exception("FastCaloSimParamAction", "NoTileGeoG4SDCalc", FatalException, description); + abort(); + } + } + + if (m_current_transform == nullptr) + { + m_current_transform = new G4AffineTransform (); } - - if (m_current_transform == 0) - m_current_transform = new G4AffineTransform (); - m_lar_helper = new LArG4SimpleSD( "IDHelper" , &(*m_detStore) ); - + //get also lar em helper m_calo_dd_man = CaloDetDescrManager::instance(); - + const DataHandle<CaloIdManager> caloIdManager; - StatusCode sc=m_detStore->retrieve(caloIdManager); - if(sc.isSuccess()) + if(m_detStore->retrieve(caloIdManager).isSuccess()) std::cout<<"CaloIDManager retrieved."<<std::endl; else throw std::runtime_error("ISF_HitAnalysis: Unable to retrieve CaloIDManeger"); - + m_lar_emID=caloIdManager->getEM_ID(); - return; + return; } - + void FastCaloSimParamAction::endOfRun(const G4Run*){ - + G4cout << "############################################" << G4endl - << "## FastCaloSimParamAction - EndOfRun ##" << G4endl - << "## deleting calculators ##" << G4endl - << "############################################" << G4endl; - - if (m_calculator_EMECIW_pos != 0) { - delete m_calculator_EMECIW_pos; - m_calculator_EMECIW_pos = 0; - } - if (m_calculator_EMECIW_neg != 0) { - delete m_calculator_EMECIW_neg; - m_calculator_EMECIW_neg = 0; - } - if (m_calculator_EMECOW_pos != 0) { - delete m_calculator_EMECOW_pos; - m_calculator_EMECOW_pos = 0; - } - if (m_calculator_EMECOW_neg != 0) { - delete m_calculator_EMECOW_neg; - m_calculator_EMECOW_neg = 0; - } - //if (m_calculator_BIB != 0) { - // delete m_calculator_BIB; - // m_calculator_BIB=0; - //} - if (m_calculator_BOB != 0) { - delete m_calculator_BOB; - m_calculator_BOB=0; - } - if (m_calculator_EMB !=0) { - delete m_calculator_EMB; - m_calculator_EMB = 0; - } - - if (m_calculator_FCAL1 !=0) { - delete m_calculator_FCAL1; - m_calculator_FCAL1 = 0; - } - - if (m_calculator_FCAL2 !=0) { - delete m_calculator_FCAL2; - m_calculator_FCAL2 = 0; - } - - if (m_calculator_FCAL3 !=0) { - delete m_calculator_FCAL3; - m_calculator_FCAL3 = 0; - } - - if (m_calculator_HEC !=0) { - delete m_calculator_HEC; - m_calculator_HEC = 0; - } - std::cout <<"ZH EM PS calculators: "<<std::endl; - - if (m_calculator_EMBPS !=0) { - delete m_calculator_EMBPS; - m_calculator_EMBPS = 0; - } - /* - if (m_calculator_EMEPS !=0) { - delete m_calculator_EMEPS; - m_calculator_EMEPS = 0; - } - */ - //if (m_calculator_HECLocal !=0) { - // delete m_calculator_HECLocal; - // m_calculator_HECLocal = 0; - //} - + << "## FastCaloSimParamAction - EndOfRun ##" << G4endl + << "## deleting calculators ##" << G4endl + << "############################################" << G4endl; + if (m_calculator_Tile !=0) { delete m_calculator_Tile; m_calculator_Tile = 0; - + } - - std::cout <<"ZH good detector map: "<<std::endl; + + G4cout << "ZH good detector map: " << G4endl; for (std::map<std::string, int>::iterator it = m_detectormap.begin(); it!= m_detectormap.end(); ++it) { - std::cout <<it->second<<" "<<it->first<<std::endl; + std::cout <<it->second<<" "<<it->first<<std::endl; } std::cout <<"-----------------------------------------------"<<std::endl; std::cout <<"List of unused parts :"<<std::endl; for (std::set<std::string>::iterator it = m_unuseddetector.begin(); it!=m_unuseddetector.end(); it++) { - std::cout <<(*it)<<" "; + std::cout <<(*it)<<" "; } std::cout <<std::endl; - - + + G4cout << "############################################" << G4endl - << "## FastCaloSimParamAction - EndOfRun ##" << G4endl - << "############################################" << G4endl; - + << "## FastCaloSimParamAction - EndOfRun ##" << G4endl + << "############################################" << G4endl; + return; - - + + } - + void FastCaloSimParamAction::beginOfEvent(const G4Event*){ //G4cout << "############################################" << G4endl // << "## FastCaloSimParamAction - BeginOfEvent ##" << G4endl // << "############################################" << G4endl; - - // init calculator - if (m_calculator_EMECIW_pos == 0) - m_calculator_EMECIW_pos = new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, 1); - if (m_calculator_EMECOW_pos == 0) - m_calculator_EMECOW_pos = new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, 1); - - if (m_calculator_EMECIW_neg == 0) - m_calculator_EMECIW_neg = new LArG4::EC::EnergyCalculator(LArWheelCalculator::InnerAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, -1); - if (m_calculator_EMECOW_neg == 0) - m_calculator_EMECOW_neg = new LArG4::EC::EnergyCalculator(LArWheelCalculator::OuterAbsorberWheel,LArG4::EC::EnergyCalculator::EMEC_ECOR_ROPT, -1); - //if (m_calculator_BIB == 0) - // m_calculator_BIB = new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackInnerBarretteWheel); - if (m_calculator_BOB == 0) - m_calculator_BOB = new LArG4::EC::EnergyCalculator(LArWheelCalculator::BackOuterBarretteWheel); - if (m_calculator_FCAL1 == 0) - m_calculator_FCAL1 = LArFCAL1Calculator::GetInstance(); - if (m_calculator_FCAL2 == 0) - m_calculator_FCAL2 = LArFCAL2Calculator::GetInstance(); - if (m_calculator_FCAL3 == 0) - m_calculator_FCAL3 = LArFCAL3Calculator::GetInstance(); - if (m_calculator_HEC == 0) - m_calculator_HEC = LArHECWheelCalculator::GetCalculator(); - //if (m_calculator_HECLocal == 0) - // m_calculator_HECLocal = LArHECLocalCalculator::GetCalculator(); - if (m_calculator_EMB == 0) - m_calculator_EMB = LArBarrelCalculator::GetCalculator(); - if (m_calculator_EMBPS == 0) - m_calculator_EMBPS = LArBarrelPresamplerCalculator::GetCalculator(); - if (m_calculator_EMEPS == 0) - m_calculator_EMEPS = LArEndcapPresamplerCalculator::GetCalculator(); - if (m_calculator_Tile == 0) + + // init tile calculator + if (m_calculator_Tile == nullptr) + { + // Get the tile calculator from the SD + G4SDManager *sdManager = G4SDManager::GetSDMpointer(); + TileGeoG4SD * tileSD = dynamic_cast<TileGeoG4SD*>( sdManager->FindSensitiveDetector("TileGeoG4SD") ); + if (tileSD){ + m_calculator_Tile = tileSD->GetCalculator(); + } else { + G4ExceptionDescription description; + description << "FastCaloSimParamAction::BeginOfEventAction - can't find TileGeoG4SDCalc"; + G4Exception("FastCaloSimParamAction", "NoTileGeoG4SDCalc", FatalException, description); + abort(); + } + } + + if (m_current_transform == nullptr) { - // Get the tile calculator from the SD - G4SDManager *sdManager = G4SDManager::GetSDMpointer(); - TileGeoG4SD * tileSD = dynamic_cast<TileGeoG4SD*>( sdManager->FindSensitiveDetector("TileGeoG4SD") ); - if (tileSD){ - m_calculator_Tile = tileSD->GetCalculator(); - } else { - G4ExceptionDescription description; - description << "FastCaloSimParamAction::BeginOfEventAction - can't find TileGeoG4SDCalc"; - G4Exception("FastCaloSimParamAction", "NoTileGeoG4SDCalc", FatalException, description); - abort(); - } + m_current_transform = new G4AffineTransform (); } - - if (m_current_transform == 0) - m_current_transform = new G4AffineTransform (); - - + m_eventSteps = new ISF_FCS_Parametrization::FCS_StepInfoCollection(); //G4cout << "############################################" << G4endl // << "## FastCaloSimParamAction - BeginOfEvent2 ##" << G4endl // << "############################################" << G4endl; - - - return; + + + return; } - + void FastCaloSimParamAction::endOfEvent(const G4Event*){ - + //G4cout << "############################################" << G4endl // << "## FastCaloSimParamAction - EndOfEvent ##" << G4endl // << "## ##" << G4endl // << "############################################" << G4endl; - + // // Zero order cleanup // combine hits from the same spot (distance < 1 mm^2) @@ -1197,11 +196,11 @@ namespace G4UA{ #ifdef _myDEBUG_ G4cout << "FastCaloSimParamAction::EndOfEventAction: Before initial cleanup, N=" << m_eventSteps->size() << G4endl; #endif - + // G4cout << "FastCaloSimParamAction::EndOfEventAction: After initial cleanup, N=" << m_eventSteps->size() << G4endl; if (m_eventSteps->size()==0) return; //don't need to play with it G4cout << "FastCaloSimParamAction::EndOfEventAction: After initial cleanup, N=" << m_eventSteps->size() << G4endl; - + // // Put eventSteps into event store // @@ -1210,90 +209,91 @@ namespace G4UA{ // std::cout <<"Check if already in StoreGate:"<<std::endl; if (m_evtStore->contains<ISF_FCS_Parametrization::FCS_StepInfoCollection>(location)) { - StatusCode check = m_evtStore->retrieve(test,location); - if (check.isSuccess()) - { - //std::cout <<"ZH, Already have in StoreGate : "<<test->size()<<std::endl; - //want to merge and overwrite! - for (ISF_FCS_Parametrization::FCS_StepInfoCollection::iterator iter = m_eventSteps->begin();iter != m_eventSteps->end();iter++) - { - test->push_back((*iter)); - } - //std::cout <<"Now have: "<<test->size()<<std::endl; - // StatusCode sc = evtStore()->remove( - //check - check = m_evtStore->retrieve(test,location); - if (check.isSuccess()) - { - std::cout <<"ZH, check in StoreGate : "<<test->size()<<std::endl; - } - /* - StatusCode sc = evtStore()->record( test, location); //want to overwrite? but current release doesn't have this method??? - if( sc.isFailure() ) { - G4cout << "Error: Couldn't store EventSteps object in event store at location: " << location << G4endl;// - } else { - - G4cout << "Info: Stored EventSteps object (size: " << test->size() << ")" - << " in event store at location: " << location << G4endl; - } - */ - } - else - { - std::cout <<"ZH WTF ??"<<std::endl; - } + StatusCode check = m_evtStore->retrieve(test,location); + if (check.isSuccess()) + { + //std::cout <<"ZH, Already have in StoreGate : "<<test->size()<<std::endl; + //want to merge and overwrite! + for (ISF_FCS_Parametrization::FCS_StepInfoCollection::iterator iter = m_eventSteps->begin();iter != m_eventSteps->end();iter++) + { + test->push_back((*iter)); + } + //std::cout <<"Now have: "<<test->size()<<std::endl; + // StatusCode sc = evtStore()->remove( + //check + check = m_evtStore->retrieve(test,location); + if (check.isSuccess()) + { + std::cout <<"ZH, check in StoreGate : "<<test->size()<<std::endl; + } + /* + StatusCode sc = evtStore()->record( test, location); //want to overwrite? but current release doesn't have this method??? + if( sc.isFailure() ) { + G4cout << "Error: Couldn't store EventSteps object in event store at location: " << location << G4endl;// + } else { + + G4cout << "Info: Stored EventSteps object (size: " << test->size() << ")" + << " in event store at location: " << location << G4endl; + } + */ + } + else + { + std::cout <<"ZH WTF ??"<<std::endl; + } } else { - StatusCode sc = m_evtStore->record( m_eventSteps, location, true ); - if( sc.isFailure() ) { - G4cout << "Error: Couldn't store EventSteps object in event store at location: " << location << G4endl; - } else { - G4cout << "Info: Stored EventSteps object (size: " << m_eventSteps->size() << ")" - << " in event store at location: " << location << G4endl; - } + StatusCode sc = m_evtStore->record( m_eventSteps, location, true ); + if( sc.isFailure() ) { + G4cout << "Error: Couldn't store EventSteps object in event store at location: " << location << G4endl; + } else { + G4cout << "Info: Stored EventSteps object (size: " << m_eventSteps->size() << ")" + << " in event store at location: " << location << G4endl; + } } return; } - - void FastCaloSimParamAction::processStep(const G4Step* aStep){ + + void FastCaloSimParamAction::processStep(const G4Step* aStep) +{ //G4cout <<"FastCaloSimParamAction - SteppingAction"<<G4endl; - m_current_calculator = NULL; - m_current_calculator_Tile = NULL; - + m_current_calculator = nullptr; + m_current_calculator_Tile = nullptr; + G4ThreeVector position1 = aStep->GetPreStepPoint()->GetPosition(); //pre step is the position i'm interested in G4ThreeVector position2 = aStep->GetPostStepPoint()->GetPosition(); G4ThreeVector pos = 0.5*(position1+position2); // std::cout <<" === NEW STEP ==="<<std::endl; - + G4TouchableHistory* theTouchable = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable()); //this has all the history depth if (!theTouchable) { - //This shouldn't happen anyway - //std::cout <<"ZH Missing touchable??"<<std::endl; - return; + //This shouldn't happen anyway + //std::cout <<"ZH Missing touchable??"<<std::endl; + return; } int depth = theTouchable->GetHistoryDepth(); G4VPhysicalVolume *pCurrentVolume = aStep->GetPreStepPoint()->GetPhysicalVolume(); if (!pCurrentVolume) { - //std::cout <<"ZH Missing current volume??"<<std::endl; - return; + //std::cout <<"ZH Missing current volume??"<<std::endl; + return; } - + G4LogicalVolume* pCurrentLogicalVolume = pCurrentVolume->GetLogicalVolume(); if (!pCurrentLogicalVolume) { - //std::cout <<"ZH Missing current logical volume"<<std::endl; - return; + //std::cout <<"ZH Missing current logical volume"<<std::endl; + return; } - + if (!pCurrentLogicalVolume->GetSensitiveDetector()) { - //std::cout <<"No SD"<<std::endl; - //this volume doesn't have a sensitive detector -> not interested - return; + //std::cout <<"No SD"<<std::endl; + //this volume doesn't have a sensitive detector -> not interested + return; } std::string CurrentLogicalVolumeName = pCurrentLogicalVolume->GetName(); std::string OrigLogicalVolumeName = CurrentLogicalVolumeName; @@ -1301,454 +301,455 @@ namespace G4UA{ double StepLength = aStep->GetStepLength()/ CLHEP::mm;; //std::cout <<"ZH Step: "<<StepLength<<std::endl; //std::cout <<"Current : "<<CurrentLogicalVolumeName<<std::endl; - + std::string tilestring("Tile"); - + for (int idepth = 0; idepth<depth; idepth++) { - pCurrentVolume = theTouchable->GetVolume(idepth); - pCurrentLogicalVolume = pCurrentVolume->GetLogicalVolume(); - CurrentLogicalVolumeName = pCurrentLogicalVolume->GetName(); - //std::cout <<CurrentLogicalVolumeName<<" depth: "<<idepth<<std::endl; - if(CurrentLogicalVolumeName == "LArMgr::LAr::FCAL::Module1::Absorber") - { - // shower is inside FCAL1 - m_current_calculator = m_calculator_FCAL1; - //m_current_calculator = NULL; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::FCAL::Module2::Absorber") - { - // shower is inside FCAL2 - m_current_calculator = m_calculator_FCAL2; - //m_current_calculator = NULL; //try disable.. - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::FCAL::Module3::Absorber") - { - // shower is inside FCAL3 - m_current_calculator = m_calculator_FCAL3; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Pos::InnerWheel") - { - m_current_calculator = m_calculator_EMECIW_pos; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Neg::InnerWheel") - { - // shower is inside inner EMEC - m_current_calculator = m_calculator_EMECIW_neg; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Pos::OuterWheel") - { - m_current_calculator = m_calculator_EMECOW_pos; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Neg::OuterWheel") - { - // shower is inside outer EMEC positive - m_current_calculator = m_calculator_EMECOW_neg; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMB::STAC") - { - // shower is inside EMB positive - m_current_calculator = m_calculator_EMB; - break; - } - //else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::FrontInnerBarrette::Module::Phidiv") - // { - // m_current_calculator = m_calculator_BIB; - // break; - // } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::BackOuterBarrette::Module::Phidiv") - { - m_current_calculator = m_calculator_BOB; - break; - } - //else if (CurrentLogicalVolumeName == "LArMgr::LAr::HEC::Module::Depth::Slice::Local") - //{ - // m_current_calculator = m_calculator_HECLocal; - // break; - //} //doesn't exist anymore - else if (CurrentLogicalVolumeName == "LArMgr::LAr::HEC::Module::Depth::Slice") - { - m_current_calculator = m_calculator_HEC; - break; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::Barrel::Presampler::Module") - { - m_current_calculator = m_calculator_EMBPS; - } - else if (CurrentLogicalVolumeName == "LArMgr::LAr::Endcap::Presampler::LiquidArgon") - { - m_current_calculator = m_calculator_EMEPS; - } - else if (CurrentLogicalVolumeName.find(tilestring)!= std::string::npos) - { - m_current_calculator_Tile = m_calculator_Tile; - break; - } - + pCurrentVolume = theTouchable->GetVolume(idepth); + pCurrentLogicalVolume = pCurrentVolume->GetLogicalVolume(); + CurrentLogicalVolumeName = pCurrentLogicalVolume->GetName(); + //std::cout <<CurrentLogicalVolumeName<<" depth: "<<idepth<<std::endl; + if(CurrentLogicalVolumeName == "LArMgr::LAr::FCAL::Module1::Absorber") + { + // shower is inside FCAL1 + m_current_calculator = m_config.calculator_FCAL1; + //m_current_calculator = nullptr; + break; + } + else if (CurrentLogicalVolumeName == "LArMgr::LAr::FCAL::Module2::Absorber") + { + // shower is inside FCAL2 + m_current_calculator = m_config.calculator_FCAL2; + //m_current_calculator = nullptr; //try disable.. + break; + } + else if (CurrentLogicalVolumeName == "LArMgr::LAr::FCAL::Module3::Absorber") + { + // shower is inside FCAL3 + m_current_calculator = m_config.calculator_FCAL3; + break; + } + else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Pos::InnerWheel") + { + m_current_calculator = m_config.calculator_EMECIW_pos; + break; + } + else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Neg::InnerWheel") + { + // shower is inside inner EMEC + m_current_calculator = m_config.calculator_EMECIW_neg; + break; + } + else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Pos::OuterWheel") + { + m_current_calculator = m_config.calculator_EMECOW_pos; + break; + } + else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Neg::OuterWheel") + { + // shower is inside outer EMEC positive + m_current_calculator = m_config.calculator_EMECOW_neg; + break; + } + else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMB::STAC") + { + // shower is inside EMB positive + m_current_calculator = m_config.calculator_EMB; + break; + } + //else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::FrontInnerBarrette::Module::Phidiv") + // { + // m_current_calculator = m_config.calculator_BIB; + // break; + // } + else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::BackOuterBarrette::Module::Phidiv") + { + m_current_calculator = m_config.calculator_BOB; + break; + } + //else if (CurrentLogicalVolumeName == "LArMgr::LAr::HEC::Module::Depth::Slice::Local") + //{ + // m_current_calculator = m_config.calculator_HECLocal; + // break; + //} //doesn't exist anymore + else if (CurrentLogicalVolumeName == "LArMgr::LAr::HEC::Module::Depth::Slice") + { + m_current_calculator = m_config.calculator_HEC; + break; + } + else if (CurrentLogicalVolumeName == "LArMgr::LAr::Barrel::Presampler::Module") + { + m_current_calculator = m_config.calculator_EMBPS; + } + else if (CurrentLogicalVolumeName == "LArMgr::LAr::Endcap::Presampler::LiquidArgon") + { + m_current_calculator = m_config.calculator_EMEPS; + } + else if (CurrentLogicalVolumeName.find(tilestring)!= std::string::npos) + { + m_current_calculator_Tile = m_calculator_Tile; + break; + } + } //std::cout <<"--- END SEARCHING ---"<<std::endl; - + if (m_current_calculator || m_current_calculator_Tile) { - //Good detector - if (m_detectormap.find(OrigLogicalVolumeName) == m_detectormap.end()) - { - m_detectormap.insert(std::pair<std::string,int>(OrigLogicalVolumeName,m_ndetectors)); - m_ndetectors++; - std::cout <<"ZH I have added new detector: "<<OrigLogicalVolumeName<<" because I know a calculator for: "<<CurrentLogicalVolumeName<<std::endl; - } + //Good detector + if (m_detectormap.find(OrigLogicalVolumeName) == m_detectormap.end()) + { + m_detectormap.insert(std::pair<std::string,int>(OrigLogicalVolumeName,m_ndetectors)); + m_ndetectors++; + std::cout <<"ZH I have added new detector: "<<OrigLogicalVolumeName<<" because I know a calculator for: "<<CurrentLogicalVolumeName<<std::endl; + } } else { - //Unused - if ( m_unuseddetector.insert(OrigLogicalVolumeName).second) - { - std::cout <<"ZH I don't have a calculator for: "<<OrigLogicalVolumeName<<" and I'm here for the first time"<<std::endl; - } - //std::cout <<"End here"<<std::endl; - return; + //Unused + if ( m_unuseddetector.insert(OrigLogicalVolumeName).second) + { + std::cout <<"ZH I don't have a calculator for: "<<OrigLogicalVolumeName<<" and I'm here for the first time"<<std::endl; + } + //std::cout <<"End here"<<std::endl; + return; } //std::cout <<"Continue"<<std::endl; - + //////////////////////////////////////////////////////////// // Calculation and storage of LAr/Tile Hit information //////////////////////////////////////////////////////////// - + if (aStep->GetTotalEnergyDeposit()>0) { /* - std::cout <<" === NEW STEP ==="<<std::endl; - std::cout <<"Prestep pos: "<<position1.x()<<" "<<position1.y()<<" "<<position1.z()<<std::endl; - std::cout <<"Poststep pos: "<<position2.x()<<" "<<position2.y()<<" "<<position2.z()<<std::endl; - std::cout <<"Step pos: "<<pos.x()<<" "<<pos.y()<<" "<<pos.z()<<std::endl; - - std::cout <<"ZH Step length: "<<aStep->GetStepLength() /CLHEP::mm <<" in "<<OrigLogicalVolumeName<<std::endl; + std::cout <<" === NEW STEP ==="<<std::endl; + std::cout <<"Prestep pos: "<<position1.x()<<" "<<position1.y()<<" "<<position1.z()<<std::endl; + std::cout <<"Poststep pos: "<<position2.x()<<" "<<position2.y()<<" "<<position2.z()<<std::endl; + std::cout <<"Step pos: "<<pos.x()<<" "<<pos.y()<<" "<<pos.z()<<std::endl; + + std::cout <<"ZH Step length: "<<aStep->GetStepLength() /CLHEP::mm <<" in "<<OrigLogicalVolumeName<<std::endl; */ /* - G4VPhysicalVolume *pNextVolume = aStep->GetPostStepPoint()->GetPhysicalVolume(); - if (!pNextVolume) - { - //std::cout <<"ZH Missing next volume??"<<std::endl; - //return; - } - - G4LogicalVolume* pNextLogicalVolume = pNextVolume->GetLogicalVolume(); - if (!pNextLogicalVolume) - { - //std::cout <<"ZH Missing next logical volume"<<std::endl; - //return; - } - - if (!pNextLogicalVolume->GetSensitiveDetector()) - { - //std::cout <<"ZH Missing next SD"<<std::endl; - //return; - } - if (pNextLogicalVolume) - { - //std::cout <<"ZH Missing volume: "<<pNextLogicalVolume->GetName()<<std::endl; - } + G4VPhysicalVolume *pNextVolume = aStep->GetPostStepPoint()->GetPhysicalVolume(); + if (!pNextVolume) + { + //std::cout <<"ZH Missing next volume??"<<std::endl; + //return; + } + + G4LogicalVolume* pNextLogicalVolume = pNextVolume->GetLogicalVolume(); + if (!pNextLogicalVolume) + { + //std::cout <<"ZH Missing next logical volume"<<std::endl; + //return; + } + + if (!pNextLogicalVolume->GetSensitiveDetector()) + { + //std::cout <<"ZH Missing next SD"<<std::endl; + //return; + } + if (pNextLogicalVolume) + { + //std::cout <<"ZH Missing volume: "<<pNextLogicalVolume->GetName()<<std::endl; + } */ //std::cout <<"ZH calculator should do something"<<OrigLogicalVolumeName<<" "<<m_current_calculator<<std::endl; - + ///////////////////// //Do LAr Stuff ///////////////////// if (m_current_calculator) { - - double et = 0; // Total collected charge - //G4cout << m_current_calculator << " " << position << G4endl; - - std::vector<const G4Step*> steps; - //bool shortstep = false; - if (m_config.shorten_lar_step && StepLength>0.2) - { - //create smaller substeps instead - G4int nsub_step=(int) (StepLength/0.2) + 1; - G4double delta=1./((double) nsub_step); - //std::cout <<"Orig prestep: "<<aStep->GetPreStepPoint()->GetPosition()<<std::endl; - for (G4int i=0;i<nsub_step;i++) { - // G4double fraction=(((G4double) i)+0.5)*delta; - G4double fraction1 = ((G4double) i)*delta; - G4double fraction2 = (((G4double) i) + 1.)*delta; - G4ThreeVector subpoint1=position1*(1-fraction1) + position2*fraction1; - G4ThreeVector subpoint2=position1*(1-fraction2) + position2*fraction2; - - //G4StepPoint *startpoint = 0; - //startpoint = const_cast<G4StepPoint*>(aStep->GetPreStepPoint()); - //startpoint->SetPosition(subpoint1); - //G4StepPoint *endpoint = 0; - //endpoint = const_cast<G4StepPoint*>(aStep->GetPostStepPoint()); - //endpoint->SetPosition(subpoint2); - - G4StepPoint *startpoint = new G4StepPoint(*(aStep->GetPreStepPoint())); - G4StepPoint *endpoint = new G4StepPoint(*(aStep->GetPostStepPoint())); - startpoint->SetPosition(subpoint1); - endpoint->SetPosition(subpoint2); - - //std::cout <<"ZH substep: "<<i<<" Pos: "<<subpoint1<<" "<<subpoint2<<std::endl; - G4Step* newstep = new G4Step(*aStep); - //newstep = const_cast<G4Step*>(aStep); - if(newstep->GetPreStepPoint()) delete newstep->GetPreStepPoint(); - if(newstep->GetPostStepPoint()) delete newstep->GetPostStepPoint(); - newstep->SetPreStepPoint(startpoint); - newstep->SetPostStepPoint(endpoint); - newstep->SetStepLength( (subpoint1-subpoint2).mag()); - newstep->SetTotalEnergyDeposit(aStep->GetTotalEnergyDeposit()/nsub_step); - //std::cout <<"ZH substep: "<<newstep->GetPreStepPoint()->GetPosition()<<" "<<newstep->GetPostStepPoint()->GetPosition()<<" / "<<0.5*(newstep->GetPreStepPoint()->GetPosition()+newstep->GetPostStepPoint()->GetPosition())<<std::endl; - steps.push_back(newstep); - } - //std::cout <<"Orig poststep"<<aStep->GetPostStepPoint()->GetPosition()<<std::endl; - //shortstep = true; - } - else - { - steps.push_back(aStep); - } - - //std::cout <<"ZH Step size: "<<steps.size()<<" full step length "<<StepLength<<std::endl; - for (unsigned int istep = 0; istep <steps.size(); istep++) - { - //need to update the position! - pos = 0.5*(steps[istep]->GetPreStepPoint()->GetPosition()+steps[istep]->GetPostStepPoint()->GetPosition()); - //std::cout <<"ZH Processing step: "<<istep<<" at position "<<pos<<std::endl; - - if (m_current_calculator->Process(steps[istep])) - { - //if (!shortstep) G4cout <<"ZH process step ok: "<<m_current_calculator->getNumHits()<<G4endl; - int nlarh = m_current_calculator->getNumHits(); - for (int i=0; i<nlarh; ++i) - { - et += (m_current_calculator->energy(i)); - //std::cout <<"ZH Hit: "<<i<<" E: "<<m_current_calculator->energy(i)<<" in: "<<(std::string) m_current_calculator->identifier(i)<<std::endl; - } - } - else - { - //Maybe 0 hits or something like that... - //G4cout << "ZH: Error: Hit not processed by calculator! " << istep<<" / "<<steps.size()<<" shortstep: "<<shortstep<<G4endl; - //G4cout << "ZH: calculator not processed: Volume: "<< pCurrentVolume->GetName()<<" "<<m_current_calculator<< " position: "<<pos<<" SL: "<<StepLength<<G4endl; - //G4cout <<"ZH: Orig position: "<<steps[istep]->GetPreStepPoint()->GetPosition()<<" / "<<steps[istep]->GetPostStepPoint()->GetPosition()<<"and SL: "<<StepLength<<" step: "<<aStep->GetPreStepPoint()->GetPosition()<<" / "<<aStep->GetPostStepPoint()->GetPosition()<<G4endl; - return; - } - - // drop hits with zero deposited energy (could still happen with negative corrections from calculator) - //Or if total energy is <0 - if (et <= 0.) - { - std::cout <<"ZH: Total negative energy: "<<et<<" not processing..."<<std::endl; - return; - } - - int nlarh = m_current_calculator->getNumHits(); - std::vector<G4ThreeVector> subhitcells; - subhitcells.resize(nlarh); - G4ThreeVector origpos = pos; - double e_subhitmax = -999.; - int e_subhitmaxindex =-1; - if (nlarh>0) - { - e_subhitmax = m_current_calculator->energy(0); - e_subhitmaxindex = 0; - } - //Figure out the subhit with most energy - for (int i=1; i<nlarh; ++i) - { - if (e_subhitmax< m_current_calculator->energy(i)) - { - e_subhitmax = m_current_calculator->energy(i); - e_subhitmaxindex = i; - } - } - //Identifier for the subhit with max energy - LArG4Identifier e_subhitmax_ident = m_current_calculator->identifier(e_subhitmaxindex); - Identifier e_subhitmax_id = m_lar_helper->ConvertID(e_subhitmax_ident); - - for (int i=0; i<nlarh; ++i) - { - LArG4Identifier ident = m_current_calculator->identifier(i); - Identifier id = m_lar_helper->ConvertID(ident); - - Identifier inv_id; - if (id == inv_id) - { - std::cout <<"Something wrong with identifier (LAr): "<<(std::string) ident; - std::cout <<" "<<id<<" "<<id.getString()<<" "<<CurrentLogicalVolumeName <<" nhit: "<<nlarh<<std::endl; - std::cout <<inv_id<<std::endl; - } - - //std::cout <<"Subhit: "<<i<<std::endl; - //std::cout <<"LArIdent "<<(std::string) ident<<std::endl; - //std::cout <<"Ident "<<id.getString()<<std::endl; - //std::cout <<"ZH Step: LAr: "<<StepLength<<std::endl; - //need to get the cell information - - if (nlarh>1) - { - //it didn't seem to happen outside em_barrel - if (m_lar_emID->is_em_barrel(id)) - { - if (m_config.shift_lar_subhit) - { - //find subhit with largest energy - - if (e_subhitmaxindex == -1) - { - std::cout <<"ZH no subhit index with e>-999??? "<<std::endl; - return; - } - else - { - //std::cout <<"ZH shifting subhits: largest energy subhit index is "<<e_subhitmaxindex<<" E: "<<e_subhitmax<<" identifier: "<<e_subhitmax_id.getString()<<std::endl; - } - //from sampling, hit_eta, hit_phi (simple geometry) - //CaloDetDescrElement *bestcell = m_calo_dd_man->get_element(m_calo_dd_man->get_element(id)->getSampling(),origpos.eta(), origpos.phi()); - CaloDetDescrElement *highestcell = m_calo_dd_man->get_element(e_subhitmax_id); - //from identifier - CaloDetDescrElement *thiscell = m_calo_dd_man->get_element(id); - //delete them afterwards? - if (!highestcell) - { - //How often does this happen, do not shift - std::cout <<"ZH highestEcell failed: "<<e_subhitmax_id.getString()<<std::endl; - //" "<<m_calo_dd_man->get_element(id)->getSampling()<<" "<<origpos.eta()<<" "<< origpos.phi()<<std::endl; - //do no shift? - pos = origpos; - } - else if (highestcell == thiscell) - { - //the cells match, do not shift this hit - //std::cout <<"No shift: index: "<<i<<std::endl; - //std::cout <<"Orig pos: "<<origpos.x()<<" "<<origpos.y()<<" "<<origpos.z()<<std::endl; - //std::cout <<"This cell: "<<thiscell->x()<<" "<<thiscell->y()<<" "<<thiscell->z()<<std::endl; - //std::cout <<"No shift"<<std::endl; - pos = origpos; - } - else - { - //the two cells do not match => shift - //std::cout <<"Orig pos: "<<origpos.x()<<" "<<origpos.y()<<" "<<origpos.z()<<std::endl; - G4ThreeVector diff(thiscell->x()-highestcell->x(), thiscell->y()-highestcell->y(), thiscell->z()-highestcell->z()); - pos = origpos+diff; - //std::cout <<"Shift: ! index: "<<i<<std::endl; - //std::cout <<"This cell: "<<thiscell->x()<<" "<<thiscell->y()<<" "<<thiscell->z()<<std::endl; - //std::cout <<"Highest E cell: "<<highestcell->x()<<" "<<highestcell->y()<<" "<<highestcell->z()<<std::endl; - //std::cout <<"(Best cell: "<<bestcell->x()<<" "<<bestcell->y()<<" "<<bestcell->z()<<")"<<std::endl; - //std::cout <<"Shift pos: "<<pos.x()<<" "<<pos.y()<<" "<<pos.z()<<std::endl; - } - //delete highestcell; - //delete thiscell; - } - } - else - { - //Does this happen? - std::cout <<"More subhits, but not in LAr barrel "<<(std::string) ident<<std::endl; - } - } - - /* - //This was only for testing purposes that the shifted hits match to the right cells - CaloDetDescrElement *pcell = m_calo_dd_man->get_element(id); - if (pcell) - { - G4ThreeVector cellvec(pcell->x(),pcell->y(), pcell->z()); - std::cout <<"Hit-cell dist: "<<(pos-cellvec).mag()<<" in: "<<i<<" "<<(std::string) ident<<" sampling: "<<pcell->getSampling()<<" "<<id.getString()<<std::endl; - CaloDetDescrElement *testcell = m_calo_dd_man->get_element(pcell->getSampling(),pos.eta(), pos.phi()); - if (testcell) - { - G4ThreeVector testvec(testcell->x(),testcell->y(), testcell->z()); - std::cout <<"Test cell: "<<testcell->x()<<" "<<testcell->y()<<" "<<testcell->z()<<" "<<testcell->identify().getString()<<std::endl; - std::cout <<"Hit-test cell dist: "<<(pos-testvec).mag()<<" in: "<<i<<" sampling: "<<testcell->getSampling()<<std::endl; - } - else - { - std::cout <<"Test cell failed: "<<pcell->getSampling()<<" "<<pos.eta()<<" "<<pos.phi()<<std::endl; - } - } - else - { - std::cout <<"pcell failed: "<<id.getString()<<std::endl; - } - */ - //Finalize time for LAr hits?: NO - //double time = m_current_calculator->energy(i)==0 ? 0. : (double) m_current_calculator->time(i)/m_current_calculator->energy(i)/CLHEP::ns; - double time = m_current_calculator->time(i); - double energy = m_current_calculator->energy(i)/CLHEP::MeV; - - ISF_FCS_Parametrization::FCS_StepInfo* theInfo = new ISF_FCS_Parametrization::FCS_StepInfo(pos, id, energy, time, true, nlarh); //store nlarh as info - //This one stores also StepLength, but it is not yet in SVN... - // ISF_FCS_Parametrization::FCS_StepInfo* theInfo = new ISF_FCS_Parametrization::FCS_StepInfo(pos, id, (double) m_current_calculator->energy(i), (double) m_current_calculator->time(i), true, nlarh, StepLength); //store nlarh as info - //std::cout <<"Adding new step info: "<<i<<" at: "<<pos<<" Id: "<<id<<" E: "<<energy<<" time: "<<time<<std::endl; - m_eventSteps->push_back(theInfo); - }//nlarh - //std::cout <<"----"<<std::endl; - } //istep - - //Delete steps? - if (steps.size()>1) - { - //only when doing substeps, don't want to delete the original a4step - while(!steps.empty()) delete steps.back(), steps.pop_back(); - } + + double et = 0; // Total collected charge + //G4cout << m_current_calculator << " " << position << G4endl; + + std::vector<const G4Step*> steps; + //bool shortstep = false; + if (m_config.shorten_lar_step && StepLength>0.2) + { + //create smaller substeps instead + G4int nsub_step=(int) (StepLength/0.2) + 1; + G4double delta=1./((double) nsub_step); + //std::cout <<"Orig prestep: "<<aStep->GetPreStepPoint()->GetPosition()<<std::endl; + for (G4int i=0;i<nsub_step;i++) { + // G4double fraction=(((G4double) i)+0.5)*delta; + G4double fraction1 = ((G4double) i)*delta; + G4double fraction2 = (((G4double) i) + 1.)*delta; + G4ThreeVector subpoint1=position1*(1-fraction1) + position2*fraction1; + G4ThreeVector subpoint2=position1*(1-fraction2) + position2*fraction2; + + //G4StepPoint *startpoint = 0; + //startpoint = const_cast<G4StepPoint*>(aStep->GetPreStepPoint()); + //startpoint->SetPosition(subpoint1); + //G4StepPoint *endpoint = 0; + //endpoint = const_cast<G4StepPoint*>(aStep->GetPostStepPoint()); + //endpoint->SetPosition(subpoint2); + + G4StepPoint *startpoint = new G4StepPoint(*(aStep->GetPreStepPoint())); + G4StepPoint *endpoint = new G4StepPoint(*(aStep->GetPostStepPoint())); + startpoint->SetPosition(subpoint1); + endpoint->SetPosition(subpoint2); + + //std::cout <<"ZH substep: "<<i<<" Pos: "<<subpoint1<<" "<<subpoint2<<std::endl; + G4Step* newstep = new G4Step(*aStep); + //newstep = const_cast<G4Step*>(aStep); + if(newstep->GetPreStepPoint()) delete newstep->GetPreStepPoint(); + if(newstep->GetPostStepPoint()) delete newstep->GetPostStepPoint(); + newstep->SetPreStepPoint(startpoint); + newstep->SetPostStepPoint(endpoint); + newstep->SetStepLength( (subpoint1-subpoint2).mag()); + newstep->SetTotalEnergyDeposit(aStep->GetTotalEnergyDeposit()/nsub_step); + //std::cout <<"ZH substep: "<<newstep->GetPreStepPoint()->GetPosition()<<" "<<newstep->GetPostStepPoint()->GetPosition()<<" / "<<0.5*(newstep->GetPreStepPoint()->GetPosition()+newstep->GetPostStepPoint()->GetPosition())<<std::endl; + steps.push_back(newstep); + } + //std::cout <<"Orig poststep"<<aStep->GetPostStepPoint()->GetPosition()<<std::endl; + //shortstep = true; + } + else + { + steps.push_back(aStep); + } + + //std::cout <<"ZH Step size: "<<steps.size()<<" full step length "<<StepLength<<std::endl; + for (unsigned int istep = 0; istep <steps.size(); istep++) + { + //need to update the position! + pos = 0.5*(steps[istep]->GetPreStepPoint()->GetPosition()+steps[istep]->GetPostStepPoint()->GetPosition()); + //std::cout <<"ZH Processing step: "<<istep<<" at position "<<pos<<std::endl; + + std::vector<LArHitData> results; + if (m_current_calculator->Process(steps[istep], results)) + { + //if (!shortstep) G4cout <<"ZH process step ok: "<<results.size()<<G4endl; + + for (auto larhit: results) + { + et += larhit.energy; + //std::cout <<"ZH Hit: "<<i<<" E: "<<larhit.energy<<" in: "<<(std::string) larhit.id <<std::endl; + } + } + else + { + //Maybe 0 hits or something like that... + //G4cout << "ZH: Error: Hit not processed by calculator! " << istep<<" / "<<steps.size()<<" shortstep: "<<shortstep<<G4endl; + //G4cout << "ZH: calculator not processed: Volume: "<< pCurrentVolume->GetName()<<" "<<m_current_calculator<< " position: "<<pos<<" SL: "<<StepLength<<G4endl; + //G4cout <<"ZH: Orig position: "<<steps[istep]->GetPreStepPoint()->GetPosition()<<" / "<<steps[istep]->GetPostStepPoint()->GetPosition()<<"and SL: "<<StepLength<<" step: "<<aStep->GetPreStepPoint()->GetPosition()<<" / "<<aStep->GetPostStepPoint()->GetPosition()<<G4endl; + return; + } + + // drop hits with zero deposited energy (could still happen with negative corrections from calculator) + //Or if total energy is <0 + if (et <= 0.) + { + std::cout <<"ZH: Total negative energy: "<<et<<" not processing..."<<std::endl; + return; + } + + size_t nlarh = results.size(); + std::vector<G4ThreeVector> subhitcells; + subhitcells.resize(nlarh); + G4ThreeVector origpos = pos; + double e_subhitmax = -999.; + int e_subhitmaxindex =-1; + if (nlarh>0) + { + e_subhitmax = results[0].energy; + e_subhitmaxindex = 0; + } + //Figure out the subhit with most energy + for (size_t i=1; i<nlarh; ++i) + { + if (e_subhitmax< results[i].energy) + { + e_subhitmax = results[i].energy; + e_subhitmaxindex = i; + } + } + //Identifier for the subhit with max energy + LArG4Identifier e_subhitmax_ident = results[e_subhitmaxindex].id; + Identifier e_subhitmax_id = m_lar_helper->ConvertID(e_subhitmax_ident); + + for (size_t i=0; i<nlarh; ++i) + { + LArG4Identifier ident = results[i].id; + Identifier id = m_lar_helper->ConvertID(ident); + + Identifier inv_id; + if (id == inv_id) + { + std::cout <<"Something wrong with identifier (LAr): "<<(std::string) ident; + std::cout <<" "<<id<<" "<<id.getString()<<" "<<CurrentLogicalVolumeName <<" nhit: "<<nlarh<<std::endl; + std::cout <<inv_id<<std::endl; + } + + //std::cout <<"Subhit: "<<i<<std::endl; + //std::cout <<"LArIdent "<<(std::string) ident<<std::endl; + //std::cout <<"Ident "<<id.getString()<<std::endl; + //std::cout <<"ZH Step: LAr: "<<StepLength<<std::endl; + //need to get the cell information + + if (nlarh>1) + { + //it didn't seem to happen outside em_barrel + if (m_lar_emID->is_em_barrel(id)) + { + if (m_config.shift_lar_subhit) + { + //find subhit with largest energy + + if (e_subhitmaxindex == -1) + { + std::cout <<"ZH no subhit index with e>-999??? "<<std::endl; + return; + } + else + { + //std::cout <<"ZH shifting subhits: largest energy subhit index is "<<e_subhitmaxindex<<" E: "<<e_subhitmax<<" identifier: "<<e_subhitmax_id.getString()<<std::endl; + } + //from sampling, hit_eta, hit_phi (simple geometry) + //CaloDetDescrElement *bestcell = m_calo_dd_man->get_element(m_calo_dd_man->get_element(id)->getSampling(),origpos.eta(), origpos.phi()); + CaloDetDescrElement *highestcell = m_calo_dd_man->get_element(e_subhitmax_id); + //from identifier + CaloDetDescrElement *thiscell = m_calo_dd_man->get_element(id); + //delete them afterwards? + if (!highestcell) + { + //How often does this happen, do not shift + std::cout <<"ZH highestEcell failed: "<<e_subhitmax_id.getString()<<std::endl; + //" "<<m_calo_dd_man->get_element(id)->getSampling()<<" "<<origpos.eta()<<" "<< origpos.phi()<<std::endl; + //do no shift? + pos = origpos; + } + else if (highestcell == thiscell) + { + //the cells match, do not shift this hit + //std::cout <<"No shift: index: "<<i<<std::endl; + //std::cout <<"Orig pos: "<<origpos.x()<<" "<<origpos.y()<<" "<<origpos.z()<<std::endl; + //std::cout <<"This cell: "<<thiscell->x()<<" "<<thiscell->y()<<" "<<thiscell->z()<<std::endl; + //std::cout <<"No shift"<<std::endl; + pos = origpos; + } + else + { + //the two cells do not match => shift + //std::cout <<"Orig pos: "<<origpos.x()<<" "<<origpos.y()<<" "<<origpos.z()<<std::endl; + G4ThreeVector diff(thiscell->x()-highestcell->x(), thiscell->y()-highestcell->y(), thiscell->z()-highestcell->z()); + pos = origpos+diff; + //std::cout <<"Shift: ! index: "<<i<<std::endl; + //std::cout <<"This cell: "<<thiscell->x()<<" "<<thiscell->y()<<" "<<thiscell->z()<<std::endl; + //std::cout <<"Highest E cell: "<<highestcell->x()<<" "<<highestcell->y()<<" "<<highestcell->z()<<std::endl; + //std::cout <<"(Best cell: "<<bestcell->x()<<" "<<bestcell->y()<<" "<<bestcell->z()<<")"<<std::endl; + //std::cout <<"Shift pos: "<<pos.x()<<" "<<pos.y()<<" "<<pos.z()<<std::endl; + } + //delete highestcell; + //delete thiscell; + } + } + else + { + //Does this happen? + std::cout <<"More subhits, but not in LAr barrel "<<(std::string) ident<<std::endl; + } + } + + /* + //This was only for testing purposes that the shifted hits match to the right cells + CaloDetDescrElement *pcell = m_calo_dd_man->get_element(id); + if (pcell) + { + G4ThreeVector cellvec(pcell->x(),pcell->y(), pcell->z()); + std::cout <<"Hit-cell dist: "<<(pos-cellvec).mag()<<" in: "<<i<<" "<<(std::string) ident<<" sampling: "<<pcell->getSampling()<<" "<<id.getString()<<std::endl; + CaloDetDescrElement *testcell = m_calo_dd_man->get_element(pcell->getSampling(),pos.eta(), pos.phi()); + if (testcell) + { + G4ThreeVector testvec(testcell->x(),testcell->y(), testcell->z()); + std::cout <<"Test cell: "<<testcell->x()<<" "<<testcell->y()<<" "<<testcell->z()<<" "<<testcell->identify().getString()<<std::endl; + std::cout <<"Hit-test cell dist: "<<(pos-testvec).mag()<<" in: "<<i<<" sampling: "<<testcell->getSampling()<<std::endl; + } + else + { + std::cout <<"Test cell failed: "<<pcell->getSampling()<<" "<<pos.eta()<<" "<<pos.phi()<<std::endl; + } + } + else + { + std::cout <<"pcell failed: "<<id.getString()<<std::endl; + } + */ + //Finalize time for LAr hits?: NO + //double time = results[i].energy)==0 ? 0. : (double) results[i].time/results[i].energy/CLHEP::ns; + double time = results[i].time; + double energy = results[i].energy/CLHEP::MeV; + + ISF_FCS_Parametrization::FCS_StepInfo* theInfo = new ISF_FCS_Parametrization::FCS_StepInfo(pos, id, energy, time, true, nlarh); //store nlarh as info + //This one stores also StepLength, but it is not yet in SVN... + // ISF_FCS_Parametrization::FCS_StepInfo* theInfo = new ISF_FCS_Parametrization::FCS_StepInfo(pos, id, (double) results[i].energy, (double) results[i].time, true, nlarh, StepLength); //store nlarh as info + //std::cout <<"Adding new step info: "<<i<<" at: "<<pos<<" Id: "<<id<<" E: "<<energy<<" time: "<<time<<std::endl; + m_eventSteps->push_back(theInfo); + }//nlarh + //std::cout <<"----"<<std::endl; + } //istep + + //Delete steps? + if (steps.size()>1) + { + //only when doing substeps, don't want to delete the original a4step + while(!steps.empty()) delete steps.back(), steps.pop_back(); + } } //////////////////////// //Do TileCal Stuff //////////////////////// - + else if (m_current_calculator_Tile) - { - //std::cout<<"GG: Hello" << std::endl; - - //calculation of MicroHit with aStep - TileMicroHit micHit = m_calculator_Tile->TileGeoG4SDCalc::GetTileMicroHit(aStep); - Identifier m_invalid_id; - - //Check if MicroHit is not in scintillator - if ((micHit.pmt_up == m_invalid_id) && (micHit.pmt_down == m_invalid_id)) { - std::cout <<"Invalid hit in Tile??"<<std::endl; - return;} - else { - // Store TileHits Information - //std::cout <<"ZH Step: Tile: "<<StepLength<<std::endl; - if ((micHit.pmt_up == m_invalid_id) || (micHit.pmt_down == m_invalid_id)) - { - //std::cout <<"Something wrong in identifier: One tile pmt: "<<micHit.pmt_up<<" "<<micHit.pmt_down<<std::endl; - //std::cout <<"E up: "<<micHit.e_up<<" E down: "<<micHit.e_down<<" T up: "<<micHit.time_up<<" T down: "<<micHit.time_down<<std::endl; - } - ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_up = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_up, micHit.e_up, micHit.time_up, true,1); - //Commented out version needs ISF_Event which is not yet in SVN.. - // ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_up = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_up, micHit.e_up, micHit.time_up, true,1,StepLength); - m_eventSteps->push_back(theInfo_Tile_up); - - ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_down = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_down, micHit.e_down,micHit.time_down , true,1); - //ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_down = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_down, micHit.e_down,micHit.time_down , true,1,StepLength); - m_eventSteps->push_back(theInfo_Tile_down); - - //std::cout << "GG: GetTileMicroHit: pmtID_up,pmtID_down,edep_up,edep_down,scin_Time_up,scin_Time_down:\t" << micHit.pmt_up <<";\t"<< micHit.pmt_down <<";\t"<< micHit.e_up <<";\t"<< micHit.e_down <<";\t" << micHit.time_up <<";\t"<< micHit.time_down << std::endl; - - } - - - } + { + //std::cout<<"GG: Hello" << std::endl; + + //calculation of MicroHit with aStep + TileMicroHit micHit = m_calculator_Tile->TileGeoG4SDCalc::GetTileMicroHit(aStep); + Identifier m_invalid_id; + + //Check if MicroHit is not in scintillator + if ((micHit.pmt_up == m_invalid_id) && (micHit.pmt_down == m_invalid_id)) { + std::cout <<"Invalid hit in Tile??"<<std::endl; + return;} + else { + // Store TileHits Information + //std::cout <<"ZH Step: Tile: "<<StepLength<<std::endl; + if ((micHit.pmt_up == m_invalid_id) || (micHit.pmt_down == m_invalid_id)) + { + //std::cout <<"Something wrong in identifier: One tile pmt: "<<micHit.pmt_up<<" "<<micHit.pmt_down<<std::endl; + //std::cout <<"E up: "<<micHit.e_up<<" E down: "<<micHit.e_down<<" T up: "<<micHit.time_up<<" T down: "<<micHit.time_down<<std::endl; + } + ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_up = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_up, micHit.e_up, micHit.time_up, true,1); + //Commented out version needs ISF_Event which is not yet in SVN.. + // ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_up = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_up, micHit.e_up, micHit.time_up, true,1,StepLength); + m_eventSteps->push_back(theInfo_Tile_up); + + ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_down = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_down, micHit.e_down,micHit.time_down , true,1); + //ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_down = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_down, micHit.e_down,micHit.time_down , true,1,StepLength); + m_eventSteps->push_back(theInfo_Tile_down); + + //std::cout << "GG: GetTileMicroHit: pmtID_up,pmtID_down,edep_up,edep_down,scin_Time_up,scin_Time_down:\t" << micHit.pmt_up <<";\t"<< micHit.pmt_down <<";\t"<< micHit.e_up <<";\t"<< micHit.e_down <<";\t" << micHit.time_up <<";\t"<< micHit.time_down << std::endl; + + } + + + } else - { - //Shouldn't be here anyway.. - G4cout <<"ZH ???"<<aStep->GetTotalEnergyDeposit() << G4endl; - } + { + //Shouldn't be here anyway.. + G4cout <<"ZH ???"<<aStep->GetTotalEnergyDeposit() << G4endl; + } //std::cout <<"End of step"<<std::endl; return; } return; - - - + + + } -} // namespace G4UA +} // namespace G4UA diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamActionTool.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamActionTool.cxx index a74198b85b717c74e33b1f06d71d05fd844c6b7e..da2f6d16278a9993ecd86f614027190fdfe6ab7b 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamActionTool.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamActionTool.cxx @@ -4,24 +4,82 @@ #include "CxxUtils/make_unique.h" #include "ISF_Geant4UserActions/FastCaloSimParamActionTool.h" +#include "LArG4Code/ILArCalculatorSvc.h" -namespace G4UA{ +namespace G4UA{ - FastCaloSimParamActionTool::FastCaloSimParamActionTool(const std::string& type, const std::string& name,const IInterface* parent): - ActionToolBase<FastCaloSimParamAction>(type, name, parent), m_config(){ + FastCaloSimParamActionTool::FastCaloSimParamActionTool(const std::string& type, const std::string& name,const IInterface* parent) + : ActionToolBase<FastCaloSimParamAction>(type, name, parent) + , m_config() + , m_emepiwcalc("EMECPosInnerWheelCalculator", name) + , m_emeniwcalc("EMECNegInnerWheelCalculator", name) + , m_emepowcalc("EMECPosOuterWheelCalculator", name) + , m_emenowcalc("EMECNegOuterWheelCalculator", name) + , m_emeobarcalc("EMECBackOuterBarretteCalculator", name) + , m_embcalc("EMBCalculator", name) + , m_fcal1calc("FCAL1Calculator", name) + , m_fcal2calc("FCAL2Calculator", name) + , m_fcal3calc("FCAL3Calculator", name) + , m_heccalc("HECWheelCalculator", name) + , m_pscalc("EMBPresamplerCalculator", name) + , m_emepscalc("EMECPresamplerCalculator", name) + { declareProperty("shift_lar_subhit",m_config.shift_lar_subhit, ""); declareProperty("shorten_lar_step",m_config.shorten_lar_step, ""); - + + declareProperty("EMECPosIWCalculator", m_emepiwcalc); + declareProperty("EMECNegIWCalculator", m_emeniwcalc); + declareProperty("EMECPosOWCalculator", m_emepowcalc); + declareProperty("EMECNegOWCalculator", m_emenowcalc); + declareProperty("EMECBOBCalculator", m_emeobarcalc); + declareProperty("EMBCalculator",m_embcalc); + declareProperty("FCAL1Calculator", m_fcal1calc); + declareProperty("FCAL2Calculator", m_fcal2calc); + declareProperty("FCAL3Calculator", m_fcal3calc); + declareProperty("HECWheelCalculator", m_heccalc); + declareProperty("EMBPSCalculator",m_pscalc); + declareProperty("EMECPSCalculator", m_emepscalc); + } + + StatusCode FastCaloSimParamActionTool::initialize() + { + ATH_CHECK(m_emepiwcalc.retrieve()); + ATH_CHECK(m_emeniwcalc.retrieve()); + ATH_CHECK(m_emepowcalc.retrieve()); + ATH_CHECK(m_emenowcalc.retrieve()); + ATH_CHECK(m_emeobarcalc.retrieve()); + ATH_CHECK(m_embcalc.retrieve()); + ATH_CHECK(m_fcal1calc.retrieve()); + ATH_CHECK(m_fcal2calc.retrieve()); + ATH_CHECK(m_fcal3calc.retrieve()); + ATH_CHECK(m_heccalc.retrieve()); + ATH_CHECK(m_pscalc.retrieve()); + ATH_CHECK(m_emepscalc.retrieve()); + m_config.calculator_EMECIW_pos = &*m_emepiwcalc; + m_config.calculator_EMECIW_neg = &*m_emeniwcalc; + m_config.calculator_EMECOW_pos = &*m_emepowcalc; + m_config.calculator_EMECOW_neg = &*m_emenowcalc; + m_config.calculator_BOB = &*m_emeobarcalc; + m_config.calculator_EMB = &*m_embcalc; + m_config.calculator_FCAL1 = &*m_fcal1calc; + m_config.calculator_FCAL2 = &*m_fcal2calc; + m_config.calculator_FCAL3 = &*m_fcal3calc; + m_config.calculator_HEC = &*m_heccalc; + m_config.calculator_EMBPS = &*m_pscalc; + m_config.calculator_EMEPS = &*m_emepscalc; + + return StatusCode::SUCCESS; } - std::unique_ptr<FastCaloSimParamAction> FastCaloSimParamActionTool::makeAction(){ + std::unique_ptr<FastCaloSimParamAction> FastCaloSimParamActionTool::makeAction() + { ATH_MSG_DEBUG("makeAction"); auto action = CxxUtils::make_unique<FastCaloSimParamAction>(m_config); return std::move(action); } - + StatusCode FastCaloSimParamActionTool::queryInterface(const InterfaceID& riid, void** ppvIf){ - + if(riid == IBeginRunActionTool::interfaceID()) { *ppvIf = (IBeginRunActionTool*) this; addRef(); @@ -49,5 +107,5 @@ namespace G4UA{ } return ActionToolBase<FastCaloSimParamAction>::queryInterface(riid, ppvIf); } - -} // namespace G4UA + +} // namespace G4UA diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.cxx index e6a179e694f9c999c4eccca0bfe47a54bec45b8d..b89569a8ddf4c9483c915b60dc5c4a0fea040052 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.cxx @@ -13,150 +13,6 @@ #include "TFile.h" #include "TTree.h" -using namespace iGeant4; - -void TestBoundariesUserAction::BeginOfRun(const G4Run* /*aRun*/) -{ - file = TFile::Open("points.root","RECREATE"); - tree = new TTree("points","points"); - // tree->Branch("data",&data.x,"x:y:z/F:volume/I:enter/O:exit:leave"); - tree->Branch("x",&data.x,"x/F"); - tree->Branch("y",&data.y,"y/F"); - tree->Branch("z",&data.z,"z/F"); - tree->Branch("volume",&data.volume,"volume/I"); - tree->Branch("enter",&data.enter,"enter/O"); - tree->Branch("exit",&data.exit,"exit/O"); - tree->Branch("leave",&data.leave,"leave/O"); - return; -} - -void TestBoundariesUserAction::EndOfRun(const G4Run* /*aRun*/) -{ - tree->Write(); - file->Close(); - delete file; - file=0; - tree=0; -} - -TestBoundariesUserAction::TestBoundariesUserAction(const std::string& type, const std::string& name, const IInterface* parent): - UserActionBase(type,name,parent), - file(0), tree(0) -{ - sel["Atlas::Atlas"]=0; - sel["IDET::IDET"]=1; - sel["CALO::CALO"]=2; - sel["MUONQ02::MUONQ02"]=3; - sel["BeamPipe::BeamPipe"]=4; - -} - - -void TestBoundariesUserAction::Step(const G4Step* aStep) -{ - G4StepPoint * preStep = aStep->GetPreStepPoint(); - - G4StepPoint *postStep = aStep->GetPostStepPoint(); - - if (!preStep || !postStep) { - ATH_MSG_ERROR("TestBoundariesUserAction Error something missing"); - return; - } - - G4TouchableHistory* preTH = (G4TouchableHistory*)(preStep->GetTouchable()); - G4TouchableHistory* postTH = (G4TouchableHistory*)(postStep->GetTouchable()); - - - /* - if (preTH){ - int preN=preTH->GetHistoryDepth(); - for (int i=0; i<preN; ++i) { - std::cout<<" "<<preTH->GetVolume(i)->GetLogicalVolume()->GetName(); - } - std::cout<<"\n"; - } - else std::cout<<" no preTH\n"; - if (postTH) { - int postN=postTH->GetHistoryDepth(); - for (int i=0; i<postN; ++i) { - std::cout<<" "<<postTH->GetVolume(i)->GetLogicalVolume()->GetName(); - } - std::cout<<"\n"; - } - else std::cout<<" no postTH\n"; -*/ - G4LogicalVolume* preLV=preStep->GetPhysicalVolume()->GetLogicalVolume(); - if (preTH) { - int preN=preTH->GetHistoryDepth(); - if (preN>0) preLV= preTH->GetVolume(preN-1)->GetLogicalVolume(); - } - - - G4LogicalVolume* postLV=0; - if (postStep->GetPhysicalVolume()) - postLV=postStep->GetPhysicalVolume()->GetLogicalVolume(); - if (postTH) { - int postN=postTH->GetHistoryDepth(); - if (postN>0) postLV= postTH->GetVolume(postN-1)->GetLogicalVolume(); - } - - if (postLV!=preLV) { - // bool startedInVolume=false; - // bool exitedVolume=false; - //bool leftWorld=false; - G4ThreeVector pos=aStep->GetPostStepPoint()->GetPosition(); - // std::cout<<"pos :"<<pos<<"\n"; - data.Set(pos.x(),pos.y(),pos.z(),0); - if (preLV) { - std::string preStepPointName=preLV->GetName(); - // std::cout<<"preLV :"<<preStepPointName<<"\n"; - SMap::const_iterator it=sel.find(preStepPointName); - if (it!=sel.end()) { - //startedInVolume=true; - data.volume=it->second; - data.Reset(); - data.exit=true; - if (tree) tree->Fill(); - } - } - if (postLV) { - std::string postStepPointName=postLV->GetName(); - // std::cout<<"postLV :"<<postStepPointName<<"\n"; - SMap::const_iterator it=sel.find(postStepPointName); - if (it!=sel.end()) { - //startedInVolume=true; - data.volume=it->second; - data.Reset(); - data.enter=true; - if (tree) tree->Fill(); - } - } - else { - // std::cout<<"postLV : ---\n"; - //leftWorld=true; - data.volume=0; - data.Reset(); - data.leave=true; - if (tree) tree->Fill(); - } - - } - -} - -StatusCode TestBoundariesUserAction::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} - - #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/ISvcLocator.h" diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.h index c985992d9ebbd06f39b62ef0be3f23f26e268666..8d7837e8e52181c01f35f5dde39afa7e4203e0d3 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.h @@ -6,7 +6,6 @@ #define ISF_Geant4Tools_TestBoundariesUserAction_h -#include "G4AtlasTools/UserActionBase.h" #include <string> #include <map> @@ -14,42 +13,6 @@ class TTree; class TFile; #include "TMath.h" -namespace iGeant4 { - - class TestBoundariesUserAction: public UserActionBase { - public: - TestBoundariesUserAction(const std::string& type, const std::string& name, const IInterface* parent); - virtual void BeginOfRun(const G4Run*) override; - virtual void EndOfRun(const G4Run*) override; - virtual void Step(const G4Step*) override; - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - private: - typedef std::map<std::string,int> SMap; - SMap sel; - std::map<std::string,std::string> mother; - - TFile * file; - TTree * tree; - struct Data { - Float_t x,y,z; - Int_t volume; - Bool_t enter; - Bool_t exit; - Bool_t leave; - Data() : x(0.),y(0.),z(0.), volume(0),enter(false),exit(false),leave(false) {} - void Reset() { - enter=exit=leave=false; - } - void Set(Float_t _x, Float_t _y, Float_t _z, - Int_t _vol) { - x=_x; y=_y; z=_z; - volume=_vol; - } - } data; - }; - -} - #include "G4AtlasInterfaces/IBeginRunAction.h" #include "G4AtlasInterfaces/IEndRunAction.h" diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/components/ISF_Geant4UserActions_entries.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/components/ISF_Geant4UserActions_entries.cxx index 4b7333d688fc1e41d7da6d3bb654493c9e7573ab..a1ea3c6e5b393b9f8374fe5e7c5bb3d89bd9b62e 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/components/ISF_Geant4UserActions_entries.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/components/ISF_Geant4UserActions_entries.cxx @@ -1,21 +1,15 @@ #include "GaudiKernel/DeclareFactoryEntries.h" -#include "ISF_Geant4UserActions/FastCaloSimParamAction.h" #include "ISF_Geant4UserActions/FastCaloSimParamActionTool.h" -#include "../TestBoundariesUserAction.h" #include "../TestBoundariesUserActionTool.h" -DECLARE_TOOL_FACTORY( FastCaloSimParamAction ) DECLARE_TOOL_FACTORY( G4UA::FastCaloSimParamActionTool ) -DECLARE_TOOL_FACTORY( iGeant4::TestBoundariesUserAction ) DECLARE_TOOL_FACTORY( G4UA::iGeant4::TestBoundariesUserActionTool ) DECLARE_FACTORY_ENTRIES( ISF_Geant4UserActions ) { - DECLARE_TOOL( FastCaloSimParamAction ) DECLARE_TOOL( G4UA::FastCaloSimParamActionTool ) - DECLARE_TOOL( iGeant4::TestBoundariesUserAction ) DECLARE_TOOL( G4UA::iGeant4::TestBoundariesUserActionTool ) } diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.GMSB.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.GMSB.py index dee4b888a4cd52a154d75eabb81b329ebb6a3249..39a37d7292285ee9f949258c160178dd3072cf2d 100644 --- a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.GMSB.py +++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.GMSB.py @@ -114,11 +114,11 @@ try: simdict = digitizationFlags.specialConfiguration.get_Value() doG4SimConfig = False else: - from G4AtlasApps import AtlasG4Eng - simdict = AtlasG4Eng.G4Eng.Dict_SpecialConfiguration + from G4AtlasApps.SimFlags import simFlags + simdict = simFlags.specialConfiguration.get_Value() except: - from G4AtlasApps import AtlasG4Eng - simdict = AtlasG4Eng.G4Eng.Dict_SpecialConfiguration + from G4AtlasApps.SimFlags import simFlags + simdict = simFlags.specialConfiguration.get_Value() assert "GMSBIndex" in simdict #if 2525 == simdict["GMSBIndex"]: @@ -130,7 +130,7 @@ if doG4SimConfig: def gmsb_processlist(): from G4AtlasApps import AtlasG4Eng AtlasG4Eng.G4Eng.gbl.G4Commands().process.list() - + simFlags.InitFunctions.add_function("postInit", gmsb_processlist) def gmsb_setparams(): @@ -139,57 +139,14 @@ if doG4SimConfig: ## Assuming that GMSBIndex is an int here... GMSBIndex = int(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration["GMSBIndex"]) - - def modify_slepton_mass(name, mass): - slepton = AtlasG4Eng.G4Eng.gbl.ParticleDataModifier(name) - slepton.SetParticleMass(mass) - if GMSBIndex == 1: # generic neutralino to photon scenario + from G4AtlasApps.SimFlags import simFlags + simFlags.PhysicsOptions += ["GauginosPhysicsTool"] - GMSBNeutralino = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration["GMSBNeutralino"]) - GMSBTime = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration["GMSBLifeTime"]) - AtlasG4Eng.G4Eng.log.info("Generic GMSB neutralino to photon scenario (mass=%s MeV/time=%s ns)" % (GMSBNeutralino, GMSBTime)) - - AtlasG4Eng.G4Eng._ctrl.load("Gauginos") - NLsp=AtlasG4Eng.G4Eng.gbl.ParticleDataModifier("s_chi_0_1") - NLsp.SetParticleMass(GMSBNeutralino) - NLsp.SetParticleLifeTime(GMSBTime) - NLsp.Stable(False) - NLsp.AddDecayChannel("s_chi_0_1",1.,"s_G=gamma") - - if AtlasG4Eng.G4Eng.Dict_SpecialConfiguration.has_key("GMSBGravitino"): - GMSBGravitino = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration["GMSBGravitino"]) - AtlasG4Eng.G4Eng.log.info("Adding gravitino mass (gravitino mass=%s keV)" % (GMSBGravitino*1E3)) - - Lsp=AtlasG4Eng.G4Eng.gbl.ParticleDataModifier("s_G") - Lsp.SetParticleMass(GMSBGravitino) - - del GMSBGravitino - - del GMSBNeutralino, GMSBTime - elif GMSBIndex == 2 or GMSBIndex == 3 or GMSBIndex == 4: # generic stau scenario - - GMSBStau = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration["GMSBStau"]) - AtlasG4Eng.G4Eng.log.info("Generic GMSB stau scenario (stau=%s MeV)" % GMSBStau) - - AtlasG4Eng.G4Eng._ctrl.load("Sleptons") - modify_slepton_mass("s_tau_plus_1", GMSBStau) - modify_slepton_mass("s_tau_minus_1", GMSBStau) - - if AtlasG4Eng.G4Eng.Dict_SpecialConfiguration.has_key("GMSBSlepton"): - GMSBSlepton = eval(AtlasG4Eng.G4Eng.Dict_SpecialConfiguration.get("GMSBSlepton", None)) - AtlasG4Eng.G4Eng.log.info("Adding slepton mass to GMSB stau scenario (slepton=%s MeV)" % GMSBSlepton) - - modify_slepton_mass("s_mu_plus_R", GMSBSlepton) - modify_slepton_mass("s_mu_minus_R", GMSBSlepton) - modify_slepton_mass("s_e_plus_R", GMSBSlepton) - modify_slepton_mass("s_e_minus_R", GMSBSlepton) - - del GMSBSlepton - - del GMSBStau + from G4AtlasApps.SimFlags import simFlags + simFlags.PhysicsOptions += ["SleptonsPhysicsTool"] del GMSBIndex @@ -205,4 +162,3 @@ if doG4SimConfig: simFlags.InitFunctions.add_function("postInit", gmsb_applycalomctruthstrategy) del doG4SimConfig, simdict - diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Monopole.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Monopole.py index e1619727bad04a9fff91587290df4853238c63c7..c2028e4780a0fd3eaa534ac5458d3da1743ac376 100644 --- a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Monopole.py +++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Monopole.py @@ -61,29 +61,15 @@ if doG4SimConfig: AtlasG4Eng.G4Eng.log.info("Unlocking simFlags.EquationOfMotion to reset the value for Monopole simulation.") from G4AtlasApps.SimFlags import simFlags # FIXME ideally would include this file early enough, so that the unlocking is not required - simFlags.EquationOfMotion.unlock() + #simFlags.EquationOfMotion.unlock() simFlags.EquationOfMotion.set_On() - simFlags.EquationOfMotion.set_Value_and_Lock("MonopoleEquationOfMotion") + simFlags.EquationOfMotion.set_Value_and_Lock("G4mplEqMagElectricField")#"MonopoleEquationOfMotion") simFlags.G4Stepper.set_Value_and_Lock('ClassicalRK4') simFlags.PhysicsOptions += ["MonopolePhysicsTool"] - - try: - # MT-compatible UserActions - from G4AtlasServices.G4AtlasServicesConfig import addAction - addAction("LooperKillerTool",['Step'],False) - addAction("HIPKillerTool",['Step'],False) - except: - # this configures the non-MT UserActions - try: - from G4AtlasServices.G4AtlasUserActionConfig import UAStore - except ImportError: - from G4AtlasServices.UserActionStore import UAStore - from AthenaCommon.CfgGetter import getPublicToolClone - # use specific configuration - lkAction = getPublicToolClone("MonopoleLooperKiller", "LooperKiller", PrintSteps=2, MaxSteps=2000000, VerboseLevel=0) - UAStore.addAction(lkAction,['Step']) - # add HIP killer - UAStore.addAction('HIPKiller',['Step']) + # add monopole-specific configuration for looper killer + simFlags.OptionalUserActionList.addAction('MonopoleLooperKillerTool',['Step']) + # add default HIP killer + simFlags.OptionalUserActionList.addAction('G4UA::HIPKillerTool',['Step']) diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Qball.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Qball.py index 53e9a3f1b57d37dc6bc6f20d6881bc943d0abe5a..886a8d1d5739e12b85684a6c06c0325940190cf2 100644 --- a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Qball.py +++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Qball.py @@ -65,26 +65,12 @@ if doG4SimConfig: # FIXME ideally would include this file early enough, so that the unlocking is not required simFlags.EquationOfMotion.unlock() simFlags.EquationOfMotion.set_On() - simFlags.EquationOfMotion.set_Value_and_Lock("MonopoleEquationOfMotion") + simFlags.EquationOfMotion.set_Value_and_Lock("G4mplEqMagElectricField")#"MonopoleEquationOfMotion") simFlags.G4Stepper.set_Value_and_Lock('ClassicalRK4') simFlags.PhysicsOptions += ["MonopolePhysicsTool"] - - try: - # MT-compatible UserActions - from G4AtlasServices.G4AtlasServicesConfig import addAction - addAction("LooperKillerTool",['Step'],False) - addAction("HIPKillerTool",['Step'],False) - except: - # this configures the non-MT UserActions - try: - from G4AtlasServices.G4AtlasUserActionConfig import UAStore - except ImportError: - from G4AtlasServices.UserActionStore import UAStore - from AthenaCommon.CfgGetter import getPublicToolClone - # use specific configuration - lkAction = getPublicToolClone("LooperKillerQBall", "LooperKiller", PrintSteps=2, MaxSteps=2000000, VerboseLevel=0) - UAStore.addAction(lkAction,['Step']) - # add HIP killer - UAStore.addAction('HIPKiller',['Step']) + # add monopole-specific configuration for looper killer + simFlags.OptionalUserActionList.addAction('MonopoleLooperKillerTool',['Step']) + # add default HIP killer + simFlags.OptionalUserActionList.addAction('G4UA::HIPKillerTool',['Step']) del doG4SimConfig, simdict diff --git a/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/CMakeLists.txt b/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/CMakeLists.txt index c0ddb525fe977929fa7cdd0e194703b19a28ccea..58f5395cbcd0e597e3b43646a10d4549d377005d 100644 --- a/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/CMakeLists.txt +++ b/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/CMakeLists.txt @@ -16,7 +16,7 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoModel/GeoModelKernel GaudiKernel Simulation/G4Atlas/G4AtlasTools - Simulation/G4Utilities/Geo2G4 + Simulation/G4Utilities/GeoMaterial2G4 TileCalorimeter/TileSimEvent ) # External dependencies: @@ -29,7 +29,7 @@ atlas_add_component( CombinedScintillator src/*.cc src/components/*.cxx INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier CxxUtils StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib Geo2G4Lib TileSimEvent ) + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier CxxUtils StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib GeoMaterial2G4 TileSimEvent ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/cmt/requirements b/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/cmt/requirements index c71c8886a972402ab4ade9d51134b88d4a094659..fa1f57b1f11824c9b22196e8a655d980a579e47d 100644 --- a/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/cmt/requirements +++ b/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/cmt/requirements @@ -13,7 +13,7 @@ use GaudiInterface GaudiInterface-* External use Geant4 Geant4-* External use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel use GeoModelKernel GeoModelKernel-* DetectorDescription/GeoModel -use Geo2G4 Geo2G4-* Simulation/G4Utilities +use GeoMaterial2G4 GeoMaterial2G4-* Simulation/G4Utilities use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas use StoreGate StoreGate-* Control use TileSimEvent TileSimEvent-* TileCalorimeter diff --git a/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/src/CombinedScintillatorTool.cc b/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/src/CombinedScintillatorTool.cc index 8dc4e04b62c5a23219253f8d9dece2d5f174c323..bd03a89697e5d3e36daf4bd96d52a86ebc868691 100644 --- a/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/src/CombinedScintillatorTool.cc +++ b/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/src/CombinedScintillatorTool.cc @@ -8,7 +8,7 @@ //Athena headers #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoMaterial.h" -#include "Geo2G4/Geo2G4MaterialFactory.h" +#include "GeoMaterial2G4/Geo2G4MaterialFactory.h" #include "StoreGate/DataHandle.h" // Geant4 headers diff --git a/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/CMakeLists.txt b/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/CMakeLists.txt index e0046085e5b8e303e0ddc9eb6dc81bee810dd31f..74c584441a95647797fb545516985d2f37d06ab0 100644 --- a/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/CMakeLists.txt +++ b/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/CMakeLists.txt @@ -14,7 +14,7 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoModel/GeoModelKernel GaudiKernel Simulation/G4Atlas/G4AtlasTools - Simulation/G4Utilities/Geo2G4 ) + Simulation/G4Utilities/GeoMaterial2G4 ) # External dependencies: find_package( CLHEP ) @@ -26,7 +26,7 @@ atlas_add_component( DeadMaterial src/*.cxx src/components/*.cxx INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib Geo2G4Lib ) + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib GeoMaterial2G4 ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/cmt/requirements b/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/cmt/requirements index 795a42cd7e06cb4078a7b7725ce67696f36821c6..017bba6f311a097feb73f973507c3b8d619e0b6c 100755 --- a/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/cmt/requirements +++ b/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/cmt/requirements @@ -10,7 +10,7 @@ use GaudiInterface GaudiInterface-* External use Geant4 Geant4-* External use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel use GeoModelKernel GeoModelKernel-* DetectorDescription/GeoModel -use Geo2G4 Geo2G4-* Simulation/G4Utilities +use GeoMaterial2G4 GeoMaterial2G4-* Simulation/G4Utilities use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas use StoreGate StoreGate-* Control end_private diff --git a/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/src/DeadMaterialTool.cxx b/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/src/DeadMaterialTool.cxx index 29a0510faa5279f66297ea1c2951e9d12e167f49..f23a00d4945a38ff8fa963a94cb6f085439d94e9 100644 --- a/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/src/DeadMaterialTool.cxx +++ b/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/src/DeadMaterialTool.cxx @@ -8,7 +8,7 @@ //Athena headers #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoMaterial.h" -#include "Geo2G4/Geo2G4MaterialFactory.h" +#include "GeoMaterial2G4/Geo2G4MaterialFactory.h" #include "StoreGate/DataHandle.h" // Geant4 headers diff --git a/TileCalorimeter/TileG4/TileAncillary/LarCrate/CMakeLists.txt b/TileCalorimeter/TileG4/TileAncillary/LarCrate/CMakeLists.txt index 4fdc2241a648960032b87e5505f860d64ab2c2d5..eebd0081fea0620dc87b281a7ded16d97b5a7e13 100644 --- a/TileCalorimeter/TileG4/TileAncillary/LarCrate/CMakeLists.txt +++ b/TileCalorimeter/TileG4/TileAncillary/LarCrate/CMakeLists.txt @@ -14,7 +14,7 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoModel/GeoModelKernel GaudiKernel Simulation/G4Atlas/G4AtlasTools - Simulation/G4Utilities/Geo2G4 ) + Simulation/G4Utilities/GeoMaterial2G4 ) # External dependencies: find_package( CLHEP ) @@ -26,7 +26,7 @@ atlas_add_component( LarCrate src/*.cxx src/components/*.cxx INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib Geo2G4Lib ) + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib GeoMaterial2G4 ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/TileCalorimeter/TileG4/TileAncillary/LarCrate/cmt/requirements b/TileCalorimeter/TileG4/TileAncillary/LarCrate/cmt/requirements index 82901f976743cfdab2d558d39238f6a08f9a5a02..49a2a3a3970c1772ea5505c73a21f97db9de5c85 100755 --- a/TileCalorimeter/TileG4/TileAncillary/LarCrate/cmt/requirements +++ b/TileCalorimeter/TileG4/TileAncillary/LarCrate/cmt/requirements @@ -10,7 +10,7 @@ use GaudiInterface GaudiInterface-* External use Geant4 Geant4-* External use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel use GeoModelKernel GeoModelKernel-* DetectorDescription/GeoModel -use Geo2G4 Geo2G4-* Simulation/G4Utilities +use GeoMaterial2G4 GeoMaterial2G4-* Simulation/G4Utilities use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas use StoreGate StoreGate-* Control diff --git a/TileCalorimeter/TileG4/TileAncillary/LarCrate/src/LArCrateTool.cxx b/TileCalorimeter/TileG4/TileAncillary/LarCrate/src/LArCrateTool.cxx index 8eb83f737cb638a537cfa7c4bf6026abcea3f8ca..d2fad03748e661b3deee88831ef1e2f98810a95f 100644 --- a/TileCalorimeter/TileG4/TileAncillary/LarCrate/src/LArCrateTool.cxx +++ b/TileCalorimeter/TileG4/TileAncillary/LarCrate/src/LArCrateTool.cxx @@ -8,7 +8,7 @@ //Athena headers #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoMaterial.h" -#include "Geo2G4/Geo2G4MaterialFactory.h" +#include "GeoMaterial2G4/Geo2G4MaterialFactory.h" #include "StoreGate/DataHandle.h" // Geant4 headers diff --git a/TileCalorimeter/TileG4/TileAncillary/MuonWall/CMakeLists.txt b/TileCalorimeter/TileG4/TileAncillary/MuonWall/CMakeLists.txt index 6a2446b7538bf454493e5718ccc2152b2d1ff1e2..4d0606ea4a18ab32aab607fc1544c259cc6dba0a 100644 --- a/TileCalorimeter/TileG4/TileAncillary/MuonWall/CMakeLists.txt +++ b/TileCalorimeter/TileG4/TileAncillary/MuonWall/CMakeLists.txt @@ -16,7 +16,7 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoModel/GeoModelKernel GaudiKernel Simulation/G4Atlas/G4AtlasTools - Simulation/G4Utilities/Geo2G4 + Simulation/G4Utilities/GeoMaterial2G4 TileCalorimeter/TileSimEvent ) # External dependencies: @@ -29,7 +29,7 @@ atlas_add_component( MuonWall src/*.cxx src/components/*.cxx INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier CxxUtils StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib Geo2G4Lib TileSimEvent ) + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier CxxUtils StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib GeoMaterial2G4 TileSimEvent ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/TileCalorimeter/TileG4/TileAncillary/MuonWall/cmt/requirements b/TileCalorimeter/TileG4/TileAncillary/MuonWall/cmt/requirements index a7d68fab48f1135a44ec960536a53c0e79b83df9..1f72de29747576da91174ef30ff666d790e16b99 100755 --- a/TileCalorimeter/TileG4/TileAncillary/MuonWall/cmt/requirements +++ b/TileCalorimeter/TileG4/TileAncillary/MuonWall/cmt/requirements @@ -13,7 +13,7 @@ use GaudiInterface GaudiInterface-* External use Geant4 Geant4-* External use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel use GeoModelKernel GeoModelKernel-* DetectorDescription/GeoModel -use Geo2G4 Geo2G4-* Simulation/G4Utilities +use GeoMaterial2G4 GeoMaterial2G4-* Simulation/G4Utilities use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas use StoreGate StoreGate-* Control use TileSimEvent TileSimEvent-* TileCalorimeter diff --git a/TileCalorimeter/TileG4/TileAncillary/MuonWall/src/MuonWallTool.cxx b/TileCalorimeter/TileG4/TileAncillary/MuonWall/src/MuonWallTool.cxx index 3d823f5b618b2d8127abffb5e79143379e692623..a391d1c40696801ca24a93a8db64cf3f25ba16e2 100644 --- a/TileCalorimeter/TileG4/TileAncillary/MuonWall/src/MuonWallTool.cxx +++ b/TileCalorimeter/TileG4/TileAncillary/MuonWall/src/MuonWallTool.cxx @@ -15,7 +15,7 @@ //Athena headers #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoMaterial.h" -#include "Geo2G4/Geo2G4MaterialFactory.h" +#include "GeoMaterial2G4/Geo2G4MaterialFactory.h" #include "StoreGate/DataHandle.h" // Geant4 headers diff --git a/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/CMakeLists.txt b/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/CMakeLists.txt index 1ca9bc24a93ee4806150eb1bd3f125b6466f3fd3..a41e63804d6e11bb402e46efabdb6f466cd27f3c 100644 --- a/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/CMakeLists.txt +++ b/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/CMakeLists.txt @@ -16,7 +16,7 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoModel/GeoModelKernel GaudiKernel Simulation/G4Atlas/G4AtlasTools - Simulation/G4Utilities/Geo2G4 + Simulation/G4Utilities/GeoMaterial2G4 TileCalorimeter/TileSimEvent ) # External dependencies: @@ -29,7 +29,7 @@ atlas_add_component( PhantomCalorimeter src/*.cc src/components/*.cxx INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier CxxUtils StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib Geo2G4Lib TileSimEvent ) + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier CxxUtils StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib GeoMaterial2G4 TileSimEvent ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/cmt/requirements b/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/cmt/requirements index c0f98bc5fc47cc42510bd365e8059522fa2bf960..08a7e034f303dd97b7a908a46b3e74e3eef606af 100644 --- a/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/cmt/requirements +++ b/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/cmt/requirements @@ -13,7 +13,7 @@ use GaudiInterface GaudiInterface-* External use Geant4 Geant4-* External use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel use GeoModelKernel GeoModelKernel-* DetectorDescription/GeoModel -use Geo2G4 Geo2G4-* Simulation/G4Utilities +use GeoMaterial2G4 GeoMaterial2G4-* Simulation/G4Utilities use G4AtlasTools G4AtlasTools-* Simulation/G4Atlas use StoreGate StoreGate-* Control use TileSimEvent TileSimEvent-* TileCalorimeter diff --git a/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/src/PhantomBarrelTool.cc b/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/src/PhantomBarrelTool.cc index 15e6e2c26e05bf56ad52f5080e5fd91ba6206b4e..ecb6e9e48e7badec435a274d3a625eec153a81b4 100644 --- a/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/src/PhantomBarrelTool.cc +++ b/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/src/PhantomBarrelTool.cc @@ -8,7 +8,7 @@ //Athena headers #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoMaterial.h" -#include "Geo2G4/Geo2G4MaterialFactory.h" +#include "GeoMaterial2G4/Geo2G4MaterialFactory.h" #include "StoreGate/DataHandle.h" // Geant4 headers diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4LookupBuilder.cc b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4LookupBuilder.cc index 3242d99fbf3ea2e0e23790c705e70b27ec2b9fd1..17ea1db8dde3276d4b3109e5155aa5a8675c91d2 100755 --- a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4LookupBuilder.cc +++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4LookupBuilder.cc @@ -22,9 +22,21 @@ #include "TileDetDescr/TileDetDescrManager.h" #include "TileDetDescr/TileDddbManager.h" #include "TileDetDescr/TileCellDim.h" //added by Sergey +#include "CxxUtils/StrFormat.h" #include "G4ios.hh" +namespace { + + +std::string makeCellName (const std::string& prefix, int i) +{ + return prefix + CxxUtils::strformat ("%i", i); +} + + +} // anonymous namespace + TileGeoG4LookupBuilder::TileGeoG4LookupBuilder(StoreGateSvc* pDetStore, const int verboseLevel) : m_tileID(0), m_dbManager(0), @@ -151,8 +163,6 @@ void TileGeoG4LookupBuilder::CreateGeoG4Cells() { std::string cellPrefix; int counter, i; - char* buff = new char[5]; - int nCounter = m_dbManager->GetNumTicl(); if (m_dbManager->GetNumberOfEnv() == 1) { G4cout << "WARNING: CreateGeoG4Cells() - nCells from DB " << nCounter << G4endl; @@ -217,8 +227,7 @@ void TileGeoG4LookupBuilder::CreateGeoG4Cells() { } } - sprintf(buff, "%i", abs(static_cast<int>(m_dbManager->TICLncell()))); - nameCell = cellPrefix + std::string(buff); + nameCell = makeCellName (cellPrefix, abs(static_cast<int>(m_dbManager->TICLncell()))); if (m_cellMap->find(nameCell) != m_cellMap->end()) { G4cout << "ERROR CreateGeoG4Cells() - Attempt to recreate GeoG4Cell with name ---> " << nameCell << G4endl; @@ -294,7 +303,6 @@ void TileGeoG4LookupBuilder::CreateGeoG4Cells() { // Put it there... m_cellMap->operator[](nameCell) = cell; } - delete[] buff; } void TileGeoG4LookupBuilder::CreateGeoG4Sections(bool is_tb) { @@ -318,8 +326,6 @@ void TileGeoG4LookupBuilder::CreateGeoG4Sections(bool is_tb) { std::string cellPrefix; std::string cellName; - char* buff = new char[5]; - int nSections = (is_tb) ? 4 : m_dbManager->GetNumTilb(); if (m_dbManager->GetNumberOfEnv() == 1) nSections = 1; @@ -340,44 +346,38 @@ void TileGeoG4LookupBuilder::CreateGeoG4Sections(bool is_tb) { // SAMPLE A cellPrefix = "Aneg"; for (j = 10; j > 0; j--) { - sprintf(buff, "%i", j); - cellName = cellPrefix + std::string(buff); + cellName = makeCellName (cellPrefix, j); sectionCells.push_back(m_cellMap->operator[](cellName)); } cellPrefix = "Apos"; for (j = 1; j < 11; j++) { - sprintf(buff, "%i", j); - cellName = cellPrefix + std::string(buff); + cellName = makeCellName (cellPrefix, j); sectionCells.push_back(m_cellMap->operator[](cellName)); } //SAMPLE BC cellPrefix = "BCneg"; for (j = 9; j > 0; j--) { - sprintf(buff, "%i", j); - cellName = cellPrefix + std::string(buff); + cellName = makeCellName (cellPrefix, j); sectionCells.push_back(m_cellMap->operator[](cellName)); } cellPrefix = "BCpos"; for (j = 1; j < 10; j++) { - sprintf(buff, "%i", j); - cellName = cellPrefix + std::string(buff); + cellName = makeCellName (cellPrefix, j); sectionCells.push_back(m_cellMap->operator[](cellName)); } //SAMPLE D cellPrefix = "Dneg"; for (j = 3; j > 0; j--) { - sprintf(buff, "%i", j); - cellName = cellPrefix + std::string(buff); + cellName = makeCellName (cellPrefix, j); sectionCells.push_back(m_cellMap->operator[](cellName)); } cellName = "D0"; sectionCells.push_back(m_cellMap->operator[](cellName)); cellPrefix = "Dpos"; for (j = 1; j < 4; j++) { - sprintf(buff, "%i", j); - cellName = cellPrefix + std::string(buff); + cellName = makeCellName (cellPrefix, j); sectionCells.push_back(m_cellMap->operator[](cellName)); } if (m_verboseLevel>5) @@ -389,24 +389,21 @@ void TileGeoG4LookupBuilder::CreateGeoG4Sections(bool is_tb) { // SAMPLE A cellPrefix = "A"; for (j = 12; j < 17; j++) { - sprintf(buff, "%i", j); - cellName = cellPrefix + std::string(buff); + cellName = makeCellName (cellPrefix, j); sectionCells.push_back(m_cellMap->operator[](cellName)); } // SAMPLE B cellPrefix = "B"; for (j = 11; j < 16; j++) { - sprintf(buff, "%i", j); - cellName = cellPrefix + std::string(buff); + cellName = makeCellName (cellPrefix, j); sectionCells.push_back(m_cellMap->operator[](cellName)); } // SAMPLE D cellPrefix = "D"; for (j = 5; j < 7; j++) { - sprintf(buff, "%i", j); - cellName = cellPrefix + std::string(buff); + cellName = makeCellName (cellPrefix, j); sectionCells.push_back(m_cellMap->operator[](cellName)); } if (m_verboseLevel>5) @@ -540,7 +537,6 @@ void TileGeoG4LookupBuilder::CreateGeoG4Sections(bool is_tb) { sectionCells.clear(); } - delete[] buff; } // Filling number of PMT in array for C10 Cells diff --git a/TileCalorimeter/TileSvc/TileSimEventAthenaPool/CMakeLists.txt b/TileCalorimeter/TileSvc/TileSimEventAthenaPool/CMakeLists.txt index 9e710bc8d07f947de62e3606616399d938c887d4..407c708b69c08bfd27c9ba1f848596647755e772 100644 --- a/TileCalorimeter/TileSvc/TileSimEventAthenaPool/CMakeLists.txt +++ b/TileCalorimeter/TileSvc/TileSimEventAthenaPool/CMakeLists.txt @@ -32,7 +32,10 @@ endif() find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) - run_tpcnv_test( TileSimEventTPCnv_HITS HITS.04919495._000416 ) + set( TILESIMEVENTATHENAPOOL_REFERENCE_TAG + TileSimEventAthenaPoolReference-01-00-00 ) + run_tpcnv_test( TileSimEventTPCnv_HITS HITS.04919495._000416 + REFERENCE_TAG ${TILESIMEVENTATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) endif() diff --git a/Tracking/TrkEvent/TrkParametersIdentificationHelpers/TrkParametersIdentificationHelpers/BitField.h b/Tracking/TrkEvent/TrkParametersIdentificationHelpers/TrkParametersIdentificationHelpers/BitField.h index d51bd34fd771968405705c63338d4b7f4d509af5..fa47e3553bb8e1f63a1cf212bb890c0b561cc452 100644 --- a/Tracking/TrkEvent/TrkParametersIdentificationHelpers/TrkParametersIdentificationHelpers/BitField.h +++ b/Tracking/TrkEvent/TrkParametersIdentificationHelpers/TrkParametersIdentificationHelpers/BitField.h @@ -27,42 +27,42 @@ namespace Trk { unsigned int decode( T id ) const; private: - unsigned int offset; /// position of the first bit manipulated by the BitField - unsigned int bits; /// number of bits that the BitField is allowed to manipulate - unsigned int maxValue; /// maximum allow value - unsigned int mask; /// bit mask for the allowed range + unsigned int m_offset; /// position of the first bit manipulated by the BitField + unsigned int m_bits; /// number of m_bits that the BitField is allowed to manipulate + unsigned int m_maxValue; /// maximum allow value + unsigned int m_mask; /// bit m_mask for the allowed range }; template< class T> bool BitField<T>::encode( unsigned int value, T& id ) const { // check that the value is in range - if( value >= maxValue ) return false; + if( value >= m_maxValue ) return false; - // clear bits - id &= ~mask; + // clear m_bits + id &= ~m_mask; - // set bits - id |= (value<<offset); + // set m_bits + id |= (value<<m_offset); return true; } template< class T> unsigned int BitField<T>::decode( T id ) const { - // apply mask and shift with offset - return (id & mask) >> offset; + // apply m_mask and shift with m_offset + return (id & m_mask) >> m_offset; } template< class T> - BitField<T>::BitField( unsigned int offset_,unsigned int bits_ ) : offset(offset_),bits(bits_) { - // calculate mask - mask = 0; - for( unsigned int bit = offset; bit < offset + bits; ++bit ) { - mask |= (1<<bit); + BitField<T>::BitField( unsigned int offset_,unsigned int bits_ ) : m_offset(offset_),m_bits(bits_) { + // calculate m_mask + m_mask = 0; + for( unsigned int bit = m_offset; bit < m_offset + m_bits; ++bit ) { + m_mask |= (1<<bit); } - // silly way of calculating 2^bits - maxValue = 1; - for( unsigned int i=0;i<bits;++i ) maxValue *= 2; + // silly way of calculating 2^m_bits + m_maxValue = 1; + for( unsigned int i=0;i<m_bits;++i ) m_maxValue *= 2; } } diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/CMakeLists.txt b/Tracking/TrkEventCnv/TrkEventAthenaPool/CMakeLists.txt index 43fd9df07c5626726cd5cb990834573b3169fe91..16eb16dc042d59b5c0268b3611a2167803ba774f 100644 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/CMakeLists.txt +++ b/Tracking/TrkEventCnv/TrkEventAthenaPool/CMakeLists.txt @@ -51,12 +51,20 @@ endif() find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) - run_tpcnv_test( TrkEventTPCnv_14.5.0 AOD-14.5.0-full ) - run_tpcnv_test( TrkEventTPCnv_15.6.7 AOD-15.6.7-full ) - run_tpcnv_test( TrkEventTPCnv_16.6.2.1 AOD-16.6.2.1-full ) - run_tpcnv_test( TrkEventTPCnv_17.2.8 AOD-17.2.8-full ) - run_tpcnv_test( TrkEventTPCnv_18.0.0 AOD-18.0.0-full ) - run_tpcnv_test( TrkEventTPCnv_20.1.7.2 ESD-20.1.7.2 ) + set( TRKEVENTATHENAPOOL_REFERENCE_TAG + TrkEventAthenaPoolReference-01-00-00 ) + run_tpcnv_test( TrkEventTPCnv_14.5.0 AOD-14.5.0-full + REFERENCE_TAG ${TRKEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( TrkEventTPCnv_15.6.7 AOD-15.6.7-full + REFERENCE_TAG ${TRKEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( TrkEventTPCnv_16.6.2.1 AOD-16.6.2.1-full + REFERENCE_TAG ${TRKEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( TrkEventTPCnv_17.2.8 AOD-17.2.8-full + REFERENCE_TAG ${TRKEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( TrkEventTPCnv_18.0.0 AOD-18.0.0-full + REFERENCE_TAG ${TRKEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( TrkEventTPCnv_20.1.7.2 ESD-20.1.7.2 + REFERENCE_TAG ${TRKEVENTATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) endif() diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_14.5.0.ref b/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_14.5.0.ref deleted file mode 100644 index 5229c6e8608e593577b697f30260c6794f26a1f1..0000000000000000000000000000000000000000 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_14.5.0.ref +++ /dev/null @@ -1,814 +0,0 @@ -Mon Apr 18 21:58:44 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "TrkEventAthenaPool/TrkEventTPCnv_14.5.0_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 9.98 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 22:00:07 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSig_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigHypoContainer_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigHypo_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigElemStore_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigHypoKine_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigObjContainer_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MissingETSigObject_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p1 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 2964F1C3-FA2D-AD05-7A1B-CB209A81EF43 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root File version:51800 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 2964F1C3-FA2D-AD05-7A1B-CB209A81EF43 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] AE38AD8D-0090-DD11-9EFF-000423D6460E -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root File version:51800 -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Found 6 metadata containers in input file, 0 will be used -IOVDbSvc INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found. -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_14.5.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_14.5.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_14.5.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_14.5.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_14.5.0-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_14.5.0-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-00 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-02-01-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-00, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2676 64.1319 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7032 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.506 136.131 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 13460Kb Time = 0.4S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-DC3-07 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-DC3-07, Name: DC3, Layout: Final, Code Version: 3.06.00, Description: DC3 Geometry -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 13312Kb Time = 0.27S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-R13-02 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x2452220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-R13-02, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 22200Kb Time = 0.29S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.06S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-02-01-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-02-01-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-02-01-00> default MuonVersion is <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.01.Initial> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.01.Initial> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-02-01-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ASZT table in Oracle -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 21 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 4 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 215 -MuGM:ProcPosition INFO *** N. of stations described in mysql 220 -MuGM:ProcPosition INFO *** N. of types 28 size of jtypvec 28 -MuGM:ProcPosition INFO *** : 220 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1678 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-02-01-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.01.Initial -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1678 child volumes -MuGM:MuonFactory INFO *** 1670 independent elements and -MuGM:MuonFactory INFO *** 11928 elements cloned or shared -MuGM:MuonFactory INFO *** 215 kinds of stations -MuGM:MuonFactory INFO *** 1678 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1678 MuonStations -MuGM:MuonFactory INFO *** 2168 MDT Readout Elements 1108 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1678 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1678/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 19424Kb Time = 1.48S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 0Kb Time = 0S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 15710 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] AE38AD8D-0090-DD11-9EFF-000423D6460E -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] AE38AD8D-0090-DD11-9EFF-000423D6460E -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root File version:51800 -PoolSvc INFO Failed to find container POOLContainer(DataHeader) to create POOL collection. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 5200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-CSC-00-01-00 set from input file -IOVDbSvc INFO TagInfo override for tag TrtStrawStatusPerm-02_test in folder /TRT/Cond/StatusPermanent -ClassIDSvc INFO getRegistryEntries: read 739 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_14.5.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_14.5.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-CSC-00-01-00 resolved to InDetAlign_CSC_02 for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-CSC-00-01-00 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-CSC-00-01-00 resolved to InDetPixelDist-nominal for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_14.5.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_14.5.0-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-CSC-00-01-00 resolved to TRTAlign_CSC_01 for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-CSC-00-01-00 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-CSC-00-01-00 resolved to TrtStrawStatus-02 for folder /TRT/Cond/Status -IOVDbSvc INFO HVS tag OFLCOND-CSC-00-01-00 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -GeoModelSvc WARNING *** *** Geometry configured through jobOptions does not match TagInfo tags! *** *** -GeoModelSvc INFO ** Job Option configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-02-01-00 -GeoModelSvc INFO * InDet tag: -GeoModelSvc INFO * Pixel tag: -GeoModelSvc INFO * SCT tag: -GeoModelSvc INFO * TRT tag: -GeoModelSvc INFO * LAr tag: -GeoModelSvc INFO * Tile tag: -GeoModelSvc INFO * Muon tag: -GeoModelSvc INFO * Calo tag: -GeoModelSvc INFO * MagField tag: -GeoModelSvc INFO * CavernInfra tag: -GeoModelSvc INFO * ForwardDetectors tag: -GeoModelSvc INFO ** TAG INFO configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-CSC-01-02-00 -AthenaEventLoopMgr INFO ===>>> start processing event #1388, run #5200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -VxContainerCnv INFO VxContainerCnv::initialize() - INFO MVFVxContainerCnv::initialize() -VxContainerCnv INFO VxContainerCnv: MVFVxCandidate converter=0x3667ac00 -ClassIDSvc INFO getRegistryEntries: read 60 CLIDRegistry entries for module ALL -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 569 CLIDRegistry entries for module ALL -TrackCollectionCnvVERBOSE TrackCollectionCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 2663 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 111 CLIDRegistry entries for module ALL -SegmentCollecti... INFO SegmentCollectionCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 3 CLIDRegistry entries for module ALL -V0ContainerCnv INFO V0ContainerCnv::initialize() -AthenaEventLoopMgr INFO ===>>> done processing event #1388, run #5200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #1390, run #5200 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #1390, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #1391, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #1391, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #1392, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #1392, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #1394, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #1394, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #1397, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #1397, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #1398, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #1398, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #1399, run #5200 7 events processed so far <<<=== -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c100d8000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c100d8000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c10880000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c10880000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c110d8000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c110d8000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c11880000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c11880000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c120d8000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c120d8000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c12880000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c12880000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c13880000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c13880000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c130d0000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c130d0000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c100d8000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c100d8000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c10880000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c10880000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c110d8000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c110d8000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c11880000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c11880000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c120d8000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c120d8000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c12880000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c12880000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c130d0000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c130d0000000000/4294967295 -ToolSvc.MuonEve... ERROR Apparently could not find detector element for 0x7c13880000000000 -SegmentCollecti...WARNING Unable to reset DetEl for this RIO_OnTrack, probably because of a problem with the Identifier/IdentifierHash : (0x7c13880000000000/4294967295 -AthenaEventLoopMgr INFO ===>>> done processing event #1399, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #1402, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #1402, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #1404, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #1404, run #5200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-14.5.0/AOD-14.5.0-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] AE38AD8D-0090-DD11-9EFF-000423D6460E -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.14 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.05 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/179 (( 0.07 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.07 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.04 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6370 (( 0.05 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.04 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.02 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Total payload read from COOL: 30487 bytes in (( 0.48 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 0.26 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 0.22 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 0 [us] #= 1 -ChronoStatSvc INFO Time User : Tot= 40.7 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_15.6.7.ref b/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_15.6.7.ref deleted file mode 100644 index 8d9c54702900dea30ae5db6ea3092105755ef2f8..0000000000000000000000000000000000000000 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_15.6.7.ref +++ /dev/null @@ -1,762 +0,0 @@ -Mon Apr 18 22:26:36 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "TrkEventAthenaPool/TrkEventTPCnv_15.6.7_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 16.89 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 22:28:00 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p1 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 7AEFFC67-F98B-0DB6-148A-7DAFB1452C56 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root File version:52200 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 7AEFFC67-F98B-0DB6-148A-7DAFB1452C56 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 78299BCB-231B-DF11-9A5B-003048673400 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root File version:52200 -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Folder /TagInfo will be taken from file metadata -IOVDbSvc INFO Found 15 metadata containers in input file, 1 will be used -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_15.6.7-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_15.6.7-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_15.6.7-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_15.6.7-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -IOVDbSvc INFO Added taginfo remove for /TagInfo -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_15.6.7-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_15.6.7-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-00 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-02-01-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-00, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2676 64.1319 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7032 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.506 136.131 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 14484Kb Time = 0.42S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-DC3-07 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-DC3-07, Name: DC3, Layout: Final, Code Version: 3.06.00, Description: DC3 Geometry -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 14336Kb Time = 0.24S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-R13-02 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x19a4220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-R13-02, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 22200Kb Time = 0.29S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.05S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-02-01-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-02-01-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-02-01-00> default MuonVersion is <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.01.Initial> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.01.Initial> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-02-01-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ASZT table in Oracle -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 21 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 4 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 215 -MuGM:ProcPosition INFO *** N. of stations described in mysql 220 -MuGM:ProcPosition INFO *** N. of types 28 size of jtypvec 28 -MuGM:ProcPosition INFO *** : 220 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1678 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-02-01-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.01.Initial -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1678 child volumes -MuGM:MuonFactory INFO *** 1670 independent elements and -MuGM:MuonFactory INFO *** 11928 elements cloned or shared -MuGM:MuonFactory INFO *** 215 kinds of stations -MuGM:MuonFactory INFO *** 1678 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1678 MuonStations -MuGM:MuonFactory INFO *** 2168 MDT Readout Elements 1108 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1678 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1678/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 18400Kb Time = 1.47S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 1024Kb Time = 0S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16172 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 78299BCB-231B-DF11-9A5B-003048673400 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 78299BCB-231B-DF11-9A5B-003048673400 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root File version:52200 -PoolSvc INFO Failed to find container POOLContainer(DataHeader) to create POOL collection. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -ClassIDSvc INFO getRegistryEntries: read 703 CLIDRegistry entries for module ALL -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 5200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-SIM-00-00-00 set from input file -IOVDbSvc INFO TagInfo override for tag TrtStrawStatus-02 in folder /TRT/Cond/Status -IOVDbSvc INFO TagInfo override for tag TrtStrawStatusPerm-02_test in folder /TRT/Cond/StatusPermanent -ClassIDSvc INFO getRegistryEntries: read 36 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_15.6.7-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_15.6.7-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetAlign_CSC_02 for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_15.6.7-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_15.6.7-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTAlign_CSC_01 for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-SIM-00-00-00 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -AthenaEventLoopMgr INFO ===>>> start processing event #30002, run #5200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -VxContainerCnv INFO VxContainerCnv::initialize() - INFO MVFVxContainerCnv::initialize() -VxContainerCnv INFO VxContainerCnv: MVFVxCandidate converter=0x35f50680 -ClassIDSvc INFO getRegistryEntries: read 50 CLIDRegistry entries for module ALL -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 569 CLIDRegistry entries for module ALL -TrackCollectionCnvVERBOSE TrackCollectionCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 2645 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 32 CLIDRegistry entries for module ALL -SegmentCollecti... INFO SegmentCollectionCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 82 CLIDRegistry entries for module ALL -V0ContainerCnv INFO V0ContainerCnv::initialize() -AthenaEventLoopMgr INFO ===>>> done processing event #30002, run #5200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0021.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 9CD5F769-7DFF-DA11-9E2E-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0027.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 14138A63-183C-DB11-9249-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #30004, run #5200 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30004, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30009, run #5200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30009, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30010, run #5200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30010, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30012, run #5200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30012, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30013, run #5200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30013, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30014, run #5200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30014, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30018, run #5200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30018, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30020, run #5200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30020, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #30022, run #5200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #30022, run #5200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-15.6.7/AOD-15.6.7-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 78299BCB-231B-DF11-9A5B-003048673400 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.09 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.04 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.04 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.06 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.04 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6370 (( 0.02 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.03 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.04 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Folder /TagInfo (AttrListColl) db-read 0/2 objs/chan/bytes 2/0/0 (( 0.00 ))s -IOVDbSvc INFO Total payload read from COOL: 30482 bytes in (( 0.36 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 0.17 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 0.19 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 0 [us] #= 1 -ChronoStatSvc INFO Time User : Tot= 45.1 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_16.6.2.1.ref b/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_16.6.2.1.ref deleted file mode 100644 index bfdbae24c7f9d05746aee7b6d6a51e05c62bfa58..0000000000000000000000000000000000000000 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_16.6.2.1.ref +++ /dev/null @@ -1,777 +0,0 @@ -Mon Apr 18 22:11:23 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "TrkEventAthenaPool/TrkEventTPCnv_16.6.2.1_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 2.85 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 22:12:55 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p2 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p2 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 8DA8E655-F20C-BF4A-F9C1-4DA03306904E -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root File version:52600 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 8DA8E655-F20C-BF4A-F9C1-4DA03306904E -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 48D7B5A4-1E0D-E011-B6D0-003048F0E778 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root File version:52600 -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Folder /TagInfo will be taken from file metadata -IOVDbSvc INFO Found 15 metadata containers in input file, 1 will be used -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -IOVDbSvc INFO Added taginfo remove for /TagInfo -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-00 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-02-01-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-00, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2676 64.1319 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7032 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.506 136.131 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 14484Kb Time = 0.42S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-DC3-07 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-DC3-07, Name: DC3, Layout: Final, Code Version: 3.06.00, Description: DC3 Geometry -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 13312Kb Time = 0.26S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-R13-02 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x2000220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-R13-02, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 22200Kb Time = 0.28S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.05S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-02-01-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-02-01-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-02-01-00> default MuonVersion is <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.01.Initial> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.01.Initial> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-02-01-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ASZT table in Oracle -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 21 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 4 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 215 -MuGM:ProcPosition INFO *** N. of stations described in mysql 220 -MuGM:ProcPosition INFO *** N. of types 28 size of jtypvec 28 -MuGM:ProcPosition INFO *** : 220 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1678 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-02-01-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.01.Initial -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1678 child volumes -MuGM:MuonFactory INFO *** 1670 independent elements and -MuGM:MuonFactory INFO *** 11928 elements cloned or shared -MuGM:MuonFactory INFO *** 215 kinds of stations -MuGM:MuonFactory INFO *** 1678 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1678 MuonStations -MuGM:MuonFactory INFO *** 2168 MDT Readout Elements 1108 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1678 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1678/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 19424Kb Time = 1.37S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 0Kb Time = 0.01S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16160 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 48D7B5A4-1E0D-E011-B6D0-003048F0E778 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 48D7B5A4-1E0D-E011-B6D0-003048F0E778 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root File version:52600 -PoolSvc INFO Failed to find container POOLContainer(DataHeader) to create POOL collection. -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root" -ImplicitCollection Info and a name "POOLContainer_DataHeader" -ClassIDSvc INFO getRegistryEntries: read 703 CLIDRegistry entries for module ALL -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -PoolSvc INFO Failed to find container MetaDataHdr(DataHeader) to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 105200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-DR-BS7T-ANom-11 set from input file -ClassIDSvc INFO getRegistryEntries: read 36 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to InDetAlign_Nominal for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_16.6.2.1-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TRTAlign_Nominal for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusTemporaryEmpty for folder /TRT/Cond/Status -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusPermanentAllBoardsBarrelIndividual for folder /TRT/Cond/StatusPermanent -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 8E91164C-1E3C-DB11-8CAB-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -GeoModelSvc WARNING *** *** Geometry configured through jobOptions does not match TagInfo tags! *** *** -GeoModelSvc INFO ** Job Option configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-02-01-00 -GeoModelSvc INFO * InDet tag: -GeoModelSvc INFO * Pixel tag: -GeoModelSvc INFO * SCT tag: -GeoModelSvc INFO * TRT tag: -GeoModelSvc INFO * LAr tag: -GeoModelSvc INFO * Tile tag: -GeoModelSvc INFO * Muon tag: -GeoModelSvc INFO * Calo tag: -GeoModelSvc INFO * MagField tag: -GeoModelSvc INFO * CavernInfra tag: -GeoModelSvc INFO * ForwardDetectors tag: -GeoModelSvc INFO ** TAG INFO configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-10-00-00 -AthenaEventLoopMgr INFO ===>>> start processing event #1, run #105200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -VxContainerCnv INFO VxContainerCnv::initialize() - INFO MVFVxContainerCnv::initialize() -VxContainerCnv INFO VxContainerCnv: MVFVxCandidate converter=0x36570680 -ClassIDSvc INFO getRegistryEntries: read 50 CLIDRegistry entries for module ALL -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 569 CLIDRegistry entries for module ALL -TrackCollectionCnvVERBOSE TrackCollectionCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 2645 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 111 CLIDRegistry entries for module ALL -SegmentCollecti... INFO SegmentCollectionCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 3 CLIDRegistry entries for module ALL -V0ContainerCnv INFO V0ContainerCnv::initialize() -AthenaEventLoopMgr INFO ===>>> done processing event #1, run #105200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 8E91164C-1E3C-DB11-8CAB-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #2, run #105200 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #2, run #105200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #3, run #105200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #3, run #105200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #4, run #105200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #4, run #105200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #5, run #105200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #5, run #105200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #6, run #105200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #6, run #105200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #7, run #105200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #7, run #105200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #8, run #105200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #8, run #105200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #9, run #105200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #9, run #105200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #10, run #105200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #10, run #105200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-16.6.2.1/AOD-16.6.2.1-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 48D7B5A4-1E0D-E011-B6D0-003048F0E778 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.10 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.03 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.03 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.06 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.03 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 36/36/6732 (( 0.03 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.04 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.03 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Folder /TagInfo (AttrListColl) db-read 0/2 objs/chan/bytes 2/0/0 (( 0.00 ))s -IOVDbSvc INFO Total payload read from COOL: 30844 bytes in (( 0.35 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 0.15 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 0.20 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 0 [us] #= 1 -ChronoStatSvc INFO Time User : Tot= 51 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_17.2.8.ref b/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_17.2.8.ref deleted file mode 100644 index b5d40e77633bb2055eb7f98885fff8c7e90d1cd1..0000000000000000000000000000000000000000 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_17.2.8.ref +++ /dev/null @@ -1,769 +0,0 @@ -Mon Apr 18 22:11:23 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "TrkEventAthenaPool/TrkEventTPCnv_17.2.8_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 2.86 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 22:12:59 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p2 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 9D196C2B-7B55-C009-844D-5714DF920A79 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root File version:53005 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 9D196C2B-7B55-C009-844D-5714DF920A79 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 28DA6945-4CE8-E011-A394-003048F0E7AE -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root File version:53005 -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root" -ImplicitCollection Info and a name "POOLContainer(DataHeader)" -PoolSvc INFO Failed to find container MetaDataHdrDataHeader to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Folder /TagInfo will be taken from file metadata -IOVDbSvc INFO Found 15 metadata containers in input file, 1 will be used -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_17.2.8-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_17.2.8-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_17.2.8-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_17.2.8-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -IOVDbSvc INFO Added taginfo remove for /TagInfo -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_17.2.8-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_17.2.8-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-00 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-02-01-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-00, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2676 64.1319 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7032 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.506 136.131 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 14484Kb Time = 0.43S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-DC3-07 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-DC3-07, Name: DC3, Layout: Final, Code Version: 3.06.00, Description: DC3 Geometry -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 14336Kb Time = 0.27S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-02-01-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-R13-02 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x1ab8220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-R13-02, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 21176Kb Time = 0.27S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.07S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-02-01-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-02-01-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-02-01-00> default MuonVersion is <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.01.Initial> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.01.Initial> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.01.Initial from DB MuonVersion <MuonSpectrometer-R.03.01.Initial.Light.BML.S13.Patch> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-02-01-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ASZT table in Oracle -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 21 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 4 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 215 -MuGM:ProcPosition INFO *** N. of stations described in mysql 220 -MuGM:ProcPosition INFO *** N. of types 28 size of jtypvec 28 -MuGM:ProcPosition INFO *** : 220 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1678 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-02-01-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.01.Initial -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1678 child volumes -MuGM:MuonFactory INFO *** 1670 independent elements and -MuGM:MuonFactory INFO *** 11928 elements cloned or shared -MuGM:MuonFactory INFO *** 215 kinds of stations -MuGM:MuonFactory INFO *** 1678 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1678 MuonStations -MuGM:MuonFactory INFO *** 2168 MDT Readout Elements 1108 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1678 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1678/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 22496Kb Time = 1.48S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 0Kb Time = 0S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 16977 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 28DA6945-4CE8-E011-A394-003048F0E7AE -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 28DA6945-4CE8-E011-A394-003048F0E7AE -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root File version:53005 -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root" -ImplicitCollection Info and a name "POOLContainer(DataHeader)" -ClassIDSvc INFO getRegistryEntries: read 703 CLIDRegistry entries for module ALL -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdrDataHeader to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 105200 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-DR-BS7T-ANom-11 set from input file -ClassIDSvc INFO getRegistryEntries: read 36 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_17.2.8-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_17.2.8-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to InDetAlign_Nominal for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to InDetPixelDist-000-00 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_17.2.8-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_17.2.8-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TRTAlign_Nominal for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusTemporaryEmpty for folder /TRT/Cond/Status -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO HVS tag OFLCOND-DR-BS7T-ANom-11 resolved to TrtStrawStatusPermanentAllBoardsBarrelIndividual for folder /TRT/Cond/StatusPermanent -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 8E91164C-1E3C-DB11-8CAB-00132046AB63 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root File version:51000 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -GeoModelSvc WARNING *** *** Geometry configured through jobOptions does not match TagInfo tags! *** *** -GeoModelSvc INFO ** Job Option configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-02-01-00 -GeoModelSvc INFO * InDet tag: -GeoModelSvc INFO * Pixel tag: -GeoModelSvc INFO * SCT tag: -GeoModelSvc INFO * TRT tag: -GeoModelSvc INFO * LAr tag: -GeoModelSvc INFO * Tile tag: -GeoModelSvc INFO * Muon tag: -GeoModelSvc INFO * Calo tag: -GeoModelSvc INFO * MagField tag: -GeoModelSvc INFO * CavernInfra tag: -GeoModelSvc INFO * ForwardDetectors tag: -GeoModelSvc INFO ** TAG INFO configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-10-00-00 -AthenaEventLoopMgr INFO ===>>> start processing event #1, run #105200 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 140 CLIDRegistry entries for module ALL -VxContainerCnv INFO VxContainerCnv::initialize() - INFO MVFVxContainerCnv::initialize() -VxContainerCnv INFO VxContainerCnv: MVFVxCandidate converter=0x36265180 -ClassIDSvc INFO getRegistryEntries: read 50 CLIDRegistry entries for module ALL -TrackParticleCo... INFO TrackParticleContainerCnv::initialize() -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 564 CLIDRegistry entries for module ALL -TrackCollectionCnvVERBOSE TrackCollectionCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 2645 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 111 CLIDRegistry entries for module ALL -SegmentCollecti... INFO SegmentCollectionCnv::initialize() -AthenaEventLoopMgr INFO ===>>> done processing event #1, run #105200 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0028.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 8E91164C-1E3C-DB11-8CAB-00132046AB63 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #2, run #105200 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #2, run #105200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #3, run #105200 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #3, run #105200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #4, run #105200 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #4, run #105200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #5, run #105200 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #5, run #105200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #6, run #105200 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #6, run #105200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #7, run #105200 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #7, run #105200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #8, run #105200 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #8, run #105200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #9, run #105200 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #9, run #105200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #10, run #105200 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #10, run #105200 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/aod/AOD-17.2.8/AOD-17.2.8-full.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 28DA6945-4CE8-E011-A394-003048F0E7AE -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.08 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.03 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.03 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.06 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.03 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 36/36/6732 (( 0.03 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.04 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6545 (( 0.03 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Folder /TagInfo (AttrListColl) db-read 0/2 objs/chan/bytes 2/0/0 (( 0.00 ))s -IOVDbSvc INFO Total payload read from COOL: 30844 bytes in (( 0.33 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 0.15 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 0.19 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 0 [us] #= 1 -ChronoStatSvc INFO Time User : Tot= 49.7 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_20.1.7.2.ref b/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_20.1.7.2.ref deleted file mode 100644 index 42d12d715781958874922d33d030dd60b11b808e..0000000000000000000000000000000000000000 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/share/TrkEventTPCnv_20.1.7.2.ref +++ /dev/null @@ -1,764 +0,0 @@ -Mon Apr 18 21:58:44 CEST 2016 -Preloading tcmalloc_minimal.so -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AtlasOffline-21.0.0] [x86_64-slc6-gcc49-dbg] [21.X.Y-VAL/rel_1] -- built on [2016-04-17 22:40] -Py:Athena INFO including file "AthenaCommon/Bootstrap.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" -Py:Athena INFO including file "TrkEventAthenaPool/TrkEventTPCnv_20.1.7.2_test.py" -Py:Athena INFO including file "AthenaPoolUtilities/TPCnvTest.py" -Py:ConfigurableDb INFO Read module info for 4949 configurables from 10 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 10 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -D3PD__TrigConfMetadataTool: TriggerD3PDMaker.TriggerD3PDMakerConf - ['TrigCostD3PDMaker.TrigCostD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! -Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -EventInfoMgtInit: Got release version AtlasOffline-rel_1 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Data source lookup using /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/XML/AtlasAuthentication/dblookup.xml file -loading ISF_Geant4Tools -Py:ConfiguredFactory INFO imported 105 confDb modules in 10.02 seconds -SetGeometryVersion.py obtained major release version 21 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v3r4) - running on lxplus067.cern.ch on Mon Apr 18 22:00:07 2016 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level=0 -StatusCodeSvc INFO initialize -JobIDSvc INFO Initializing JobIDSvc - package version AthenaServices-01-60-08 -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO Initializing ClassIDSvc - package version CLIDComps-00-06-19 -ClassIDSvc INFO getRegistryEntries: read 4912 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -DetectorStore INFO Initializing DetectorStore - package version StoreGate-03-06-37 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-01-60-08 -InputMetaDataStore INFO Initializing InputMetaDataStore - package version StoreGate-03-06-37 -MetaDataStore INFO Initializing MetaDataStore - package version StoreGate-03-06-37 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-28-18 -PoolSvc INFO Initializing PoolSvc - package version PoolSvc-00-25-02 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://aiatlas036.cern.ch:8000/atlr)(serverurl=http://aiatlas034.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli02.in2p3.fr:23128/ccin2p3-AtlasFrontier)(serverurl=http://ccsqfatlasli01.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca18.cern.ch:3128)(proxyurl=http://ca17.cern.ch:3128)(proxyurl=http://atlast0fsquid.cern.ch:3128)(proxyurl=http://atlassquid1.cern.ch:3128)(proxyurl=http://atlassquid2.cern.ch:3128)(proxyurl=http://atlassquid4.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus067.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Re-initializing PoolSvc -PoolSvc INFO Resolved path (via DATAPATH) is /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasCore/rel_1/InstallArea/share/poolcond/PoolCat_oflcond.xml -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_oflcond.xml -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info Xerces-c initialization Number 0 -XMLFileCatalog Info Connecting to the catalog -XMLFileCatalog Info Connecting to the catalog -PoolXMLFileCatalog Info File PoolFileCatalog.xml does not exist, a new one is created -PoolXMLFileCatalog Info Read-only filesystem -PoolXMLFileCatalog Info Read-only filesystem -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-19-10 -TagMetaDataStore INFO Initializing TagMetaDataStore - package version StoreGate-03-06-37 -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root in mode: READ -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p2 is available -TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root opened -PoolSvc INFO File is not in Catalog! Attempt to open it anyway. -PoolSvc INFO Failed to open container to check POOL collection - trying. -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 61EF9A6E-73FC-5F4B-F284-1F9FB2DD4FE6 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root File version:53425 -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 61EF9A6E-73FC-5F4B-F284-1F9FB2DD4FE6 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] B844C45F-3B55-3444-8A2D-5093FBECF354 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root File version:53425 -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root" -ImplicitCollection Info and a name "POOLContainer(DataHeader)" -PoolSvc INFO Failed to find container MetaDataHdrDataHeader to get Token. -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -AthenaPoolAddre... INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-19-10 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Read from meta data only for folder /TagInfo -IOVDbSvc INFO Initialised with 3 connections and 9 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-02-07 -IOVDbSvc INFO Folder /TagInfo will be taken from file metadata -IOVDbSvc INFO Found 15 metadata containers in input file, 1 will be used -StoreGateSvc INFO Initializing StoreGateSvc - package version StoreGate-03-06-37 -ConditionStore INFO Initializing ConditionStore - package version StoreGate-03-06-37 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -CoralApplication Info Create a cool::CoralApplication... -CoralApplication Info Create a new own CORAL connection service -CoralApplication Info Create the COOL database service -RalDatabaseSvc Info Instantiate the RalDatabaseSvc -CoralApplication Info Create a cool::CoralApplication... DONE -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP -CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0 -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_20.1.7.2-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_20.1.7.2-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_20.1.7.2-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_20.1.7.2-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#4.s#1) will be ended on connectionID=C#4 -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -IOVDbSvc INFO Added taginfo remove for /TagInfo -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for STGCIDHELPER with CLID 4174 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MMIDHELPER with CLID 4175 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -ToolSvc.MGM_Ali... INFO Initilalizing -ToolSvc.MGM_Ali... INFO In initialize ---- # of folders registered is 0 -ToolSvc.MGM_Ali... INFO A Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO B Lines container recorded in the detector store -ToolSvc.MGM_Ali... INFO As-Built container recorded in the detector store -ToolSvc.MGM_Ali... INFO I-Lines container recorded in the detector store or skipped since not needed -ToolSvc.MGM_Ali... INFO proxy for class ALineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class BLineParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -ToolSvc.MGM_Ali... INFO proxy for class CscInternalAlignmentMapContainer found or not needed -ToolSvc.MGM_Ali... INFO proxy transient Address found or not needed -ToolSvc.MGM_Ali... INFO proxy for class MdtAsBuiltParContainer found -ToolSvc.MGM_Ali... INFO proxy transient Address found -GeoModelSvc INFO Retrieved DetectorTools = PrivateToolHandleArray(['PixelDetectorTool/PixelDetectorTool','SCT_DetectorTool/SCT_DetectorTool','TRT_DetectorTool/TRT_DetectorTool','InDetServMatTool/InDetServMatTool','MuonDetectorTool/MuonDetectorTool','BeamPipeDetectorTool/BeamPipeDetectorTool']) -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_20.1.7.2-x86_64-slc6-gcc49-dbg/geomDB is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_20.1.7.2-x86_64-slc6-gcc49-dbg/geomDB is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode -GeoModelSvc.Pix... INFO Building Pixel Detector with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -GeoModelSvc.Pix... INFO Pixel Version: Pixel-GEO-02 Package Version: PixelGeoModel-00-09-56 -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -PixelIDDetDescrCnv INFO in createObj: creating a PixelID helper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: destaged_layout -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-00 file IdDictParser/IdDictForwardDetectors.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version default DetDescr tag InDetIdentifier-05 file IdDictParser/IdDictInnerDetector.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.01 DetDescr tag MuonIdentifier-02 file IdDictParser/IdDictMuonSpectrometer_R.01.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -PixelID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 min/max 2 13 values 2 4 5 7 10 11 12 13 indexes 0 0 1 2 0 3 0 0 4 5 6 7 indices 8 prev 0 next 0 mode enumerated cont mode none -pixel 1 1:3 3 e7ffffffffffffff 59 2 3 min/max 1 3 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -bec 1 -2,0,2 3 f9ffffffffffffff 57 2 5 min/max -2 2 values -2 0 2 indexes 0 0 1 0 2 indices 3 prev 0 next 0 mode enumerated cont mode none -bec_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -lay_disk 0 0:2 3 fe7fffffffffffff 55 2 7 min/max 0 2 values indexes indices 3 prev 0 next 0 mode both_bounded cont mode none -lay_disk_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_mod 0 0:51 3f ff81ffffffffffff 49 6 9 min/max 0 51 values indexes indices 52 prev 0 next 0 mode both_bounded cont mode none -phi_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -eta_mod 1 -6:6 f fffe1fffffffffff 45 4 15 min/max -6 6 values indexes indices 13 prev 0 next 0 mode both_bounded cont mode none -eta_mod_shift 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -phi_index 0 0:327 1ff ffffe00fffffffff 36 9 19 min/max 0 327 values indexes indices 328 prev 0 next 0 mode both_bounded cont mode none -eta_index 0 0:191 ff fffffff00fffffff 28 8 28 min/max 0 191 values indexes indices 192 prev 0 next 0 mode both_bounded cont mode none -bec_eta_mod 0 0 0 0 0 0 0 min/max 0 0 values indexes indices 0 prev 0 next 0 mode both_bounded cont mode none -PixelID::initLevelsFromDict - found levels -subdet 0 -part 1 -barrel_endcap 2 -layer or disk 3 -phi_module 4 -eta_module 5 -phi_index 6 -eta_index 7 -InDetGeometryDBSvc INFO GeometryDBSvc Initialized -ToolSvc.InDetDD... INFO BCMBuilder initialize() successful in ToolSvc.InDetDD::BCM_Builder -GeoModelSvc.Pix... INFO BCM_GeoModel tool retrieved: BCM_Tool = PublicToolHandle('InDetDD::BCM_Builder/InDetDD::BCM_Builder') -ToolSvc.InDetDD... INFO BLMBuilder initialize() successful in ToolSvc.InDetDD::BLM_Builder -GeoModelSvc.Pix... INFO BLM_GeoModel tool retrieved: BLM_Tool = PublicToolHandle('InDetDD::BLM_Builder/InDetDD::BLM_Builder') -GeoModelSvc.Pix... INFO Service builder tool not specified. -PixelGeoModel INFO Retrieving Record Sets from database ... -PixelGeoModel INFO Key = ATLAS-GEO-10-00-00 Node = ATLAS -PixelGeoModel INFO ... Record Sets retrieved. -PixelGeoModel INFO DBM switch = SetDBMFlag: 0 -PixelGeoModel INFO Building Pixel Detector -PixelGeoModel INFO Version: Pixel-GEO-02, Name: DC3, Layout: Final, Code Version: 5.01.00, Description: DC3 Geometry -GEOPIXELSERVICES pixel : 40 245 // 3460 -GEOPIXELSERVICES barrel : 42 245 // -460 460 -GEOPIXELSERVICES endcap : 82 175 // 484 670 -PixelGeoModel INFO *** LAYER 0 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 0 in/out radius 46.2723 64.1329 -PixelGeoModel INFO *** LAYER 1 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 1 in/out radius 83.7078 102.132 -PixelGeoModel INFO *** LAYER 2 planar/3D modules : 0 0 -PixelGeoModel INFO Layer 2 in/out radius 117.51 136.132 -ToolSvc.InDetDD... INFO Building BCM with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BCM Version: BCM-00 Package Version: BCM_GeoModel-00-02-07 -ToolSvc.InDetDD... INFO Building BLM with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -ToolSvc.InDetDD... INFO BLM Version: BLM-00 Package Version: BLM_GeoModel-00-01-05 -PixelGeoModel INFO Static run1 type alignment folder structure found -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/ID, level 2, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIX, level 1, with frame global. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXB4, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEA3, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC1, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC2, level 0, with frame local. -PixelDetectorMa... INFO Registering alignment channel with key /Indet/Align/PIXEC3, level 0, with frame local. -GeoModelSvc.Pix... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.PixelDetectorTool SZ= 15508Kb Time = 0.38S -GeoModelSvc.SCT... INFO Building SCT with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -GeoModelSvc.SCT... INFO SCT Version: SCT-GEO-00 Package Version: SCT_GeoModel-00-12-08 -SCT_IDDetDescrCnv INFO in createObj: creating a SCT_ID helper object in the detector store -SCT_ID INFO Initialize from dictionary -AtlasDetectorID INFO initialize_from_dictionary - OK -indet 1 2,4,5,7,10,11,12,13 7 1fffffffffffffff 61 3 0 -sct1 1:3 3 e7ffffffffffffff 59 2 3 -bec1 -2,0,2 3 f9ffffffffffffff 57 2 5 -lay_disk0 0:8 f fe1fffffffffffff 53 4 7 -phi_mod0 0:55 3f ffe07fffffffffff 47 6 11 -eta_mod1 -6:6 f ffff87ffffffffff 43 4 17 -side0 0:1 1 fffffbffffffffff 42 1 21 -strip0 0:767 3ff fffffc00ffffffff 32 10 22 -SCT_ID INFO SCT_ID::initialize_from_dict -SCT_GeoModel INFO Building SCT Detector. -SCT_GeoModel INFO Version: SCT-GEO-00, Name: GEO, Layout: Final, Code Version: 3.06.00, Description: Atlas Geometry 2008 -SCT_GeoModel INFO Retrieving Record Sets from database ... -SCT_GeoModel INFO Static run1 type alignment folder structure found -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/ID, level 3, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCT, level 2, with frame global. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTB4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEA9, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC1, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC2, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC3, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC4, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC5, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC6, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC7, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC8, level 1, with frame local. -SCTDetectorManager INFO Registering alignment channel with key /Indet/Align/SCTEC9, level 1, with frame local. -GeoModelSvc.SCT... INFO Lorentz angle service not requested. -GeoModelSvc INFO GeoModelSvc.SCT_DetectorTool SZ= 13312Kb Time = 0.26S -GeoModelSvc.TRT... INFO Building TRT with Version Tag: ATLAS-GEO-10-00-00 at Node: ATLAS -GeoModelSvc.TRT... INFO TRT Version: TRT-GEO-00 Package Version: TRT_GeoModel-00-02-70 -GeoModelSvc.TRT... INFO Creating the TRT -GeoModelSvc.TRT... INFO TRT Geometry Options: -GeoModelSvc.TRT... INFO UseOldActiveGasMixture = false -GeoModelSvc.TRT... INFO Do Argon = false -GeoModelSvc.TRT... INFO Do Krypton = false -GeoModelSvc.TRT... INFO DC2CompatibleBarrelCoordinates = false -GeoModelSvc.TRT... INFO InitialLayout = true -GeoModelSvc.TRT... INFO Alignable = true -GeoModelSvc.TRT... INFO VersioName = DC3 -GeoModelSvc.TRT... INFO Building TRT geometry from GeoModel factory TRTDetectorFactory_Full -TRT_GeoModel WARNING The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON -TRT_GeoModel WARNING Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_GeoModel WARNING Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION -TRT_IDDetDescrCnv INFO in createObj: creating a TRT_ID helper object in the detector store -TRT_ID INFO Initialize from dictionary msgSvc 0x1dd2220 -AtlasDetectorID INFO initialize_from_dictionary - OK -TRT_GeoModel INFO In TRT Detector Factory (For DC2 and later geometries) -TRT_GeoModel INFO Version: TRT-GEO-00, Name: DC3, Layout: Initial, Code Version: 4.01.01, Description: DC3 Geometry -TRT_GeoModel INFO Static run1 type alignment folder structure found -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/TRT, level 3, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B0, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B1, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/B2, level 2, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2A, level 1, with frame global. -TRTDetectorManager INFO Registering alignment channel with key /TRT/Align/L2C, level 1, with frame global. -GeoModelSvc INFO GeoModelSvc.TRT_DetectorTool SZ= 21176Kb Time = 0.29S -GeoModelSvc.InD... INFO InDetServMat Package Version: InDetServMatGeoModel-00-04-32 -GeoModelSvc.InD... INFO Building Inner Detector Service Material. Version: CSC -GeoModelSvc INFO GeoModelSvc.InDetServMatTool SZ= 0Kb Time = 0.07S -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-01-09-13 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-GEO-10-00-00> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-GEO-10-00-00 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-GEO-10-00-00> default MuonVersion is <MuonSpectrometer-R.03.11> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 1 -GeoModelSvc.Muo... INFO ControlCscIntAlines reset to 0 -GeoModelSvc.Muo... INFO EnableMdtDeformations 0 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 0 -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuGM:MuonFactory INFO MuonLayout set to <R.03.11> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.03.11 from DB MuonVersion <MuonSpectrometer-R.03.11> -MuonGeoModel_MYSQL INFO GeometryVersion set to <R.03.11> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.03.11 from DB MuonVersion <MuonSpectrometer-R.03.11> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 234 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 234 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1172 -MdtIdHelper INFO The detector element hash max is 2296 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 234 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 234 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 594 -RpcIdHelper INFO The detector element hash max is 1116 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 203 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 234 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 203 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 230 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 234 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO STGCIDHELPER retrieved from DetStore -sTGC_IDDetDescrCnv INFO in createObj: creating a sTgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore -MM_IDDetDescrCnv INFO in createObj: creating a MmIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-GEO-10-00-00> node <ATLAS> -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO ASZT table found in Oracle -MuGM:RDBReadAtlas INFO ASZT size is 32 -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel_MYSQL INFO LayoutName (from DBAM) set to <R.03> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 8 nCSC 2 nTGC 22 nRPC 22 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 4 nCRO 4 nCMI 3 nLBI 4 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 226 -MuGM:ProcPosition INFO *** N. of stations described in mysql 226 -MuGM:ProcPosition INFO *** N. of types 30 size of jtypvec 30 -MuGM:ProcPosition INFO *** : 226 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1740 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.03 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-GEO-10-00-00> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.03.11 -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1740 child volumes -MuGM:MuonFactory INFO *** 1729 independent elements and -MuGM:MuonFactory INFO *** 11439 elements cloned or shared -MuGM:MuonFactory INFO *** 226 kinds of stations -MuGM:MuonFactory INFO *** 1740 stations with alignable transforms -MuGM:MuonFactory INFO *** 136 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1740 MuonStations -MuGM:MuonFactory INFO *** 2292 MDT Readout Elements 1170 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1116 RPC Readout Elements 594 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1740 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1740/0 -MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 22496Kb Time = 1.5S -GeoModelSvc.Bea... INFO Building Beam Pipe -GeoModelSvc INFO GeoModelSvc.BeamPipeDetectorTool SZ= 1024Kb Time = 0.01S -CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.Pix...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/PIX -GeoModelSvc.Pix...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -ClassIDSvc INFO getRegistryEntries: read 13841 CLIDRegistry entries for module ALL -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL1/ID -GeoModelSvc.SCT...WARNING Unable to register callback on global Container with folder /Indet/AlignL2/SCT -GeoModelSvc.SCT...WARNING Unable to register callback on AlignableTransformContainer with folder /Indet/AlignL3 -GeoModelSvc.TRT...WARNING Unable to register callback on global Container with folder /TRT/AlignL1/TRT -GeoModelSvc.TRT...WARNING Unable to register callback on AlignableTransformContainer with folder /TRT/AlignL2 -GeoModelSvc.Muo... INFO Register call-back against 0 folders listed below -GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore -GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list -GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-01-60-08 -AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq -AthAlgSeq INFO Member list: PyAthena::Alg/dumper -PyComponentMgr INFO Initializing PyComponentMgr... -dumper INFO Initializing dumper... -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ActiveStoreSvc INFO Initializing ActiveStoreSvc - package version StoreGate-03-06-37 -ApplicationMgr INFO Application Manager Initialized successfully -InputMetaDataStore INFO Start InputMetaDataStore -MetaDataStore INFO Start MetaDataStore -TagMetaDataStore INFO Start TagMetaDataStore -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] B844C45F-3B55-3444-8A2D-5093FBECF354 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -RootCollection Info Opening Collection File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root in mode: READ -RootCollection Info File /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root opened -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] B844C45F-3B55-3444-8A2D-5093FBECF354 -Domain[ROOT_All] Info /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root File version:53425 -ImplicitCollection Info Opened the implicit collection with connection string "PFN:/afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root" -ImplicitCollection Info and a name "POOLContainer(DataHeader)" -ClassIDSvc INFO getRegistryEntries: read 703 CLIDRegistry entries for module ALL -StoreGateSvc INFO Start StoreGateSvc -ConditionStore INFO Start ConditionStore -DetectorStore INFO Start DetectorStore -ApplicationMgr INFO Application Manager Started successfully -PoolSvc INFO Failed to find container MetaDataHdrDataHeader to get Token. -AthenaEventLoopMgr INFO ===>>> start of run 189751 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Global tag: OFLCOND-SDR-BS7T-05-24 set from input file -ClassIDSvc INFO getRegistryEntries: read 36 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_INDET/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_20.1.7.2-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_20.1.7.2-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_INDET/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SDR-BS7T-05-24 resolved to IndetAlign-MC11-00 for folder /Indet/Align -IOVDbSvc INFO HVS tag OFLCOND-SDR-BS7T-05-24 resolved to IBLDist-NULL for folder /Indet/IBLDist -IOVDbSvc INFO HVS tag OFLCOND-SDR-BS7T-05-24 resolved to InDetPixelDist-000-01 for folder /Indet/PixelDist -IOVDbSvc INFO Disconnecting from COOLOFL_INDET/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_INDET/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_INDET/OFLP200' -IOVDbSvc INFO Opening COOL connection for COOLOFL_TRT/OFLP200 -RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Connect to the database server -CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm -CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas -CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_20.1.7.2-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" )' - do NOT retry -CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#10 will be disconnected -CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/TrkEventCnv/TrkEventAthenaPool/run/TrkEventTPCnv_20.1.7.2-x86_64-slc6-gcc49-dbg/sqlite200 is not writable" ) -CORAL/RelationalPlugins/frontier Info The current compresion level is 5 -CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected -CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode -RalSessionMgr Info Start a read-only transaction active for the duration of the database connection -RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_TRT/OFLP200' -RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.0 will be opened using CURRENT client release number 3.1.3 -IOVDbSvc INFO HVS tag OFLCOND-SDR-BS7T-05-24 resolved to TRTAlign_Nominal for folder /TRT/Align -IOVDbSvc INFO HVS tag OFLCOND-SDR-BS7T-05-24 resolved to TRTCalibDX_nominal for folder /TRT/Calib/DX -IOVDbSvc INFO HVS tag OFLCOND-SDR-BS7T-05-24 resolved to TrtStrawStatus-MC11b-FromData-00-00 for folder /TRT/Cond/Status -IOVDbSvc INFO HVS tag OFLCOND-SDR-BS7T-05-24 resolved to TrtStrawStatusHT-empty-00-00 for folder /TRT/Cond/StatusHT -IOVDbSvc INFO HVS tag OFLCOND-SDR-BS7T-05-24 resolved to TrtStrawStatusPermCol-02 for folder /TRT/Cond/StatusPermanent -IOVDbSvc INFO Disconnecting from COOLOFL_TRT/OFLP200 -RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection -RalSessionMgr Info Disconnect from the database server -CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11 -CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected -RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_TRT/OFLP200' -RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_TRT/OFLP200' -DbSession Info Open DbSession -Domain[ROOT_All] Info > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D0709FD7-6A55-E011-925D-002481043EC0 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0001.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0001.pool.root File version:52600 -PixelDetectorMa... INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeader_p1 is available -TClass::Init:0: RuntimeWarning: no dictionary for class DataHeaderElement_p1 is available -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root File version:51000 -Domain[ROOT_All] Info -> Access DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -Domain[ROOT_All] Info /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root -RootDatabase.open Success /afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root File version:52200 -GeoModelSvc WARNING *** *** Geometry configured through jobOptions does not match TagInfo tags! *** *** -GeoModelSvc INFO ** Job Option configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-10-00-00 -GeoModelSvc INFO * InDet tag: -GeoModelSvc INFO * Pixel tag: -GeoModelSvc INFO * SCT tag: -GeoModelSvc INFO * TRT tag: -GeoModelSvc INFO * LAr tag: -GeoModelSvc INFO * Tile tag: -GeoModelSvc INFO * Muon tag: -GeoModelSvc INFO * Calo tag: -GeoModelSvc INFO * MagField tag: -GeoModelSvc INFO * CavernInfra tag: -GeoModelSvc INFO * ForwardDetectors tag: -GeoModelSvc INFO ** TAG INFO configuration: -GeoModelSvc INFO * ATLAS tag: ATLAS-GEO-18-01-01 -AthenaEventLoopMgr INFO ===>>> start processing event #35002, run #189751 0 events processed so far <<<=== -ClassIDSvc INFO getRegistryEntries: read 138 CLIDRegistry entries for module ALL -TrackCollectionCnvVERBOSE TrackCollectionCnv::initialize() -ClassIDSvc INFO getRegistryEntries: read 2846 CLIDRegistry entries for module ALL -AtlasIDDetDescrCnv INFO in createObj: creating a AtlasDetectorID helper object in the detector store -AtlasDetectorID INFO initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 448 CLIDRegistry entries for module ALL -SegmentCollecti... INFO SegmentCollectionCnv::initialize() -AthenaEventLoopMgr INFO ===>>> done processing event #35002, run #189751 1 events processed so far <<<=== -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158 -/afs/cern.ch/atlas/conditions/poolcond/vol0/oflcond.000002.conditions.simul.pool.v0000/oflcond.000002.conditions.simul.pool.v0000._0029.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] 0E3CF1E5-143D-DB11-92C7-000CF1DA62DD -/afs/cern.ch/atlas/conditions/poolcond/vol0/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0001.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] D0709FD7-6A55-E011-925D-002481043EC0 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO ===>>> start processing event #35003, run #189751 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #35003, run #189751 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #35004, run #189751 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #35004, run #189751 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #35005, run #189751 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #35005, run #189751 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #35006, run #189751 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #35006, run #189751 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #35007, run #189751 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #35007, run #189751 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #35008, run #189751 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #35008, run #189751 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #35009, run #189751 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #35009, run #189751 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #35010, run #189751 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #35010, run #189751 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #35011, run #189751 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #35011, run #189751 10 events processed so far <<<=== -/afs/cern.ch/atlas/maxidisk/d33/referencefiles/esd/ESD-20.1.7.2.pool.root Info Database being retired... -Domain[ROOT_All] Info -> Deaccess DbDatabase READ [ROOT_All] B844C45F-3B55-3444-8A2D-5093FBECF354 -Domain[ROOT_All] Info > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -DetectorStore INFO Stop DetectorStore -ConditionStore INFO Stop ConditionStore -StoreGateSvc INFO Stop StoreGateSvc -StoreGateSvc INFO stop: setting service priority to 101 so that event stores get finalized and cleared before other stores -TagMetaDataStore INFO Stop TagMetaDataStore -MetaDataStore INFO Stop MetaDataStore -InputMetaDataStore INFO Stop InputMetaDataStore -ApplicationMgr INFO Application Manager Stopped successfully -dumper INFO Finalizing dumper... -AthAlgSeq INFO Finalizing AthAlgSeq... -AthOutSeq INFO Finalizing AthOutSeq... -AthRegSeq INFO Finalizing AthRegSeq... -AthMasterSeq INFO Finalizing AthMasterSeq... -StoreGateSvc INFO Finalizing StoreGateSvc - package version StoreGate-03-06-37 -PyComponentMgr INFO Finalizing PyComponentMgr... -IdDictDetDescrCnv INFO in finalize -DetectorStore INFO Finalizing DetectorStore - package version StoreGate-03-06-37 -ConditionStore INFO Finalizing ConditionStore - package version StoreGate-03-06-37 -IOVDbSvc INFO Folder /Indet/Align (PoolColl) db-read 1/1 objs/chan/bytes 34/43/5440 (( 0.34 ))s -IOVDbSvc INFO Folder /Indet/IBLDist (AttrListColl) db-read 1/1 objs/chan/bytes 14/14/280 (( 0.06 ))s -IOVDbSvc INFO Folder /Indet/PixelDist (PoolRef) db-read 1/0 objs/chan/bytes 1/1/174 (( 0.04 ))s -IOVDbSvc WARNING Folder /Indet/PixelDist is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Align (PoolColl) db-read 1/1 objs/chan/bytes 32/32/5120 (( 0.14 ))s -IOVDbSvc INFO Folder /TRT/Calib/DX (PoolRef) db-read 1/1 objs/chan/bytes 1/1/183 (( 0.03 ))s -IOVDbSvc INFO Folder /TRT/Cond/Status (PoolColl) db-read 1/0 objs/chan/bytes 36/36/6552 (( 0.04 ))s -IOVDbSvc WARNING Folder /TRT/Cond/Status is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusHT (PoolColl) db-read 1/0 objs/chan/bytes 35/35/6370 (( 0.04 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusHT is requested but no data retrieved -IOVDbSvc INFO Folder /TRT/Cond/StatusPermanent (PoolColl) db-read 1/0 objs/chan/bytes 35/36/6370 (( 0.04 ))s -IOVDbSvc WARNING Folder /TRT/Cond/StatusPermanent is requested but no data retrieved -IOVDbSvc INFO Folder /TagInfo (AttrListColl) db-read 0/2 objs/chan/bytes 2/0/0 (( 0.00 ))s -IOVDbSvc INFO Total payload read from COOL: 30489 bytes in (( 0.73 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_INDET/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 0.44 ))s -IOVDbSvc INFO Connection COOLOFL_TRT/OFLP200 : nConnect: 2 nFolders: 5 ReadTime: (( 0.29 ))s -TagMetaDataStore INFO Finalizing TagMetaDataStore - package version StoreGate-03-06-37 -PoolSvc INFO I/O finalization... -XMLFileCatalog Info Updating the catalog -PoolXMLFileCatalog Info XercesC termination number 0 -MetaDataStore INFO Finalizing MetaDataStore - package version StoreGate-03-06-37 -InputMetaDataStore INFO Finalizing InputMetaDataStore - package version StoreGate-03-06-37 -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -AthenaSealSvc::... INFO Time User : Tot= 1 [ms] #= 1 -ChronoStatSvc INFO Time User : Tot= 84.8 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Py:Athena INFO leaving with code 0: "successful run" -CoralApplication Info Delete the COOL CoralApplication... -CoralApplication Info Delete the COOL database service -RalDatabaseSvc Info Delete the RalDatabaseSvc... -RalDatabaseSvc Info Purge the connection pool -RalDatabaseSvc Info Reset the ICS pointer -RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE -CoralApplication Info Delete the CORAL connection service -CoralApplication Info Delete the COOL CoralApplication... DONE -CORAL/Services/ConnectionService Info Deleting the ConnectionPool diff --git a/Tracking/TrkG4Components/TrkG4UserActions/CMakeLists.txt b/Tracking/TrkG4Components/TrkG4UserActions/CMakeLists.txt index 6c184e6d5074ed1373187b290887bce3a17024fb..590deed7acbc239e6c24af01d1125b066ffaa779 100644 --- a/Tracking/TrkG4Components/TrkG4UserActions/CMakeLists.txt +++ b/Tracking/TrkG4Components/TrkG4UserActions/CMakeLists.txt @@ -8,7 +8,9 @@ atlas_subdir( TrkG4UserActions ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps + Control/StoreGate GaudiKernel + Simulation/G4Atlas/G4AtlasInterfaces Simulation/G4Atlas/G4AtlasTools Tracking/TrkDetDescr/TrkDetDescrInterfaces Tracking/TrkDetDescr/TrkGeometry @@ -16,7 +18,6 @@ atlas_depends_on_subdirs( PUBLIC Tracking/TrkEvent/TrkParameters PRIVATE Control/CxxUtils - Control/StoreGate DetectorDescription/GeoPrimitives Simulation/G4Sim/SimHelpers Tracking/TrkDetDescr/TrkSurfaces @@ -30,13 +31,14 @@ find_package( Eigen ) find_package( Geant4 ) find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) find_package( XercesC ) +find_package( Boost ) # Component(s) in the package: atlas_add_component( TrkG4UserActions src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps GaudiKernel G4AtlasToolsLib TrkDetDescrInterfaces TrkGeometry TrkMaterialOnTrack TrkParameters CxxUtils StoreGateLib SGtests GeoPrimitives SimHelpers TrkSurfaces TrkExInterfaces TrkExUtils TrkValInterfaces ) + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps GaudiKernel G4AtlasInterfaces G4AtlasToolsLib TrkDetDescrInterfaces TrkGeometry TrkMaterialOnTrack TrkParameters CxxUtils StoreGateLib SGtests GeoPrimitives SimHelpers TrkSurfaces TrkExInterfaces TrkExUtils TrkValInterfaces ) # Install files from the package: atlas_install_headers( TrkG4UserActions ) diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorder.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorder.h index c6547c12446de25b85b3b104487e1aa0062157d1..e6679013edcd80780da8d77c75f0b1135d5c5d75 100755 --- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorder.h +++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorder.h @@ -9,11 +9,14 @@ #ifndef EnergyLossRecorder_H #define EnergyLossRecorder_H -#include "G4AtlasTools/UserActionBase.h" -#include "GaudiKernel/ToolHandle.h" #include <string> #include <vector> +#include "G4AtlasInterfaces/IBeginRunAction.h" +#include "G4AtlasInterfaces/IEndRunAction.h" +#include "G4AtlasInterfaces/IBeginEventAction.h" +#include "G4AtlasInterfaces/IEndEventAction.h" +#include "G4AtlasInterfaces/ISteppingAction.h" /** @class EnergyLossRecorder @@ -31,24 +34,31 @@ namespace Trk { class IPositionMomentumWriter; } -class EnergyLossRecorder final: public UserActionBase { - - public: - /** Standard UserAction */ - EnergyLossRecorder(const std::string& type, const std::string& name, const IInterface* parent); - - /** All G4 interface methods */ - virtual void BeginOfEvent(const G4Event*) override; //FIXME no-longer needed? - virtual void EndOfEvent(const G4Event*) override; - virtual void BeginOfRun(const G4Run*) override; //FIXME no-longer needed? - virtual void EndOfRun(const G4Run*) override; //FIXME no-longer needed? - virtual void Step(const G4Step*) override; - - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - virtual StatusCode initialize() override; - private: - ToolHandle<Trk::IPositionMomentumWriter> m_pmWriter; - unsigned int m_entries; -}; +namespace G4UA{ + + class EnergyLossRecorder: public IBeginRunAction, public IEndRunAction, public IBeginEventAction, public IEndEventAction, public ISteppingAction + { + + public: + + struct Config + { + Trk::IPositionMomentumWriter *pmWriter=nullptr; + }; + + EnergyLossRecorder(const Config& config); + virtual void beginOfRun(const G4Run*) override; + virtual void endOfRun(const G4Run*) override; + virtual void beginOfEvent(const G4Event*) override; + virtual void endOfEvent(const G4Event*) override; + virtual void processStep(const G4Step*) override; + private: + Config m_config; + unsigned int m_entries; + }; // class EnergyLossRecorder + + +} // namespace G4UA + #endif diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorderTool.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorderTool.h new file mode 100644 index 0000000000000000000000000000000000000000..d8dddc3f7e3b03c56a5ed54bc0db017ff6c5277a --- /dev/null +++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorderTool.h @@ -0,0 +1,67 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRKG4USERACTIONS_G4UA__ENERGYLOSSRECORDERTOOL_H +#define TRKG4USERACTIONS_G4UA__ENERGYLOSSRECORDERTOOL_H +#include "G4AtlasInterfaces/IBeginRunActionTool.h" +#include "G4AtlasInterfaces/IEndRunActionTool.h" +#include "G4AtlasInterfaces/IBeginEventActionTool.h" +#include "G4AtlasInterfaces/IEndEventActionTool.h" +#include "G4AtlasInterfaces/ISteppingActionTool.h" +#include "G4AtlasTools/ActionToolBase.h" +#include "TrkG4UserActions/EnergyLossRecorder.h" +namespace Trk { + class IPositionMomentumWriter; +} + +namespace G4UA{ + + + /// @class EnergyLossRecorderTool + /// @brief A class to manage EnergyLossRecorder actions + /// + /// creates one instance of the action per thread + /// + /// @author Andrea Di Simone + + class EnergyLossRecorderTool: + + public ActionToolBase<EnergyLossRecorder>, + public IBeginRunActionTool, public IEndRunActionTool, public IBeginEventActionTool, public IEndEventActionTool, public ISteppingActionTool + { + + public: + /// standard tool ctor + EnergyLossRecorderTool(const std::string& type, const std::string& name,const IInterface* parent); + /// Athena initialize method + virtual StatusCode initialize() override final; + /// gets the BoR action + virtual IBeginRunAction* getBeginRunAction() override final + { return static_cast<IBeginRunAction*>( getAction() ); } + /// gets the EoR action + virtual IEndRunAction* getEndRunAction() override final + { return static_cast<IEndRunAction*>( getAction() ); } + /// gets the BoE action + virtual IBeginEventAction* getBeginEventAction() override final + { return static_cast<IBeginEventAction*>( getAction() ); } + /// gets the EoE action + virtual IEndEventAction* getEndEventAction() override final + { return static_cast<IEndEventAction*>( getAction() ); } + /// gets the stepping action + virtual ISteppingAction* getSteppingAction() override final + { return static_cast<ISteppingAction*>( getAction() ); } + /// Gaudi interface manipulation + virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override; + protected: + /// creates the instance for this thread + virtual std::unique_ptr<EnergyLossRecorder> makeAction() override final; + private: + /// stores the config obtained from the python side + EnergyLossRecorder::Config m_config; + ToolHandle<Trk::IPositionMomentumWriter> m_pmWriter; + }; // class EnergyLossRecorderTool + + +} // namespace G4UA +#endif diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollower.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollower.h index 44f2e5ecab6392ebe704ce9fab4f10bef53cb268..3ebdf21640c09abb578b16c1beae4893719444b1 100755 --- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollower.h +++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollower.h @@ -9,8 +9,8 @@ #ifndef GeantFollower_H #define GeantFollower_H -#include "G4AtlasTools/UserActionBase.h" #include "GaudiKernel/ToolHandle.h" +#include "TrkG4UserActions/IGeantFollowerHelper.h" #include <string> #include <vector> @@ -23,27 +23,37 @@ namespace Trk { class IGeantFollowerHelper; } -class StoreGateSvc; +#include "G4AtlasInterfaces/IBeginEventAction.h" +#include "G4AtlasInterfaces/IEndEventAction.h" +#include "G4AtlasInterfaces/IBeginRunAction.h" +#include "G4AtlasInterfaces/ISteppingAction.h" +namespace G4UA{ -class GeantFollower final: public UserActionBase { - public: - /** Standard UserAction Constructor*/ - GeantFollower(const std::string& type, const std::string& name, const IInterface* parent); + class GeantFollower: public IBeginEventAction, public IEndEventAction, public IBeginRunAction, public ISteppingAction + { - /** All G4 interface methods */ - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfEvent(const G4Event*) override; - virtual void Step(const G4Step*) override; + public: - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - virtual StatusCode initialize() override; + struct Config + { + ToolHandle<Trk::IGeantFollowerHelper> helper=ToolHandle<Trk::IGeantFollowerHelper>("Trk::GeantFollowerHelper/GeantFollowerHelper"); + }; - private: - ToolHandle<Trk::IGeantFollowerHelper> m_helper; - mutable const Trk::IGeantFollowerHelper* m_helperPointer; + GeantFollower(const Config& config); + virtual void beginOfEvent(const G4Event*) override; + virtual void endOfEvent(const G4Event*) override; + virtual void beginOfRun(const G4Run*) override; + virtual void processStep(const G4Step*) override; + private: -}; + Config m_config; + mutable const Trk::IGeantFollowerHelper* m_helperPointer; + + }; // class GeantFollower + + +} // namespace G4UA #endif diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMS.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMS.h index 9e108955621c9f0114ab8aea4533c62b319e996b..bb667456c8ec2c6fb07ce4ec4414898f2b0c585a 100755 --- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMS.h +++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMS.h @@ -9,13 +9,17 @@ #ifndef GeantFollowerMS_H #define GeantFollowerMS_H -#include "G4AtlasTools/UserActionBase.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" #include "TrkDetDescrInterfaces/ITrackingGeometrySvc.h" #include <string> #include <vector> +#include "G4AtlasInterfaces/IBeginEventAction.h" +#include "G4AtlasInterfaces/IEndEventAction.h" +#include "G4AtlasInterfaces/IBeginRunAction.h" +#include "G4AtlasInterfaces/ISteppingAction.h" + /** @class GeantFollowerMS @author Andreas.Salzburger@cern.ch @@ -26,33 +30,34 @@ namespace Trk { class TrackingGeometry; } -class StoreGateSvc; - -class GeantFollowerMS final: public UserActionBase { +namespace G4UA{ -public: - /** Standard UserAction Constructor*/ - GeantFollowerMS(const std::string& type, const std::string& name, const IInterface* parent); - /** All G4 interface methods */ - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfEvent(const G4Event*) override; - virtual void Step(const G4Step*) override; + class GeantFollowerMS: public IBeginEventAction, public IEndEventAction, public IBeginRunAction, public ISteppingAction + { - virtual StatusCode queryInterface(const InterfaceID&, void**) override; - virtual StatusCode initialize() override; + public: -private: - ToolHandle<Trk::IGeantFollowerMSHelper> m_helper; - mutable const Trk::IGeantFollowerMSHelper* m_helperPointer; + struct Config + { + ToolHandle<Trk::IGeantFollowerMSHelper> helper=ToolHandle<Trk::IGeantFollowerMSHelper>("Trk::GeantFollowerMSHelper/GeantFollowerMSHelper"); + ServiceHandle<Trk::ITrackingGeometrySvc> trackingGeometrySvc=ServiceHandle<Trk::ITrackingGeometrySvc>("AtlasTrackingGeometrySvc","GeantFollowerMS"); + }; + GeantFollowerMS(const Config& config); + virtual void beginOfEvent(const G4Event*) override; + virtual void endOfEvent(const G4Event*) override; + virtual void beginOfRun(const G4Run*) override; + virtual void processStep(const G4Step*) override; + private: + Config m_config; + /** tracking geometry */ + mutable const Trk::TrackingGeometry* m_trackingGeometry; + mutable const Trk::IGeantFollowerMSHelper* m_helperPointer; - /** tracking geometry */ - mutable const Trk::TrackingGeometry* m_trackingGeometry; - ServiceHandle<Trk::ITrackingGeometrySvc> m_trackingGeometrySvc; - std::string m_trackingGeometryName; + }; // class GeantFollowerMS -}; +} // namespace G4UA #endif diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMSTool.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMSTool.h new file mode 100644 index 0000000000000000000000000000000000000000..e1324c761cd70f0df8953a05d4b1d0dfc7b41ad3 --- /dev/null +++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMSTool.h @@ -0,0 +1,53 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRKG4USERACTIONS_G4UA__GEANTFOLLOWERMSTOOL_H +#define TRKG4USERACTIONS_G4UA__GEANTFOLLOWERMSTOOL_H +#include "G4AtlasInterfaces/IBeginEventActionTool.h" +#include "G4AtlasInterfaces/IEndEventActionTool.h" +#include "G4AtlasInterfaces/IBeginRunActionTool.h" +#include "G4AtlasInterfaces/ISteppingActionTool.h" +#include "G4AtlasTools/ActionToolBase.h" +#include "TrkG4UserActions/GeantFollowerMS.h" + +namespace G4UA{ + + /// @class AthenaStackingActionTool + /// @brief Tool which manages the GeantFollowerMS action + /// + /// @author Andrea Di Simone + /// + + class GeantFollowerMSTool: + public ActionToolBase<GeantFollowerMS>, + public IBeginEventActionTool, public IEndEventActionTool, public IBeginRunActionTool, public ISteppingActionTool + { + + public: + /// Standard constructor + GeantFollowerMSTool(const std::string& type, const std::string& name,const IInterface* parent); + /// Retrieve the BoE action + virtual IBeginEventAction* getBeginEventAction() override final + { return static_cast<IBeginEventAction*>( getAction() ); } + /// Retrieve the EoE action + virtual IEndEventAction* getEndEventAction() override final + { return static_cast<IEndEventAction*>( getAction() ); } + /// Retrieve the BoR action + virtual IBeginRunAction* getBeginRunAction() override final + { return static_cast<IBeginRunAction*>( getAction() ); } + /// Retrieve the stepping action + virtual ISteppingAction* getSteppingAction() override final + { return static_cast<ISteppingAction*>( getAction() ); } + virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override; + protected: + /// Create an action for this thread + virtual std::unique_ptr<GeantFollowerMS> makeAction() override final; + private: + /// Configuration parameters + GeantFollowerMS::Config m_config; + }; // class GeantFollowerMSTool + + +} // namespace G4UA +#endif diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerTool.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerTool.h new file mode 100644 index 0000000000000000000000000000000000000000..c2bae8627b892ec4bc9c0131994f0e7dd821d8f5 --- /dev/null +++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerTool.h @@ -0,0 +1,53 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRKG4USERACTIONS_G4UA__GEANTFOLLOWERTOOL_H +#define TRKG4USERACTIONS_G4UA__GEANTFOLLOWERTOOL_H +#include "G4AtlasInterfaces/IBeginEventActionTool.h" +#include "G4AtlasInterfaces/IEndEventActionTool.h" +#include "G4AtlasInterfaces/IBeginRunActionTool.h" +#include "G4AtlasInterfaces/ISteppingActionTool.h" +#include "G4AtlasTools/ActionToolBase.h" +#include "TrkG4UserActions/GeantFollower.h" + +namespace G4UA{ + + /// @class AthenaStackingActionTool + /// @brief Tool which manages the GeantFollower action + /// + /// @author Andrea Di Simone + /// + + class GeantFollowerTool: + public ActionToolBase<GeantFollower>, + public IBeginEventActionTool, public IEndEventActionTool, public IBeginRunActionTool, public ISteppingActionTool + { + + public: + /// Standard constructor + GeantFollowerTool(const std::string& type, const std::string& name,const IInterface* parent); + /// Retrieve the BoE action + virtual IBeginEventAction* getBeginEventAction() override final + { return static_cast<IBeginEventAction*>( getAction() ); } + /// Retrieve the EoE action + virtual IEndEventAction* getEndEventAction() override final + { return static_cast<IEndEventAction*>( getAction() ); } + /// Retrieve the BoR action + virtual IBeginRunAction* getBeginRunAction() override final + { return static_cast<IBeginRunAction*>( getAction() ); } + /// Retrieve the stepping action + virtual ISteppingAction* getSteppingAction() override final + { return static_cast<ISteppingAction*>( getAction() ); } + virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override; + protected: + /// Create an action for this thread + virtual std::unique_ptr<GeantFollower> makeAction() override final; + private: + /// Configuration parameters + GeantFollower::Config m_config; + }; // class GeantFollowerTool + + +} // namespace G4UA +#endif diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorder.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorder.h index dfb47108b01592e5abc5627d89d699779ab421ad..6bf8f4ef5a1bb1c0bf869b72b1a605bd51b70ae8 100755 --- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorder.h +++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorder.h @@ -9,15 +9,6 @@ #ifndef MaterialStepRecorder_H #define MaterialStepRecorder_H -#include "G4AtlasTools/UserActionBase.h" -#include <string> -#include <vector> - -#include "TrkGeometry/MaterialStepCollection.h" -#include "TrkGeometry/ElementTable.h" -#include "TrkGeometry/Material.h" - - /** @class MaterialStepRecorder @author Andreas.Salzburger@cern.ch @@ -28,37 +19,59 @@ namespace Trk { class IPositionMomentumWriter; } -class MaterialStepRecorder final: public UserActionBase { +#include <vector> + +#include "StoreGate/StoreGateSvc.h" +#include "GaudiKernel/ServiceHandle.h" + +#include "AthenaBaseComps/AthMessaging.h" + +#include "G4AtlasInterfaces/IBeginEventAction.h" +#include "G4AtlasInterfaces/IEndEventAction.h" +#include "G4AtlasInterfaces/IBeginRunAction.h" +#include "G4AtlasInterfaces/ISteppingAction.h" + +#include "TrkGeometry/MaterialStepCollection.h" +#include "TrkGeometry/ElementTable.h" +#include "TrkGeometry/Material.h" + +namespace G4UA{ + + + class MaterialStepRecorder: public AthMessaging, public IBeginEventAction, public IEndEventAction, public IBeginRunAction, public ISteppingAction + { - public: - /** Standard UserAction Constructor */ - MaterialStepRecorder(const std::string& type, const std::string& name, const IInterface* parent); + public: + MaterialStepRecorder(); + virtual void beginOfEvent(const G4Event*) override; + virtual void endOfEvent(const G4Event*) override; + virtual void beginOfRun(const G4Run*) override; + virtual void processStep(const G4Step*) override; + private: - /** All G4 interface methods */ - virtual void BeginOfEvent(const G4Event*) override; - virtual void EndOfEvent(const G4Event*) override; - virtual void BeginOfRun(const G4Run*) override; - virtual void EndOfRun(const G4Run*) override; - virtual void Step(const G4Step*) override; + typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t; + /// Pointer to StoreGate (event store by default) + mutable StoreGateSvc_t m_evtStore; + /// Pointer to StoreGate (detector store by default) + mutable StoreGateSvc_t m_detStore; + Trk::MaterialStepCollection* m_matStepCollection; //FIXME convert to a WriteHandle + std::string m_matStepCollectionName; //FIXME should be passed in via a Config struct rather than hardcoded. - virtual StatusCode queryInterface(const InterfaceID&, void**) override; + bool m_recordComposition; //FIXME should be passed in via a Config struct rather than hardcoded. - private: - Trk::MaterialStepCollection* m_matStepCollection; //FIXME convert to a WriteHandle - std::string m_matStepCollectionName; + double m_totalNbOfAtoms; + size_t m_totalSteps; + size_t m_eventID; - bool m_recordComposition; + Trk::ElementTable* m_elementTable; //FIXME convert to a WriteHandle + std::string m_elementTableName; - double m_totalNbOfAtoms; - size_t m_totalSteps; - size_t m_eventID; + Trk::ElementTable* m_runElementTable; - Trk::ElementTable* m_elementTable; //FIXME convert to a WriteHandle - std::string m_elementTableName; + }; // class MaterialStepRecorder - Trk::ElementTable* m_runElementTable; -}; +} // namespace G4UA #endif diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorderTool.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorderTool.h new file mode 100644 index 0000000000000000000000000000000000000000..95fd060f83c9554acb18a46838aae1f543439421 --- /dev/null +++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorderTool.h @@ -0,0 +1,52 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRKG4USERACTIONS_G4UA__MATERIALSTEPRECORDERTOOL_H +#define TRKG4USERACTIONS_G4UA__MATERIALSTEPRECORDERTOOL_H + +#include "G4AtlasInterfaces/IBeginEventActionTool.h" +#include "G4AtlasInterfaces/IEndEventActionTool.h" +#include "G4AtlasInterfaces/IBeginRunActionTool.h" +#include "G4AtlasInterfaces/ISteppingActionTool.h" +#include "G4AtlasTools/ActionToolBase.h" +#include "TrkG4UserActions/MaterialStepRecorder.h" + +namespace G4UA{ + + /// @class MaterialStepRecorderTool + /// @brief Tool which manages the MaterialStepRecorder action + /// + /// @author Andrea Di Simone + /// + + class MaterialStepRecorderTool: + public ActionToolBase<MaterialStepRecorder>, + public IBeginEventActionTool, public IEndEventActionTool, public IBeginRunActionTool, public ISteppingActionTool + { + + public: + /// Standard constructor + MaterialStepRecorderTool(const std::string& type, const std::string& name,const IInterface* parent); + /// Retrieve the BoE action + virtual IBeginEventAction* getBeginEventAction() override final + { return static_cast<IBeginEventAction*>( getAction() ); } + /// Retrieve the EoE action + virtual IEndEventAction* getEndEventAction() override final + { return static_cast<IEndEventAction*>( getAction() ); } + /// Retrieve the BoR action + virtual IBeginRunAction* getBeginRunAction() override final + { return static_cast<IBeginRunAction*>( getAction() ); } + /// Retrieve the stepping action + virtual ISteppingAction* getSteppingAction() override final + { return static_cast<ISteppingAction*>( getAction() ); } + virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override; + protected: + /// Create an action for this thread + virtual std::unique_ptr<MaterialStepRecorder> makeAction() override final; + private: + }; // class MaterialStepRecorderTool + + +} // namespace G4UA +#endif diff --git a/Tracking/TrkG4Components/TrkG4UserActions/cmt/requirements b/Tracking/TrkG4Components/TrkG4UserActions/cmt/requirements index cb212035a095d32e5f936990800ca63cd122eaf9..d402f8942bbd023291bb0a3d79d134a401d33c70 100644 --- a/Tracking/TrkG4Components/TrkG4UserActions/cmt/requirements +++ b/Tracking/TrkG4Components/TrkG4UserActions/cmt/requirements @@ -13,12 +13,13 @@ use TrkParameters TrkParameters-* Tracking/TrkEvent use Geant4 Geant4-* External use TrkDetDescrInterfaces TrkDetDescrInterfaces-* Tracking/TrkDetDescr use TrkMaterialOnTrack TrkMaterialOnTrack-* Tracking/TrkEvent +use StoreGate StoreGate-* Control +use G4AtlasInterfaces G4AtlasInterfaces-* Simulation/G4Atlas private use AtlasROOT AtlasROOT-* External use AtlasCLHEP AtlasCLHEP-* External use CxxUtils CxxUtils-* Control -use StoreGate StoreGate-* Control use GeoPrimitives GeoPrimitives-* DetectorDescription use SimHelpers SimHelpers-* Simulation/G4Sim use TrkSurfaces TrkSurfaces-* Tracking/TrkDetDescr diff --git a/Tracking/TrkG4Components/TrkG4UserActions/python/TrkG4UserActionsConfig.py b/Tracking/TrkG4Components/TrkG4UserActions/python/TrkG4UserActionsConfig.py index 14ef617f5b92330f74390c5766d2f3e3b4fce4ca..9857b10511cfe3fc01bf1311ed097c241aa4396c 100644 --- a/Tracking/TrkG4Components/TrkG4UserActions/python/TrkG4UserActionsConfig.py +++ b/Tracking/TrkG4Components/TrkG4UserActions/python/TrkG4UserActionsConfig.py @@ -8,39 +8,3 @@ def getMaterialStepRecorderTool(name="G4UA::MaterialStepRecorderTool", **kwargs) kwargs.setdefault(prop,value) from TrkG4UserActions.TrkG4UserActionsConf import G4UA__MaterialStepRecorderTool return G4UA__MaterialStepRecorderTool(name, **kwargs) -from AthenaCommon import CfgMgr - -#------------------------------------------------------------------- -def getMaterialStepRecorder(name="MaterialStepRecorder", **kwargs): - return CfgMgr.MaterialStepRecorder(name, **kwargs) -#------------------------------------------------------------------- -def getPositionMomentumWriter(name="PosMomWriter", **kwargs): - return CfgMgr.Trk__PositionMomentumWriter(name, **kwargs) - -def getEnergyLossRecorder(name="EnergyLossRecorder", **kwargs): - kwargs.setdefault("PositionMomentumWriter", "PosMomWriter") - return CfgMgr.EnergyLossRecorder(name, **kwargs) -#------------------------------------------------------------------- -def getGeantFollowerHelper(name="GeantFollowerHelper", **kwargs): - from AthenaCommon.AppMgr import ToolSvc - kwargs.setdefault("Extrapolator", ToolSvc.TestExtrapolator) ##FIXME Assumes that this already exists.. - kwargs.setdefault("ExtrapolateDirectly", True) - kwargs.setdefault("ExtrapolateIncrementally", True) - return CfgMgr.Trk__GeantFollowerHelper(name, **kwargs) - -def getGeantFollower(name="GeantFollower", **kwargs): - return CfgMgrGeantFollower.(name, **kwargs) -#------------------------------------------------------------------- -def getGeantFollowerMSHelper(name="GeantFollowerMSHelper", **kwargs): - from AthenaCommon.AppMgr import ToolSvc - kwargs.setdefault("Extrapolator", ToolSvc.TestExtrapolator) ##FIXME Assumes that this already exists.. - kwargs.setdefault("ExtrapolateDirectly", False) # for geantinos ExtrapolateDirectly = True no Eloss is calculated - kwargs.setdefault("ExtrapolateIncrementally", False) - # SpeedUp False takes more CPU because it will stop at each G4 Step in the Muon Spectrometer - kwargs.setdefault("SpeedUp", True) - return CfgMgr.Trk__GeantFollowerMSHelper(name, **kwargs) - -def getGeantFollowerMS(name="GeantFollowerMS", **kwargs): - kwargs.setdefault("HelperTool", "GeantFollowerMSHelper") - return CfgMgr.GeantFollowerMS(name, **kwargs) -#------------------------------------------------------------------- diff --git a/Tracking/TrkG4Components/TrkG4UserActions/python/TrkG4UserActionsConfigDb.py b/Tracking/TrkG4Components/TrkG4UserActions/python/TrkG4UserActionsConfigDb.py index e43dc118bf3f242871f0d4342e55c8ed39778df1..7f7be15fc4bc0b44eac50ff24be57c3020e88ed2 100644 --- a/Tracking/TrkG4Components/TrkG4UserActions/python/TrkG4UserActionsConfigDb.py +++ b/Tracking/TrkG4Components/TrkG4UserActions/python/TrkG4UserActionsConfigDb.py @@ -3,12 +3,3 @@ from AthenaCommon.CfgGetter import addTool addTool("TrkG4UserActions.TrkG4UserActionsConfig.getMaterialStepRecorderTool", "G4UA::MaterialStepRecorderTool") -from AthenaCommon.CfgGetter import addTool -addTool("TrkG4UserActions.TrkG4UserActionsConfig.getMaterialStepRecorder", "MaterialStepRecorder" ) -addTool("TrkG4UserActions.TrkG4UserActionsConfig.getPositionMomentumWriter","PosMomWriter" ) -addTool("TrkG4UserActions.TrkG4UserActionsConfig.getEnergyLossRecorder" , "EnergyLossRecorder" ) -addTool("TrkG4UserActions.TrkG4UserActionsConfig.getGeantFollowerHelper", "GeantFollowerHelper" ) -addTool("TrkG4UserActions.TrkG4UserActionsConfig.getGeantFollower" , "GeantFollower" ) -addTool("TrkG4UserActions.TrkG4UserActionsConfig.getGeantFollowerMSHelper", "GeantFollowerMSHelper" ) -addTool("TrkG4UserActions.TrkG4UserActionsConfig.getGeantFollowerMS" , "GeantFollowerMS" ) - diff --git a/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowingMS_jobOptions.py b/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowingMS_jobOptions.py index aa9114e34270cce529bbe26b5e6d3d8cc688d28e..92e2495c49be90bea80b5ccefd227256abc40934 100644 --- a/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowingMS_jobOptions.py +++ b/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowingMS_jobOptions.py @@ -2,10 +2,9 @@ # # # This job option runs the G4 simulation -# of the ATLAS detector and the GeantinoMapping. +# of the ATLAS detector and the GeantFollower in the Muon Spectrometer. # It can be run using athena.py # -__version__="$Revision: 729147 $" #============================================================== @@ -31,6 +30,7 @@ from AthenaCommon.GlobalFlags import globalflags #from G4AtlasApps import AtlasG4Eng #AtlasG4Eng.G4Eng._ctrl.fldMenu.UseStepper('NystromRK4') + #--- Include JobSpecs.py -------------------------------------- #include ('JobSpecs.py') @@ -62,8 +62,11 @@ if 'myPt' not in dir() : myPt = 'p' # values are 'p' or 'pt' if 'myGeo' not in dir() : +# release 20 + myGeo = 'ATLAS-R2-2015-03-01-00' # this is release 19 like - myGeo = 'ATLAS-GEO-20-00-01' +# myGeo = 'ATLAS-R1-2012-02-00-00' +# myGeo = 'ATLAS-GEO-20-00-01' # this is release 17 from Jochen # myGeo = 'ATLAS-GEO-18-01-03' # myGeo = 'ATLAS-GEO-18-01-00' @@ -121,39 +124,34 @@ athenaCommonFlags.PoolEvgenInput.set_Off() ### is this necessary? athenaCommonFlags.PoolHitsOutput.set_Off() athenaCommonFlags.EvtMax = myMaxEvent + +#from AthenaCommon.AppMgr import AppMgr +#AppMgr.EvtMax = myMaxEvent + #--- Simulation flags ----------------------------------------- from G4AtlasApps.SimFlags import SimFlags SimFlags.load_atlas_flags() # Going to use an ATLAS layout +SimFlags.SimLayout.set_On() SimFlags.SimLayout = myGeo SimFlags.EventFilter.set_Off() +SimFlags.RunNumber = 222510 include("GeneratorUtils/StdEvgenSetup.py") -myMinEta = 0.2 -#myMinEta = 0.0 +myMinEta = 0. myMaxEta = 1.0 - -#myMinEta = 0.8 -#myMaxEta = 1.8 - -#myMinEta = 1.8 +myMinEta = 1.0 +myMaxEta = 1.8 +myMinEta = 1.8 myMaxEta = 2.8 -#myMinEta = 0.2 -#myMaxEta = 2.8 - - -#myMinEta = 2.0 -#myMaxEta = 2.8 -#myMinEta = 0.8 -#myMaxEta = 2.0 -#myMinEta = 0.2 -#myMaxEta = 0.8 - myPDG = 13 # 998 = Charged Geantino 999 = neutral Geantino, 13 = Muon #myPDG = 998 +#from AthenaCommon.CfgGetter import getAlgorithm +#topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True) + # sept 2014 run ParticleGun import ParticleGun as PG pg = PG.ParticleGun(randomSvcName=SimFlags.RandomSvc.get_Value(), randomStream="SINGLE") @@ -188,6 +186,7 @@ from AthenaCommon.AppMgr import ToolSvc from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc + #ToolSvc.AtlasGeometryBuilder.OutputLevel = VERBOSE #ToolSvc.CaloTrackingGeometryBuilder.OutputLevel = DEBUG #ToolSvc.MuonTrackingGeometryBuilder.OutputLevel = DEBUG @@ -197,6 +196,7 @@ from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc #DetFlags.simulate.Truth_setOn() ### deprecated! + #-------------------------------------------------------------- # Assign the TrackingGeometry to the Algorithm @@ -312,6 +312,26 @@ TestExtrapolator = Trk__Extrapolator('TestExtrapolator',\ SubMEUpdators = TestSubUpdators) ToolSvc += TestExtrapolator + +# Helper setup +# for geantinos ExtrapolateDirectly = True no Eloss is calculated +# SpeedUp False takes more CPU because it will stop at each G4 Step in the Muon Spectrometer + +from TrkG4UserActions.TrkG4UserActionsConf import Trk__GeantFollowerMSHelper +GeantFollowerMSHelper = Trk__GeantFollowerMSHelper(name="GeantFollowerMSHelper") +GeantFollowerMSHelper.Extrapolator = TestExtrapolator +GeantFollowerMSHelper.ExtrapolateDirectly = False +GeantFollowerMSHelper.ExtrapolateIncrementally = False +GeantFollowerMSHelper.SpeedUp = True +GeantFollowerMSHelper.OutputLevel = INFO +ToolSvc += GeantFollowerMSHelper + +# higher precision for stepping +SimFlags.TightMuonStepping=True + +SimFlags.UseV2UserActions = True +SimFlags.OptionalUserActionList.addAction('G4UA::GeantFollowerMSTool',['Step','BeginOfEvent','EndOfEvent','BeginOfRun']) + ############### The output collection ####################### from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream @@ -329,14 +349,22 @@ ServiceMgr.THistSvc.Output += [ "val DATAFILE='GeantFollowing.root' TYPE='ROOT' ############################################################## + +from AthenaCommon.CfgGetter import getAlgorithm +topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True) + ## Populate alg sequence from G4AtlasApps.PyG4Atlas import PyG4AtlasAlg topSeq += PyG4AtlasAlg() #ServiceMgr.AthenaOutputStream.StreamHITS.ItemList = ['EventInfo#*'] +from AthenaCommon.AppMgr import AppMgr +AppMgr.EvtMax = myMaxEvent + ToolSvc.MuonTrackingGeometryBuilder.BlendInertMaterial = False TestSTEP_Propagator.Straggling = False +#ToolSvc.CaloTrackingGeometryBuilder.OutputLevel = VERBOSE #TestExtrapolator.OutputLevel = VERBOSE @@ -344,11 +372,7 @@ if myPDG == 998 : TestSTEP_Propagator.MultipleScattering = False TestSTEP_Propagator.EnergyLoss = False -from AthenaCommon.CfgGetter import getPublicTool -ServiceMgr.UserActionSvc.BeginOfEventActions += [getPublicTool("GeantFollowerMS")] -ServiceMgr.UserActionSvc.EndOfEventActions += [getPublicTool("GeantFollowerMS")] -ServiceMgr.UserActionSvc.SteppingActions += [getPublicTool("GeantFollowerMS")] from AthenaCommon.ConfigurationShelve import saveToAscii saveToAscii("config.txt") -#--- End jobOptions.GeantinoMapping.py file ------------------------------ +#--- End jobOptions GeantFollowingMS_jobOptions.py file ------------------------------ diff --git a/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowing_jobOptions.py b/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowing_jobOptions.py index 285102e012ad438b519869f59d8fc1ae1a8e6321..769f6d83c5c19bececa008149ea347022832ae3d 100644 --- a/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowing_jobOptions.py +++ b/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowing_jobOptions.py @@ -2,10 +2,9 @@ # # # This job option runs the G4 simulation -# of the ATLAS detector and the GeantinoMapping. +# of the ATLAS detector and the GeantFollower in ID (and MS) # It can be run using athena.py # -__version__="$Revision: 467755 $" #============================================================== @@ -13,6 +12,11 @@ __version__="$Revision: 467755 $" from AthenaCommon.AlgSequence import AlgSequence topSeq = AlgSequence() +#topSeq.ContinueEventloopOnFPE = True +from RecExConfig.RecFlags import rec as rec +rec.doFloatingPointException.set_Value_and_Lock(True) +rec.doNameAuditor = True + #--- Output threshold (DEBUG, INFO, WARNING, ERROR, FATAL) ---- #from AthenaCommon.AppMgr import ServiceMgr ServiceMgr.MessageSvc.OutputLevel = INFO @@ -22,15 +26,22 @@ ServiceMgr.MessageSvc.defaultLimit = 20000 from AthenaCommon.DetFlags import DetFlags from AthenaCommon.GlobalFlags import globalflags -from G4AtlasApps import AtlasG4Eng -AtlasG4Eng.G4Eng._ctrl.fldMenu.UseStepper('NystromRK4') +# Code crashes on NystromRK4 stepper NOW take default +#from G4AtlasApps import AtlasG4Eng +#AtlasG4Eng.G4Eng._ctrl.fldMenu.UseStepper('NystromRK4') + #--- Include JobSpecs.py -------------------------------------- #include ('JobSpecs.py') ### pass arguments with athena -c "..." ...jobOptions.py: if 'myMomentum' not in dir() : - myMomentum = 5000 + myMomentum = 25000 +# myMomentum = 50000 +# myMomentum = 100000 +# myMomentum = 500000 +# myMomentum = 10000 +# myMomentum = 5000 if 'myRandomOffset' not in dir() : myRandomOffset = 0 @@ -42,23 +53,45 @@ if 'myRandomSeed2' not in dir() : myRandomSeed2 = 820189 if 'myMaxEvent' not in dir() : - myMaxEvent = 25 + myMaxEvent = 500 + myMaxEvent = 5000 +# myMaxEvent = 1000 + myMaxEvent = 100 if 'myPt' not in dir() : - myPt = 'pt' # values are 'p' or 'pt' + myPt = 'p' # values are 'p' or 'pt' if 'myGeo' not in dir() : - myGeo = 'ATLAS-GEO-18-01-00' - +# release 20 + myGeo = 'ATLAS-R2-2015-03-01-00' +# this is release 19 like +# myGeo = 'ATLAS-GEO-20-00-01' +# this is release 17 from Jochen +# myGeo = 'ATLAS-GEO-18-01-03' +# myGeo = 'ATLAS-GEO-18-01-00' +# myGEO = 'ATLAS-R1-2012-02-01-00' # Set everything to ATLAS DetFlags.ID_setOn() DetFlags.Calo_setOn() DetFlags.Muon_setOn() + # the global flags + +# select latest Muon lay out on top of GEO-20 +from GeoModelSvc.GeoModelSvcConf import GeoModelSvc +GeoModelSvc = GeoModelSvc() +#GeoModelSvc.MuonVersionOverride="MuonSpectrometer-R.07.00" +#GeoModelSvc.MuonVersionOverride="MuonSpectrometer-R.06.04" + + +from IOVDbSvc.CondDB import conddb + if myGeo.split('-')[1] == 'GEO' : if myGeo.split('-')[2] > 16 : globalflags.ConditionsTag = 'OFLCOND-SDR-BS7T-05-02' + globalflags.ConditionsTag = 'OFLCOND-MC12-SDR-06' +# conddb.setGlobalTag("OFLCOND-MC12-SDR-06") else : globalflags.ConditionsTag = 'OFLCOND-SDR-BS7T-04-15' print globalflags.ConditionsTag @@ -66,7 +99,7 @@ elif myGeo.split('-')[1] == 'IBL' : globalflags.ConditionsTag = 'OFLCOND-SDR-BS14T-IBL-03' else : globalflags.ConditionsTag = 'OFLCOND-SDR-BS7T-05-02' - +# globalflags.ConditionsTag = 'OFLCOND-SIM-00-00-00' print globalflags.ConditionsTag #from AthenaCommon import AthenaCommonFlags @@ -77,7 +110,7 @@ print globalflags.ConditionsTag #from IOVDbSvc.CondDB import conddb #conddb.addOverride('/GLOBAL/BField/Map','BFieldMap-FullAsym-09') -#DetFlags.simulate.Truth_setOn() ### deprecated! + DetFlags.Truth_setOn() # specify your "/tmp/<username>/" directory here (output files may be large!) @@ -86,8 +119,9 @@ outPath = "" #"/tmp/wlukas/" #--- AthenaCommon flags --------------------------------------- from AthenaCommon.AthenaCommonFlags import athenaCommonFlags athenaCommonFlags.PoolEvgenInput.set_Off() ### is this necessary? -athenaCommonFlags.PoolHitsOutput = outPath + 'Hits.pool.root' -athenaCommonFlags.EvtMax = myMaxEvent +###athenaCommonFlags.PoolHitsOutput = outPath + 'Hits.pool.root' +athenaCommonFlags.PoolHitsOutput.set_Off() +athenaCommonFlags.EvtMax = myMaxEvent #--- Simulation flags ----------------------------------------- from G4AtlasApps.SimFlags import SimFlags @@ -95,102 +129,126 @@ SimFlags.load_atlas_flags() # Going to use an ATLAS layout SimFlags.SimLayout = myGeo SimFlags.EventFilter.set_Off() -myMinEta = 0.0 -myMaxEta = 0.0 - -myPDG = 998 # 999 = Geantinos, 13 = Muons, 0 diferently charged geantino - -## Run ParticleGenerator -import AthenaCommon.AtlasUnixGeneratorJob -spgorders = [ 'pdgcode:' + ' constant ' + str(myPDG), - 'vertX:' + ' constant 0.0', - 'vertY:' + ' constant 0.0', - 'vertZ:' + ' constant 0.0', - 't:' + ' constant 0.0', - 'eta:' + ' flat ' + str(myMinEta) + ' ' + str(myMaxEta), - 'phi:' + ' flat 0 6.2831853', - myPt + ':' + ' constant ' + str(myMomentum) ] -from ParticleGenerator.ParticleGeneratorConf import ParticleGenerator -topSeq += ParticleGenerator() -topSeq.ParticleGenerator.orders = sorted(spgorders) +include("GeneratorUtils/StdEvgenSetup.py") -SimFlags.RandomSeedOffset = myRandomOffset +myMinEta = 0.2 +#myMinEta = 0.0 +myMaxEta = 1.0 -### new rel17 (check Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py for details) -# SimFlags.RandomSeedList.addSeed( "SINGLE", myRandomSeed1, myRandomSeed2 ) +#myMinEta = 0.8 +#myMaxEta = 1.8 -### alternative for earlier rel17/rel16 -from AthenaServices.AthenaServicesConf import AtRanluxGenSvc -ServiceMgr += AtRanluxGenSvc() -ServiceMgr.AtRanluxGenSvc.Seeds = [ "SINGLE " + str(myRandomSeed1) + ' ' + str(myRandomSeed2) ] -### alternative to previous line -#ServiceMgr.AtRanluxGenSvc.Seeds = [ "SINGLE OFFSET " + str(myRandomOffset) + ' ' + str(myRandomSeed1) + ' ' + str(myRandomSeed2) ] +#myMinEta = 1.8 +myMaxEta = 2.8 -### alternative for old rel16 versions and before (?) -#SeedString = "SINGLE " + str(myRandomSeed1) + ' ' + str(myRandomSeed2) -#SimFlags.Seeds.set_Value(SeedString) +#myMinEta = 0.2 +#myMaxEta = 2.8 -#AtlasG4Eng.G4Eng._ctrl.fldMenu.UseStepper('AtlasRK4') + +#myMinEta = 2.0 +#myMaxEta = 2.8 +#myMinEta = 0.8 +#myMaxEta = 2.0 +#myMinEta = 0.2 +#myMaxEta = 0.8 + +myPDG = 13 # 998 = Charged Geantino 999 = neutral Geantino, 13 = Muon + +myPDG = 998 + +#from AthenaCommon.CfgGetter import getAlgorithm +#topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True) + +# sept 2014 run ParticleGun +import ParticleGun as PG +pg = PG.ParticleGun(randomSvcName=SimFlags.RandomSvc.get_Value(), randomStream="SINGLE") +#pg.sampler.pid = PG.CyclicSeqSampler([-13,13]) +pg.sampler.pid = myPDG +pg.sampler.mom = PG.EEtaMPhiSampler(energy=myMomentum, eta=[myMinEta,myMaxEta]) +#pg.sampler.mom = PG.PtEtaMPhiSampler(pt=myMomentum, eta=[myMinEta,myMaxEta]) +topSeq += pg + +SimFlags.RandomSeedOffset = myRandomOffset + +### new rel17 (check Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py for details) +SimFlags.RandomSeedList.addSeed( "SINGLE", myRandomSeed1, myRandomSeed2 ) + +from RngComps.RngCompsConf import AtRndmGenSvc +myAtRndmGenSvc = AtRndmGenSvc() +myAtRndmGenSvc.Seeds = ["SINGLE "+str(myRandomSeed1)+" "+str(myRandomSeed2) ] +#myAtRndmGenSvc.OutputLevel = VERBOSE +myAtRndmGenSvc.EventReseeding = False +ServiceMgr += myAtRndmGenSvc # suppress the enormous amount of MC output -from TruthExamples.TruthExamplesConf import DumpMC -DumpMC.VerboseOutput = False +# from TruthExamples.TruthExamplesConf import PrintMC +# PrintMC.VerboseOutput = False # ToolSvc setup from AthenaCommon.AppMgr import ToolSvc -# Estrapolator setup -include('TrkDetDescrSvc/AtlasTrackingGeometrySvc.py') -from AthenaCommon.AppMgr import ServiceMgr as svcMgr -AtlasTrackingGeometrySvc = svcMgr.AtlasTrackingGeometrySvc +# Tracking Geometry +# from AthenaCommon.CfgGetter import getService +# getService("AtlasTrackingGeometrySvc") + +from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags +from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc + +#ToolSvc.AtlasGeometryBuilder.OutputLevel = VERBOSE +#ToolSvc.CaloTrackingGeometryBuilder.OutputLevel = DEBUG +#ToolSvc.MuonTrackingGeometryBuilder.OutputLevel = DEBUG +#ToolSvc.InDetTrackingGeometryBuilder.OutputLevel = DEBUG + +#ServiceMgr.AtlasTrackingGeometrySvc.OutputLevel = VERBOSE + +#DetFlags.simulate.Truth_setOn() ### deprecated! + #-------------------------------------------------------------- # Assign the TrackingGeometry to the Algorithm #-------------------------------------------------------------- # the layer material inspector -from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__LayerMaterialInspector +from TrkDetDescrTestTools.TrkDetDescrTestToolsConf import Trk__LayerMaterialInspector LayerMaterialInspector = Trk__LayerMaterialInspector(name= 'LayerMaterialInspector') LayerMaterialInspector.OutputLevel = INFO -from AthenaCommon.AppMgr import ToolSvc ToolSvc += LayerMaterialInspector + + # the tracking volume displayer -from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__TrackingVolumeDisplayer +from TrkDetDescrTestTools.TrkDetDescrTestToolsConf import Trk__TrackingVolumeDisplayer TrackingVolumeDisplayer = Trk__TrackingVolumeDisplayer(name= 'TrackingVolumeDisplayer') TrackingVolumeDisplayer.TrackingVolumeOutputFile = 'TrackingVolumes-'+TrkDetFlags.MaterialMagicTag()+'.C' TrackingVolumeDisplayer.LayerOutputFile = 'Layers-'+TrkDetFlags.MaterialMagicTag()+'.C' TrackingVolumeDisplayer.SurfaceOutputFile = 'Surfaces-'+TrkDetFlags.MaterialMagicTag()+'.C' ToolSvc += TrackingVolumeDisplayer -# set up the Geometry Builder test -from TrkDetDescrAlgs.TrkDetDescrAlgsConf import Trk__GeometryBuilderTest -GeometryBuilderTest = Trk__GeometryBuilderTest(name ='GeometryBuilderTest') -GeometryBuilderTest.TrackingGeometrySvc = AtlasTrackingGeometrySvc -GeometryBuilderTest.DisplayTrackingVolumes = False -GeometryBuilderTest.RecordLayerMaterial = False -GeometryBuilderTest.LayerMaterialInspector = LayerMaterialInspector -GeometryBuilderTest.TrackingVolumeDisplayer = TrackingVolumeDisplayer -GeometryBuilderTest.WriteNtuple = False -GeometryBuilderTest.OutputLevel = INFO -topSeq += GeometryBuilderTest # PROPAGATOR DEFAULTS -------------------------------------------------------------------------------------- -TestPorpagators = [] +TestEnergyLossUpdator = [] +from TrkExTools.TrkExToolsConf import Trk__EnergyLossUpdator +AtlasEnergyLossUpdator = Trk__EnergyLossUpdator(name="AtlasEnergyLossUpdator") +ToolSvc += AtlasEnergyLossUpdator +ToolSvc.AtlasEnergyLossUpdator.DetailedEloss = True +TestEnergyLossUpdator += [AtlasEnergyLossUpdator] + + +TestPropagators = [] from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator -#from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as Propagator TestPropagator = Propagator(name = 'TestPropagator') ToolSvc += TestPropagator -TestPorpagators += [ TestPropagator ] +TestPropagators += [ TestPropagator ] from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as STEP_Propagator TestSTEP_Propagator = STEP_Propagator(name = 'TestSTEP_Propagator') ToolSvc += TestSTEP_Propagator +TestSTEP_Propagator.DetailedEloss = True -TestPorpagators += [TestSTEP_Propagator] +TestPropagators += [TestSTEP_Propagator] # UPDATOR DEFAULTS ----------------------------------------------------------------------------------------- @@ -198,24 +256,26 @@ TestUpdators = [] from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator as MaterialEffectsUpdator TestMaterialEffectsUpdator = MaterialEffectsUpdator(name = 'TestMaterialEffectsUpdator') -TestMaterialEffectsUpdator.EnergyLoss = False -TestMaterialEffectsUpdator.MultipleScattering = False ToolSvc += TestMaterialEffectsUpdator +if myPDG == 998 : + TestMaterialEffectsUpdator.EnergyLoss = False + TestMaterialEffectsUpdator.MultipleScattering = False TestUpdators += [ TestMaterialEffectsUpdator ] TestMaterialEffectsUpdatorLandau = MaterialEffectsUpdator(name = 'TestMaterialEffectsUpdatorLandau') TestMaterialEffectsUpdatorLandau.LandauMode = True -TestMaterialEffectsUpdatorLandau.EnergyLoss = False -TestMaterialEffectsUpdatorLandau.MultipleScattering = False ToolSvc += TestMaterialEffectsUpdatorLandau +if myPDG == 998 : + TestMaterialEffectsUpdatorLandau.EnergyLoss = False + TestMaterialEffectsUpdatorLandau.MultipleScattering = False -TestUpdators += [ TestMaterialEffectsUpdatorLandau ] +##TestUpdators += [ TestMaterialEffectsUpdatorLandau ] # the UNIQUE NAVIGATOR ( === UNIQUE GEOMETRY) -------------------------------------------------------------- from TrkExTools.TrkExToolsConf import Trk__Navigator TestNavigator = Trk__Navigator(name = 'TestNavigator') -TestNavigator.TrackingGeometrySvc = AtlasTrackingGeometrySvc +TestNavigator.TrackingGeometrySvc = "Trk::TrackingGeometrySvc/AtlasTrackingGeometrySvc" ToolSvc += TestNavigator # CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE @@ -230,31 +290,52 @@ TestSubUpdators += [ TestMaterialEffectsUpdator.name() ] # default for Calo is (Rk,MatLandau) TestSubPropagators += [ TestPropagator.name() ] -TestSubUpdators += [ TestMaterialEffectsUpdatorLandau.name() ] +TestSubUpdators += [ TestMaterialEffectsUpdator.name() ] + +TestSubPropagators += [ TestPropagator.name() ] +TestSubUpdators += [ TestMaterialEffectsUpdator.name() ] # default for MS is (STEP,Mat) TestSubPropagators += [ TestSTEP_Propagator.name() ] TestSubUpdators += [ TestMaterialEffectsUpdator.name() ] + +TestSubPropagators += [ TestSTEP_Propagator.name() ] +TestSubUpdators += [ TestMaterialEffectsUpdator.name() ] + +TestSubPropagators += [ TestPropagator.name() ] +TestSubUpdators += [ TestMaterialEffectsUpdator.name() ] # ---------------------------------------------------------------------------------------------------------- # call the base class constructor from TrkExTools.TrkExToolsConf import Trk__Extrapolator -TestExtrapolator = Trk__Extrapolator('TextExtrapolator',\ +TestExtrapolator = Trk__Extrapolator('TestExtrapolator',\ Navigator = TestNavigator,\ MaterialEffectsUpdators = TestUpdators,\ - Propagators = TestPorpagators,\ + Propagators = TestPropagators,\ + EnergyLossUpdators = TestEnergyLossUpdator,\ + STEP_Propagator = TestSTEP_Propagator.name(),\ SubPropagators = TestSubPropagators,\ - SubMEUpdators = TestSubUpdators,\ - DoCaloDynamic = False) + SubMEUpdators = TestSubUpdators) ToolSvc += TestExtrapolator +from TrkG4UserActions.TrkG4UserActionsConf import Trk__GeantFollowerHelper +GeantFollowerHelper = Trk__GeantFollowerHelper(name="GeantFollowerHelper") +GeantFollowerHelper.Extrapolator = TestExtrapolator +GeantFollowerHelper.ExtrapolateDirectly = True +GeantFollowerHelper.ExtrapolateIncrementally = True +GeantFollowerHelper.OutputLevel = VERBOSE +ToolSvc += GeantFollowerHelper + +SimFlags.UseV2UserActions = True +SimFlags.OptionalUserActionList.addAction('G4UA::GeantFollowerTool',['Step','BeginOfEvent','EndOfEvent','BeginOfRun']) + ############### The output collection ####################### from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream -# --- check dictionary +## --- check dictionary ServiceMgr.AthenaSealSvc.CheckDictionary = True -# --- commit interval (test) -ServiceMgr.AthenaPoolCnvSvc.OutputLevel = DEBUG +## --- commit interval (test) +#ServiceMgr.AthenaPoolCnvSvc.OutputLevel = DEBUG ServiceMgr.AthenaPoolCnvSvc.CommitInterval = 10 from AthenaCommon.AppMgr import ServiceMgr @@ -265,13 +346,25 @@ ServiceMgr.THistSvc.Output += [ "val DATAFILE='GeantFollowing.root' TYPE='ROOT' ############################################################## + +from AthenaCommon.CfgGetter import getAlgorithm +topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True) + ## Populate alg sequence from G4AtlasApps.PyG4Atlas import PyG4AtlasAlg topSeq += PyG4AtlasAlg() -from AthenaCommon.CfgGetter import getPublicTool -ServiceMgr.UserActionSvc.BeginOfEventActions += [getPublicTool("GeantFollower")] -ServiceMgr.UserActionSvc.EndOfEventActions += [getPublicTool("GeantFollower")] -ServiceMgr.UserActionSvc.SteppingActions += [getPublicTool("GeantFollower")] +#ServiceMgr.AthenaOutputStream.StreamHITS.ItemList = ['EventInfo#*'] + +ToolSvc.MuonTrackingGeometryBuilder.BlendInertMaterial = False +TestSTEP_Propagator.Straggling = False + +#TestExtrapolator.OutputLevel = VERBOSE + +if myPDG == 998 : + TestSTEP_Propagator.MultipleScattering = False + TestSTEP_Propagator.EnergyLoss = False -#--- End jobOptions.GeantinoMapping.py file ------------------------------ +from AthenaCommon.ConfigurationShelve import saveToAscii +saveToAscii("config.txt") +#--- End jobOptions GeantFollowing_jobOptions.py file ------------------------------ diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorder.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorder.cxx index 373f56a66ee3459cdbb0db2f8732c4e0c8bf5ccc..e2d9ae86d0464ed49ca748bf2527c890c730135e 100755 --- a/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorder.cxx +++ b/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorder.cxx @@ -7,7 +7,6 @@ /////////////////////////////////////////////////////////////////// #include "TrkG4UserActions/EnergyLossRecorder.h" -#include <iostream> #include "G4Step.hh" //#include "G4Material.hh" #include "G4StepPoint.hh" @@ -21,98 +20,84 @@ #include "GeoPrimitives/GeoPrimitives.h" #include "TrkValInterfaces/IPositionMomentumWriter.h" - -EnergyLossRecorder::EnergyLossRecorder(const std::string& type, const std::string& name, const IInterface* parent): - UserActionBase(type,name,parent), - m_pmWriter(""), - m_entries(0) -{ - declareProperty("PositionMomentumWriter", m_pmWriter, ""); -} - -StatusCode EnergyLossRecorder::initialize() +namespace G4UA { - if(!m_pmWriter.empty()) - { - ATH_CHECK(m_pmWriter.retrieve()); - } - return StatusCode::SUCCESS; -} -void EnergyLossRecorder::BeginOfEvent(const G4Event*) -{ - return; -} -void EnergyLossRecorder::EndOfEvent(const G4Event*) -{ - if (!m_pmWriter.empty()) - { - m_pmWriter->finalizeTrack(); - } - m_entries = 0; -} + EnergyLossRecorder::EnergyLossRecorder(const Config& config) + : m_config(config) + , m_entries(0) + { -void EnergyLossRecorder::BeginOfRun(const G4Run*) -{ - return; -} + } -void EnergyLossRecorder::EndOfRun(const G4Run*) -{ - return; -} + void EnergyLossRecorder::beginOfRun(const G4Run*) + { + return; + } -void EnergyLossRecorder::Step(const G4Step* aStep) -{ + void EnergyLossRecorder::endOfRun(const G4Run*) + { + return; + } - // kill secondary particles - if (aStep->GetTrack()->GetParentID()) { - aStep->GetTrack()->SetTrackStatus(fStopAndKill); + void EnergyLossRecorder::beginOfEvent(const G4Event*) + { return; } - // we require a minimum amount of material for recording the step - // the material information - G4TouchableHistory* touchHist = (G4TouchableHistory*)aStep->GetPreStepPoint()->GetTouchable(); - // G4LogicalVolume - G4LogicalVolume *lv= touchHist ? touchHist->GetVolume()->GetLogicalVolume() : 0; - G4Material *mat = lv ? lv->GetMaterial() : 0; + void EnergyLossRecorder::endOfEvent(const G4Event*) + { + if (m_config.pmWriter) + { + m_config.pmWriter->finalizeTrack(); + } + m_entries = 0; + return; + } - // log the information // cut off air - if (mat && mat->GetRadlen() < 200000.) { - // keep primary particles - calculate the kinematics for them - G4ThreeVector pos = aStep->GetPreStepPoint()->GetPosition(); - double px = aStep->GetPreStepPoint()->GetMomentum().x(); - double py = aStep->GetPreStepPoint()->GetMomentum().y(); - double pz = aStep->GetPreStepPoint()->GetMomentum().z(); - Amg::Vector3D position(pos.x(),pos.y(),pos.z()); - Amg::Vector3D momentum(px ,py, pz); + void EnergyLossRecorder::processStep(const G4Step* aStep) + { + // kill secondary particles + if (aStep->GetTrack()->GetParentID()) + { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + return; + } + if(!m_config.pmWriter) return; + // we require a minimum amount of material for recording the step + // the material information + G4TouchableHistory* touchHist = (G4TouchableHistory*)aStep->GetPreStepPoint()->GetTouchable(); + // G4LogicalVolume + G4LogicalVolume *lv= touchHist ? touchHist->GetVolume()->GetLogicalVolume() : 0; + G4Material *mat = lv ? lv->GetMaterial() : 0; - // record the starting parameters at the first step - if (m_entries==0) { - // increase the counter - ++m_entries; - double m = aStep->GetTrack()->GetDynamicParticle()->GetMass(); - int pdgCode = aStep->GetTrack()->GetDynamicParticle()->GetPDGcode(); - m_pmWriter->initializeTrack(position,momentum,m,pdgCode); - } - else + // log the information // cut off air + if (mat && mat->GetRadlen() < 200000.) { - m_pmWriter->recordTrackState(position,momentum); + // keep primary particles - calculate the kinematics for them + G4ThreeVector pos = aStep->GetPreStepPoint()->GetPosition(); + double px = aStep->GetPreStepPoint()->GetMomentum().x(); + double py = aStep->GetPreStepPoint()->GetMomentum().y(); + double pz = aStep->GetPreStepPoint()->GetMomentum().z(); + Amg::Vector3D position(pos.x(),pos.y(),pos.z()); + Amg::Vector3D momentum(px ,py, pz); + + + // record the starting parameters at the first step + if (m_entries==0) + { + // increase the counter + ++m_entries; + double m = aStep->GetTrack()->GetDynamicParticle()->GetMass(); + int pdgCode = aStep->GetTrack()->GetDynamicParticle()->GetPDGcode(); + m_config.pmWriter->initializeTrack(position,momentum,m,pdgCode); + } + else + { + m_config.pmWriter->recordTrackState(position,momentum); + } } } -} - -StatusCode EnergyLossRecorder::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} +} // namespace G4UA diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorderTool.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorderTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..764d6c11f599bf9bdfa8f2ef18840a0cb5355b0c --- /dev/null +++ b/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorderTool.cxx @@ -0,0 +1,62 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CxxUtils/make_unique.h" +#include "TrkG4UserActions/EnergyLossRecorderTool.h" +#include "TrkValInterfaces/IPositionMomentumWriter.h" + +namespace G4UA{ + + + EnergyLossRecorderTool::EnergyLossRecorderTool(const std::string& type, const std::string& name,const IInterface* parent) + : ActionToolBase<EnergyLossRecorder>(type, name, parent), m_config() + , m_pmWriter("") + { + declareProperty("PositionMomentumWriter", m_pmWriter, ""); + } + StatusCode EnergyLossRecorderTool::initialize() + { + if(!m_pmWriter.empty()) + { + ATH_CHECK(m_pmWriter.retrieve()); + m_config.pmWriter = &(*m_pmWriter); + } + return StatusCode::SUCCESS; + } + std::unique_ptr<EnergyLossRecorder> EnergyLossRecorderTool::makeAction(){ + ATH_MSG_DEBUG("makeAction"); + auto action = CxxUtils::make_unique<EnergyLossRecorder>(m_config); + return std::move(action); + } + StatusCode EnergyLossRecorderTool::queryInterface(const InterfaceID& riid, void** ppvIf){ + + if(riid == IBeginRunActionTool::interfaceID()) { + *ppvIf = (IBeginRunActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == IEndRunActionTool::interfaceID()) { + *ppvIf = (IEndRunActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == IBeginEventActionTool::interfaceID()) { + *ppvIf = (IBeginEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == IEndEventActionTool::interfaceID()) { + *ppvIf = (IEndEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == ISteppingActionTool::interfaceID()) { + *ppvIf = (ISteppingActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + return ActionToolBase<EnergyLossRecorder>::queryInterface(riid, ppvIf); + } + +} // namespace G4UA diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollower.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollower.cxx index 28099b4a4b0b414e38c7debee5803fe023840372..c7b16adb2098d93ec45ac7b446c49217352fa7cd 100755 --- a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollower.cxx +++ b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollower.cxx @@ -24,91 +24,91 @@ #include "G4DynamicParticle.hh" #include "G4Track.hh" +#include "GaudiKernel/Bootstrap.h" +#include "GaudiKernel/ISvcLocator.h" -GeantFollower::GeantFollower(const std::string& type, const std::string& name, const IInterface* parent) : - UserActionBase(type,name,parent), - m_helper("Trk::GeantFollowerHelper"), - m_helperPointer(0) -{ - declareProperty("HelperTool",m_helper); -} +namespace G4UA{ -StatusCode GeantFollower::initialize() -{ - ATH_CHECK(m_helper.retrieve()); - m_helperPointer = (&(*m_helper)); - return StatusCode::SUCCESS; -} + GeantFollower::GeantFollower(const Config& config) + : m_config(config) + , m_helperPointer(nullptr) + {} + void GeantFollower::beginOfEvent(const G4Event*) + { + m_helperPointer->beginEvent(); + } + void GeantFollower::endOfEvent(const G4Event*) + { + m_helperPointer->endEvent(); + } -void GeantFollower::BeginOfEvent(const G4Event*) -{ - // now initialize the helper - m_helperPointer->beginEvent(); - return; -} + void GeantFollower::beginOfRun(const G4Run*) + { + if(m_config.helper.retrieve()!=StatusCode::SUCCESS) + { + G4ExceptionDescription description; + description << "Cannot retrieve GeantFollower helper"; + G4Exception("GeantFollower", "GeantFollower1", FatalException, description); + return; + } + m_helperPointer = (&(*m_config.helper)); -void GeantFollower::EndOfEvent(const G4Event*) -{ - // release event - m_helperPointer->endEvent(); - return; -} + return; + } + void GeantFollower::processStep(const G4Step* aStep) + { + // kill secondaries + if (aStep->GetTrack()->GetParentID()) + { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + return; + } + + // get the prestep point and follow this guy + G4StepPoint * g4PreStep = aStep->GetPreStepPoint(); + G4ThreeVector g4Momentum = g4PreStep->GetMomentum(); + G4ThreeVector g4Position = g4PreStep->GetPosition(); + + G4Track* g4Track = aStep->GetTrack(); + const G4DynamicParticle* g4DynParticle = g4Track->GetDynamicParticle(); + + // the material information + const G4TouchableHistory* touchHist = static_cast<const G4TouchableHistory*>(aStep->GetPreStepPoint()->GetTouchable()); + if(ATH_LIKELY(touchHist)) + { + // G4LogicalVolume + const G4LogicalVolume *lv= touchHist->GetVolume()->GetLogicalVolume(); + if(ATH_LIKELY(lv)) + { + const G4Material *mat = lv->GetMaterial(); + // the step information + double steplength = aStep->GetStepLength(); + // the position information + double X0 = mat->GetRadlen(); + // update the track follower + m_helperPointer->trackParticle(g4Position,g4Momentum,g4DynParticle->GetPDGcode(),g4DynParticle->GetCharge(),steplength,X0); + } + else + { + G4ExceptionDescription description; + description << "GeantFollower::SteppingAction NULL G4LogicalVolume pointer."; + G4Exception("GeantFollower", "GeantFollower2", FatalException, description); + } + } + else + { + G4ExceptionDescription description; + description << "GeantFollower::SteppingAction NULL G4TouchableHistory pointer."; + G4Exception("GeantFollower", "GeantFollower3", FatalException, description); + } + return; -void GeantFollower::Step(const G4Step* aStep) -{ - // kill secondaries - if (aStep->GetTrack()->GetParentID()) { - aStep->GetTrack()->SetTrackStatus(fStopAndKill); - return; } - // get the prestep point and follow this guy - G4StepPoint * g4PreStep = aStep->GetPreStepPoint(); - G4ThreeVector g4Momentum = g4PreStep->GetMomentum(); - G4ThreeVector g4Position = g4PreStep->GetPosition(); - - G4Track* g4Track = aStep->GetTrack(); - const G4DynamicParticle* g4DynParticle = g4Track->GetDynamicParticle(); - - // the material information - const G4TouchableHistory* touchHist = static_cast<const G4TouchableHistory*>(aStep->GetPreStepPoint()->GetTouchable()); - if(ATH_LIKELY(touchHist)) { - // G4LogicalVolume - const G4LogicalVolume *lv= touchHist->GetVolume()->GetLogicalVolume(); - if(ATH_LIKELY(lv)) { - const G4Material *mat = lv->GetMaterial(); - // the step information - double steplength = aStep->GetStepLength(); - // the position information - double X0 = mat->GetRadlen(); - // update the track follower - m_helperPointer->trackParticle(g4Position,g4Momentum,g4DynParticle->GetPDGcode(),g4DynParticle->GetCharge(),steplength,X0); - } - else { - throw std::runtime_error("GeantFollower::SteppingAction NULL G4LogicalVolume pointer."); - } - } - else { - throw std::runtime_error("GeantFollower::SteppingAction NULL G4TouchableHistory pointer."); - } - return; -} - - -StatusCode GeantFollower::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} +} // namespace G4UA diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerHelper.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerHelper.cxx index 3373b150b717126776834e98d080a46149beda99..6e895bfaec2369a4ba12700600bd7bf0ce8e52ca 100644 --- a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerHelper.cxx +++ b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerHelper.cxx @@ -145,11 +145,9 @@ void Trk::GeantFollowerHelper::beginEvent() const void Trk::GeantFollowerHelper::trackParticle(const G4ThreeVector& pos, const G4ThreeVector& mom, int pdg, double charge, float t, float X0) const { - - // construct the intial parameters - Amg::Vector3D npos(pos.x(),pos.y(),pos.z()); - Amg::Vector3D nmom(mom.x(),mom.y(),mom.z()); - + // construct the initial parameters + Amg::Vector3D npos(pos.x(),pos.y(),pos.z()); + Amg::Vector3D nmom(mom.x(),mom.y(),mom.z()); if (!m_g4_steps){ ATH_MSG_INFO("Initial step ... preparing event cache."); m_t_x = pos.x(); @@ -184,7 +182,7 @@ void Trk::GeantFollowerHelper::trackParticle(const G4ThreeVector& pos, const G4T // destination surface const Trk::PlaneSurface& destinationSurface = g4Parameters->associatedSurface(); // extrapolate to the destination surface - const Trk::TrackParameters* trkParameters = m_extrapolateDirectly ? + const Trk::TrackParameters* trkParameters = m_extrapolateDirectly ? m_extrapolator->extrapolateDirectly(*m_parameterCache,destinationSurface,Trk::alongMomentum,false) : m_extrapolator->extrapolate(*m_parameterCache,destinationSurface,Trk::alongMomentum,false); // fill the geant information and the trk information diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMS.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMS.cxx index d5ce67993bf248b893fdac49d514d6b9fb646195..6762b37831628aa03344d94cb47596a589d5f319 100755 --- a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMS.cxx +++ b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMS.cxx @@ -25,96 +25,98 @@ #include "G4Track.hh" #include "TrkGeometry/TrackingGeometry.h" -GeantFollowerMS::GeantFollowerMS(const std::string& type, const std::string& name, const IInterface* parent) : - UserActionBase(type,name,parent), - m_helper("Trk::GeantFollowerMSHelper"), - m_helperPointer(0), - m_trackingGeometry(0), - m_trackingGeometrySvc("AtlasTrackingGeometrySvc",name), - m_trackingGeometryName("AtlasTrackingGeometry") -{ - declareProperty("HelperTool",m_helper); -} - - -StatusCode GeantFollowerMS::initialize() -{ - ATH_CHECK(m_helper.retrieve()); - m_helperPointer = (&(*m_helper)); - ATH_CHECK(m_trackingGeometrySvc.retrieve()); //FIXME possibly should not bail in this case? - m_trackingGeometryName = m_trackingGeometrySvc->trackingGeometryName(); - return StatusCode::SUCCESS; -} - - -void GeantFollowerMS::BeginOfEvent(const G4Event*) -{ - // now initialize the helper - m_helperPointer->beginEvent(); - return; -} - - -void GeantFollowerMS::EndOfEvent(const G4Event*) -{ - // release event - m_helperPointer->endEvent(); - return; -} - - -void GeantFollowerMS::Step(const G4Step* aStep) -{ - - // kill secondaries - if (aStep->GetTrack()->GetParentID()) { - aStep->GetTrack()->SetTrackStatus(fStopAndKill); - return; +#include "GaudiKernel/Bootstrap.h" +#include "GaudiKernel/ISvcLocator.h" + +namespace G4UA{ + + + GeantFollowerMS::GeantFollowerMS(const Config& config) + : m_config(config) + , m_trackingGeometry(nullptr) + , m_helperPointer(nullptr) + {} + + void GeantFollowerMS::beginOfEvent(const G4Event*) + { + m_helperPointer->beginEvent(); } - // get the prestep point and follow this guy - G4StepPoint * g4PreStep = aStep->GetPreStepPoint(); - G4ThreeVector g4Momentum = g4PreStep->GetMomentum(); - G4ThreeVector g4Position = g4PreStep->GetPosition(); - - G4Track* g4Track = aStep->GetTrack(); - const G4DynamicParticle* g4DynParticle = g4Track->GetDynamicParticle(); - - // the material information - const G4TouchableHistory* touchHist = static_cast<const G4TouchableHistory*>(aStep->GetPreStepPoint()->GetTouchable()); - if(ATH_LIKELY(touchHist)) { - // G4LogicalVolume - const G4LogicalVolume *lv= touchHist->GetVolume()->GetLogicalVolume(); - if(ATH_LIKELY(lv)) { - const G4Material *mat = lv->GetMaterial(); - // the step information - double steplength = aStep->GetStepLength(); - // the position information - double X0 = mat->GetRadlen(); - // update the track follower - //std::cout << " particle PDG " << g4DynParticle->GetPDGcode() << " charge " << g4DynParticle->GetCharge() << std::endl; - m_helperPointer->trackParticle(g4Position,g4Momentum,g4DynParticle->GetPDGcode(),g4DynParticle->GetCharge(),steplength,X0); - } - else { - throw std::runtime_error("GeantFollowerMS::SteppingAction NULL G4LogicalVolume pointer."); - } + void GeantFollowerMS::endOfEvent(const G4Event*) + { + m_helperPointer->endEvent(); } - else { - throw std::runtime_error("GeantFollowerMS::SteppingAction NULL G4TouchableHistory pointer."); + + void GeantFollowerMS::beginOfRun(const G4Run*) + { + if(m_config.helper.retrieve()!=StatusCode::SUCCESS) + { + G4ExceptionDescription description; + description << "Cannot retrieve GeantFollowerMS helper"; + G4Exception("GeantFollowerMS", "GeantFollowerMS1", FatalException, description); + return; + } + m_helperPointer = (&(*m_config.helper)); + + if(m_config.trackingGeometrySvc.retrieve()!=StatusCode::SUCCESS) + { + G4ExceptionDescription description; + description << "Cannot retrieve TrackingGeometrySvc in GeantFollowerMS"; + G4Exception("GeantFollowerMS", "GeantFollowerMS2", FatalException, description); + return; + } + + return; } - return; -} - - -StatusCode GeantFollowerMS::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); + + void GeantFollowerMS::processStep(const G4Step* aStep) + { + // kill secondaries + if (aStep->GetTrack()->GetParentID()) + { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + return; + } + + // get the prestep point and follow this guy + G4StepPoint * g4PreStep = aStep->GetPreStepPoint(); + G4ThreeVector g4Momentum = g4PreStep->GetMomentum(); + G4ThreeVector g4Position = g4PreStep->GetPosition(); + + G4Track* g4Track = aStep->GetTrack(); + const G4DynamicParticle* g4DynParticle = g4Track->GetDynamicParticle(); + + // the material information + const G4TouchableHistory* touchHist = static_cast<const G4TouchableHistory*>(aStep->GetPreStepPoint()->GetTouchable()); + if(ATH_LIKELY(touchHist)) + { + // G4LogicalVolume + const G4LogicalVolume *lv= touchHist->GetVolume()->GetLogicalVolume(); + if(ATH_LIKELY(lv)) + { + const G4Material *mat = lv->GetMaterial(); + // the step information + double steplength = aStep->GetStepLength(); + // the position information + double X0 = mat->GetRadlen(); + // update the track follower + //std::cout << " particle PDG " << g4DynParticle->GetPDGcode() << " charge " << g4DynParticle->GetCharge() << std::endl; + m_helperPointer->trackParticle(g4Position,g4Momentum,g4DynParticle->GetPDGcode(),g4DynParticle->GetCharge(),steplength,X0); + } + else + { + G4ExceptionDescription description; + description << "GeantFollowerMS::SteppingAction NULL G4LogicalVolume pointer."; + G4Exception("GeantFollowerMS", "GeantFollowerMS3", FatalException, description); + } + } + else + { + G4ExceptionDescription description; + description << "GeantFollowerMS::SteppingAction NULL G4TouchableHistory pointer."; + G4Exception("GeantFollowerMS", "GeantFollowerMS4", FatalException, description); + } + return; } - return StatusCode::SUCCESS; -} +} // namespace G4UA diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMSHelper.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMSHelper.cxx index eccd3ac620518d79a6b4a540dff3611e61cf0a73..b5205f4979162a2557da1ad767f8e58852254209 100644 --- a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMSHelper.cxx +++ b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMSHelper.cxx @@ -11,9 +11,6 @@ #include "StoreGate/StoreGateSvc.h" #include "TTree.h" #include "GaudiKernel/ITHistSvc.h" -// CLHEP -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" // Trk #include "TrkExInterfaces/IExtrapolator.h" #include "TrkExInterfaces/IEnergyLossUpdator.h" @@ -151,6 +148,11 @@ StatusCode Trk::GeantFollowerMSHelper::initialize() return StatusCode::FAILURE; } + if(m_speedup) { + ATH_MSG_INFO(" SpeedUp GeantFollowerMS "); + } else { + ATH_MSG_INFO(" NO SpeedUp GeantFollowerMS "); + } ATH_MSG_INFO("initialize()"); // create the new Tree @@ -366,6 +368,7 @@ void Trk::GeantFollowerMSHelper::trackParticle(const G4ThreeVector& pos, const G m_g4_steps = 0; m_tX0Cache = 0.; // construct the intial parameters + m_parameterCache = new Trk::CurvilinearParameters(npos, nmom, charge); AmgSymMatrix(5)* covMatrix = new AmgSymMatrix(5);; covMatrix->setZero(); @@ -434,6 +437,7 @@ void Trk::GeantFollowerMSHelper::trackParticle(const G4ThreeVector& pos, const G // if(fabs(npos.z())>zMuonEntry||npos.perp()>4255) crossedExitLayer = true; if(fabs(npos.z())>21800||npos.perp()>12500) crossedExitLayer = true; if(m_crossedMuonEntry&&m_g4_steps>=2&&!crossedExitLayer) return; + if(m_g4_steps>2) return; if(m_g4_steps>4) return; } @@ -491,6 +495,9 @@ void Trk::GeantFollowerMSHelper::trackParticle(const G4ThreeVector& pos, const G m_extrapolator->extrapolate(*m_parameterCacheMS,destinationSurface,Trk::alongMomentum,false,Trk::muon); // Backwards from Exit to ME if(trkParameters_FW) { + ATH_MSG_DEBUG (" forward extrapolation succeeded "); + bool doBackWard = false; + if(doBackWard) { const Trk::TrackParameters* trkParameters_BACK = m_extrapolateDirectly ? m_extrapolator->extrapolateDirectly(*trkParameters_FW,*m_destinationSurface,Trk::oppositeMomentum,false,Trk::muon) : m_extrapolator->extrapolate(*trkParameters_FW,*m_destinationSurface,Trk::oppositeMomentum,false,Trk::muon); @@ -575,6 +582,7 @@ void Trk::GeantFollowerMSHelper::trackParticle(const G4ThreeVector& pos, const G m_b_X0 = x0; m_b_Eloss = Eloss; delete matvec_BACK; + } } delete trkParameters_FW; } diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMSTool.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMSTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..aac628ea659c179229a9e66314bc32c46ded4b5d --- /dev/null +++ b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMSTool.cxx @@ -0,0 +1,48 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CxxUtils/make_unique.h" +#include "TrkG4UserActions/GeantFollowerMSTool.h" +#include "TrkG4UserActions/IGeantFollowerMSHelper.h" + +namespace G4UA{ + + + GeantFollowerMSTool::GeantFollowerMSTool(const std::string& type, const std::string& name,const IInterface* parent): + ActionToolBase<GeantFollowerMS>(type, name, parent), m_config(){ + declareProperty("HelperTool",m_config.helper); + } + + std::unique_ptr<GeantFollowerMS> GeantFollowerMSTool::makeAction(){ + ATH_MSG_DEBUG("makeAction"); + auto action = CxxUtils::make_unique<GeantFollowerMS>(m_config); + return std::move(action); + } + + StatusCode GeantFollowerMSTool::queryInterface(const InterfaceID& riid, void** ppvIf){ + + if(riid == IBeginEventActionTool::interfaceID()) { + *ppvIf = (IBeginEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == IEndEventActionTool::interfaceID()) { + *ppvIf = (IEndEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == IBeginRunActionTool::interfaceID()) { + *ppvIf = (IBeginRunActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == ISteppingActionTool::interfaceID()) { + *ppvIf = (ISteppingActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + return ActionToolBase<GeantFollowerMS>::queryInterface(riid, ppvIf); + } + +} // namespace G4UA diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerTool.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..a4ec9ba79e817ed357ec52a5e205ad990ce46181 --- /dev/null +++ b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerTool.cxx @@ -0,0 +1,47 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CxxUtils/make_unique.h" +#include "TrkG4UserActions/GeantFollowerTool.h" + +namespace G4UA{ + + + GeantFollowerTool::GeantFollowerTool(const std::string& type, const std::string& name,const IInterface* parent): + ActionToolBase<GeantFollower>(type, name, parent), m_config(){ + declareProperty("HelperTool",m_config.helper); + } + + std::unique_ptr<GeantFollower> GeantFollowerTool::makeAction(){ + ATH_MSG_DEBUG("makeAction"); + auto action = CxxUtils::make_unique<GeantFollower>(m_config); + return std::move(action); + } + + StatusCode GeantFollowerTool::queryInterface(const InterfaceID& riid, void** ppvIf){ + + if(riid == IBeginEventActionTool::interfaceID()) { + *ppvIf = (IBeginEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == IEndEventActionTool::interfaceID()) { + *ppvIf = (IEndEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == IBeginRunActionTool::interfaceID()) { + *ppvIf = (IBeginRunActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == ISteppingActionTool::interfaceID()) { + *ppvIf = (ISteppingActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + return ActionToolBase<GeantFollower>::queryInterface(riid, ppvIf); + } + +} // namespace G4UA diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorder.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorder.cxx index 7db5a3866a3cb871f994288b39160709dfe79573..7287dc232ccddf5a551bb4412b76d9c2e0e1cee6 100755 --- a/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorder.cxx +++ b/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorder.cxx @@ -14,6 +14,9 @@ #include "GaudiKernel/NTuple.h" #include "GaudiKernel/SmartDataPtr.h" #include "GaudiKernel/MsgStream.h" +#include "GaudiKernel/Bootstrap.h" +#include "GaudiKernel/ISvcLocator.h" +#include "GaudiKernel/IMessageSvc.h" #include "SimHelpers/ServiceAccessor.h" #include "StoreGate/StoreGateSvc.h" #include "G4Step.hh" @@ -25,211 +28,199 @@ #include <climits> #include <cmath> -MaterialStepRecorder::MaterialStepRecorder(const std::string& type, const std::string& name, const IInterface* parent): - UserActionBase(type,name,parent), - m_matStepCollection(0), - m_matStepCollectionName("MaterialStepRecords"), - m_recordComposition(true), - m_totalNbOfAtoms(0), - m_totalSteps(0), - m_eventID(0), - m_elementTable(0), - m_elementTableName("ElementTable"), - m_runElementTable(0) -{} - - -void MaterialStepRecorder::BeginOfEvent(const G4Event*) -{ - ATH_MSG_DEBUG(" BeginOfEventAction"); - // create a new Collection - m_matStepCollection = new Trk::MaterialStepCollection; - return; -} - - -void MaterialStepRecorder::EndOfEvent(const G4Event*) -{ - ATH_MSG_DEBUG(" EndOfEventAction"); - ++m_eventID; - // write the Collection to StoreGate - if ( evtStore()->record(m_matStepCollection, m_matStepCollectionName, false).isFailure() ) { - std::cout << "[MaterialStepRecorder] EndOfEventAction : recording MaterialStep collection in StoreGate FAILED" << std::endl; +namespace G4UA{ + + + MaterialStepRecorder::MaterialStepRecorder(): + AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ),"MaterialStepRecorder"), + m_evtStore("StoreGateSvc/StoreGateSvc","MaterialStepRecorder"), //FIXME name should be passed in via a Config struct rather than hardcoded. + m_detStore("StoreGateSvc/DetectorStore","MaterialStepRecorder"), //FIXME name should be passed in via a Config struct rather than hardcoded. + m_matStepCollection(nullptr), + m_matStepCollectionName("MaterialStepRecords"), //FIXME should be passed in via a Config struct rather than hardcoded. + m_recordComposition(true), //FIXME should be passed in via a Config struct rather than hardcoded. + m_totalNbOfAtoms(0), + m_totalSteps(0), + m_eventID(0), + m_elementTable(nullptr), + m_elementTableName("ElementTable"), + m_runElementTable(nullptr) + { } - // write out the ElementTable of this event - if ( evtStore()->record(m_elementTable, m_elementTableName, false).isFailure() ){ - std::cout << "[MaterialStepRecorder] EndOfEventAction : recording ElementTable in StoreGate FAILED" << std::endl; - delete m_elementTable; - } - m_elementTable = 0; - return; -} - - -void MaterialStepRecorder::BeginOfRun(const G4Run*) -{ - ATH_MSG_DEBUG(" BeginOfRunAction"); - // initialize - m_totalSteps = 0; - m_eventID = 0; - return; -} - - -void MaterialStepRecorder::EndOfRun(const G4Run*) -{ - ATH_MSG_DEBUG(" EndOfRunAction"); - if (m_runElementTable) - { - ATH_MSG_DEBUG(" Printing final ElementTable "); - ATH_MSG_DEBUG(*m_runElementTable); - } - delete m_runElementTable; - return; -} + void MaterialStepRecorder::beginOfEvent(const G4Event*){ -void MaterialStepRecorder::Step(const G4Step* aStep) -{ - // kill secondaries - if (aStep->GetTrack()->GetParentID()) { - aStep->GetTrack()->SetTrackStatus(fStopAndKill); - return; - } - // ElementTable preparation - if (m_recordComposition && !m_elementTable) { - m_elementTable = new Trk::ElementTable(); - m_runElementTable = new Trk::ElementTable(); + ATH_MSG_DEBUG(" BeginOfEventAction"); + + // create a new Collection + m_matStepCollection = new Trk::MaterialStepCollection; + + // m_eventStepLength = 0; + } - // the material information - G4TouchableHistory* touchHist = (G4TouchableHistory*)aStep->GetPreStepPoint()->GetTouchable(); - // G4LogicalVolume - G4LogicalVolume *lv= touchHist ? touchHist->GetVolume()->GetLogicalVolume() : 0; - G4Material *mat = lv ? lv->GetMaterial() : 0; + void MaterialStepRecorder::endOfEvent(const G4Event*){ - std::vector<unsigned char> elements; - std::vector<unsigned char> fractions; + ATH_MSG_DEBUG(" EndOfEventAction"); - // log the information // cut off air - if (mat && mat->GetRadlen() < 200000.) { + ++m_eventID; + // write the Collection to StoreGate + if(m_evtStore->record(m_matStepCollection, m_matStepCollectionName, false).isFailure()) + { + ATH_MSG_ERROR("cannot record step collection to StoreGate"); + } + // write out the ElementTable of this event + if ( m_evtStore->record(m_elementTable, m_elementTableName, false).isFailure() ) + { + ATH_MSG_ERROR("EndOfEventAction : recording ElementTable in StoreGate FAILED"); + delete m_elementTable; + } + m_elementTable = nullptr; - ++m_totalSteps; + } - // the step information - double steplength = aStep->GetStepLength(); + void MaterialStepRecorder::beginOfRun(const G4Run*){ - // the position information - G4ThreeVector pos = aStep->GetPreStepPoint()->GetPosition(); + ATH_MSG_DEBUG(" BeginOfRunAction"); - double X0 = mat->GetRadlen(); - double L0 = mat->GetNuclearInterLength(); - double A = 0.; - double Z = 0.; - // double totAtoms = 0.; + // initialize + m_totalSteps = 0; + m_eventID = 0; - double rho = mat->GetDensity()*CLHEP::mm3/CLHEP::gram; + } - // get the number of Elements - size_t elNumber = mat->GetNumberOfElements(); - const G4ElementVector* elVector = mat->GetElementVector(); - double totAtoms = mat->GetTotNbOfAtomsPerVolume(); + void MaterialStepRecorder::processStep(const G4Step* aStep) + { + // kill secondaries + if (aStep->GetTrack()->GetParentID()) { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + return; + } - // reserve the right number of elements - elements.reserve(elNumber); - fractions.reserve(elNumber); + // ElementTable preparation + if (m_recordComposition && !m_elementTable) { + m_elementTable = new Trk::ElementTable(); + m_runElementTable = new Trk::ElementTable(); + } - if (1 == elNumber) { + // the material information + G4TouchableHistory* touchHist = (G4TouchableHistory*)aStep->GetPreStepPoint()->GetTouchable(); + // G4LogicalVolume + G4LogicalVolume *lv= touchHist ? touchHist->GetVolume()->GetLogicalVolume() : 0; + G4Material *mat = lv ? lv->GetMaterial() : 0; - A = mat->GetA()/CLHEP::gram; - Z = mat->GetZ(); + std::vector<unsigned char> elements; + std::vector<unsigned char> fractions; - unsigned int Zint = (unsigned int)Z; - // the element and fraction vector - elements.push_back(static_cast<unsigned char>(Z)); - fractions.push_back(UCHAR_MAX); - // record the Element - if (m_recordComposition && !m_elementTable->contains(Zint)){ - // the element Material - Trk::Material elMat(X0,L0,A,Z,rho); - G4String elName = (*elVector)[0]->GetName(); - // add it to the table - m_elementTable->addElement(elMat, elName); - m_runElementTable->addElement(elMat,elName); - } + // log the information // cut off air + if (mat && mat->GetRadlen() < 200000.) { + + ++m_totalSteps; + + // the step information + double steplength = aStep->GetStepLength(); + // the position information + G4ThreeVector pos = aStep->GetPreStepPoint()->GetPosition(); - } else { + double X0 = mat->GetRadlen(); + double L0 = mat->GetNuclearInterLength(); + double A = 0.; + double Z = 0.; + // double totAtoms = 0.; - const G4double* atVector = mat->GetVecNbOfAtomsPerVolume(); - double totalFrac = 0.; - double totalFracChar = 0.; + double rho = mat->GetDensity()*CLHEP::mm3/CLHEP::gram; - for (size_t iel = 0; iel < elNumber; ++iel) { + // get the number of Elements + size_t elNumber = mat->GetNumberOfElements(); + const G4ElementVector* elVector = mat->GetElementVector(); + double totAtoms = mat->GetTotNbOfAtomsPerVolume(); - G4Element* currentEl = (*elVector)[iel]; - double currentNum = atVector ? atVector[iel] : 1.; - double relNbAtoms = currentNum/totAtoms; + // reserve the right number of elements + elements.reserve(elNumber); + fractions.reserve(elNumber); - double currentZ = currentEl->GetZ(); + if (1 == elNumber) { - A += relNbAtoms*currentEl->GetA()/CLHEP::gram; - Z += relNbAtoms*currentEl->GetZ(); - unsigned int Zint = (unsigned int)(currentEl->GetZ()); + A = mat->GetA()/CLHEP::gram; + Z = mat->GetZ(); + unsigned int Zint = (unsigned int)Z; // the element and fraction vector - elements.push_back(int(currentZ)); - // calculate the fraction with a accuracy of 1/256. - unsigned int relNbAtomsChar = (unsigned int)(relNbAtoms*(UCHAR_MAX)); - relNbAtomsChar = relNbAtomsChar > UCHAR_MAX ? UCHAR_MAX : relNbAtomsChar; - - // smaller components than 0.5 % are automatically ignored - totalFrac += relNbAtoms; - if (relNbAtomsChar) { - totalFracChar += double(relNbAtomsChar)/double(1.*UCHAR_MAX); - fractions.push_back(relNbAtomsChar); - // record composition - if (m_recordComposition && !m_elementTable->contains(Zint)){ - double curA = currentEl->GetA()/CLHEP::gram; - double curZ = currentEl->GetZ(); - // approximate formulas for X0 and L0 - // X0 from : PH-EP-Tech-Note-2010-013 g/cm3 -> g/mm3 - // L0 from : - double curX0 = 1432.8*curA/(curZ*(curZ+1)*(11.319-std::log(curZ))); - double curL0 = 0.; - double curRho = rho*relNbAtoms; - Trk::Material elMat(curX0,curL0,curA,curZ,curRho); - G4String elName = currentEl->GetName(); - // add it to the table - m_elementTable->addElement(elMat, elName); - m_runElementTable->addElement(elMat,elName); + elements.push_back(static_cast<unsigned char>(Z)); + fractions.push_back(UCHAR_MAX); + // record the Element + if (m_recordComposition && !m_elementTable->contains(Zint)){ + // the element Material + Trk::Material elMat(X0,L0,A,Z,rho); + G4String elName = (*elVector)[0]->GetName(); + // add it to the table + m_elementTable->addElement(elMat, elName); + m_runElementTable->addElement(elMat,elName); + } + + + } else { + + const G4double* atVector = mat->GetVecNbOfAtomsPerVolume(); + double totalFrac = 0.; + double totalFracChar = 0.; + + for (size_t iel = 0; iel < elNumber; ++iel) { + + G4Element* currentEl = (*elVector)[iel]; + double currentNum = atVector ? atVector[iel] : 1.; + double relNbAtoms = currentNum/totAtoms; + + double currentZ = currentEl->GetZ(); + + A += relNbAtoms*currentEl->GetA()/CLHEP::gram; + Z += relNbAtoms*currentEl->GetZ(); + unsigned int Zint = (unsigned int)(currentEl->GetZ()); + + // the element and fraction vector + elements.push_back(int(currentZ)); + // calculate the fraction with a accuracy of 1/256. + unsigned int relNbAtomsChar = (unsigned int)(relNbAtoms*(UCHAR_MAX)); + relNbAtomsChar = relNbAtomsChar > UCHAR_MAX ? UCHAR_MAX : relNbAtomsChar; + + // smaller components than 0.5 % are automatically ignored + totalFrac += relNbAtoms; + if (relNbAtomsChar) { + totalFracChar += double(relNbAtomsChar)/double(1.*UCHAR_MAX); + fractions.push_back(relNbAtomsChar); + // record composition + if (m_recordComposition && !m_elementTable->contains(Zint)){ + double curA = currentEl->GetA()/CLHEP::gram; + double curZ = currentEl->GetZ(); + // approximate formulas for X0 and L0 + // X0 from : PH-EP-Tech-Note-2010-013 g/cm3 -> g/mm3 + // L0 from : + double curX0 = 1432.8*curA/(curZ*(curZ+1)*(11.319-std::log(curZ))); + double curL0 = 0.; + double curRho = rho*relNbAtoms; + Trk::Material elMat(curX0,curL0,curA,curZ,curRho); + G4String elName = currentEl->GetName(); + // add it to the table + m_elementTable->addElement(elMat, elName); + m_runElementTable->addElement(elMat,elName); + } } } + if ((totalFrac-1.)*(totalFrac-1.) > 10e-4 ) + ATH_MSG_DEBUG("Total fractions do not add up to one at INPUT (" << totalFrac << ") !"); } - if ((totalFrac-1.)*(totalFrac-1.) > 10e-4 ) - ATH_MSG_DEBUG("Total fractions do not add up to one at INPUT (" << totalFrac << ") !"); - } - // is it a Geantino? - if (aStep->GetTrack()->GetParticleDefinition()->GetPDGEncoding() == 0) { - if (m_recordComposition) - m_matStepCollection->push_back(new Trk::MaterialStep(pos.x(), pos.y(), pos.z(), steplength, X0, L0, A, Z, rho, elements, fractions)); - else - m_matStepCollection->push_back(new Trk::MaterialStep(pos.x(), pos.y(), pos.z(), steplength, X0, L0, A, Z, rho)); + // is it a Geantino? + if (aStep->GetTrack()->GetParticleDefinition()->GetPDGEncoding() == 0) { + if (m_recordComposition) + m_matStepCollection->push_back(new Trk::MaterialStep(pos.x(), pos.y(), pos.z(), steplength, X0, L0, A, Z, rho, elements, fractions)); + else + m_matStepCollection->push_back(new Trk::MaterialStep(pos.x(), pos.y(), pos.z(), steplength, X0, L0, A, Z, rho)); + } } + return; } - return; -} - -StatusCode MaterialStepRecorder::queryInterface(const InterfaceID& riid, void** ppvInterface) -{ - if ( IUserAction::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<IUserAction*>(this); - addRef(); - } else { - // Interface is not directly available : try out a base class - return UserActionBase::queryInterface(riid, ppvInterface); - } - return StatusCode::SUCCESS; -} + + +} // namespace G4UA diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorderTool.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorderTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..ea99a1fb79f2a553c165d9e1a63ed1ed8ca9ed41 --- /dev/null +++ b/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorderTool.cxx @@ -0,0 +1,43 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CxxUtils/make_unique.h" +#include "TrkG4UserActions/MaterialStepRecorderTool.h" + +namespace G4UA{ + + MaterialStepRecorderTool::MaterialStepRecorderTool(const std::string& type, const std::string& name,const IInterface* parent): + ActionToolBase<MaterialStepRecorder>(type, name, parent){ + } + std::unique_ptr<MaterialStepRecorder> MaterialStepRecorderTool::makeAction(){ + ATH_MSG_DEBUG("makeAction"); + auto action = CxxUtils::make_unique<MaterialStepRecorder>(); + return std::move(action); + } + StatusCode MaterialStepRecorderTool::queryInterface(const InterfaceID& riid, void** ppvIf){ + + if(riid == IBeginEventActionTool::interfaceID()) { + *ppvIf = (IBeginEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == IEndEventActionTool::interfaceID()) { + *ppvIf = (IEndEventActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == IBeginRunActionTool::interfaceID()) { + *ppvIf = (IBeginRunActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + if(riid == ISteppingActionTool::interfaceID()) { + *ppvIf = (ISteppingActionTool*) this; + addRef(); + return StatusCode::SUCCESS; + } + return ActionToolBase<MaterialStepRecorder>::queryInterface(riid, ppvIf); + } + +} // namespace G4UA diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/components/TrkG4UserActions_entries.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/components/TrkG4UserActions_entries.cxx index 9726ac9faca404d6b67fcf3b4915229f558845b0..bd0499f5f6f44d3c7a18899166507265d748c6dd 100644 --- a/Tracking/TrkG4Components/TrkG4UserActions/src/components/TrkG4UserActions_entries.cxx +++ b/Tracking/TrkG4Components/TrkG4UserActions/src/components/TrkG4UserActions_entries.cxx @@ -1,14 +1,23 @@ #include "GaudiKernel/DeclareFactoryEntries.h" +#include "TrkG4UserActions/MaterialStepRecorderTool.h" +//#include "TrkG4UserActions/EnergyLossRecorderTool.h" +#include "TrkG4UserActions/GeantFollowerTool.h" #include "TrkG4UserActions/GeantFollowerHelper.h" +#include "TrkG4UserActions/GeantFollowerMSTool.h" #include "TrkG4UserActions/GeantFollowerMSHelper.h" -#include "TrkG4UserActions/MaterialStepRecorder.h" -#include "TrkG4UserActions/EnergyLossRecorder.h" -#include "TrkG4UserActions/GeantFollower.h" -#include "TrkG4UserActions/GeantFollowerMS.h" +DECLARE_TOOL_FACTORY( G4UA::MaterialStepRecorderTool ) +//DECLARE_TOOL_FACTORY( G4UA::EnergyLossRecorderTool ) DECLARE_NAMESPACE_TOOL_FACTORY( Trk , GeantFollowerHelper ) +DECLARE_TOOL_FACTORY( G4UA::GeantFollowerTool ) DECLARE_NAMESPACE_TOOL_FACTORY( Trk , GeantFollowerMSHelper ) -DECLARE_TOOL_FACTORY( MaterialStepRecorder ) -DECLARE_TOOL_FACTORY( EnergyLossRecorder ) -DECLARE_TOOL_FACTORY( GeantFollower ) -DECLARE_TOOL_FACTORY( GeantFollowerMS ) +DECLARE_TOOL_FACTORY( G4UA::GeantFollowerMSTool ) + +DECLARE_FACTORY_ENTRIES( TrkG4UserActions ) { + DECLARE_TOOL( G4UA::MaterialStepRecorderTool ) + // DECLARE_TOOL( G4UA::EnergyLossRecorderTool ) + DECLARE_TOOL( G4UA::GeantFollowerTool ) + DECLARE_NAMESPACE_TOOL( Trk , GeantFollowerHelper ) + DECLARE_TOOL( G4UA::GeantFollowerMSTool ) + DECLARE_NAMESPACE_TOOL( Trk , GeantFollowerMSHelper ) +} diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsFex.cxx b/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsFex.cxx index fd9061a654caa1758a57ceaeeafd0fffe078f20a..32acd2cd89bfc26dea58a46c0d3f9352a7d40d72 100644 --- a/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsFex.cxx +++ b/Trigger/TrigAlgorithms/TrigT2MinBias/src/T2MbtsFex.cxx @@ -204,7 +204,7 @@ HLT::ErrorCode T2MbtsFex::hltExecute(std::vector<std::vector<HLT::TriggerElement else { m_triggerEnergies[bit_pos] = (*m_itt)->energy(); m_triggerID[bit_pos] = bit_pos; - ATH_MSG_ERROR("Counter id = " << bit_pos << ", energy = " << m_triggerEnergies[bit_pos] << " pC"); + ATH_MSG_DEBUG("Counter id = " << bit_pos << ", energy = " << m_triggerEnergies[bit_pos] << " pC"); } unsigned int nTriggerTimes = m_triggerTimes.size(); diff --git a/Trigger/TrigAnalysis/TrigAnalysisExamples/CMakeLists.txt b/Trigger/TrigAnalysis/TrigAnalysisExamples/CMakeLists.txt index bfb789d3cac64d7159ef9b3b2626b38859b7636e..2e71c4123bbbc0b8f5dc740144c4dcbca589700c 100644 --- a/Trigger/TrigAnalysis/TrigAnalysisExamples/CMakeLists.txt +++ b/Trigger/TrigAnalysis/TrigAnalysisExamples/CMakeLists.txt @@ -6,48 +6,50 @@ atlas_subdir( TrigAnalysisExamples ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaPython - TestPolicy - Event/xAOD/xAODEventInfo - Event/xAOD/xAODTrigger - Event/xAOD/xAODEgamma - Event/xAOD/xAODTau - Event/xAOD/xAODTrigEgamma - Event/xAOD/xAODTrigCalo - Event/xAOD/xAODJet - Trigger/TrigConfiguration/TrigConfHLTData - PRIVATE - Control/AthenaBaseComps - Control/AthenaKernel - Control/StoreGate - Control/AthAnalysisBaseComps - Control/AthToolSupport/AsgTools - PhysicsAnalysis/POOLRootAccess - Event/EventInfo - GaudiKernel - Trigger/TrigAnalysis/TrigAnalysisInterfaces - Trigger/TrigAnalysis/TrigDecisionTool - Trigger/TrigAnalysis/TriggerMatchingTool - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigT1/TrigT1Interfaces - Event/FourMomUtils) +atlas_depends_on_subdirs( + PRIVATE + Event/xAOD/xAODEventInfo + Event/xAOD/xAODTrigger + Event/xAOD/xAODEgamma + Event/xAOD/xAODTau + Event/xAOD/xAODTrigEgamma + Event/xAOD/xAODTrigCalo + Event/xAOD/xAODJet + Trigger/TrigConfiguration/TrigConfHLTData + Control/AthenaBaseComps + Control/AthenaKernel + Control/StoreGate + Control/AthAnalysisBaseComps + Control/AthToolSupport/AsgTools + PhysicsAnalysis/POOLRootAccess + Event/EventInfo + GaudiKernel + Trigger/TrigAnalysis/TrigAnalysisInterfaces + Trigger/TrigAnalysis/TrigDecisionTool + Trigger/TrigAnalysis/TriggerMatchingTool + Trigger/TrigEvent/TrigSteeringEvent + Trigger/TrigT1/TrigT1Interfaces + Event/FourMomUtils ) # External dependencies: -find_package( Boost COMPONENTS filesystem thread system ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( Boost ) +find_package( ROOT COMPONENTS Core Tree Hist ) # Component(s) in the package: atlas_add_component( TrigAnalysisExamples - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib AthAnalysisBaseCompsLib AsgTools SGtests EventInfo GaudiKernel xAODEventInfo xAODTrigger xAODEgamma xAODTau xAODTrigEgamma xAODTrigCalo xAODJet TrigConfHLTData TrigDecisionToolLib TriggerMatchingTool TrigSteeringEvent TrigT1Interfaces FourMomUtils POOLRootAccess) + src/*.h src/*.cxx src/components/*.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AthenaBaseComps + AthenaKernel StoreGateLib AthAnalysisBaseCompsLib AsgTools EventInfo + GaudiKernel xAODEventInfo xAODTrigger xAODEgamma xAODTau xAODTrigEgamma + xAODTrigCalo xAODJet TrigConfHLTData TrigDecisionToolLib TriggerMatchingToolLib + TrigSteeringEvent TrigT1Interfaces FourMomUtils POOLRootAccess ) atlas_add_executable( TrigAnalysisExApp - src/TrigAnalysisExApp.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthAnalysisBaseCompsLib POOLRootAccess TrigDecisionTool) + src/apps/TrigAnalysisExApp.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} AthAnalysisBaseCompsLib POOLRootAccess + GaudiKernel TrigDecisionToolLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TrigAnalysisExApp.cxx b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/apps/TrigAnalysisExApp.cxx similarity index 100% rename from Trigger/TrigAnalysis/TrigAnalysisExamples/src/TrigAnalysisExApp.cxx rename to Trigger/TrigAnalysis/TrigAnalysisExamples/src/apps/TrigAnalysisExApp.cxx diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt index 13a50b6c0b3c0b4967fd76615410f6a1b8c4f968..f0224facd5657d475f3ebb48181eadb34ed150ea 100644 --- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt +++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt @@ -6,54 +6,62 @@ atlas_subdir( TrigEgammaAnalysisTools ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthToolSupport/AsgTools - Event/xAOD/xAODCaloEvent - Event/xAOD/xAODEgamma - Event/xAOD/xAODEventInfo - Event/xAOD/xAODJet - Event/xAOD/xAODPrimitives - Event/xAOD/xAODTracking - Event/xAOD/xAODTrigCalo - Event/xAOD/xAODTrigEgamma - Event/xAOD/xAODTrigRinger - Event/xAOD/xAODTrigger - Event/xAOD/xAODTruth - LumiBlock/LumiBlockComps - PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools - Reconstruction/RecoTools/RecoToolInterfaces - Reconstruction/egamma/egammaMVACalib - Trigger/TrigAnalysis/TrigDecisionTool - Trigger/TrigAnalysis/TrigEgammaMatchingTool - Trigger/TrigAnalysis/TrigEgammaEmulationTool - Trigger/TrigConfiguration/TrigConfHLTData - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigMonitoring/TrigHLTMonitoring - PhysicsAnalysis/AnalysisCommon/PATCore - PRIVATE - Control/AthenaBaseComps - Control/AthenaMonitoring - Control/StoreGate - GaudiKernel - Trigger/TrigConfiguration/TrigConfxAOD ) +atlas_depends_on_subdirs( + PUBLIC + Control/AthToolSupport/AsgTools + Event/xAOD/xAODCaloEvent + Event/xAOD/xAODEgamma + Event/xAOD/xAODEventInfo + Event/xAOD/xAODJet + Event/xAOD/xAODTracking + Event/xAOD/xAODTrigCalo + Event/xAOD/xAODTrigEgamma + Event/xAOD/xAODTrigRinger + Event/xAOD/xAODTrigger + Event/xAOD/xAODTruth + LumiBlock/LumiBlockComps + PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools + Reconstruction/RecoTools/RecoToolInterfaces + Reconstruction/egamma/egammaMVACalib + Trigger/TrigAnalysis/TrigDecisionTool + Trigger/TrigAnalysis/TrigEgammaMatchingTool + Trigger/TrigAnalysis/TrigEgammaEmulationTool + Trigger/TrigConfiguration/TrigConfHLTData + Trigger/TrigEvent/TrigSteeringEvent + Trigger/TrigMonitoring/TrigHLTMonitoring + PhysicsAnalysis/AnalysisCommon/PATCore + PRIVATE + Control/AthenaBaseComps + Control/AthenaMonitoring + Control/StoreGate + GaudiKernel + Trigger/TrigConfiguration/TrigConfxAOD ) # External dependencies: -find_package( Boost COMPONENTS filesystem thread system ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( Boost ) +find_package( ROOT COMPONENTS Core Hist Tree ) # Component(s) in the package: +atlas_add_library( TrigEgammaAnalysisToolsLib + TrigEgammaAnalysisTools/*.h Root/*.cxx + PUBLIC_HEADERS TrigEgammaAnalysisTools + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODCaloEvent xAODEgamma + xAODEventInfo xAODJet xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger + xAODTrigger xAODTruth LumiBlockCompsLib ElectronPhotonSelectorToolsLib + RecoToolInterfaces egammaMVACalibLib TrigDecisionToolLib + TrigEgammaMatchingToolLib TrigEgammaEmulationToolLib TrigConfHLTData + TrigSteeringEvent TrigHLTMonitoringLib PATCoreLib + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} TrigConfxAODLib ) + atlas_add_component( TrigEgammaAnalysisTools - src/*.cxx - Root/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AsgTools xAODCaloEvent xAODEgamma xAODEventInfo xAODJet xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODTrigger xAODTruth LumiBlockCompsLib ElectronPhotonSelectorToolsLib egammaMVACalibLib TrigDecisionToolLib TrigEgammaMatchingToolLib TrigEgammaEmulationTool TrigConfHLTData TrigSteeringEvent TrigHLTMonitoringLib AthenaBaseComps AthenaMonitoringLib StoreGateLib SGtests GaudiKernel PATCoreLib ) + src/*.h src/*.cxx src/components/*.cxx + LINK_LIBRARIES AthenaBaseComps GaudiKernel AsgTools TrigHLTMonitoringLib + AthenaMonitoringLib TrigDecisionToolLib TrigEgammaMatchingToolLib xAODEgamma + TrigEgammaAnalysisToolsLib ) # Install files from the package: -atlas_install_headers( TrigEgammaAnalysisTools ) atlas_install_python_modules( python/TrigEgamma*.py ) atlas_install_joboptions( share/test*.py ) -atlas_install_generic( share/trigEgammaDQ.py share/get_trigEgammaDQ.sh - DESTINATION share - EXECUTABLE ) - +atlas_install_scripts( share/trigEgammaDQ.py share/get_trigEgammaDQ.sh ) diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/src/TrigEgammaMonTool.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/src/TrigEgammaMonTool.cxx index e95494774aab6763fc1774348ade8cd45312b0bb..dd7bd078d5cafd27abcf966fe9f249a9caf90725 100644 --- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/src/TrigEgammaMonTool.cxx +++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/src/TrigEgammaMonTool.cxx @@ -82,8 +82,7 @@ StatusCode TrigEgammaMonTool::fill(){ StatusCode TrigEgammaMonTool::proc(){ // Finalize the efficiency for end of run - //if(!endOfRunFlag()){ return(StatusCode::SUCCESS); } - if(!endOfRun){ return(StatusCode::SUCCESS); } + if(!endOfRunFlag()){ return(StatusCode::SUCCESS); } ATH_MSG_INFO ("Finalizing " << name() << "..."); for ( ToolHandleArray<ITrigEgammaAnalysisBaseTool>::const_iterator itoo=m_asgtools.begin(); itoo!=m_asgtools.end(); ++itoo ) { diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/CMakeLists.txt b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/CMakeLists.txt index 270af764fc68931374066362c66a40ec36107cc6..3ed5616cfe518d7d20350b5984451dbf5a321257 100644 --- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/CMakeLists.txt +++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/CMakeLists.txt @@ -6,49 +6,58 @@ atlas_subdir( TrigEgammaEmulationTool ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthContainers - Control/AthToolSupport/AsgTools - Event/xAOD/xAODBase - Event/xAOD/xAODCaloEvent - Event/xAOD/xAODEgamma - Event/xAOD/xAODPrimitives - Event/xAOD/xAODTracking - Event/xAOD/xAODTrigCalo - Event/xAOD/xAODTrigEgamma - Event/xAOD/xAODTrigRinger - Event/xAOD/xAODTrigger - PhysicsAnalysis/AnalysisCommon/PATCore - PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools - LumiBlock/LumiBlockComps - InnerDetector/InDetRecTools/InDetTrackSelectionTool - Reconstruction/RecoTools/RecoToolInterfaces - Trigger/TrigAnalysis/TrigDecisionTool - Trigger/TrigConfiguration/TrigConfHLTData - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigHypothesis/TrigMultiVarHypo - PRIVATE - Control/AthenaBaseComps - Control/StoreGate - GaudiKernel - Trigger/TrigAnalysis/TrigEgammaMatchingTool ) +atlas_depends_on_subdirs( + PUBLIC + Control/AthContainers + Control/AthToolSupport/AsgTools + Event/xAOD/xAODBase + Event/xAOD/xAODCaloEvent + Event/xAOD/xAODEgamma + Event/xAOD/xAODPrimitives + Event/xAOD/xAODTracking + Event/xAOD/xAODTrigCalo + Event/xAOD/xAODTrigEgamma + Event/xAOD/xAODTrigRinger + Event/xAOD/xAODTrigger + PhysicsAnalysis/AnalysisCommon/PATCore + PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools + LumiBlock/LumiBlockComps + InnerDetector/InDetRecTools/InDetTrackSelectionTool + Reconstruction/RecoTools/RecoToolInterfaces + Trigger/TrigAnalysis/TrigDecisionTool + Trigger/TrigConfiguration/TrigConfHLTData + Trigger/TrigEvent/TrigSteeringEvent + Trigger/TrigHypothesis/TrigMultiVarHypo + Trigger/TrigAnalysis/TrigEgammaMatchingTool + PRIVATE + Control/AthenaBaseComps + Control/StoreGate + GaudiKernel ) # External dependencies: -find_package( Boost COMPONENTS filesystem thread system ) +find_package( Boost ) find_package( CLHEP ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) # Component(s) in the package: -atlas_add_component( TrigEgammaEmulationTool - src/*.cxx - Root/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AsgTools xAODBase xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODTrigger PATCoreLib ElectronPhotonSelectorToolsLib TrigDecisionToolLib TrigConfHLTData TrigSteeringEvent TrigMultiVarHypoLib AthenaBaseComps StoreGateLib SGtests GaudiKernel TrigEgammaMatchingToolLib LumiBlockCompsLib ) +atlas_add_library( TrigEgammaEmulationToolLib + TrigEgammaEmulationTool/*.h Root/*.cxx + PUBLIC_HEADERS TrigEgammaEmulationTool + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthContainers AsgTools xAODBase + xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma + xAODTrigRinger xAODTrigger PATCoreLib ElectronPhotonSelectorToolsLib + LumiBlockCompsLib InDetTrackSelectionToolLib RecoToolInterfaces + TrigDecisionToolLib TrigConfHLTData TrigSteeringEvent TrigMultiVarHypoLib + TrigEgammaMatchingToolLib + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ) +atlas_add_component( TrigEgammaEmulationTool + src/*.h src/*.cxx src/components/*.cxx + LINK_LIBRARIES AthenaBaseComps GaudiKernel TrigDecisionToolLib + TrigEgammaMatchingToolLib xAODTrigger xAODTrigCalo xAODTrigRinger + xAODTracking xAODCaloEvent xAODEgamma PATCoreLib TrigEgammaEmulationToolLib ) # Install files from the package: -atlas_install_headers( TrigEgammaEmulationTool ) atlas_install_python_modules( python/TrigEgamma*.py ) atlas_install_joboptions( share/test*.py ) - diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/scripts/TIDArun.sh b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/scripts/TIDArun.sh index e91b9de09a383ff999a6d6c1bac54af795ef7452..03d36f98e2706af79e0be40a1da8f11fb4671dd2 100755 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/scripts/TIDArun.sh +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/scripts/TIDArun.sh @@ -36,9 +36,7 @@ if [ -e TrkNtuple-0000.root ]; then echo "fetching reference files from $REFDIR" - get_files TIDAhistos-vtx.dat - - EXPERT=$(grep expert $2) + EXPERT=$(echo $1 $2 | grep expert) # if expert timing histos if [ "x$EXPERT" != "x" ]; then @@ -79,6 +77,7 @@ if [ -e TrkNtuple-0000.root ]; then done if [ "x$EXPERT" == "x" ]; then + get_files -data TIDAhistos-vtx.dat echo -e "\nrunning comparitor " $(date) "\n" TIDAcomparitor.exe $* $NOREF else diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/CMakeLists.txt b/Trigger/TrigEvent/TrigEventAthenaPool/CMakeLists.txt index 885d67c880095c29f48b2d5626c95f6715324de6..594f9a98121dae95390200da4f37799853f023ec 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/CMakeLists.txt +++ b/Trigger/TrigEvent/TrigEventAthenaPool/CMakeLists.txt @@ -54,12 +54,20 @@ endif() find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) - run_tpcnv_test( TrigEventAthenaPool_15.6.1 ESD-15.6.1 ) - run_tpcnv_test( TrigEventAthenaPool_15.6.13.2 AOD-15.6.13.2-full ) - run_tpcnv_test( TrigEventAthenaPool_16.0.3.3 AOD-16.0.3.3-full ) - run_tpcnv_test( TrigEventAthenaPool_17.0.6 AOD-17.0.6-full ) - run_tpcnv_test( TrigEventAthenaPool_18.0.0 AOD-18.0.0-full ) - run_tpcnv_test( TrigEventAthenaPool_20.1.7.2 ESD-20.1.7.2 ) + set( TRIGEVENTATHENAPOOL_REFERENCE_TAG + TrigEventAthenaPoolReference-01-00-00 ) + run_tpcnv_test( TrigEventAthenaPool_15.6.1 ESD-15.6.1 + REFERENCE_TAG ${TRIGEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( TrigEventAthenaPool_15.6.13.2 AOD-15.6.13.2-full + REFERENCE_TAG ${TRIGEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( TrigEventAthenaPool_16.0.3.3 AOD-16.0.3.3-full + REFERENCE_TAG ${TRIGEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( TrigEventAthenaPool_17.0.6 AOD-17.0.6-full + REFERENCE_TAG ${TRIGEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( TrigEventAthenaPool_18.0.0 AOD-18.0.0-full + REFERENCE_TAG ${TRIGEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( TrigEventAthenaPool_20.1.7.2 ESD-20.1.7.2 + REFERENCE_TAG ${TRIGEVENTATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) endif() diff --git a/Trigger/TrigValidation/TrigInDetValidation/TIDAbuild/TrigInDetValidation_TestConfiguration_main.xml b/Trigger/TrigValidation/TrigInDetValidation/TIDAbuild/TrigInDetValidation_TestConfiguration_main.xml index 429120ecda87c720e9f89ec265b28466c71d700a..62d873aaf3c7104ef5c541cb15c6272042dec315 100644 --- a/Trigger/TrigValidation/TrigInDetValidation/TIDAbuild/TrigInDetValidation_TestConfiguration_main.xml +++ b/Trigger/TrigValidation/TrigInDetValidation/TIDAbuild/TrigInDetValidation_TestConfiguration_main.xml @@ -129,8 +129,19 @@ <keepFilePattern displayColor="red">*.css</keepFilePattern> <keepFilePattern>TIDAWeb/STAR</keepFilePattern> <keepFilePattern>TIDAWeb/build/STAR</keepFilePattern> + <keepFilePattern>times/STAR</keepFilePattern> <keepFilePattern>times-FTF/STAR</keepFilePattern> + + <keepFilePattern>times/STAR.p*</keepFilePattern> + <keepFilePattern>times-FTF/STAR.p*</keepFilePattern> + + <keepFilePattern>times/STAR.pdf</keepFilePattern> + <keepFilePattern>times/STAR.png</keepFilePattern> + + <keepFilePattern>times-FTF/STAR.pdf</keepFilePattern> + <keepFilePattern>times-FTF/STAR.png</keepFilePattern> + <keepFilePattern>*.png</keepFilePattern> <keepFilePattern>*.ps</keepFilePattern> <keepFilePattern>*.php</keepFilePattern> diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/TrigInDetValidation_TestConfiguration.xml b/Trigger/TrigValidation/TrigInDetValidation/test/TrigInDetValidation_TestConfiguration.xml index 6ba3a33b30c6b6f47a6f5e3c2aeb0df922fa9912..ba5e2abeab42c1aff6efa595aeb96f7f5735b87d 100755 --- a/Trigger/TrigValidation/TrigInDetValidation/test/TrigInDetValidation_TestConfiguration.xml +++ b/Trigger/TrigValidation/TrigInDetValidation/test/TrigInDetValidation_TestConfiguration.xml @@ -9212,8 +9212,19 @@ <keepFilePattern displayColor="red">*.css</keepFilePattern> <keepFilePattern>TIDAWeb/*</keepFilePattern> <keepFilePattern>TIDAWeb/build/*</keepFilePattern> + <keepFilePattern>times/*</keepFilePattern> <keepFilePattern>times-FTF/*</keepFilePattern> + + <keepFilePattern>times/*.p*</keepFilePattern> + <keepFilePattern>times-FTF/*.p*</keepFilePattern> + + <keepFilePattern>times/*.pdf</keepFilePattern> + <keepFilePattern>times/*.png</keepFilePattern> + + <keepFilePattern>times-FTF/*.pdf</keepFilePattern> + <keepFilePattern>times-FTF/*.png</keepFilePattern> + <keepFilePattern>*.png</keepFilePattern> <keepFilePattern>*.ps</keepFilePattern> <keepFilePattern>*.php</keepFilePattern> diff --git a/Trigger/TrigValidation/TrigInDetValidationLight/TIDAbuild/TrigInDetValidationLight_TestConfiguration_main.xml b/Trigger/TrigValidation/TrigInDetValidationLight/TIDAbuild/TrigInDetValidationLight_TestConfiguration_main.xml index c26cfbf39b2792f2f39fa8066d3a71ff081cb02f..4fa75802981819903da4cad9a8888d98e56d8516 100644 --- a/Trigger/TrigValidation/TrigInDetValidationLight/TIDAbuild/TrigInDetValidationLight_TestConfiguration_main.xml +++ b/Trigger/TrigValidation/TrigInDetValidationLight/TIDAbuild/TrigInDetValidationLight_TestConfiguration_main.xml @@ -68,7 +68,20 @@ <keepFilePattern displayColor="red">TIDA*.css</keepFilePattern> <keepFilePattern>TIDAWeb/STAR</keepFilePattern> <keepFilePattern>TIDAWeb/build/STAR</keepFilePattern> + <keepFilePattern>times/STAR</keepFilePattern> + <keepFilePattern>times-FTF/STAR</keepFilePattern> + + <keepFilePattern>times/STAR.p*</keepFilePattern> + <keepFilePattern>times-FTF/STAR.p*</keepFilePattern> + + <keepFilePattern>times/STAR.pdf</keepFilePattern> + <keepFilePattern>times/STAR.png</keepFilePattern> + + <keepFilePattern>times-FTF/STAR.pdf</keepFilePattern> + <keepFilePattern>times-FTF/STAR.png</keepFilePattern> + + <keepFilePattern>*.png</keepFilePattern> <keepFilePattern>*.ps</keepFilePattern> <keepFilePattern>*.hist</keepFilePattern> diff --git a/Trigger/TrigValidation/TrigInDetValidationLight/test/TrigInDetValidationLight_TestConfiguration.xml b/Trigger/TrigValidation/TrigInDetValidationLight/test/TrigInDetValidationLight_TestConfiguration.xml index 7161560daa98ff32a55646e169cf84f3c8e8d35c..5e74c4effab6751daaeeef3d18c8c832552c6bec 100644 --- a/Trigger/TrigValidation/TrigInDetValidationLight/test/TrigInDetValidationLight_TestConfiguration.xml +++ b/Trigger/TrigValidation/TrigInDetValidationLight/test/TrigInDetValidationLight_TestConfiguration.xml @@ -1758,7 +1758,20 @@ <keepFilePattern displayColor="red">TIDA*.css</keepFilePattern> <keepFilePattern>TIDAWeb/*</keepFilePattern> <keepFilePattern>TIDAWeb/build/*</keepFilePattern> + <keepFilePattern>times/*</keepFilePattern> + <keepFilePattern>times-FTF/*</keepFilePattern> + + <keepFilePattern>times/*.p*</keepFilePattern> + <keepFilePattern>times-FTF/*.p*</keepFilePattern> + + <keepFilePattern>times/*.pdf</keepFilePattern> + <keepFilePattern>times/*.png</keepFilePattern> + + <keepFilePattern>times-FTF/*.pdf</keepFilePattern> + <keepFilePattern>times-FTF/*.png</keepFilePattern> + + <keepFilePattern>*.png</keepFilePattern> <keepFilePattern>*.ps</keepFilePattern> <keepFilePattern>*.hist</keepFilePattern> diff --git a/graphics/VP1/VP1Utils/src/SoVisualizeAction.cxx b/graphics/VP1/VP1Utils/src/SoVisualizeAction.cxx index 150fa20f6d6f31b8565550f4e1f212a7fe6c06d3..9b3a10868535a3f2f1c109e5176a2d09a34c228c 100644 --- a/graphics/VP1/VP1Utils/src/SoVisualizeAction.cxx +++ b/graphics/VP1/VP1Utils/src/SoVisualizeAction.cxx @@ -164,11 +164,11 @@ void SoVisualizeAction::handleLArCustom(const LArCustomShape *custom) SoLAr::initClass(); SoLAr *solar = new SoLAr(); const LArWheelCalculator *calc = custom->calculator(); - LArWheelCalculator::LArWheelCalculator_t type = calc->type(); - if (type==LArWheelCalculator::InnerAbsorberWheel || - type==LArWheelCalculator::InnerElectrodWheel || - type==LArWheelCalculator::InnerAbsorberModule || - type==LArWheelCalculator::InnerElectrodModule ) { + LArG4;;LArWheelCalculator_t type = calc->type(); + if (type==LArG4;;InnerAbsorberWheel || + type==LArG4;;InnerElectrodWheel || + type==LArG4;;InnerAbsorberModule || + type==LArG4;;InnerElectrodModule ) { float zPlane[2],rInner[2],rOuter[2]; zPlane[0]=0; zPlane[1]=calc->GetWheelThickness(); @@ -188,10 +188,10 @@ void SoVisualizeAction::handleLArCustom(const LArCustomShape *custom) solar->fRmax.setValues(0,2,rOuter); solar->fDz.setValues (0,2,zPlane); } - else if (type==LArWheelCalculator::OuterAbsorberWheel || - type==LArWheelCalculator::OuterElectrodWheel || - type==LArWheelCalculator::OuterAbsorberModule || - type==LArWheelCalculator::OuterElectrodModule ) { + else if (type==LArG4;;OuterAbsorberWheel || + type==LArG4;;OuterElectrodWheel || + type==LArG4;;OuterAbsorberModule || + type==LArG4;;OuterElectrodModule ) { float zPlane[3], rInner[3], rOuter[3]; zPlane[0] = 0; zPlane[2] = calc->GetWheelThickness();