From b1a79f65fce2f39b16efdb93b78d2a36f48ce8b3 Mon Sep 17 00:00:00 2001 From: jodafons Date: Wed, 18 Oct 2023 16:09:01 -0300 Subject: [PATCH] updaye --- a | 465 ------------------ core/G4Kernel/python/CaloPhiRange.py | 1 - core/G4Kernel/python/ComponentAccumulator.py | 16 +- core/G4Kernel/python/DetectorConstruction.py | 8 +- core/G4Kernel/python/EventReader.py | 9 +- .../python/ComponentAccumulator.py | 1 - core/GaugiKernel/python/Cpp.py | 21 +- core/GaugiKernel/python/__init__.py | 5 + events/TruthParticle/src/LinkDef.h | 4 +- generator/evtgen/python/Pythia8.py | 52 +- generator/evtgen/python/hepmc3/RootReader.py | 48 +- generator/filters/python/BoostedEvents.py | 64 +-- generator/filters/python/FixedRegion.py | 48 +- generator/filters/python/JF17.py | 61 +-- generator/filters/python/Pileup.py | 53 +- generator/filters/python/SingleParticle.py | 95 ++-- generator/filters/python/Zee.py | 51 +- generator/filters/python/__init__.py | 4 - generator/filters/src/BoostedEvents.cxx | 2 - generator/filters/src/JF17.cxx | 2 - generator/filters/src/Zee.cxx | 2 +- generator/genkernel/python/EventTape.py | 60 +-- generator/scripts/gen_electron.py | 8 +- generator/scripts/gen_jets.py | 5 +- generator/scripts/gen_minbias.py | 5 +- generator/scripts/gen_photon.py | 7 +- generator/scripts/gen_zee.py | 7 +- .../CaloCellBuilder/python/CaloCellMaker.py | 13 +- .../CaloCellBuilder/python/CaloCellMerge.py | 9 +- .../CaloCellBuilder/python/CaloHitMaker.py | 10 +- .../CaloCellBuilder/python/CaloHitMerge.py | 6 +- .../CaloCellBuilder/python/Calorimeter.py | 3 + .../CaloCellBuilder/python/CrossTalkMaker.py | 12 +- .../CaloCellBuilder/python/OptimalFilter.py | 10 +- .../CaloCellBuilder/python/PileupMerge.py | 7 +- .../CaloCellBuilder/python/PulseGenerator.py | 7 +- .../python/RootStreamAODMaker.py | 91 ++-- .../python/RootStreamESDMaker.py | 79 ++- .../python/RootStreamESDReader.py | 71 +-- .../python/RootStreamFlags.py | 22 + .../python/RootStreamHITMaker.py | 83 ++-- .../python/RootStreamHITReader.py | 64 +-- .../python/RootStreamNTUPLEMaker.py | 1 - .../io/RootStreamBuilder/python/__init__.py | 4 + .../src/RootStreamESDReader.cxx | 6 +- .../src/RootStreamHITMaker.cxx | 2 +- .../src/RootStreamHITReader.cxx | 8 +- scripts/digit_trf.py | 26 +- scripts/simu_trf.py | 17 +- 49 files changed, 469 insertions(+), 1186 deletions(-) delete mode 100644 a diff --git a/a b/a deleted file mode 100644 index c4325513..00000000 --- a/a +++ /dev/null @@ -1,465 +0,0 @@ -Module libc not found. -2023-10-17 17:13:36,500 | Py.RootStreamHITReader INFO Checking xAOD__EventInfoContainer_EventInfo tree into the root file... -2023-10-17 17:13:36,658 | Py.RootStreamHITReader INFO Checking xAOD__EventSeedContainer_Seeds tree into the root file... -2023-10-17 17:13:36,659 | Py.RootStreamHITReader INFO Checking xAOD__TruthParticleContainer_Particles tree into the root file... -2023-10-17 17:13:36,660 | Py.RootStreamHITReader INFO Checking xAOD__CaloHitContainer_Hits tree into the root file... -2023-10-17 17:13:36,660 | Py.RootStreamHITReader INFO Getting a total of 3 events into the ntuple. -2023-10-17 17:13:36,811 | Py.CaloCellBuilder INFO Configure CaloCellBuilder. -2023-10-17 17:13:36,812 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_PSB collection -2023-10-17 17:13:37,320 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMB1 collection -2023-10-17 17:13:37,323 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMB2 collection -2023-10-17 17:13:37,325 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMB3 collection -2023-10-17 17:13:37,328 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_TileCal1 collection -2023-10-17 17:13:37,330 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_TileCal2 collection -2023-10-17 17:13:37,332 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_TileCal3 collection -2023-10-17 17:13:37,334 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_TileExt1_A collection -2023-10-17 17:13:37,336 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_TileExt2_A collection -2023-10-17 17:13:37,338 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_TileExt3_A collection -2023-10-17 17:13:37,340 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_PSE_A collection -2023-10-17 17:13:37,342 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC1_0A collection -2023-10-17 17:13:37,344 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC1_1A collection -2023-10-17 17:13:37,346 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC1_2A collection -2023-10-17 17:13:37,348 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC1_3A collection -2023-10-17 17:13:37,350 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC2_0A collection -2023-10-17 17:13:37,352 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC2_1A collection -2023-10-17 17:13:37,354 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC3_0A collection -2023-10-17 17:13:37,357 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC3_1A collection -2023-10-17 17:13:37,359 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_HEC1_0A collection -2023-10-17 17:13:37,362 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_HEC1_1A collection -2023-10-17 17:13:37,365 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_HEC2_0A collection -2023-10-17 17:13:37,367 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_HEC2_1A collection -2023-10-17 17:13:37,370 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_HEC3_0A collection -2023-10-17 17:13:37,372 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_HEC3_1A collection -2023-10-17 17:13:37,374 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_TileExt1_B collection -2023-10-17 17:13:37,376 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_TileExt2_B collection -2023-10-17 17:13:37,378 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_TileExt3_B collection -2023-10-17 17:13:37,380 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_PSE_B collection -2023-10-17 17:13:37,382 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC1_0B collection -2023-10-17 17:13:37,384 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC1_1B collection -2023-10-17 17:13:37,386 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC1_2B collection -2023-10-17 17:13:37,388 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC1_3B collection -2023-10-17 17:13:37,390 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC2_0B collection -2023-10-17 17:13:37,392 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC2_1B collection -2023-10-17 17:13:37,394 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC3_0B collection -2023-10-17 17:13:37,396 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_EMEC3_1B collection -2023-10-17 17:13:37,398 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_HEC1_0B collection -2023-10-17 17:13:37,400 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_HEC1_1B collection -2023-10-17 17:13:37,402 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_HEC2_0B collection -2023-10-17 17:13:37,404 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_HEC2_1B collection -2023-10-17 17:13:37,406 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_HEC3_0B collection -2023-10-17 17:13:37,408 | Py.CaloCellBuilder INFO Create new CaloCellMaker and dump all cells into Collection_HEC3_1B collection -2023-10-17 17:13:37,410 | Py.CaloCellBuilder INFO Create CaloCellMerge and dump all cell collections into Cells container -Cxx.ComponentAccumulator INFO Initialize... -Cxx.ComponentAccumulator INFO Initializing the tool with name HITReader -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_PSB -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMB1 -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMB2 -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMB3 -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_TileCal1 -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_TileCal2 -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_TileCal3 -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_TileExt1_A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_TileExt2_A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_TileExt3_A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_PSE_A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC1_0A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC1_1A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC1_2A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC1_3A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC2_0A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC2_1A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC3_0A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC3_1A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_HEC1_0A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_HEC1_1A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_HEC2_0A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_HEC2_1A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_HEC3_0A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_HEC3_1A -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_TileExt1_B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_TileExt2_B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_TileExt3_B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_PSE_B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC1_0B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC1_1B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC1_2B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC1_3B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC2_0B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC2_1B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC3_0B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_EMEC3_1B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_HEC1_0B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_HEC1_1B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_HEC2_0B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_HEC2_1B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_HEC3_0B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMaker_Collection_HEC3_1B -Cxx.ComponentAccumulator INFO Initializing the tool with name CaloCellMerge -Cxx.ComponentAccumulator INFO Initializing the tool with name RootStreamESDMaker -Cxx.ComponentAccumulator INFO Initialize... -Cxx.HITReader INFO Reading file zee.HIT.root -Cxx.ComponentAccumulator INFO ======================= Event 0 ========================= -Cxx.HITReader INFO Deserialize all containers... -Cxx.HITReader INFO Preparing xAOD::EventInfoContainer#EventInfo... -Cxx.HITReader INFO Converting and deseriallizing EventInfo objects into root file... -AKI JOAO 1 0x115061b0 -AKI JOAO 2 -AKI JOAO 3 1 -Cxx.HITReader INFO Preparing xAOD::EventSeedContainer#Seeds... -Cxx.HITReader INFO Converting and deseriallizing EventSeed objects into root file... -Cxx.HITReader INFO Preparing xAOD::TruthParticleContainer#Particles... -Cxx.HITReader INFO Converting and deseriallizing TruthParticle objects into root file... -Cxx.HITReader INFO Preparing xAOD::CaloHitContainer#Hits... -Cxx.HITReader INFO Converting and deseriallizing CaloHit objects into root file... -Cxx.RootStreamESDMaker INFO Serialize all containers... -Cxx.RootStreamESDMaker INFO Cells -Cxx.RootStreamESDMaker INFO Collection_EMB1 -Cxx.RootStreamESDMaker INFO Collection_EMB2 -Cxx.RootStreamESDMaker INFO Collection_EMB3 -Cxx.RootStreamESDMaker INFO Collection_EMEC1_0A -Cxx.RootStreamESDMaker INFO Collection_EMEC1_0B -Cxx.RootStreamESDMaker INFO Collection_EMEC1_1A -Cxx.RootStreamESDMaker INFO Collection_EMEC1_1B -Cxx.RootStreamESDMaker INFO Collection_EMEC1_2A -Cxx.RootStreamESDMaker INFO Collection_EMEC1_2B -Cxx.RootStreamESDMaker INFO Collection_EMEC1_3A -Cxx.RootStreamESDMaker INFO Collection_EMEC1_3B -Cxx.RootStreamESDMaker INFO Collection_EMEC2_0A -Cxx.RootStreamESDMaker INFO Collection_EMEC2_0B -Cxx.RootStreamESDMaker INFO Collection_EMEC2_1A -Cxx.RootStreamESDMaker INFO Collection_EMEC2_1B -Cxx.RootStreamESDMaker INFO Collection_EMEC3_0A -Cxx.RootStreamESDMaker INFO Collection_EMEC3_0B -Cxx.RootStreamESDMaker INFO Collection_EMEC3_1A -Cxx.RootStreamESDMaker INFO Collection_EMEC3_1B -Cxx.RootStreamESDMaker INFO Collection_HEC1_0A -Cxx.RootStreamESDMaker INFO Collection_HEC1_0B -Cxx.RootStreamESDMaker INFO Collection_HEC1_1A -Cxx.RootStreamESDMaker INFO Collection_HEC1_1B -Cxx.RootStreamESDMaker INFO Collection_HEC2_0A -Cxx.RootStreamESDMaker INFO Collection_HEC2_0B -Cxx.RootStreamESDMaker INFO Collection_HEC2_1A -Cxx.RootStreamESDMaker INFO Collection_HEC2_1B -Cxx.RootStreamESDMaker INFO Collection_HEC3_0A -Cxx.RootStreamESDMaker INFO Collection_HEC3_0B -Cxx.RootStreamESDMaker INFO Collection_HEC3_1A -Cxx.RootStreamESDMaker INFO Collection_HEC3_1B -Cxx.RootStreamESDMaker INFO Collection_PSB -Cxx.RootStreamESDMaker INFO Collection_PSE_A -Cxx.RootStreamESDMaker INFO Collection_PSE_B -Cxx.RootStreamESDMaker INFO Collection_TileCal1 -Cxx.RootStreamESDMaker INFO Collection_TileCal2 -Cxx.RootStreamESDMaker INFO Collection_TileCal3 -Cxx.RootStreamESDMaker INFO Collection_TileExt1_A -Cxx.RootStreamESDMaker INFO Collection_TileExt1_B -Cxx.RootStreamESDMaker INFO Collection_TileExt2_A -Cxx.RootStreamESDMaker INFO Collection_TileExt2_B -Cxx.RootStreamESDMaker INFO Collection_TileExt3_A -Cxx.RootStreamESDMaker INFO Collection_TileExt3_B -Cxx.RootStreamESDMaker INFO EventInfo -Cxx.RootStreamESDMaker INFO Hits -Cxx.RootStreamESDMaker INFO Particles -Cxx.RootStreamESDMaker INFO Seeds -Cxx.RootStreamESDMaker INFO TruthCells -Cxx.RootStreamESDMaker INFO Preparing xAOD::EventInfoContainer#EventInfo... -Cxx.RootStreamESDMaker INFO Converting and serializing EventInfo objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::EventSeedContainer#Seeds... -Cxx.RootStreamESDMaker INFO Converting and serializing EventSeed objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::TruthParticleContainer#Particles... -Cxx.RootStreamESDMaker INFO Converting and serializing TruthParticle objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::CaloCellContainer#Cells... -Cxx.RootStreamESDMaker INFO Converting and serializing CaloCell objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::CaloCellContainer#TruthCells... -Cxx.RootStreamESDMaker INFO Converting and serializing CaloCell objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::CaloClusterContainer#Clusters... -Cxx.RootStreamESDMaker WARNING There is not converver for the container xAOD::CaloClusterContainer in key Clusters -Cxx.ComponentAccumulator INFO ======================= Event 1 ========================= -Cxx.HITReader INFO Deserialize all containers... -Cxx.HITReader INFO Preparing xAOD::EventInfoContainer#EventInfo... -Cxx.HITReader INFO Converting and deseriallizing EventInfo objects into root file... -AKI JOAO 1 0x115061b0 -AKI JOAO 2 -AKI JOAO 3 1 -Cxx.HITReader INFO Preparing xAOD::EventSeedContainer#Seeds... -Cxx.HITReader INFO Converting and deseriallizing EventSeed objects into root file... -Cxx.HITReader INFO Preparing xAOD::TruthParticleContainer#Particles... -Cxx.HITReader INFO Converting and deseriallizing TruthParticle objects into root file... -Cxx.HITReader INFO Preparing xAOD::CaloHitContainer#Hits... -Cxx.HITReader INFO Converting and deseriallizing CaloHit objects into root file... -Cxx.RootStreamESDMaker INFO Serialize all containers... -Cxx.RootStreamESDMaker INFO Cells -Cxx.RootStreamESDMaker INFO Collection_EMB1 -Cxx.RootStreamESDMaker INFO Collection_EMB2 -Cxx.RootStreamESDMaker INFO Collection_EMB3 -Cxx.RootStreamESDMaker INFO Collection_EMEC1_0A -Cxx.RootStreamESDMaker INFO Collection_EMEC1_0B -Cxx.RootStreamESDMaker INFO Collection_EMEC1_1A -Cxx.RootStreamESDMaker INFO Collection_EMEC1_1B -Cxx.RootStreamESDMaker INFO Collection_EMEC1_2A -Cxx.RootStreamESDMaker INFO Collection_EMEC1_2B -Cxx.RootStreamESDMaker INFO Collection_EMEC1_3A -Cxx.RootStreamESDMaker INFO Collection_EMEC1_3B -Cxx.RootStreamESDMaker INFO Collection_EMEC2_0A -Cxx.RootStreamESDMaker INFO Collection_EMEC2_0B -Cxx.RootStreamESDMaker INFO Collection_EMEC2_1A -Cxx.RootStreamESDMaker INFO Collection_EMEC2_1B -Cxx.RootStreamESDMaker INFO Collection_EMEC3_0A -Cxx.RootStreamESDMaker INFO Collection_EMEC3_0B -Cxx.RootStreamESDMaker INFO Collection_EMEC3_1A -Cxx.RootStreamESDMaker INFO Collection_EMEC3_1B -Cxx.RootStreamESDMaker INFO Collection_HEC1_0A -Cxx.RootStreamESDMaker INFO Collection_HEC1_0B -Cxx.RootStreamESDMaker INFO Collection_HEC1_1A -Cxx.RootStreamESDMaker INFO Collection_HEC1_1B -Cxx.RootStreamESDMaker INFO Collection_HEC2_0A -Cxx.RootStreamESDMaker INFO Collection_HEC2_0B -Cxx.RootStreamESDMaker INFO Collection_HEC2_1A -Cxx.RootStreamESDMaker INFO Collection_HEC2_1B -Cxx.RootStreamESDMaker INFO Collection_HEC3_0A -Cxx.RootStreamESDMaker INFO Collection_HEC3_0B -Cxx.RootStreamESDMaker INFO Collection_HEC3_1A -Cxx.RootStreamESDMaker INFO Collection_HEC3_1B -Cxx.RootStreamESDMaker INFO Collection_PSB -Cxx.RootStreamESDMaker INFO Collection_PSE_A -Cxx.RootStreamESDMaker INFO Collection_PSE_B -Cxx.RootStreamESDMaker INFO Collection_TileCal1 -Cxx.RootStreamESDMaker INFO Collection_TileCal2 -Cxx.RootStreamESDMaker INFO Collection_TileCal3 -Cxx.RootStreamESDMaker INFO Collection_TileExt1_A -Cxx.RootStreamESDMaker INFO Collection_TileExt1_B -Cxx.RootStreamESDMaker INFO Collection_TileExt2_A -Cxx.RootStreamESDMaker INFO Collection_TileExt2_B -Cxx.RootStreamESDMaker INFO Collection_TileExt3_A -Cxx.RootStreamESDMaker INFO Collection_TileExt3_B -Cxx.RootStreamESDMaker INFO EventInfo -Cxx.RootStreamESDMaker INFO Hits -Cxx.RootStreamESDMaker INFO Particles -Cxx.RootStreamESDMaker INFO Seeds -Cxx.RootStreamESDMaker INFO TruthCells -Cxx.RootStreamESDMaker INFO Preparing xAOD::EventInfoContainer#EventInfo... -Cxx.RootStreamESDMaker INFO Converting and serializing EventInfo objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::EventSeedContainer#Seeds... -Cxx.RootStreamESDMaker INFO Converting and serializing EventSeed objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::TruthParticleContainer#Particles... -Cxx.RootStreamESDMaker INFO Converting and serializing TruthParticle objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::CaloCellContainer#Cells... -Cxx.RootStreamESDMaker INFO Converting and serializing CaloCell objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::CaloCellContainer#TruthCells... -Cxx.RootStreamESDMaker INFO Converting and serializing CaloCell objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::CaloClusterContainer#Clusters... -Cxx.RootStreamESDMaker WARNING There is not converver for the container xAOD::CaloClusterContainer in key Clusters -Cxx.ComponentAccumulator INFO ======================= Event 2 ========================= -Cxx.HITReader INFO Deserialize all containers... -Cxx.HITReader INFO Preparing xAOD::EventInfoContainer#EventInfo... -Cxx.HITReader INFO Converting and deseriallizing EventInfo objects into root file... -AKI JOAO 1 0x115061b0 -AKI JOAO 2 -AKI JOAO 3 1 -Cxx.HITReader INFO Preparing xAOD::EventSeedContainer#Seeds... -Cxx.HITReader INFO Converting and deseriallizing EventSeed objects into root file... -Cxx.HITReader INFO Preparing xAOD::TruthParticleContainer#Particles... -Cxx.HITReader INFO Converting and deseriallizing TruthParticle objects into root file... -Cxx.HITReader INFO Preparing xAOD::CaloHitContainer#Hits... -Cxx.HITReader INFO Converting and deseriallizing CaloHit objects into root file... -Cxx.RootStreamESDMaker INFO Serialize all containers... -Cxx.RootStreamESDMaker INFO Cells -Cxx.RootStreamESDMaker INFO Collection_EMB1 -Cxx.RootStreamESDMaker INFO Collection_EMB2 -Cxx.RootStreamESDMaker INFO Collection_EMB3 -Cxx.RootStreamESDMaker INFO Collection_EMEC1_0A -Cxx.RootStreamESDMaker INFO Collection_EMEC1_0B -Cxx.RootStreamESDMaker INFO Collection_EMEC1_1A -Cxx.RootStreamESDMaker INFO Collection_EMEC1_1B -Cxx.RootStreamESDMaker INFO Collection_EMEC1_2A -Cxx.RootStreamESDMaker INFO Collection_EMEC1_2B -Cxx.RootStreamESDMaker INFO Collection_EMEC1_3A -Cxx.RootStreamESDMaker INFO Collection_EMEC1_3B -Cxx.RootStreamESDMaker INFO Collection_EMEC2_0A -Cxx.RootStreamESDMaker INFO Collection_EMEC2_0B -Cxx.RootStreamESDMaker INFO Collection_EMEC2_1A -Cxx.RootStreamESDMaker INFO Collection_EMEC2_1B -Cxx.RootStreamESDMaker INFO Collection_EMEC3_0A -Cxx.RootStreamESDMaker INFO Collection_EMEC3_0B -Cxx.RootStreamESDMaker INFO Collection_EMEC3_1A -Cxx.RootStreamESDMaker INFO Collection_EMEC3_1B -Cxx.RootStreamESDMaker INFO Collection_HEC1_0A -Cxx.RootStreamESDMaker INFO Collection_HEC1_0B -Cxx.RootStreamESDMaker INFO Collection_HEC1_1A -Cxx.RootStreamESDMaker INFO Collection_HEC1_1B -Cxx.RootStreamESDMaker INFO Collection_HEC2_0A -Cxx.RootStreamESDMaker INFO Collection_HEC2_0B -Cxx.RootStreamESDMaker INFO Collection_HEC2_1A -Cxx.RootStreamESDMaker INFO Collection_HEC2_1B -Cxx.RootStreamESDMaker INFO Collection_HEC3_0A -Cxx.RootStreamESDMaker INFO Collection_HEC3_0B -Cxx.RootStreamESDMaker INFO Collection_HEC3_1A -Cxx.RootStreamESDMaker INFO Collection_HEC3_1B -Cxx.RootStreamESDMaker INFO Collection_PSB -Cxx.RootStreamESDMaker INFO Collection_PSE_A -Cxx.RootStreamESDMaker INFO Collection_PSE_B -Cxx.RootStreamESDMaker INFO Collection_TileCal1 -Cxx.RootStreamESDMaker INFO Collection_TileCal2 -Cxx.RootStreamESDMaker INFO Collection_TileCal3 -Cxx.RootStreamESDMaker INFO Collection_TileExt1_A -Cxx.RootStreamESDMaker INFO Collection_TileExt1_B -Cxx.RootStreamESDMaker INFO Collection_TileExt2_A -Cxx.RootStreamESDMaker INFO Collection_TileExt2_B -Cxx.RootStreamESDMaker INFO Collection_TileExt3_A -Cxx.RootStreamESDMaker INFO Collection_TileExt3_B -Cxx.RootStreamESDMaker INFO EventInfo -Cxx.RootStreamESDMaker INFO Hits -Cxx.RootStreamESDMaker INFO Particles -Cxx.RootStreamESDMaker INFO Seeds -Cxx.RootStreamESDMaker INFO TruthCells -Cxx.RootStreamESDMaker INFO Preparing xAOD::EventInfoContainer#EventInfo... -Cxx.RootStreamESDMaker INFO Converting and serializing EventInfo objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::EventSeedContainer#Seeds... -Cxx.RootStreamESDMaker INFO Converting and serializing EventSeed objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::TruthParticleContainer#Particles... -Cxx.RootStreamESDMaker INFO Converting and serializing TruthParticle objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::CaloCellContainer#Cells... -Cxx.RootStreamESDMaker INFO Converting and serializing CaloCell objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::CaloCellContainer#TruthCells... -Cxx.RootStreamESDMaker INFO Converting and serializing CaloCell objects into root file... -Cxx.RootStreamESDMaker INFO Preparing xAOD::CaloClusterContainer#Clusters... -Cxx.RootStreamESDMaker WARNING There is not converver for the container xAOD::CaloClusterContainer in key Clusters -Cxx.StoreGate INFO Saving StoreGate... -Cxx.StoreGate INFO Writing all root objects into the file and delete all decorators -Cxx.StoreGate INFO Decorators will no be saved into the root file. -Cxx.StoreGate INFO CollectionTree/xAOD__CaloCellContainer_Cells 0x1242d950 -Cxx.StoreGate INFO CollectionTree/xAOD__CaloCellContainer_TruthCells 0x12080820 -Cxx.StoreGate INFO CollectionTree/xAOD__CaloClusterContainer_Clusters 0x124b06f0 -Cxx.StoreGate INFO CollectionTree/xAOD__EventInfoContainer_EventInfo 0x124a8a70 -Cxx.StoreGate INFO CollectionTree/xAOD__EventSeedContainer_Seeds 0x1256cfa0 -Cxx.StoreGate INFO CollectionTree/xAOD__TruthParticleContainer_Particles 0x12557c30 -Cxx.StoreGate INFO Event/Event 0x1295bba0 -Cxx.StoreGate INFO Event/EventCounter 0x1295cb30 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC1_A_0/cells_e 0x128cff80 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC1_A_0/cells_edep 0x128d14f0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC1_A_0/res_cells 0x128d2a10 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC1_A_1/cells_e 0x128d3f90 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC1_A_1/cells_edep 0x128d4620 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC1_A_1/res_cells 0x128d4c60 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC1_B_0/cells_e 0x12947140 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC1_B_0/cells_edep 0x129486b0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC1_B_0/res_cells 0x12949bd0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC1_B_1/cells_e 0x1294b120 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC1_B_1/cells_edep 0x1294b770 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC1_B_1/res_cells 0x1294bec0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC2_A_0/cells_e 0x128d62b0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC2_A_0/cells_edep 0x128d7710 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC2_A_0/res_cells 0x128d8b20 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC2_A_1/cells_e 0x128da000 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC2_A_1/cells_edep 0x128da650 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC2_A_1/res_cells 0x128dac90 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC2_B_0/cells_e 0x1294d510 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC2_B_0/cells_edep 0x1294e970 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC2_B_0/res_cells 0x1294fd80 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC2_B_1/cells_e 0x12951260 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC2_B_1/cells_edep 0x129519c0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC2_B_1/res_cells 0x12952130 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC3_A_0/cells_e 0x128dc280 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC3_A_0/cells_edep 0x128dd5d0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC3_A_0/res_cells 0x128de8d0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC3_A_1/cells_e 0x128dfec0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC3_A_1/cells_edep 0x128e0550 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC3_A_1/res_cells 0x128e0b90 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC3_B_0/cells_e 0x12953760 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC3_B_0/cells_edep 0x12954ab0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC3_B_0/res_cells 0x12955db0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC3_B_1/cells_e 0x129572b0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC3_B_1/cells_edep 0x12957cc0 -Cxx.StoreGate INFO Expert/Cells/FCal_HEC3_B_1/res_cells 0x129586c0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMB1_0/cells_e 0x12742360 -Cxx.StoreGate INFO Expert/Cells/LAr_EMB1_0/cells_edep 0x1272bcc0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMB1_0/res_cells 0x123e91f0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMB2_0/cells_e 0x12717500 -Cxx.StoreGate INFO Expert/Cells/LAr_EMB2_0/cells_edep 0x127b5430 -Cxx.StoreGate INFO Expert/Cells/LAr_EMB2_0/res_cells 0xc060c20 -Cxx.StoreGate INFO Expert/Cells/LAr_EMB3_0/cells_e 0x127ab660 -Cxx.StoreGate INFO Expert/Cells/LAr_EMB3_0/cells_edep 0x126a7f30 -Cxx.StoreGate INFO Expert/Cells/LAr_EMB3_0/res_cells 0xc062d30 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_A_0/cells_e 0x11567a20 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_A_0/cells_edep 0x11568270 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_A_0/res_cells 0x11568ac0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_A_1/cells_e 0x1156a040 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_A_1/cells_edep 0x1156aeb0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_A_1/res_cells 0x1156bd20 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_A_2/cells_e 0x127ac4f0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_A_2/cells_edep 0x127b0ef0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_A_2/res_cells 0x127b1740 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_A_3/cells_e 0x1277c4e0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_A_3/cells_edep 0x1277d7f0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_A_3/res_cells 0x1277eaf0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_B_0/cells_e 0x128f0910 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_B_0/cells_edep 0x128fa130 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_B_0/res_cells 0x12903900 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_B_1/cells_e 0x12904e80 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_B_1/cells_edep 0x129061d0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_B_1/res_cells 0x129074d0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_B_2/cells_e 0x12908ac0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_B_2/cells_edep 0x1290d570 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_B_2/res_cells 0x12911fd0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_B_3/cells_e 0x129135c0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_B_3/cells_edep 0x12914910 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC1_B_3/res_cells 0x12915c10 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC2_A_0/cells_e 0x12769dd0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC2_A_0/cells_edep 0x1276a9f0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC2_A_0/res_cells 0x1276b840 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC2_A_1/cells_e 0x1276ce30 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC2_A_1/cells_edep 0x1276e180 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC2_A_1/res_cells 0x1276f480 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC2_B_0/cells_e 0x12917190 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC2_B_0/cells_edep 0x129239b0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC2_B_0/res_cells 0x12930180 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC2_B_1/cells_e 0x12931700 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC2_B_1/cells_edep 0x12932a50 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC2_B_1/res_cells 0x12933d50 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC3_A_0/cells_e 0x128be0a0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC3_A_0/cells_edep 0x128c46b0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC3_A_0/res_cells 0x128cadc0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC3_A_1/cells_e 0x128cc3b0 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC3_A_1/cells_edep 0x128cd700 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC3_A_1/res_cells 0x128cea00 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC3_B_0/cells_e 0x12935230 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC3_B_0/cells_edep 0x1293b950 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC3_B_0/res_cells 0x12942060 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC3_B_1/cells_e 0x12943540 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC3_B_1/cells_edep 0x12944850 -Cxx.StoreGate INFO Expert/Cells/LAr_EMEC3_B_1/res_cells 0x12945b50 -Cxx.StoreGate INFO Expert/Cells/LAr_PSB_0/cells_e 0x1275bcb0 -Cxx.StoreGate INFO Expert/Cells/LAr_PSB_0/cells_edep 0x12727360 -Cxx.StoreGate INFO Expert/Cells/LAr_PSB_0/res_cells 0x11268b60 -Cxx.StoreGate INFO Expert/Cells/LAr_PSE_A_0/cells_e 0x11571150 -Cxx.StoreGate INFO Expert/Cells/LAr_PSE_A_0/cells_edep 0x115723e0 -Cxx.StoreGate INFO Expert/Cells/LAr_PSE_A_0/res_cells 0x11573670 -Cxx.StoreGate INFO Expert/Cells/LAr_PSE_B_0/cells_e 0x128ec450 -Cxx.StoreGate INFO Expert/Cells/LAr_PSE_B_0/cells_edep 0x128edbe0 -Cxx.StoreGate INFO Expert/Cells/LAr_PSE_B_0/res_cells 0x128ef320 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCal1_0/cells_e 0x126aa440 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCal1_0/cells_edep 0x126f2630 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCal1_0/res_cells 0xb7c6cd0 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCal2_0/cells_e 0x126d3db0 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCal2_0/cells_edep 0x124b36d0 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCal2_0/res_cells 0x5e27710 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCal3_0/cells_e 0x125cf1a0 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCal3_0/cells_edep 0x127b6050 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCal3_0/res_cells 0x3be0fe0 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt1_A_0/cells_e 0x1275a350 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt1_A_0/cells_edep 0x126e30f0 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt1_A_0/res_cells 0x12679450 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt1_B_0/cells_e 0x128e2270 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt1_B_0/cells_edep 0x128e33b0 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt1_B_0/res_cells 0x128e44d0 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt2_A_0/cells_e 0x127629e0 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt2_A_0/cells_edep 0x1274a310 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt2_A_0/res_cells 0x12754c40 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt2_B_0/cells_e 0x128e5ac0 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt2_B_0/cells_edep 0x128e6d10 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt2_B_0/res_cells 0x128e7f00 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt3_A_0/cells_e 0x127aa3e0 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt3_A_0/cells_edep 0x127aac20 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt3_A_0/res_cells 0x1156fbf0 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt3_B_0/cells_e 0x128e9590 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt3_B_0/cells_edep 0x128ea270 -Cxx.StoreGate INFO Expert/Cells/TILE_TileCalExt3_B_0/res_cells 0x128eaf30 diff --git a/core/G4Kernel/python/CaloPhiRange.py b/core/G4Kernel/python/CaloPhiRange.py index cb783282..4245996e 100644 --- a/core/G4Kernel/python/CaloPhiRange.py +++ b/core/G4Kernel/python/CaloPhiRange.py @@ -2,7 +2,6 @@ from GaugiKernel import Logger from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue class CaloPhiRange( Logger ): diff --git a/core/G4Kernel/python/ComponentAccumulator.py b/core/G4Kernel/python/ComponentAccumulator.py index b0394947..013b51fd 100644 --- a/core/G4Kernel/python/ComponentAccumulator.py +++ b/core/G4Kernel/python/ComponentAccumulator.py @@ -2,9 +2,10 @@ __all__ = ["ComponentAccumulator"] from GaugiKernel import Cpp +from GaugiKernel.constants import * from GaugiKernel.macros import * import os, time, gc - +import ROOT class ComponentAccumulator( Cpp ): @@ -17,24 +18,25 @@ def __init__( self, name , detector, OutputLevel : int=0 ): - Cpp.__init__(self, name, "ROOT.RunManager", OutputLevel=OutputLevel) + Cpp.__init__(self, ROOT.RunManager(name) ) # convert python to geant4 self.__detector = detector self.__detector.compile() # set the geant detector into the geant - self.__core.setDetectorConstruction( self.__detector.core() ) + self._core.setDetectorConstruction( self.__detector.core() ) self.setProperty( "OutputFile" , OutputFile ) self.setProperty( "VisMac" , self.__detector.VisMac ) self.setProperty( "NumberOfThreads" , NumberOfThreads ) self.setProperty( "Timeout" , Timeout ) self.setProperty( "RunVis" , RunVis ) self.setProperty( "Seed" , Seed ) + #self.setProperty( "OutputLevel" , OutputLevel ) # Set the vis mac file into the manager core self.outputFiles = [ (self.OutputFile+".%d"%thread) for thread in range(self.NumberOfThreads)] def __del__(self): - del self.__core + del self._core gc.collect() time.sleep(2) self.merge() @@ -47,14 +49,14 @@ def run( self, evt=None ): evt = self.__numberOfEvents elif evt > self.__numberOfEvents: evt = self.__numberOfEvents - self.__core.run(evt) + self._core.run(evt) def __add__( self, algs ): if type(algs) is not list: algs =[algs] for alg in algs: - self.__core.push_back( alg.core() ) + self._core.push_back( alg.core() ) return self @@ -63,7 +65,7 @@ def __add__( self, algs ): # def setGenerator( self, gen ): self.__numberOfEvents = gen.GetEntries() - self.core().setGenerator( gen.core() ) + self._core.setGenerator( gen.core() ) # diff --git a/core/G4Kernel/python/DetectorConstruction.py b/core/G4Kernel/python/DetectorConstruction.py index 11666c61..f66eac35 100644 --- a/core/G4Kernel/python/DetectorConstruction.py +++ b/core/G4Kernel/python/DetectorConstruction.py @@ -8,7 +8,7 @@ from GaugiKernel.constants import * -from GaugiKernel import Cpp +from GaugiKernel import Cpp, Logger from GaugiKernel.macros import * from GaugiKernel import EnumStringification @@ -17,7 +17,7 @@ import numpy as np import collections - +import ROOT class Plates(EnumStringification): Horizontal = 0 @@ -34,7 +34,7 @@ def __init__( self, UseMagneticField : bool=False, CutOnPhi : bool=False ): - Cpp.__init__(self, name, "ROOT.DetectorConstruction") + Cpp.__init__(self, ROOT.DetectorConstruction(name) ) self.setProperty( "UseMagneticField", UseMagneticField ) self.setProperty( "CutOnPhi" , CutOnPhi ) @@ -63,7 +63,7 @@ def __add__(self, pv): def compile(self): # Create all volumes inside of the detector for pv in tqdm( self.__volumes.values(), desc="Compiling...", ncols=70): - self.__core.AddVolume( pv.name(), pv.Plates, pv.AbsorberMaterial, pv.GapMaterial, + self._core.AddVolume( pv.name(), pv.Plates, pv.AbsorberMaterial, pv.GapMaterial, # layer pv.NofLayers, pv.AbsorberThickness, pv.GapThickness, # dimensions diff --git a/core/G4Kernel/python/EventReader.py b/core/G4Kernel/python/EventReader.py index 88903888..dc6cafab 100644 --- a/core/G4Kernel/python/EventReader.py +++ b/core/G4Kernel/python/EventReader.py @@ -2,8 +2,7 @@ from GaugiKernel import Cpp from GaugiKernel.macros import * -from ROOT import TFile, TTree - +import ROOT, os class EventReader( Cpp ): @@ -16,17 +15,19 @@ def __init__( self, name, OutputLevel : int = 0 ): - Cpp.__init__(self, name, "ROOT.generator.EventReader", OutputLevel=OutputLevel) + Cpp.__init__(self, ROOT.generator.EventReader(name) ) + self.setProperty( "InputFileName" , InputFileName ) self.setProperty( "OutputEventKey" , OutputEventKey ) self.setProperty( "OutputSeedKey" , OutputSeedKey ) self.setProperty( "OutputTruthKey" , OutputTruthKey ) self.setProperty( "BunchDuration" , BunchDuration ) + #self.setProperty( "OutputLevel" , OutputLevel ) if self.InputFileName != "": if not os.path.exists(self.InputFileName): MSG_FATAL(self, f"Input file not found into the system: {self.InputFileName}") - f = TFile( InputFileName ) + f = ROOT.TFile( InputFileName ) t = f.Get("particles") self.__entries = t.GetEntries() f.Close() diff --git a/core/GaugiKernel/python/ComponentAccumulator.py b/core/GaugiKernel/python/ComponentAccumulator.py index 3114e270..1468eecc 100644 --- a/core/GaugiKernel/python/ComponentAccumulator.py +++ b/core/GaugiKernel/python/ComponentAccumulator.py @@ -19,7 +19,6 @@ def __init__(self, name, output, detector=None ): from ROOT import RunManager from ROOT import Gaugi as GK self.__acc = GK.ComponentAccumulator( name ) - from ROOT import SG self.__ctx = SG.EventContext("EventContext") self.__store = SG.StoreGate(output) diff --git a/core/GaugiKernel/python/Cpp.py b/core/GaugiKernel/python/Cpp.py index 2435cc31..7e0e9a38 100644 --- a/core/GaugiKernel/python/Cpp.py +++ b/core/GaugiKernel/python/Cpp.py @@ -1,11 +1,9 @@ -__all__ = ["CaloCellMerge", "treatPropertyValue"] +__all__ = ["Cpp", "treatPropertyValue"] from GaugiKernel import Logger from GaugiKernel.macros import * from GaugiKernel import list2stdvector -import importlib - def treatPropertyValue( value ): @@ -31,25 +29,22 @@ def treatPropertyValue( value ): class Cpp( Logger ): - def __init__( self, name : str, import_path : str, OutputLevel : int=0 ): - + def __init__( self, core ): Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import CaloCellMerge - cpp = importlib.import_module(import_path) - self.__core = cpp(name) + self._core = core + def __del__(self): + del self._core def core(self): - return self.__core + return self._core def setProperty( self, key, value ): - if self.__core.hasProperty(key): + if self._core.hasProperty(key): setattr( self, key , value ) try: - self.__core.setProperty( key, treatPropertyValue(value) ) + self._core.setProperty( key, treatPropertyValue(value) ) except: MSG_FATAL( self, f"Exception in property with name {key} and value: {value}") else: diff --git a/core/GaugiKernel/python/__init__.py b/core/GaugiKernel/python/__init__.py index dcea7e11..1625cf1e 100644 --- a/core/GaugiKernel/python/__init__.py +++ b/core/GaugiKernel/python/__init__.py @@ -1,5 +1,10 @@ __all__ = [] +import ROOT +ROOT.gSystem.Load('liblorenzetti') +from ROOT import RunManager + + from . import utils __all__.extend(utils.__all__) from .utils import * diff --git a/events/TruthParticle/src/LinkDef.h b/events/TruthParticle/src/LinkDef.h index dbe5bfce..a6f7f337 100644 --- a/events/TruthParticle/src/LinkDef.h +++ b/events/TruthParticle/src/LinkDef.h @@ -1,3 +1,4 @@ +#include "TruthParticle/TruthParticleConverter.h" #ifdef __CINT__ @@ -6,6 +7,7 @@ #pragma link off all classes; #pragma link off all functions; #pragma link C++ nestedclass; - +#pragma link C++ struct xAOD::TruthParticle_t+; +#pragma link C++ class std::vector< xAOD::TruthParticle_t >+; #endif diff --git a/generator/evtgen/python/Pythia8.py b/generator/evtgen/python/Pythia8.py index 4867481b..9829115c 100644 --- a/generator/evtgen/python/Pythia8.py +++ b/generator/evtgen/python/Pythia8.py @@ -1,45 +1,21 @@ __all__ = ["Pythia8"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue +from ROOT import generator -class Pythia8( Logger ): +class Pythia8( Cpp ): - __allow_keys = [ - "File", - "Seed", - "OutputLevel", - "EventNumber", - ] - - def __init__( self, name, **kw ): + def __init__( self, name, + File : str="", + Seed : int=512, + OutputLevel : int=0, + EventNumber : int=-1, + ): - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import generator - # Create the algorithm - self.__core = generator.Pythia8Gen() - for key, value in kw.items(): - self.setProperty( key,value ) - - - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) + Cpp.__init__(self, generator.Pythia8Gen()) + self.setProperty( "Seed" , Seed ) + self.setProperty( "EventNumber" , EventNumber ) + #self.setProperty( "OutputLevel" , OutputLevel ) + self.setProperty( "File" , File ) diff --git a/generator/evtgen/python/hepmc3/RootReader.py b/generator/evtgen/python/hepmc3/RootReader.py index 2c742aa1..689e9259 100644 --- a/generator/evtgen/python/hepmc3/RootReader.py +++ b/generator/evtgen/python/hepmc3/RootReader.py @@ -1,44 +1,20 @@ __all__ = ["P8Gun"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue +from ROOT import generator -class P8Gun( Logger ): +class P8Gun( Cpp ): - __allow_keys = [ - "File", - "Seed", - "OutputLevel", - ] + def __init__( self, name, + File : str="", + Seed : int=512, + OutputLevel : int=0 + ): - def __init__( self, name, **kw ): - - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import generator - # Create the algorithm - self.__core = generator.P8Gun() - for key, value in kw.items(): - self.setProperty( key,value ) + Cpp.__init__(self, generator.P8Gun()) + self.setProperty( "File" , File ) + self.setProperty( "Seed" , Seed ) + self.setProperty( "OutputLevel" , OutputLevel ) - - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) diff --git a/generator/filters/python/BoostedEvents.py b/generator/filters/python/BoostedEvents.py index 8e0b5b64..b467338f 100644 --- a/generator/filters/python/BoostedEvents.py +++ b/generator/filters/python/BoostedEvents.py @@ -1,54 +1,32 @@ __all__ = ["BoostedEvents"] -from GaugiKernel import Logger, EnumStringification +from GaugiKernel import Cpp, EnumStringification from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue +from GaugiKernel.constants import * +from ROOT import generator +from filters import Particle +class BoostedEvents( Cpp ): -class BoostedEvents( Logger ): - - __allow_keys = [ - "Particle", - "EnergyFactor", - "DeltaR", - "Sigma", - "HasLifetime", - "AtRest", - "Seed", - "OutputLevel", - ] - - def __init__( self, name, gen, **kw ): + def __init__( self, name, gen, + Particle : int=Particle.Electron, + Energy : float=1*GeV, + DeltaR : float=0.2, + HasLifetime : bool=False, + AtRest : bool=False, + Seed : int=512, + OutputLevel : int=0 ): - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import generator - # Create the algorithm - self.__gun = gen - self.__core = generator.BoostedEvents(name, gen) - for key, value in kw.items(): - self.setProperty( key,value ) - - - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) + Cpp.__init__(self, generator.BoostedEvents(name, gen)) + self.__gun = gen + self.setProperty( "Particle" , Particle ) + self.setProperty( "Energy" , Energy ) + self.setProperty( "DeltaR" , DeltaR ) + self.setProperty( "HasLifetime" , HasLifetime ) + self.setProperty( "AtRest" , AtRest ) + #self.setProperty( "OutputLevel" , OutputLevel ) def gun(self): diff --git a/generator/filters/python/FixedRegion.py b/generator/filters/python/FixedRegion.py index 1ee1fae2..fdd1c788 100644 --- a/generator/filters/python/FixedRegion.py +++ b/generator/filters/python/FixedRegion.py @@ -1,47 +1,21 @@ __all__ = ["FixedRegion"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue +from ROOT import generator -class FixedRegion( Logger ): +class FixedRegion( Cpp ): - __allow_keys = [ - "Eta", - "Phi", - "OutputLevel", - ] - - def __init__( self, name, **kw ): + def __init__( self, name, + Eta : float=0.0, + Phi : float=0.0, + OutputLevel : int=0 ): - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import generator - # Create the algorithm - self.__core = generator.FixedRegion(name) - for key, value in kw.items(): - self.setProperty( key,value ) - - - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) + Cpp.__init__(self, generator.FixedRegion(name)) + self.setProperty( "Eta" , Eta ) + self.setProperty( "Phi" , Phi ) + s#elf.setProperty( "OutputLevel" , OutputLevel ) diff --git a/generator/filters/python/JF17.py b/generator/filters/python/JF17.py index 9a24e4f8..0334f39c 100644 --- a/generator/filters/python/JF17.py +++ b/generator/filters/python/JF17.py @@ -1,53 +1,30 @@ __all__ = ["JF17"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue -class JF17( Logger ): +class JF17( Cpp ): - __allow_keys = [ - "EtaMax", - "EtaMin", - "MinPt", - "Select", - "Seed", - "OutputLevel", - "EtaWindow", - "PhiWindow", - ] + def __init__( self, name, gen, + EtaMax : float=1.4, + EtaMin : float=0.0, + MinPt : float=0.0, + Select : int=2, + OutputLevel : int=0, + EtaWindow : float=0.4, + PhiWindow : float=0.4, + ): - def __init__( self, name, gen, **kw ): - - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import generator - # Create the algorithm + Cpp.__init__(self, generator.JF17(name, gen.core())) self.__gen = gen - self.__core = generator.JF17(name, gen.core()) - for key, value in kw.items(): - self.setProperty( key,value ) - - - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) + self.setProperty( "EtaMax" , EtaMax ) + self.setProperty( "EtaMin" , EtaMin ) + self.setProperty( "MinPt" , MinPt ) + self.setProperty( "Select" , Select ) + #self.setProperty( "OutputLevel" , OutputLevel ) + self.setProperty( "EtaWindow" , EtaWindow ) + self.setProperty( "PhiWindow" , PhiWindow ) def gun(self): diff --git a/generator/filters/python/Pileup.py b/generator/filters/python/Pileup.py index 8f8ed472..6ea8321e 100644 --- a/generator/filters/python/Pileup.py +++ b/generator/filters/python/Pileup.py @@ -1,11 +1,11 @@ __all__ = ["Pileup"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue +from ROOT import generator -class Pileup( Logger ): +class Pileup( Cpp ): __allow_keys = [ "EtaMax", @@ -19,36 +19,31 @@ class Pileup( Logger ): "OutputLevel", ] - def __init__( self, name, gen, **kw ): + def __init__( self, name, gen, + EtaMax : float=1.4, + PileupAvg : float=0, + PileupSigma : float=0, + BunchIdStart : int=-8, + BunchIdEnd : int=7, + Select : int=2, + DeltaEta : float=0.22, + DeltaPhi : float=0.22, + OutputLevel : int=0 + ): - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import generator - # Create the algorithm + Cpp.__init__(self, generator.Pileup(name, gen.core())) self.__gen = gen - self.__core = generator.Pileup(name, gen.core()) - for key, value in kw.items(): - self.setProperty( key,value ) + self.setProperty( "EtaMax" , EtaMax ) + self.setProperty( "PileupAvg" , PileupAvg ) + self.setProperty( "PileupSigma" , PileupSigma ) + self.setProperty( "BunchIdStart" , BunchIdStart ) + self.setProperty( "BunchIdEnd" , BunchIdEnd ) + self.setProperty( "Select" , Select ) + self.setProperty( "DeltaEta" , DeltaEta ) + self.setProperty( "DeltaPhi" , DeltaPhi ) + #self.setProperty( "OutputLevel" , OutputLevel ) - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) def gun(self): return self.__gen diff --git a/generator/filters/python/SingleParticle.py b/generator/filters/python/SingleParticle.py index 7f70f05e..00a0abdd 100644 --- a/generator/filters/python/SingleParticle.py +++ b/generator/filters/python/SingleParticle.py @@ -1,9 +1,9 @@ __all__ = ["SingleParticle", "Particle"] -from GaugiKernel import Logger, EnumStringification +from GaugiKernel import Cpp, EnumStringification +from GaugiKernel.constants import * from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue - +from ROOT import generator class Particle(EnumStringification): @@ -12,60 +12,43 @@ class Particle(EnumStringification): Pion = 211 - - - -class SingleParticle( Logger ): - - __allow_keys = [ - "Eta", - "Phi", - "Particle", - "Energy", - "EnergyMin", - "EnergyMax", - "HasLifetime", - "AtRest", - "Seed", - "OutputLevel", - "DoRangedEta", - "EtaMin", - "EtaMax", - "DoRangedPhi", - "PhiMin", - "PhiMax", - ] - - def __init__( self, name, gen, **kw ): - - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import generator +class SingleParticle( Cpp ): + + def __init__( self, name, gen, + Eta : float=0.0, + Phi : float=0.0, + Particle : int=Particle.Electron, + Energy : float=-1, + EnergyMin : float=0.0*GeV, + EnergyMax : float=100*GeV, + HasLifetime : bool=False, + AtRest : bool=False, + OutputLevel : int=0, + DoRangedEta : bool=False, + EtaMin : float=-2.5, + EtaMax : float=2.5, + DoRangedPhi : bool=False, + PhiMin : float=-3.14, + PhiMax : float=3.14, + ): + + Cpp.__init__(self, generator.SingleParticle(name, gen.core()) ) self.__gen = gen - # Create the algorithm - self.__core = generator.SingleParticle(name, gen.core()) - for key, value in kw.items(): - self.setProperty( key,value ) - - - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) + self.setProperty( "Eta" , Eta ) + self.setProperty( "Phi" , Phi ) + self.setProperty( "Particle" , Particle ) + self.setProperty( "Energy" , Energy ) + self.setProperty( "EnergyMin" , EnergyMin ) + self.setProperty( "EnergyMax" , EnergyMax ) + self.setProperty( "HasLifetime" , HasLifetime ) + self.setProperty( "AtRest" , AtRest ) + #self.setProperty( "OutputLevel" , OutputLevel ) + self.setProperty( "DoRangedEta" , DoRangedEta ) + self.setProperty( "EtaMin" , EtaMin ) + self.setProperty( "EtaMax" , EtaMax ) + self.setProperty( "DoRangedPhi" , DoRangedPhi ) + self.setProperty( "PhiMin" , PhiMin ) + self.setProperty( "PhiMax" , PhiMax ) def gun(self): diff --git a/generator/filters/python/Zee.py b/generator/filters/python/Zee.py index 4f6f4853..2842b751 100644 --- a/generator/filters/python/Zee.py +++ b/generator/filters/python/Zee.py @@ -1,49 +1,26 @@ __all__ = ["Zee"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue +from ROOT import generator -class Zee( Logger ): +class Zee( Cpp ): - __allow_keys = [ - "EtaMax", - "MinPt", - "zeroVertexParticles", - "OutputLevel", - ] - - def __init__( self, name, gen, **kw ): + def __init__( self, name, gen, + EtaMax : float=1.4, + MinPt : float=0.0, + ZeroVertexParticles : bool=False, + OutputLevel : int=0 + ): - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import generator - # Create the algorithm + Cpp.__init__(self, generator.Zee(name, gen.core())) self.__gen = gen - self.__core = generator.Zee(name, gen.core()) - for key, value in kw.items(): - self.setProperty( key,value ) - - - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) + self.setProperty( "EtaMax" , EtaMax ) + self.setProperty( "MinPt" , MinPt ) + self.setProperty( "ZeroVertexParticles" , ZeroVertexParticles ) + #self.setProperty( "OutputLevel" , OutputLevel ) def gun(self): diff --git a/generator/filters/python/__init__.py b/generator/filters/python/__init__.py index e064752d..a227e71b 100644 --- a/generator/filters/python/__init__.py +++ b/generator/filters/python/__init__.py @@ -16,10 +16,6 @@ __all__.extend(SingleParticle.__all__) from .SingleParticle import * -#from . import LLPGun -#__all__.extend(LLPGun.__all__) -#from .LLPGun import * -# from . import Pileup __all__.extend(Pileup.__all__) from .Pileup import * diff --git a/generator/filters/src/BoostedEvents.cxx b/generator/filters/src/BoostedEvents.cxx index 725ce3c9..91bb9615 100644 --- a/generator/filters/src/BoostedEvents.cxx +++ b/generator/filters/src/BoostedEvents.cxx @@ -9,8 +9,6 @@ using namespace Pythia8; using namespace generator; -using namespace generator; - BoostedEvents::BoostedEvents(const std::string name, IGenerator *gen): diff --git a/generator/filters/src/JF17.cxx b/generator/filters/src/JF17.cxx index 9ecf9fb6..2c8466fc 100644 --- a/generator/filters/src/JF17.cxx +++ b/generator/filters/src/JF17.cxx @@ -21,8 +21,6 @@ JF17::JF17(const std::string name , IGenerator *gen): declareProperty( "Select" , m_select=2 ); declareProperty( "EtaWindow" , m_etaWindow=0.4 ); declareProperty( "PhiWindow" , m_phiWindow=0.4 ); - - } JF17::~JF17() diff --git a/generator/filters/src/Zee.cxx b/generator/filters/src/Zee.cxx index d21c2f56..4b2de12a 100644 --- a/generator/filters/src/Zee.cxx +++ b/generator/filters/src/Zee.cxx @@ -11,7 +11,7 @@ Zee::Zee(const std::string name, IGenerator *gen): { declareProperty( "EtaMax" , m_etaMax=1.4 ); declareProperty( "MinPt" , m_minPt=0.0 ); - declareProperty( "zeroVertexParticles" , m_zeroVertexParticles=false ); + declareProperty( "ZeroVertexParticles" , m_zeroVertexParticles=false ); } diff --git a/generator/genkernel/python/EventTape.py b/generator/genkernel/python/EventTape.py index 155d0f56..5ac71659 100644 --- a/generator/genkernel/python/EventTape.py +++ b/generator/genkernel/python/EventTape.py @@ -1,34 +1,22 @@ __all__ = ["EventTape"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue +from ROOT import generator +class EventTape( Cpp ): -class EventTape( Logger ): + def __init__( self, name : str, + OutputFile : str, + RunNumber : int=0, + NumberOfEvents : int=1, + OutputLevel : int=0 ): - __allow_keys = [ - "RunNumber" , - "NumberOfEvents" , - "OutputFile" , - "OutputLevel" , - ] - - - def __init__( self, name, **kw ): - - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import RunManager, generator - # Create the algorithm - self.__core = generator.EventTape() - for key, value in kw.items(): - self.setProperty( key,value ) - - - def core(self): - return self.__core + Cpp.__init__(self, generator.EventTape()) + self.setProperty("RunNumber" , RunNumber ) + self.setProperty("NumberOfEvents" , NumberOfEvents ) + self.setProperty("OutputFile" , OutputFile ) + self.setProperty("OutputLevel" , OutputLevel ) def run( self, evt): @@ -38,9 +26,9 @@ def run( self, evt): else: MSG_FATAL(self, "input argument type not supported. Should be int value") - self.core().initialize() - self.core().execute() - self.core().finalize() + self._core.initialize() + self._core.execute() + self._core.finalize() def __add__(self, tool): @@ -49,20 +37,6 @@ def __add__(self, tool): def push_back( self, tool ): - self.__core.push_back( tool.core() ) + self._core.push_back( tool.core() ) - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - diff --git a/generator/scripts/gen_electron.py b/generator/scripts/gen_electron.py index 0b52898a..c700639a 100755 --- a/generator/scripts/gen_electron.py +++ b/generator/scripts/gen_electron.py @@ -2,7 +2,7 @@ from GaugiKernel import LoggingLevel, Logger from GaugiKernel import GeV import argparse -import sys,os +import sys,os,traceback mainLogger = Logger.getModuleLogger("pythia") @@ -116,7 +116,8 @@ electron = SingleParticle( "Electron", Pythia8("Generator", Seed=args.seed, - EventNumber = args.eventNumber), + EventNumber = args.eventNumber + ), Eta = args.eta, Phi = args.phi, EnergyMin = args.energy_min*GeV, @@ -156,5 +157,6 @@ sys.exit(0) except Exception as e: - print(e) + traceback.print_exc() + mainLogger.error(e) sys.exit(1) diff --git a/generator/scripts/gen_jets.py b/generator/scripts/gen_jets.py index 2fc39942..d2ca086c 100755 --- a/generator/scripts/gen_jets.py +++ b/generator/scripts/gen_jets.py @@ -2,7 +2,7 @@ from GaugiKernel import LoggingLevel, Logger from GaugiKernel import GeV import argparse -import sys,os +import sys,os,traceback mainLogger = Logger.getModuleLogger("pythia") @@ -130,5 +130,6 @@ sys.exit(0) except Exception as e: - print(e) + traceback.print_exc() + mainLogger.error(e) sys.exit(1) \ No newline at end of file diff --git a/generator/scripts/gen_minbias.py b/generator/scripts/gen_minbias.py index 94769a3f..05a99788 100755 --- a/generator/scripts/gen_minbias.py +++ b/generator/scripts/gen_minbias.py @@ -2,7 +2,7 @@ from GaugiKernel import LoggingLevel, Logger from GaugiKernel import GeV import argparse -import sys,os +import sys,os,traceback mainLogger = Logger.getModuleLogger("pythia") @@ -101,5 +101,6 @@ sys.exit(0) except Exception as e: - print(e) + traceback.print_exc() + mainLogger.error(e) sys.exit(1) \ No newline at end of file diff --git a/generator/scripts/gen_photon.py b/generator/scripts/gen_photon.py index a45870c1..78e8fe07 100755 --- a/generator/scripts/gen_photon.py +++ b/generator/scripts/gen_photon.py @@ -2,7 +2,7 @@ from GaugiKernel import LoggingLevel, Logger from GaugiKernel import GeV import argparse -import sys,os +import sys,os,traceback mainLogger = Logger.getModuleLogger("pythia") @@ -156,5 +156,6 @@ sys.exit(0) except Exception as e: - print(e) - sys.exit(1) + traceback.print_exc() + mainLogger.error(e) + sys.exit(1) \ No newline at end of file diff --git a/generator/scripts/gen_zee.py b/generator/scripts/gen_zee.py index 1cdfc8d9..b55d409c 100755 --- a/generator/scripts/gen_zee.py +++ b/generator/scripts/gen_zee.py @@ -3,7 +3,7 @@ from GaugiKernel import LoggingLevel, Logger from GaugiKernel import GeV import argparse -import sys,os +import sys,os,traceback mainLogger = Logger.getModuleLogger("zee") @@ -92,7 +92,7 @@ EventNumber = args.eventNumber), EtaMax = 3.2, MinPt = 15*GeV, - zeroVertexParticles = args.zeroVertexParticles, #calibration use only. + ZeroVertexParticles = args.zeroVertexParticles, #calibration use only. OutputLevel = args.outputLevel ) tape+=zee @@ -122,5 +122,6 @@ sys.exit(0) except Exception as e: - print(e) + traceback.print_exc() + mainLogger.error(e) sys.exit(1) \ No newline at end of file diff --git a/reconstruction/calorimeter/CaloCellBuilder/python/CaloCellMaker.py b/reconstruction/calorimeter/CaloCellBuilder/python/CaloCellMaker.py index 2ceb8c6c..5dd70b77 100644 --- a/reconstruction/calorimeter/CaloCellBuilder/python/CaloCellMaker.py +++ b/reconstruction/calorimeter/CaloCellBuilder/python/CaloCellMaker.py @@ -5,7 +5,7 @@ from GaugiKernel import Cpp from GaugiKernel.macros import * - +import ROOT class CaloCellMaker( Cpp ): @@ -17,7 +17,7 @@ def __init__( self, name, sampling, DetailedHistograms : bool=False, HistogramPath : str="/Hists/Cells" ): - Cpp.__init__(self, name, "ROOT.CaloCellMaker", OutputLevel=OutputLevel) + Cpp.__init__(self, ROOT.CaloCellMaker(name) ) self.Tools = [] self.PulseGenerator = None @@ -35,14 +35,15 @@ def __init__( self, name, sampling, self.setProperty( "BunchDuration" , 25 ) self.setProperty( "DetailedHistograms" , DetailedHistograms ) self.setProperty( "HistogramPath" , HistogramPath ) - + self.setProperty( "OutputLevel" , OutputLevel ) + def core(self): # Attach all tools before return the core for tool in self.Tools: - self.__core.push_back(tool.core()) - self.__core.setPulseGenerator(self.PulseGenerator.core()) - return self.__core + self._core.push_back(tool.core()) + self._core.setPulseGenerator(self.PulseGenerator.core()) + return self._core def __add__( self, tool ): diff --git a/reconstruction/calorimeter/CaloCellBuilder/python/CaloCellMerge.py b/reconstruction/calorimeter/CaloCellBuilder/python/CaloCellMerge.py index 5ec58840..7afb21bf 100644 --- a/reconstruction/calorimeter/CaloCellBuilder/python/CaloCellMerge.py +++ b/reconstruction/calorimeter/CaloCellBuilder/python/CaloCellMerge.py @@ -1,21 +1,20 @@ __all__ = ["CaloCellMerge"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue - +import ROOT class CaloCellMerge( Cpp ): - def __init__( self, name, + def __init__( self, name : str, InputCollectionKeys : str="Collection" , OutputCellsKey : str="Cells", OutputTruthCellsKey : str="TruthCells", OutputLevel : int=0 ): - Cpp.__init__(self, name, "Root.CaloCellMerge", OutputLevel=OutputLevel) + Cpp.__init__(self, ROOT.CaloCellMerge(name) ) # Create the algorithm self.setProperty( "InputCollectionKeys" , InputCollectionKeys ) self.setProperty( "OutputCellsKey" , OutputCellsKey ) diff --git a/reconstruction/calorimeter/CaloCellBuilder/python/CaloHitMaker.py b/reconstruction/calorimeter/CaloCellBuilder/python/CaloHitMaker.py index 25724896..6d712276 100644 --- a/reconstruction/calorimeter/CaloCellBuilder/python/CaloHitMaker.py +++ b/reconstruction/calorimeter/CaloCellBuilder/python/CaloHitMaker.py @@ -5,7 +5,7 @@ from GaugiKernel import Cpp from GaugiKernel.macros import * - +import ROOT class CaloHitMaker( Cpp ): @@ -19,7 +19,7 @@ def __init__( self, name, sampling, SamplingNoiseStd : float = 0, ): - Cpp.__init__(self, name, "ROOT.CaloHitMaker", OutputLevel=OutputLevel) + Cpp.__init__(self, ROOT.CaloHitMaker(name) ) self.Tools = [] self.setProperty( "OutputCollectionKey" , OutputCollectionKey ) self.setProperty( "EtaBins" , sampling.sensitive().EtaBins) @@ -37,13 +37,15 @@ def __init__( self, name, sampling, self.setProperty( "SamplingNoiseStd" , SamplingNoiseStd ) self.setProperty( "DetailedHistograms" , DetailedHistograms ) self.setProperty( "HistogramPath" , HistogramPath ) + self.setProperty( "OutputLevel" , OutputLevel ) + def core(self): # Attach all tools before return the core for tool in self.Tools: - self.__core.push_back(tool.core()) - return self.__core + self._core.push_back(tool.core()) + return self._core def __add__( self, tool ): diff --git a/reconstruction/calorimeter/CaloCellBuilder/python/CaloHitMerge.py b/reconstruction/calorimeter/CaloCellBuilder/python/CaloHitMerge.py index 24f66571..c5a3980e 100644 --- a/reconstruction/calorimeter/CaloCellBuilder/python/CaloHitMerge.py +++ b/reconstruction/calorimeter/CaloCellBuilder/python/CaloHitMerge.py @@ -2,18 +2,18 @@ from GaugiKernel import Cpp from GaugiKernel.macros import * - +import ROOT class CaloHitMerge( Cpp ): - def __init__( self, name, + def __init__( self, name : str, InputCollectionKeys : list= [], OutputHitsKey : str = "Hits", OutputLevel : int = 10, ): - Cpp.__init__(self, name, "ROOT.CaloHitMerge", OutputLevel=OutputLevel) + Cpp.__init__(self, ROOT.CaloHitMerge(name) ) self.setProperty( "InputCollectionKeys" , InputCollectionKeys ) self.setProperty( "OutputHitsKey" , OutputHitsKey ) self.setProperty( "OutputLevel" , OutputLevel ) diff --git a/reconstruction/calorimeter/CaloCellBuilder/python/Calorimeter.py b/reconstruction/calorimeter/CaloCellBuilder/python/Calorimeter.py index 69d7bb7d..85473f54 100644 --- a/reconstruction/calorimeter/CaloCellBuilder/python/Calorimeter.py +++ b/reconstruction/calorimeter/CaloCellBuilder/python/Calorimeter.py @@ -16,6 +16,9 @@ class Calorimeter(Logger): ] def __init__(self, sv, bunch_start, bunch_end, sampling_start, **kw): + + + Logger.__init__(self) for key, value in kw.items(): diff --git a/reconstruction/calorimeter/CaloCellBuilder/python/CrossTalkMaker.py b/reconstruction/calorimeter/CaloCellBuilder/python/CrossTalkMaker.py index 28fbf52c..2e5d242b 100644 --- a/reconstruction/calorimeter/CaloCellBuilder/python/CrossTalkMaker.py +++ b/reconstruction/calorimeter/CaloCellBuilder/python/CrossTalkMaker.py @@ -3,10 +3,11 @@ from GaugiKernel import Cpp from GaugiKernel.macros import * from CaloCellBuilder import CaloFlags as flags +import ROOT -class CrossTalkMaker( Logger ): +class CrossTalkMaker( Cpp ): - def __init__( self, name, + def __init__( self, name : str, InputCollectionKey : str="Cells", OutputCollectionKey : str="XTCells", MinEnergy : float=flags.XTMinEnergy, @@ -17,8 +18,9 @@ def __init__( self, name, OutputLevel : int=0, ): - Cpp.__init__(self, name, "ROOT.CrossTalkMaker", OutputLevel=OutputLevel) + Cpp.__init__(self, ROOT.CrossTalkMaker(name) ) self.Tools = [] + self.setProperty( "OutputLevel" , OutputLevel ) self.setProperty( "InputCollectionKey" , InputCollectionKey ) self.setProperty( "OutputCollectionKey" , OutputCollectionKey ) self.setProperty( "MinEnergy" , MinEnergy ) @@ -31,8 +33,8 @@ def __init__( self, name, def core(self): # Attach all tools before return the core for tool in self.Tools: - self.__core.push_back(tool.core()) - return self.__core + self._core.push_back(tool.core()) + return self._core def __add__( self, tool ): diff --git a/reconstruction/calorimeter/CaloCellBuilder/python/OptimalFilter.py b/reconstruction/calorimeter/CaloCellBuilder/python/OptimalFilter.py index d29aba50..302d1459 100644 --- a/reconstruction/calorimeter/CaloCellBuilder/python/OptimalFilter.py +++ b/reconstruction/calorimeter/CaloCellBuilder/python/OptimalFilter.py @@ -3,17 +3,18 @@ from GaugiKernel import Cpp from GaugiKernel.macros import * - +import ROOT class OptimalFilter( Cpp ): - def __init__( self, name, + def __init__( self, name : str, WeightsEnergy : list=[], WeightsTime : list=[], OutputLevel : int=0 ): - Cpp.__init__(self, name, "ROOT.OptimalFilter", OutputLevel=OutputLevel) + Cpp.__init__(self, ROOT.OptimalFilter(name) ) + self.setProperty( "OutputLevel" , OutputLevel ) self.setProperty( "WeightsEnergy" , WeightsEnergy ) self.setProperty( "WeightsTime" , WeightsTime ) @@ -30,7 +31,8 @@ def __init__( self, name, StartSamplingBC : float=0, ): - Cpp.__init__(self, name, "ROOT.ConstrainedOptimalFilter", OutputLevel=OutputLevel) + Cpp.__init__(self, ROOT.ConstrainedOptimalFilter(name) ) + self.setProperty( "OutputLevel" , OutputLevel ) self.setProperty( "OutputLevel" , OutputLevel ) self.setProperty( "NSamples" , NSamples ) self.setProperty( "PulsePath" , PulsePath ) diff --git a/reconstruction/calorimeter/CaloCellBuilder/python/PileupMerge.py b/reconstruction/calorimeter/CaloCellBuilder/python/PileupMerge.py index e722a0ac..9afc3da0 100644 --- a/reconstruction/calorimeter/CaloCellBuilder/python/PileupMerge.py +++ b/reconstruction/calorimeter/CaloCellBuilder/python/PileupMerge.py @@ -2,11 +2,11 @@ from GaugiKernel import Cpp from GaugiKernel.macros import * - +import ROOT class PileupMerge( Cpp ): - def __init__( self, name, + def __init__( self, name : str, InputFile : str, InputHitsKey : str="Hits", OutputHitsKey : str="Hits_Merged", @@ -16,7 +16,8 @@ def __init__( self, name, NtupleName : str="CollectionTree" ): - Cpp.__init__(self, name, "ROOT.PileupMerge", OutputLevel=OutputLevel) + Cpp.__init__(self, ROOT.PileupMerge(name) ) + self.setProperty( "OutputLevel" , OutputLevel ) self.setProperty( "InputHitsKey" , InputHitsKey ) self.setProperty( "OutputHitsKey" , OutputHitsKey ) self.setProperty( "InputEventKey" , InputEventKey ) diff --git a/reconstruction/calorimeter/CaloCellBuilder/python/PulseGenerator.py b/reconstruction/calorimeter/CaloCellBuilder/python/PulseGenerator.py index 167b3156..f9028dde 100644 --- a/reconstruction/calorimeter/CaloCellBuilder/python/PulseGenerator.py +++ b/reconstruction/calorimeter/CaloCellBuilder/python/PulseGenerator.py @@ -3,12 +3,12 @@ from GaugiKernel import Cpp from GaugiKernel.macros import * - +import ROOT class PulseGenerator( Cpp ): - def __init__( self, name, + def __init__( self, name : str, OutputLevel : int=0, NSamples : int=0, ShaperFile : str="", @@ -21,7 +21,8 @@ def __init__( self, name, StartSamplingBC : float=0 ): - Cpp.__init__(self, name, "Root.PulseGenerator", OutputLevel=OutputLevel) + Cpp.__init__(self, ROOT.PulseGenerator(name) ) + self.setProperty( "OutputLevel" , OutputLevel ) self.setProperty( "NSamples" , NSamples ) self.setProperty( "ShaperFile" , ShaperFile ) self.setProperty( "Pedestal" , Pedestal ) diff --git a/reconstruction/io/RootStreamBuilder/python/RootStreamAODMaker.py b/reconstruction/io/RootStreamBuilder/python/RootStreamAODMaker.py index 06152dc6..224f686e 100644 --- a/reconstruction/io/RootStreamBuilder/python/RootStreamAODMaker.py +++ b/reconstruction/io/RootStreamBuilder/python/RootStreamAODMaker.py @@ -1,60 +1,39 @@ __all__ = ["RootStreamAODMaker"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue - - -class RootStreamAODMaker( ): - - __allow_keys = [ - "InputEventKey", - "InputTruthKey", - "InputCellsKey", - "InputClusterKey", - "InputRingerKey", - - "OutputEventKey", - "OutputTruthKey", - "OutputCellsKey", - "OutputClusterKey", - "OutputRingerKey", - - "OutputLevel", - "NtupleName", - "DumpCells", - ] - - - def __init__( self, name, **kw ): +from RootStreamBuilder import RootStreamAODFlags as flags +import ROOT + +class RootStreamAODMaker( Cpp ): + + def __init__( self, name, + InputEventKey : str, + InputTruthKey : str, + InputCellsKey : str, + InputClusterKey : str, + InputRingerKey : str, + OutputEventKey : str=None, + OutputTruthKey : str=None, + OutputCellsKey : str=None, + OutputClusterKey : str=None, + OutputRingerKey : str=None, + OutputLevel : int=0, + NtupleName : str="CollectionTree", + DumpCells : bool=flags.DumpCells, + ): - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import RootStreamAODMaker - self.__core = RootStreamAODMaker(name) - - for key, value in kw.items(): - self.setProperty( key,value ) - - - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - + Cpp.__init__(self, ROOT.RootStreamAODMaker(name)) + self.setProperty( "InputEventKey" , InputEventKey ) + self.setProperty( "InputTruthKey" , InputTruthKey ) + self.setProperty( "InputCellsKey" , InputCellsKey ) + self.setProperty( "InputClusterKey" , InputClusterKey ) + self.setProperty( "InputRingerKey" , InputRingerKey ) + self.setProperty( "OutputEventKey" , OutputEventKey if OutputEventKey else InputEventKey ) + self.setProperty( "OutputTruthKey" , OutputTruthKey if OutputTruthKey else InputTruthKey ) + self.setProperty( "OutputCellsKey" , OutputCellsKey if OutputCellsKey else InputCellsKey ) + self.setProperty( "OutputClusterKey", OutputClusterKey if OutputClusterKey else InputClusterKey ) + self.setProperty( "OutputRingerKey" , OutputRingerKey if OutputRingerKey else InputRingerKey ) + self.setProperty( "OutputLevel" , OutputLevel ) + self.setProperty( "NtupleName" , NtupleName ) + self.setProperty( "DumpCells" , DumpCells ) \ No newline at end of file diff --git a/reconstruction/io/RootStreamBuilder/python/RootStreamESDMaker.py b/reconstruction/io/RootStreamBuilder/python/RootStreamESDMaker.py index 2829d8e3..3a64d7ee 100644 --- a/reconstruction/io/RootStreamBuilder/python/RootStreamESDMaker.py +++ b/reconstruction/io/RootStreamBuilder/python/RootStreamESDMaker.py @@ -1,55 +1,34 @@ __all__ = ["RootStreamESDMaker"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue - - -class RootStreamESDMaker( Logger ): - - __allow_keys = [ - "InputEventKey", - "InputTruthKey", - "InputCellsKey", - "OutputEventKey", - "OutputTruthKey", - "OutputCellsKey", - "OutputLevel", - "NtupleName", - "EtaWindow", - "PhiWindow", - ] - - - def __init__( self, name, **kw ): +from RootStreamBuilder import RootStreamESDFlags as flags +import ROOT + +class RootStreamESDMaker( Cpp ): + + def __init__( self, name, + InputEventKey : str, + InputTruthKey : str, + InputCellsKey : str, + OutputEventKey : str=None, + OutputTruthKey : str=None, + OutputCellsKey : str=None, + OutputLevel : int=0, + NtupleName : str="CollectionTree", + EtaWindow : float=flags.EtaWindow, + PhiWindow : float=flags.PhiWindow, + ): - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import RootStreamESDMaker - self.__core = RootStreamESDMaker(name) - - for key, value in kw.items(): - self.setProperty( key,value ) - - - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - + Cpp.__init__(self, ROOT.RootStreamESDMaker(name)) + self.setProperty( "InputEventKey" , InputEventKey ) + self.setProperty( "InputTruthKey" , InputTruthKey ) + self.setProperty( "InputCellsKey" , InputCellsKey ) + self.setProperty( "OutputEventKey" , OutputEventKey if OutputEventKey else InputEventKey ) + self.setProperty( "OutputTruthKey" , OutputTruthKey if OutputTruthKey else InputTruthKey ) + self.setProperty( "OutputCellsKey" , OutputCellsKey if OutputCellsKey else InputCellsKey ) + self.setProperty( "OutputLevel" , OutputLevel ) + self.setProperty( "NtupleName" , NtupleName ) + self.setProperty( "EtaWindow" , EtaWindow ) + self.setProperty( "PhiWindow" , PhiWindow ) diff --git a/reconstruction/io/RootStreamBuilder/python/RootStreamESDReader.py b/reconstruction/io/RootStreamBuilder/python/RootStreamESDReader.py index 6d7ccf3d..31d6ce25 100644 --- a/reconstruction/io/RootStreamBuilder/python/RootStreamESDReader.py +++ b/reconstruction/io/RootStreamBuilder/python/RootStreamESDReader.py @@ -1,36 +1,30 @@ __all__ = ["RootStreamESDReader"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue - - -class RootStreamESDReader( Logger ): - - __allow_keys = [ - "EventKey", - "TruthKey", - "CellsKey", - "OutputLevel", - "NtupleName", - "InputFile", - ] - - - def __init__( self, name, **kw ): +import ROOT + +class RootStreamESDReader( Cpp ): + + def __init__( self, name, + OutputEventKey : str, + OutputTruthKey : str, + OutputCellsKey : str, + InputFile : str, + OutputLevel : int=0, + NtupleName : str="CollectionTree", + ): - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import RootStreamESDReader - self.__core = RootStreamESDReader(name) - - for key, value in kw.items(): - self.setProperty( key,value ) - - from ROOT import TFile, TTree - f = TFile( self.getProperty("InputFile"),"read") - t = f.Get( self.getProperty("NtupleName")) + Cpp.__init__(self, ROOT.RootStreamESDReader(name)) + self.setProperty( "OutputEventKey" , OutputEventKey ) + self.setProperty( "OutputTruthKey" , OutputTruthKey ) + self.setProperty( "OutputCellsKey" , OutputCellsKey ) + self.setProperty( "OutputLevel" , OutputLevel ) + self.setProperty( "NtupleName" , NtupleName ) + self.setProperty( "InputFile" , InputFile ) + + f = ROOT.TFile( self.InputFile,"read") + t = f.Get( self.NtupleName ) self.__entries = t.GetEntries() @@ -38,24 +32,5 @@ def GetEntries(self): return self.__entries - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - def merge(self, acc): acc.SetReader(self) diff --git a/reconstruction/io/RootStreamBuilder/python/RootStreamFlags.py b/reconstruction/io/RootStreamBuilder/python/RootStreamFlags.py index e69de29b..8b7d3525 100644 --- a/reconstruction/io/RootStreamBuilder/python/RootStreamFlags.py +++ b/reconstruction/io/RootStreamBuilder/python/RootStreamFlags.py @@ -0,0 +1,22 @@ + +__all__ = ["RootStreamHITFlags", "RootStreamESDFlags", "RootStreamAODFlags"] + + +from GaugiKernel import EnumStringification + + +class RootStreamHITFlags(EnumStringification): + + OnlyRoI = True + EtaWindow = 0.4 + PhiWindow = 0.4 + +class RootStreamESDFlags(EnumStringification): + + EtaWindow = 0.4 + PhiWindow = 0.4 + + +class RootStreamAODFlags(EnumStringification): + + DumpCells = True \ No newline at end of file diff --git a/reconstruction/io/RootStreamBuilder/python/RootStreamHITMaker.py b/reconstruction/io/RootStreamBuilder/python/RootStreamHITMaker.py index ed76c6ee..baf0fb8f 100644 --- a/reconstruction/io/RootStreamBuilder/python/RootStreamHITMaker.py +++ b/reconstruction/io/RootStreamBuilder/python/RootStreamHITMaker.py @@ -1,56 +1,41 @@ __all__ = ["RootStreamHITMaker"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue - - -class RootStreamHITMaker( Logger ): - - __allow_keys = [ - "InputEventKey", - "InputTruthKey", - "InputHitsKey", - "OutputEventKey", - "OutputTruthKey", - "OutputHitsKey", - "OutputLevel", - "NtupleName", - "OnlyRoI", - "EtaWindow", - "PhiWindow", - ] - - - def __init__( self, name, **kw ): +from RootStreamBuilder import RootStreamHITFlags as flags +import ROOT + +class RootStreamHITMaker( Cpp ): + + def __init__( self, name, + InputEventKey : str, + InputTruthKey : str, + InputHitsKey : str, + OutputEventKey : str=None, + OutputTruthKey : str=None, + OutputHitsKey : str=None, + OutputLevel : int=0, + NtupleName : str="CollectionTree", + OnlyRoI : bool=flags.OnlyRoI, + EtaWindow : float=flags.EtaWindow, + PhiWindow : float=flags.PhiWindow, + ): - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import RootStreamHITMaker - self.__core = RootStreamHITMaker(name) - - for key, value in kw.items(): - self.setProperty( key,value ) - - - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) + Cpp.__init__(self, ROOT.RootStreamHITMaker(name)) + + self.setProperty( "InputEventKey" , InputEventKey ) + self.setProperty( "InputTruthKey" , InputTruthKey ) + self.setProperty( "InputHitsKey" , InputHitsKey ) + + self.setProperty( "OutputEventKey" , OutputEventKey if OutputEventKey else InputEventKey ) + self.setProperty( "OutputTruthKey" , OutputTruthKey if OutputTruthKey else InputTruthKey ) + self.setProperty( "OutputHitsKey" , OutputHitsKey if OutputHitsKey else InputHitsKey ) + + self.setProperty( "OutputLevel" , OutputLevel ) + self.setProperty( "NtupleName" , NtupleName ) + self.setProperty( "OnlyRoI" , OnlyRoI ) + self.setProperty( "EtaWindow" , EtaWindow ) + self.setProperty( "PhiWindow" , PhiWindow ) diff --git a/reconstruction/io/RootStreamBuilder/python/RootStreamHITReader.py b/reconstruction/io/RootStreamBuilder/python/RootStreamHITReader.py index 41d5c5f2..c45bc245 100644 --- a/reconstruction/io/RootStreamBuilder/python/RootStreamHITReader.py +++ b/reconstruction/io/RootStreamBuilder/python/RootStreamHITReader.py @@ -1,55 +1,33 @@ __all__ = ["RootStreamHITReader"] -from GaugiKernel import Logger +from GaugiKernel import Cpp from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue +import ROOT -class RootStreamHITReader( Logger ): +class RootStreamHITReader( Cpp ): - __allow_keys = [ - "EventKey", - "TruthKey", - "HitsKey", - "OutputLevel", - "NtupleName", - "InputFile", - ] - - - def __init__( self, name, **kw ): + def __init__( self, name, + OutputEventKey : str, + OutputTruthKey : str, + OutputHitsKey : str, + InputFile : str, + OutputLevel : int=0, + NtupleName : str="CollectionTree", + ): - Logger.__init__(self) - import ROOT - ROOT.gSystem.Load('liblorenzetti') - from ROOT import RootStreamHITReader - self.__core = RootStreamHITReader(name) - for key, value in kw.items(): - self.setProperty( key,value ) - - from ROOT import TFile, TTree - f = TFile( self.getProperty("InputFile"),"read") - t = f.Get( self.getProperty("NtupleName")) + Cpp.__init__(self, ROOT.RootStreamHITReader(name)) + self.setProperty( "OutputEventKey" , OutputEventKey ) + self.setProperty( "OutputTruthKey" , OutputTruthKey ) + self.setProperty( "OutputHitsKey" , OutputHitsKey ) + self.setProperty( "OutputLevel" , OutputLevel ) + self.setProperty( "NtupleName" , NtupleName ) + self.setProperty( "InputFile" , InputFile ) + + f = ROOT.TFile( self.InputFile,"read") + t = f.Get( self.NtupleName) self.__entries = t.GetEntries() - def core(self): - return self.__core - - - def setProperty( self, key, value ): - if key in self.__allow_keys: - setattr( self, '__' + key , value ) - self.core().setProperty( key, treatPropertyValue(value) ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - - - def getProperty( self, key ): - if key in self.__allow_keys: - return getattr( self, '__' + key ) - else: - MSG_FATAL( self, "Property with name %s is not allow for %s object", key, self.__class__.__name__) - def GetEntries(self): return self.__entries diff --git a/reconstruction/io/RootStreamBuilder/python/RootStreamNTUPLEMaker.py b/reconstruction/io/RootStreamBuilder/python/RootStreamNTUPLEMaker.py index 3ea956ef..0da1e90c 100644 --- a/reconstruction/io/RootStreamBuilder/python/RootStreamNTUPLEMaker.py +++ b/reconstruction/io/RootStreamBuilder/python/RootStreamNTUPLEMaker.py @@ -2,7 +2,6 @@ from GaugiKernel import Logger from GaugiKernel.macros import * -from G4Kernel import treatPropertyValue class RootStreamNTUPLEMaker( Logger ): diff --git a/reconstruction/io/RootStreamBuilder/python/__init__.py b/reconstruction/io/RootStreamBuilder/python/__init__.py index bd232ce7..071161aa 100644 --- a/reconstruction/io/RootStreamBuilder/python/__init__.py +++ b/reconstruction/io/RootStreamBuilder/python/__init__.py @@ -5,6 +5,10 @@ __all__.extend(RootStreamKeys.__all__) from .RootStreamKeys import * +from . import RootStreamFlags +__all__.extend(RootStreamFlags.__all__) +from .RootStreamFlags import * + from . import RootStreamHITMaker __all__.extend(RootStreamHITMaker.__all__) from .RootStreamHITMaker import * diff --git a/reconstruction/io/RootStreamBuilder/src/RootStreamESDReader.cxx b/reconstruction/io/RootStreamBuilder/src/RootStreamESDReader.cxx index 39946083..31a735e1 100644 --- a/reconstruction/io/RootStreamBuilder/src/RootStreamESDReader.cxx +++ b/reconstruction/io/RootStreamBuilder/src/RootStreamESDReader.cxx @@ -19,9 +19,9 @@ RootStreamESDReader::RootStreamESDReader( std::string name ) : Algorithm() { declareProperty( "InputFile" , m_inputFile="" ); - declareProperty( "EventKey" , m_eventKey="EventInfo" ); - declareProperty( "TruthKey" , m_truthKey="Particles" ); - declareProperty( "CellsKey" , m_cellsKey="Cells" ); + declareProperty( "OutputEventKey" , m_eventKey="EventInfo" ); + declareProperty( "OutputTruthKey" , m_truthKey="Particles" ); + declareProperty( "OutputCellsKey" , m_cellsKey="Cells" ); declareProperty( "OutputLevel" , m_outputLevel=1 ); declareProperty( "NtupleName" , m_ntupleName="CollectionTree" ); } diff --git a/reconstruction/io/RootStreamBuilder/src/RootStreamHITMaker.cxx b/reconstruction/io/RootStreamBuilder/src/RootStreamHITMaker.cxx index c0f4a642..3619a302 100644 --- a/reconstruction/io/RootStreamBuilder/src/RootStreamHITMaker.cxx +++ b/reconstruction/io/RootStreamBuilder/src/RootStreamHITMaker.cxx @@ -43,7 +43,7 @@ RootStreamHITMaker::~RootStreamHITMaker() StatusCode RootStreamHITMaker::initialize() { CHECK_INIT(); - setMsgLevel(m_outputLevel); + //setMsgLevel(m_outputLevel); return StatusCode::SUCCESS; } diff --git a/reconstruction/io/RootStreamBuilder/src/RootStreamHITReader.cxx b/reconstruction/io/RootStreamBuilder/src/RootStreamHITReader.cxx index e8fd06a2..fbe63820 100644 --- a/reconstruction/io/RootStreamBuilder/src/RootStreamHITReader.cxx +++ b/reconstruction/io/RootStreamBuilder/src/RootStreamHITReader.cxx @@ -22,9 +22,9 @@ RootStreamHITReader::RootStreamHITReader( std::string name ) : Algorithm() { declareProperty( "InputFile" , m_inputFile="" ); - declareProperty( "EventKey" , m_eventKey="EventInfo" ); - declareProperty( "TruthKey" , m_truthKey="Particles" ); - declareProperty( "HitsKey" , m_hitsKey="Hits" ); + declareProperty( "OutputEventKey" , m_eventKey="EventInfo" ); + declareProperty( "OutputTruthKey" , m_truthKey="Particles" ); + declareProperty( "OutputHitsKey" , m_hitsKey="Hits" ); declareProperty( "OutputLevel" , m_outputLevel=1 ); declareProperty( "NtupleName" , m_ntupleName="CollectionTree" ); } @@ -39,7 +39,7 @@ RootStreamHITReader::~RootStreamHITReader() StatusCode RootStreamHITReader::initialize() { CHECK_INIT(); - setMsgLevel(m_outputLevel); + //setMsgLevel(m_outputLevel); return StatusCode::SUCCESS; } diff --git a/scripts/digit_trf.py b/scripts/digit_trf.py index 91819ea3..5f756ab9 100755 --- a/scripts/digit_trf.py +++ b/scripts/digit_trf.py @@ -6,7 +6,7 @@ from G4Kernel import * import numpy as np import argparse -import sys,os +import sys,os,gc,traceback mainLogger = Logger.getModuleLogger("job") @@ -47,10 +47,13 @@ # the reader must be first in sequence from RootStreamBuilder import RootStreamHITReader, recordable - reader = RootStreamHITReader("HITReader", - InputFile = args.inputFile, - OutputLevel = outputLevel - ) + reader = RootStreamHITReader("HITReader", + InputFile = args.inputFile, + OutputHitsKey = recordable("Hits"), + OutputEventKey = recordable("Events"), + OutputTruthKey = recordable("Particles"), + OutputLevel = outputLevel, + ) reader.merge(acc) @@ -68,15 +71,18 @@ calorimeter.merge(acc) from RootStreamBuilder import RootStreamESDMaker - stream = RootStreamESDMaker( "RootStreamESDMaker", - OutputLevel = outputLevel, - ) - acc += stream + ESD = RootStreamESDMaker( "RootStreamESDMaker", + InputCellsKey = recordable("Cells"), + InputEventKey = recordable("Events"), + InputTruthKey = recordable("Particles"), + OutputLevel = outputLevel) + acc += ESD acc.run(args.numberOfEvents) sys.exit(0) except Exception as e: - print(e) + traceback.print_exc() + mainLogger.error(e) sys.exit(1) diff --git a/scripts/simu_trf.py b/scripts/simu_trf.py index b6f8c56e..65a01cd1 100755 --- a/scripts/simu_trf.py +++ b/scripts/simu_trf.py @@ -7,7 +7,7 @@ from RootStreamBuilder import recordable import numpy as np import argparse -import sys,os,gc +import sys,os,gc,traceback mainLogger = Logger.getModuleLogger("job") @@ -48,6 +48,7 @@ outputLevel = LoggingLevel.fromstring(args.outputLevel) try: + eval(args.command) from ATLAS import ATLASConstruction as ATLAS @@ -61,7 +62,7 @@ gun = EventReader( "EventReader", args.inputFile, # outputs - OutputEventKey = recordable("EventInfo"), + OutputEventKey = recordable("Events" ), OutputTruthKey = recordable("Particles"), OutputSeedKey = recordable("Seeds" ), ) @@ -79,20 +80,18 @@ from RootStreamBuilder import RootStreamHITMaker, recordable HIT = RootStreamHITMaker( "RootStreamHITMaker", + OutputLevel = outputLevel, # input from context InputHitsKey = recordable("Hits"), InputEventKey = recordable("Events"), InputTruthKey = recordable("Particles"), - # output to file - OutputHitsKey = recordable("Hits"), - OutputEventKey = recordable("EventInfo"), - OutputTruthKey = recordable("Particles"), - OutputLevel = outputLevel) - + ) + acc += HIT acc.run(args.numberOfEvents) sys.exit(0) except Exception as e: - print(e) + traceback.print_exc() + mainLogger.error(e) sys.exit(1)