From 89534aae64f19c1bca0763495c68cdd2a66e4891 Mon Sep 17 00:00:00 2001 From: Chao Peng Date: Sun, 12 Feb 2023 22:34:46 -0600 Subject: [PATCH 1/8] add a new merger for ScFi Calorimeter [skip ci] --- .../calorimetry/CalorimeterScFiDigi.cc | 176 ++++++++++++++++++ .../calorimetry/CalorimeterScFiDigi.h | 90 +++++++++ 2 files changed, 266 insertions(+) create mode 100644 src/algorithms/calorimetry/CalorimeterScFiDigi.cc create mode 100644 src/algorithms/calorimetry/CalorimeterScFiDigi.h diff --git a/src/algorithms/calorimetry/CalorimeterScFiDigi.cc b/src/algorithms/calorimetry/CalorimeterScFiDigi.cc new file mode 100644 index 0000000000..4a1dcb453e --- /dev/null +++ b/src/algorithms/calorimetry/CalorimeterScFiDigi.cc @@ -0,0 +1,176 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// Copyright (C) 2022 Chao Peng, Wouter Deconinck, Sylvester Joosten, Barak Schmookler, David Lawrence + +// A digitization digitization algorithm specifically for CalorimeterHit from Scintillating Fibers +// 1. Fiber signals are merged if they are within the same light guide +// 2. Digitize the energy with dynamic ADC range and add pedestal (mean +- sigma) +// 3. Time conversion with smearing resolution (absolute value) +// TODO: Sum with timing; waveform implementation +// +// Author: Chao Peng +// Date: 02/12/2023 + + +#include "CalorimeterScFiDigi.h" + +#include +#include +#include +#include +using namespace dd4hep; + +// +// TODO: +// - Array type configuration parameters are not yet supported in JANA (needs to be added) +// - Random number service needs to be resolved (on global scale) + + + +//------------------------ +// AlgorithmInit +//------------------------ +void CalorimeterScFiDigi::AlgorithmInit(std::shared_ptr& logger) { + + // Assume all configuration parameter data members have been filled in already. + + // Gaudi implments a random number generator service. It is not clear to me how this + // can work. There are multiple race conditions that occur in parallel event processing: + // 1. The exact same events processed by a given thread in one invocation will not + // neccessarily be the combination of events any thread sees in a subsequest + // invocation. Thus, you can't rely on thread_local storage. + // 2. Its possible for the factory execution order to be modified by the presence of + // a processor (e.g. monitoring plugin). This is not as serious since changing the + // command line should cause one not to expect reproducibility. Still, one may + // expect the inclusion of an "observer" plugin not to have such side affects. + // + // More information will be needed. In the meantime, we implement a local random number + // generator. Ideally, this would be seeded with the run number+event number, but for + // now, just use default values defined in header file. + + // set energy resolution numbers + m_log=logger; + for (size_t i = 0; i < u_eRes.size() && i < 3; ++i) { + eRes[i] = u_eRes[i]; + } + + // using juggler internal units (GeV, mm, radian, ns) + tRes = m_tRes / dd4hep::ns; + stepTDC = dd4hep::ns / m_resolutionTDC; + + // need signal sum + if (!u_fields.empty()) { + + // sanity checks + if (!m_geoSvc) { + m_log->error("Unable to locate Geometry Service."); + throw std::runtime_error("Unable to locate Geometry Service."); + } + if (m_readout.empty()) { + m_log->error("readoutClass is not provided, it is needed to know the fields in readout ids."); + throw std::runtime_error("readoutClass is not provided."); + } + + // get decoders + try { + auto id_desc = m_geoSvc->detector()->readout(m_readout).idSpec(); + id_mask = 0; + std::vector> ref_fields; + for (size_t i = 0; i < u_fields.size(); ++i) { + id_mask |= id_desc.field(u_fields[i])->mask(); + // use the provided id number to find ref cell, or use 0 + int ref = i < u_refs.size() ? u_refs[i] : 0; + ref_fields.emplace_back(u_fields[i], ref); + } + ref_mask = id_desc.encode(ref_fields); + // debug() << fmt::format("Referece id mask for the fields {:#064b}", ref_mask) << endmsg; + } catch (...) { + m_log->warn("Failed to load ID decoder for {}", m_readout); + japp->Quit(); + return; + } + id_mask = ~id_mask; + //LOG_INFO(default_cout_logger) << fmt::format("ID mask in {:s}: {:#064b}", m_readout, id_mask) << LOG_END; + m_log->info("ID mask in {:s}: {:#064b}", m_readout, id_mask); + } +} + + + +//------------------------ +// AlgorithmChangeRun +//------------------------ +void CalorimeterScFiDigi::AlgorithmChangeRun() { + /// This is automatically run before Process, when a new run number is seen + /// Usually we update our calibration constants by asking a JService + /// to give us the latest data for this run number +} + +//------------------------ +// AlgorithmProcess +//------------------------ +void CalorimeterScFiDigi::AlgorithmProcess() { + + // Delete any output objects left from last event. + // (Should already have been done for us, but just to be bullet-proof.) + for( auto h : rawhits ) delete h; + rawhits.clear(); + + light_guide_digi(); +} + +//------------------------ +// signal_sum_digi +//------------------------ +void CalorimeterScFiDigi::light_guide_digi( void ){ + + // find the hits that belong to the same group (for merging) + std::unordered_map> merge_map; + for (auto ahit : simhits) { + int64_t hid = (ahit->getCellID() & id_mask) | ref_mask; + auto it = merge_map.find(hid); + + if (it == merge_map.end()) { + merge_map[hid] = {ahit}; + } else { + it->second.push_back(ahit); + } + } + + // signal sum + for (auto &[id, hits] : merge_map) { + double edep = hits[0]->getEnergy(); + double time = hits[0]->getContributions(0).getTime(); + double max_edep = hits[0]->getEnergy(); + // sum energy, take time from the most energetic hit + // TODO, implement a timing window to sum or split the hits group + for (size_t i = 1; i < hits.size(); ++i) { + edep += hits[i]->getEnergy(); + if (hits[i]->getEnergy() > max_edep) { + max_edep = hits[i]->getEnergy(); + for (const auto& c : hits[i]->getContributions()) { + if (c.getTime() <= time) { + time = c.getTime(); + } + } + } + } + + // safety check + const double eResRel = (edep > m_threshold) + ? m_normDist(generator) * eRes[0] / std::sqrt(edep) + + m_normDist(generator) * eRes[1] + + m_normDist(generator) * eRes[2] / edep + : 0; + // digitize + double ped = m_pedMeanADC + m_normDist(generator) * m_pedSigmaADC; + unsigned long long adc = std::llround(ped + edep * (m_corrMeanScale + eResRel) / m_dyRangeADC * m_capADC); + unsigned long long tdc = std::llround((time + m_normDist(generator) * tRes) * stepTDC); + + auto rawhit = new edm4hep::RawCalorimeterHit( + id, + (adc > m_capADC ? m_capADC : adc), + tdc + ); + rawhits.push_back(rawhit); + } +} diff --git a/src/algorithms/calorimetry/CalorimeterScFiDigi.h b/src/algorithms/calorimetry/CalorimeterScFiDigi.h new file mode 100644 index 0000000000..809f1f5f2c --- /dev/null +++ b/src/algorithms/calorimetry/CalorimeterScFiDigi.h @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +// Copyright (C) 2022 Chao Peng, Wouter Deconinck, Sylvester Joosten, Barak Schmookler, David Lawrence + +// A general digitization for CalorimeterHit from simulation +// 1. Smear energy deposit with a/sqrt(E/GeV) + b + c/E or a/sqrt(E/GeV) (relative value) +// 2. Digitize the energy with dynamic ADC range and add pedestal (mean +- sigma) +// 3. Time conversion with smearing resolution (absolute value) +// 4. Signal is summed if the SumFields are provided +// +// Author: Chao Peng +// Date: 06/02/2021 + + +#pragma once + +#include + +#include + +#include +#include +#include + +class CalorimeterScFiDigi { + + // Insert any member variables here + +public: + CalorimeterScFiDigi() = default; + ~CalorimeterScFiDigi(){for( auto h : rawhits ) delete h;} // better to use smart pointer? + virtual void AlgorithmInit(std::shared_ptr& logger); + virtual void AlgorithmChangeRun() ; + virtual void AlgorithmProcess() ; + + //-------- Configuration Parameters ------------ + //instantiate new spdlog logger + std::shared_ptr m_log; + + // Name of input data type (collection) + std::string m_input_tag; + + // additional smearing resolutions + std::vector u_eRes; + double m_tRes; + + // single hit energy deposition threshold + double m_threshold=1.0*dd4hep::keV; // {this, "threshold", 1. * keV}; + + // digitization settings + unsigned int m_capADC; + double m_dyRangeADC; + unsigned int m_pedMeanADC; + double m_pedSigmaADC; + double m_resolutionTDC; + double m_corrMeanScale; + + // signal sums + std::vector u_fields; + std::vector u_refs; + std::string m_geoSvcName; + std::string m_readout; + + // This may be used to declare the data members as JANA configuration parameters. + // This should compile OK even without JANA so long as you don't try using it. + // To use it, do something like the following: + // + // mycalohitdigi->SetJANAConfigParameters( japp, "BEMC"); + // + // The above will register config. parameters like: "BEMC:tag". + // The configuration parameter members of this class should be set to thier + // defaults *before* calling this. + //----------------------------------------------- + + // unitless counterparts of inputs + double dyRangeADC{0}, stepTDC{0}, tRes{0}, eRes[3] = {0., 0., 0.}; + //Rndm::Numbers m_normDist; + std::shared_ptr m_geoSvc; + uint64_t id_mask{0}, ref_mask{0}; + + // inputs/outputs + std::vector simhits; + std::vector rawhits; + +private: + std::default_random_engine generator; // TODO: need something more appropriate here + std::normal_distribution m_normDist; // defaults to mean=0, sigma=1 + + void light_guide_digi(); +}; + From b98c16766d7649444fcb334d4e2b83c3b8ec766f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Feb 2023 04:34:58 +0000 Subject: [PATCH 2/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/algorithms/calorimetry/CalorimeterClusterRecoCoG.h | 1 - src/algorithms/calorimetry/CalorimeterHitDigi.h | 1 - src/algorithms/calorimetry/CalorimeterIslandCluster.h | 1 - src/algorithms/calorimetry/CalorimeterScFiDigi.h | 1 - src/algorithms/digi/SiliconTrackerDigi.h | 1 - src/algorithms/digi/SiliconTrackerDigiConfig.h | 1 - src/algorithms/interfaces/ICollectionProducer.h | 2 -- src/algorithms/interfaces/ICollector.h | 1 - src/algorithms/interfaces/IObjectProducer.h | 1 - src/algorithms/reco/MC2SmearedParticleConfig.h | 2 -- src/algorithms/reco/MatchClusters.h | 1 - src/algorithms/reco/ParticlesWithAssociation.h | 1 - src/algorithms/tracking/ActsGeometryProvider.h | 2 -- src/algorithms/tracking/CKFTracking.h | 1 - src/algorithms/tracking/CKFTrackingConfig.h | 3 --- src/algorithms/tracking/JugBase/ACTSLogger.h | 1 - src/algorithms/tracking/JugTrack/Measurement.hpp | 1 - src/algorithms/tracking/ParticlesFromTrackFit.h | 1 - src/algorithms/tracking/ParticlesFromTrackFitResult.h | 2 -- src/algorithms/tracking/ParticlesWithTruthPID.h | 1 - src/algorithms/tracking/ParticlesWithTruthPIDConfig.h | 1 - src/algorithms/tracking/SpacePoint.h | 1 - src/algorithms/tracking/TrackParamTruthInit.h | 1 - src/algorithms/tracking/TrackParamTruthInitConfig.h | 2 -- src/algorithms/tracking/TrackProjector.h | 1 - src/algorithms/tracking/TrackProjectorConfig.h | 1 - src/algorithms/tracking/TrackSeeding.h | 2 -- src/algorithms/tracking/TrackerHitReconstruction.h | 3 --- src/algorithms/tracking/TrackerHitReconstructionConfig.h | 2 -- src/algorithms/tracking/TrackerSourceLinkerResult.h | 4 ---- src/algorithms/tracking/TruthTrackSeeding.h | 2 -- .../trk_chain_example/v1/TrackerHitReconstructionConfig.h | 1 - .../trk_chain_example/v1/TrackerHitReconstructionT.h | 1 - .../trk_chain_example/v2/JFactoryT_SiliconTrackerDigi.h | 2 -- .../trk_chain_example/v2/JFactoryT_SimTrackerHitsCollector.h | 1 - .../trk_chain_example/v2/JFactoryT_TrackerHitReconstruction.h | 2 -- .../trk_chain_example/v3/JFactoryT_SiliconTrackerDigi.h | 2 -- src/algorithms/trk_chain_example/v3/SimTrackerHitDigi.h | 2 -- .../tracking_efficiency/TrackingEfficiency_processor.h | 1 - .../tracking_occupancy/HitReconstructionAnalysis.h | 1 - .../tracking_occupancy/TrackingOccupancyAnalysis.h | 2 -- .../tracking_occupancy/TrackingOccupancy_processor.h | 1 - .../BEMC/CalorimeterHit_factory_EcalBarrelImagingRecHits.h | 1 - .../BEMC/CalorimeterHit_factory_EcalBarrelScFiRecHits.h | 1 - .../BEMC/CalorimeterHit_factory_EcalBarrelSciGlassRecHits.h | 1 - .../BEMC/Cluster_factory_EcalBarrelImagingClusters.h | 1 - src/detectors/BEMC/Cluster_factory_EcalBarrelScFiClusters.h | 1 - .../BEMC/Cluster_factory_EcalBarrelSciGlassClusters.h | 1 - .../BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h | 1 - .../ProtoCluster_factory_EcalBarrelSciGlassProtoClusters.h | 1 - ...rotoCluster_factory_EcalBarrelSciGlassTruthProtoClusters.h | 1 - src/detectors/HCAL/CalorimeterHit_factory_HcalBarrelRecHits.h | 1 - .../HCAL/CalorimeterHit_factory_HcalEndcapNRecHits.h | 1 - .../HCAL/CalorimeterHit_factory_HcalEndcapPInsertRecHits.h | 1 - .../HCAL/CalorimeterHit_factory_HcalEndcapPRecHits.h | 1 - src/detectors/HCAL/Cluster_factory_HcalBarrelClusters.h | 1 - .../HCAL/ProtoCluster_factory_HcalBarrelTruthProtoClusters.h | 1 - .../ProtoCluster_factory_HcalEndcapNIslandProtoClusters.h | 1 - .../HCAL/ProtoCluster_factory_HcalEndcapNTruthProtoClusters.h | 1 - ...ProtoCluster_factory_HcalEndcapPInsertTruthProtoClusters.h | 1 - .../ProtoCluster_factory_HcalEndcapPIslandProtoClusters.h | 1 - .../HCAL/ProtoCluster_factory_HcalEndcapPTruthProtoClusters.h | 1 - .../HCAL/RawCalorimeterHit_factory_HcalBarrelRawHits.h | 1 - .../HCAL/RawCalorimeterHit_factory_HcalEndcapNRawHits.h | 1 - .../HCAL/RawCalorimeterHit_factory_HcalEndcapPInsertRawHits.h | 1 - .../HCAL/RawCalorimeterHit_factory_HcalEndcapPRawHits.h | 1 - src/detectors/ZDC/CalorimeterHit_factory_ZDCEcalRecHits.h | 1 - src/detectors/ZDC/Cluster_factory_ZDCEcalClusters.h | 1 - .../ZDC/ProtoCluster_factory_ZDCEcalTruthProtoClusters.h | 1 - src/detectors/ZDC/RawCalorimeterHit_factory_ZDCEcalRawHits.h | 1 - src/extensions/jana/JChainFactoryGeneratorT.h | 2 -- src/extensions/jana/JChainFactoryT.h | 1 - src/extensions/podio_access/PodioAssociationHelper.h | 1 - src/extensions/podio_access/accessor.h | 2 -- src/extensions/string/StringHelpers.h | 1 - src/global/digi/SiliconTrackerDigi_factory.h | 1 - src/global/reco/MC2SmearedParticle_factory.h | 1 - src/global/reco/MatchClusters_factory.h | 1 - src/global/reco/ReconstructedParticleAssociations_factory.h | 1 - src/global/reco/ReconstructedParticles_factory.h | 1 - src/global/tracking/CKFTracking_factory.h | 1 - src/global/tracking/ParticlesWithTruthPID_factory.h | 1 - src/global/tracking/TrackParamTruthInit_factory.h | 1 - src/global/tracking/TrackParameters_factory.h | 1 - src/global/tracking/TrackProjector_factory.h | 1 - src/global/tracking/TrackSeeding_factory.h | 1 - src/global/tracking/TrackerHitCollector_factory.h | 1 - src/global/tracking/TrackerHitReconstruction_factory.h | 2 -- src/global/tracking/TrackerReconstructedParticle_factory.h | 1 - src/global/tracking/TrackerSourceLinker_factory.h | 1 - src/global/tracking/TrackingResult_factory.h | 2 -- src/global/tracking/TruthTrackSeeding_factory.h | 1 - src/services/geometry/acts/ACTSGeo_service.h | 1 - src/services/geometry/dd4hep/JDD4hep_service.h | 1 - src/services/io/podio/JEventSourcePODIOsimple.h | 1 - src/services/log/Log_service.h | 1 - src/services/rootfile/RootFile_service.h | 1 - src/tests/reco_test/GlobalReconstructionTest_processor.h | 1 - .../track_propagation_test/TrackPropagationTest_processor.h | 1 - src/tests/track_seeding_test/TrackSeedingTest_processor.h | 1 - src/tests/tracking_test/TrackingTest_processor.h | 1 - src/utilities/dump_flags/DumpFlags_processor.h | 1 - src/utilities/eicrecon/eicrecon_cli.h | 1 - src/utilities/eicrecon/print_info.h | 1 - 104 files changed, 128 deletions(-) diff --git a/src/algorithms/calorimetry/CalorimeterClusterRecoCoG.h b/src/algorithms/calorimetry/CalorimeterClusterRecoCoG.h index bfe6e03dfb..789b512b31 100644 --- a/src/algorithms/calorimetry/CalorimeterClusterRecoCoG.h +++ b/src/algorithms/calorimetry/CalorimeterClusterRecoCoG.h @@ -191,4 +191,3 @@ edm4eic::Cluster* reconstruct(const edm4eic::ProtoCluster* pcl) const { }; - diff --git a/src/algorithms/calorimetry/CalorimeterHitDigi.h b/src/algorithms/calorimetry/CalorimeterHitDigi.h index 042a6c2496..0525c4c6b6 100644 --- a/src/algorithms/calorimetry/CalorimeterHitDigi.h +++ b/src/algorithms/calorimetry/CalorimeterHitDigi.h @@ -88,4 +88,3 @@ class CalorimeterHitDigi { void single_hits_digi(); void signal_sum_digi(); }; - diff --git a/src/algorithms/calorimetry/CalorimeterIslandCluster.h b/src/algorithms/calorimetry/CalorimeterIslandCluster.h index b4496a7361..3b7b34f530 100644 --- a/src/algorithms/calorimetry/CalorimeterIslandCluster.h +++ b/src/algorithms/calorimetry/CalorimeterIslandCluster.h @@ -244,4 +244,3 @@ class CalorimeterIslandCluster { } } }; - diff --git a/src/algorithms/calorimetry/CalorimeterScFiDigi.h b/src/algorithms/calorimetry/CalorimeterScFiDigi.h index 809f1f5f2c..611f7f8d64 100644 --- a/src/algorithms/calorimetry/CalorimeterScFiDigi.h +++ b/src/algorithms/calorimetry/CalorimeterScFiDigi.h @@ -87,4 +87,3 @@ class CalorimeterScFiDigi { void light_guide_digi(); }; - diff --git a/src/algorithms/digi/SiliconTrackerDigi.h b/src/algorithms/digi/SiliconTrackerDigi.h index 6c87421a8d..c3951f80bf 100644 --- a/src/algorithms/digi/SiliconTrackerDigi.h +++ b/src/algorithms/digi/SiliconTrackerDigi.h @@ -45,4 +45,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/algorithms/digi/SiliconTrackerDigiConfig.h b/src/algorithms/digi/SiliconTrackerDigiConfig.h index 4e155db707..2855be4780 100644 --- a/src/algorithms/digi/SiliconTrackerDigiConfig.h +++ b/src/algorithms/digi/SiliconTrackerDigiConfig.h @@ -8,4 +8,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/algorithms/interfaces/ICollectionProducer.h b/src/algorithms/interfaces/ICollectionProducer.h index 5fbdf278f5..6767b12d43 100644 --- a/src/algorithms/interfaces/ICollectionProducer.h +++ b/src/algorithms/interfaces/ICollectionProducer.h @@ -24,5 +24,3 @@ namespace eicrecon { }; } - - diff --git a/src/algorithms/interfaces/ICollector.h b/src/algorithms/interfaces/ICollector.h index 0efedcfe13..b36590c3d9 100644 --- a/src/algorithms/interfaces/ICollector.h +++ b/src/algorithms/interfaces/ICollector.h @@ -20,4 +20,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/algorithms/interfaces/IObjectProducer.h b/src/algorithms/interfaces/IObjectProducer.h index 47021a138a..cccca29fa6 100644 --- a/src/algorithms/interfaces/IObjectProducer.h +++ b/src/algorithms/interfaces/IObjectProducer.h @@ -22,4 +22,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/algorithms/reco/MC2SmearedParticleConfig.h b/src/algorithms/reco/MC2SmearedParticleConfig.h index eeb31aca06..ef0e8c1a49 100644 --- a/src/algorithms/reco/MC2SmearedParticleConfig.h +++ b/src/algorithms/reco/MC2SmearedParticleConfig.h @@ -12,5 +12,3 @@ namespace eicrecon { double momentum_smearing = 0; }; } - - diff --git a/src/algorithms/reco/MatchClusters.h b/src/algorithms/reco/MatchClusters.h index 3549b48326..acbc196ee6 100644 --- a/src/algorithms/reco/MatchClusters.h +++ b/src/algorithms/reco/MatchClusters.h @@ -61,4 +61,3 @@ namespace eicrecon { }; } // namespace eicrecon - diff --git a/src/algorithms/reco/ParticlesWithAssociation.h b/src/algorithms/reco/ParticlesWithAssociation.h index 1072146986..8c51661966 100644 --- a/src/algorithms/reco/ParticlesWithAssociation.h +++ b/src/algorithms/reco/ParticlesWithAssociation.h @@ -34,4 +34,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/algorithms/tracking/ActsGeometryProvider.h b/src/algorithms/tracking/ActsGeometryProvider.h index 388c070250..55e5928dcc 100644 --- a/src/algorithms/tracking/ActsGeometryProvider.h +++ b/src/algorithms/tracking/ActsGeometryProvider.h @@ -145,5 +145,3 @@ class ActsGeometryProvider { // MsgStream m_log; }; - - diff --git a/src/algorithms/tracking/CKFTracking.h b/src/algorithms/tracking/CKFTracking.h index 7d19049b5e..a7dedfb2e8 100644 --- a/src/algorithms/tracking/CKFTracking.h +++ b/src/algorithms/tracking/CKFTracking.h @@ -91,4 +91,3 @@ namespace eicrecon { }; } // namespace Jug::Reco - diff --git a/src/algorithms/tracking/CKFTrackingConfig.h b/src/algorithms/tracking/CKFTrackingConfig.h index e6caa1cc00..271e6f0803 100644 --- a/src/algorithms/tracking/CKFTrackingConfig.h +++ b/src/algorithms/tracking/CKFTrackingConfig.h @@ -13,6 +13,3 @@ namespace eicrecon { std::vector m_numMeasurementsCutOff = {10}; //{this, "numMeasurementsCutOff", {10}}; }; } - - - diff --git a/src/algorithms/tracking/JugBase/ACTSLogger.h b/src/algorithms/tracking/JugBase/ACTSLogger.h index acf957d280..9c09345f4b 100644 --- a/src/algorithms/tracking/JugBase/ACTSLogger.h +++ b/src/algorithms/tracking/JugBase/ACTSLogger.h @@ -93,4 +93,3 @@ class GaudiPrintPolicy : public Acts::Logging::OutputPrintPolicy { MsgStream m_messenger; std::string m_name; }; - diff --git a/src/algorithms/tracking/JugTrack/Measurement.hpp b/src/algorithms/tracking/JugTrack/Measurement.hpp index 09f22f6d6e..6f1a08fff4 100644 --- a/src/algorithms/tracking/JugTrack/Measurement.hpp +++ b/src/algorithms/tracking/JugTrack/Measurement.hpp @@ -55,4 +55,3 @@ namespace eicrecon { }; } // namespace Jug - diff --git a/src/algorithms/tracking/ParticlesFromTrackFit.h b/src/algorithms/tracking/ParticlesFromTrackFit.h index dfdd9bd34c..ec396f228e 100644 --- a/src/algorithms/tracking/ParticlesFromTrackFit.h +++ b/src/algorithms/tracking/ParticlesFromTrackFit.h @@ -28,4 +28,3 @@ namespace eicrecon::Reco { }; } // namespace Jug::Reco - diff --git a/src/algorithms/tracking/ParticlesFromTrackFitResult.h b/src/algorithms/tracking/ParticlesFromTrackFitResult.h index 453e003749..ecdebadb40 100644 --- a/src/algorithms/tracking/ParticlesFromTrackFitResult.h +++ b/src/algorithms/tracking/ParticlesFromTrackFitResult.h @@ -24,5 +24,3 @@ class ParticlesFromTrackFitResult { std::unique_ptr m_particles; std::unique_ptr m_track_parameters; }; - - diff --git a/src/algorithms/tracking/ParticlesWithTruthPID.h b/src/algorithms/tracking/ParticlesWithTruthPID.h index 2e519b3899..d59505f2b0 100644 --- a/src/algorithms/tracking/ParticlesWithTruthPID.h +++ b/src/algorithms/tracking/ParticlesWithTruthPID.h @@ -36,4 +36,3 @@ namespace eicrecon { void tracePhiToleranceOnce(const double sinPhiOver2Tolerance, double phiTolerance); }; } - diff --git a/src/algorithms/tracking/ParticlesWithTruthPIDConfig.h b/src/algorithms/tracking/ParticlesWithTruthPIDConfig.h index d95ce14aa8..d3bf0c4ac2 100644 --- a/src/algorithms/tracking/ParticlesWithTruthPIDConfig.h +++ b/src/algorithms/tracking/ParticlesWithTruthPIDConfig.h @@ -15,4 +15,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/algorithms/tracking/SpacePoint.h b/src/algorithms/tracking/SpacePoint.h index b227cbfff5..728e99d026 100644 --- a/src/algorithms/tracking/SpacePoint.h +++ b/src/algorithms/tracking/SpacePoint.h @@ -60,4 +60,3 @@ using SpacePointPtr = std::unique_ptr; using SeedContainer = std::vector>; } - diff --git a/src/algorithms/tracking/TrackParamTruthInit.h b/src/algorithms/tracking/TrackParamTruthInit.h index b38540a3fe..f9bd60966b 100644 --- a/src/algorithms/tracking/TrackParamTruthInit.h +++ b/src/algorithms/tracking/TrackParamTruthInit.h @@ -34,4 +34,3 @@ namespace eicrecon { }; } // namespace eicrecon - diff --git a/src/algorithms/tracking/TrackParamTruthInitConfig.h b/src/algorithms/tracking/TrackParamTruthInitConfig.h index c56371337e..2b42a10c6e 100644 --- a/src/algorithms/tracking/TrackParamTruthInitConfig.h +++ b/src/algorithms/tracking/TrackParamTruthInitConfig.h @@ -18,5 +18,3 @@ struct TrackParamTruthInitConfig { double m_momentumSmear = 0.0; }; - - diff --git a/src/algorithms/tracking/TrackProjector.h b/src/algorithms/tracking/TrackProjector.h index 41b2f5c694..50558b4ee2 100644 --- a/src/algorithms/tracking/TrackProjector.h +++ b/src/algorithms/tracking/TrackProjector.h @@ -38,4 +38,3 @@ namespace eicrecon { } // eicrecon - diff --git a/src/algorithms/tracking/TrackProjectorConfig.h b/src/algorithms/tracking/TrackProjectorConfig.h index c40adc5a18..651cc57080 100644 --- a/src/algorithms/tracking/TrackProjectorConfig.h +++ b/src/algorithms/tracking/TrackProjectorConfig.h @@ -17,4 +17,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/algorithms/tracking/TrackSeeding.h b/src/algorithms/tracking/TrackSeeding.h index b23f5f45fe..9f8fa793f3 100644 --- a/src/algorithms/tracking/TrackSeeding.h +++ b/src/algorithms/tracking/TrackSeeding.h @@ -63,5 +63,3 @@ namespace eicrecon { std::tuple lineFit(std::vector>& positions) const; }; } - - diff --git a/src/algorithms/tracking/TrackerHitReconstruction.h b/src/algorithms/tracking/TrackerHitReconstruction.h index a5264d901c..86ea9962b4 100644 --- a/src/algorithms/tracking/TrackerHitReconstruction.h +++ b/src/algorithms/tracking/TrackerHitReconstruction.h @@ -52,6 +52,3 @@ namespace eicrecon { std::shared_ptr m_cellid_converter; }; } - - - diff --git a/src/algorithms/tracking/TrackerHitReconstructionConfig.h b/src/algorithms/tracking/TrackerHitReconstructionConfig.h index aa983ea626..b69c64160e 100644 --- a/src/algorithms/tracking/TrackerHitReconstructionConfig.h +++ b/src/algorithms/tracking/TrackerHitReconstructionConfig.h @@ -9,5 +9,3 @@ namespace eicrecon { float time_resolution = 10; }; } - - diff --git a/src/algorithms/tracking/TrackerSourceLinkerResult.h b/src/algorithms/tracking/TrackerSourceLinkerResult.h index 40547dfa6d..fa67c56f55 100644 --- a/src/algorithms/tracking/TrackerSourceLinkerResult.h +++ b/src/algorithms/tracking/TrackerSourceLinkerResult.h @@ -14,7 +14,3 @@ namespace eicrecon { std::vector> sourceLinks; }; } - - - - diff --git a/src/algorithms/tracking/TruthTrackSeeding.h b/src/algorithms/tracking/TruthTrackSeeding.h index e0788e3de1..311c7dfcae 100644 --- a/src/algorithms/tracking/TruthTrackSeeding.h +++ b/src/algorithms/tracking/TruthTrackSeeding.h @@ -22,5 +22,3 @@ namespace eicrecon { std::shared_ptr m_pdg_db; }; } - - diff --git a/src/algorithms/trk_chain_example/v1/TrackerHitReconstructionConfig.h b/src/algorithms/trk_chain_example/v1/TrackerHitReconstructionConfig.h index 3f59c932d3..6f70f09bee 100644 --- a/src/algorithms/trk_chain_example/v1/TrackerHitReconstructionConfig.h +++ b/src/algorithms/trk_chain_example/v1/TrackerHitReconstructionConfig.h @@ -1,2 +1 @@ #pragma once - diff --git a/src/algorithms/trk_chain_example/v1/TrackerHitReconstructionT.h b/src/algorithms/trk_chain_example/v1/TrackerHitReconstructionT.h index 2138b5c2d7..370431dcc9 100644 --- a/src/algorithms/trk_chain_example/v1/TrackerHitReconstructionT.h +++ b/src/algorithms/trk_chain_example/v1/TrackerHitReconstructionT.h @@ -11,4 +11,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/algorithms/trk_chain_example/v2/JFactoryT_SiliconTrackerDigi.h b/src/algorithms/trk_chain_example/v2/JFactoryT_SiliconTrackerDigi.h index e976edd75e..0f945c3afc 100644 --- a/src/algorithms/trk_chain_example/v2/JFactoryT_SiliconTrackerDigi.h +++ b/src/algorithms/trk_chain_example/v2/JFactoryT_SiliconTrackerDigi.h @@ -75,5 +75,3 @@ void SiliconTrackerDigi_factoryT::Process(c fmt::print("JFactory_BEMCRawCalorimeterHit<>::Process(...)\n"); } - - diff --git a/src/algorithms/trk_chain_example/v2/JFactoryT_SimTrackerHitsCollector.h b/src/algorithms/trk_chain_example/v2/JFactoryT_SimTrackerHitsCollector.h index 17c65f29ac..5fee770425 100644 --- a/src/algorithms/trk_chain_example/v2/JFactoryT_SimTrackerHitsCollector.h +++ b/src/algorithms/trk_chain_example/v2/JFactoryT_SimTrackerHitsCollector.h @@ -88,4 +88,3 @@ void JFactoryT_SimTrackerHitsCollector::Process(const std::sh // Add data as a factory output this->Set(hits); } - diff --git a/src/algorithms/trk_chain_example/v2/JFactoryT_TrackerHitReconstruction.h b/src/algorithms/trk_chain_example/v2/JFactoryT_TrackerHitReconstruction.h index 6d297459f9..1cb4f5876d 100644 --- a/src/algorithms/trk_chain_example/v2/JFactoryT_TrackerHitReconstruction.h +++ b/src/algorithms/trk_chain_example/v2/JFactoryT_TrackerHitReconstruction.h @@ -50,5 +50,3 @@ void JFactoryT_TrackerHitReconstruction::Process(const std::shared_p fmt::print("JFactory_BEMCRawCalorimeterHit<{}>::Process(...)\n", typeid(OutputType).name()); } - - diff --git a/src/algorithms/trk_chain_example/v3/JFactoryT_SiliconTrackerDigi.h b/src/algorithms/trk_chain_example/v3/JFactoryT_SiliconTrackerDigi.h index 978da13489..20f6195804 100644 --- a/src/algorithms/trk_chain_example/v3/JFactoryT_SiliconTrackerDigi.h +++ b/src/algorithms/trk_chain_example/v3/JFactoryT_SiliconTrackerDigi.h @@ -82,5 +82,3 @@ void JFactoryT_SiliconTrackerDigi::Process( fmt::print("JFactory_BEMCRawCalorimeterHit<>::Process(...)\n"); } - - diff --git a/src/algorithms/trk_chain_example/v3/SimTrackerHitDigi.h b/src/algorithms/trk_chain_example/v3/SimTrackerHitDigi.h index c47e4934ca..720bfb77f3 100644 --- a/src/algorithms/trk_chain_example/v3/SimTrackerHitDigi.h +++ b/src/algorithms/trk_chain_example/v3/SimTrackerHitDigi.h @@ -30,5 +30,3 @@ class SimTrackerHitDigi { std::string m_config_prefix; /// A prefix to use for command line parameters }; - - diff --git a/src/benchmarks/reconstruction/tracking_efficiency/TrackingEfficiency_processor.h b/src/benchmarks/reconstruction/tracking_efficiency/TrackingEfficiency_processor.h index f75bf218b5..2c96636b55 100644 --- a/src/benchmarks/reconstruction/tracking_efficiency/TrackingEfficiency_processor.h +++ b/src/benchmarks/reconstruction/tracking_efficiency/TrackingEfficiency_processor.h @@ -55,4 +55,3 @@ class TrackingEfficiency_processor:public JEventProcessor std::shared_ptr m_log; }; - diff --git a/src/benchmarks/reconstruction/tracking_occupancy/HitReconstructionAnalysis.h b/src/benchmarks/reconstruction/tracking_occupancy/HitReconstructionAnalysis.h index 49928a7829..29b26e6ad2 100644 --- a/src/benchmarks/reconstruction/tracking_occupancy/HitReconstructionAnalysis.h +++ b/src/benchmarks/reconstruction/tracking_occupancy/HitReconstructionAnalysis.h @@ -37,4 +37,3 @@ class HitReconstructionAnalysis { /// Total occupancy of all m_data_names TH2F * m_total_occup_th2; /// MC Particles px,py }; - diff --git a/src/benchmarks/reconstruction/tracking_occupancy/TrackingOccupancyAnalysis.h b/src/benchmarks/reconstruction/tracking_occupancy/TrackingOccupancyAnalysis.h index c4183ac09c..16bbb3ad88 100644 --- a/src/benchmarks/reconstruction/tracking_occupancy/TrackingOccupancyAnalysis.h +++ b/src/benchmarks/reconstruction/tracking_occupancy/TrackingOccupancyAnalysis.h @@ -37,5 +37,3 @@ class TrackingOccupancyAnalysis { /// Total occupancy of all m_data_names TH2F * m_total_occup_th2; /// MC Particles px,py }; - - diff --git a/src/benchmarks/reconstruction/tracking_occupancy/TrackingOccupancy_processor.h b/src/benchmarks/reconstruction/tracking_occupancy/TrackingOccupancy_processor.h index 24d4cbb924..6bcde1d33f 100644 --- a/src/benchmarks/reconstruction/tracking_occupancy/TrackingOccupancy_processor.h +++ b/src/benchmarks/reconstruction/tracking_occupancy/TrackingOccupancy_processor.h @@ -58,4 +58,3 @@ class TrackingOccupancy_processor:public JEventProcessor std::shared_ptr m_log; }; - diff --git a/src/detectors/BEMC/CalorimeterHit_factory_EcalBarrelImagingRecHits.h b/src/detectors/BEMC/CalorimeterHit_factory_EcalBarrelImagingRecHits.h index 9642ba4f05..3c60245748 100644 --- a/src/detectors/BEMC/CalorimeterHit_factory_EcalBarrelImagingRecHits.h +++ b/src/detectors/BEMC/CalorimeterHit_factory_EcalBarrelImagingRecHits.h @@ -70,4 +70,3 @@ class CalorimeterHit_factory_EcalBarrelImagingRecHits : public JFactoryT m_log; }; - diff --git a/src/detectors/HCAL/CalorimeterHit_factory_HcalEndcapNRecHits.h b/src/detectors/HCAL/CalorimeterHit_factory_HcalEndcapNRecHits.h index 97bddfeb27..1babc69bb5 100644 --- a/src/detectors/HCAL/CalorimeterHit_factory_HcalEndcapNRecHits.h +++ b/src/detectors/HCAL/CalorimeterHit_factory_HcalEndcapNRecHits.h @@ -88,4 +88,3 @@ class CalorimeterHit_factory_HcalEndcapNRecHits : public JFactoryT, C m_outputAssociations.clear(); } }; - diff --git a/src/detectors/HCAL/ProtoCluster_factory_HcalBarrelTruthProtoClusters.h b/src/detectors/HCAL/ProtoCluster_factory_HcalBarrelTruthProtoClusters.h index d6b75d2e79..e3a614308d 100644 --- a/src/detectors/HCAL/ProtoCluster_factory_HcalBarrelTruthProtoClusters.h +++ b/src/detectors/HCAL/ProtoCluster_factory_HcalBarrelTruthProtoClusters.h @@ -60,4 +60,3 @@ class ProtoCluster_factory_HcalBarrelTruthProtoClusters : public JFactoryT m_log; }; - diff --git a/src/detectors/HCAL/ProtoCluster_factory_HcalEndcapNIslandProtoClusters.h b/src/detectors/HCAL/ProtoCluster_factory_HcalEndcapNIslandProtoClusters.h index 04f81735ec..adaddc6f5c 100644 --- a/src/detectors/HCAL/ProtoCluster_factory_HcalEndcapNIslandProtoClusters.h +++ b/src/detectors/HCAL/ProtoCluster_factory_HcalEndcapNIslandProtoClusters.h @@ -85,4 +85,3 @@ class ProtoCluster_factory_HcalEndcapNIslandProtoClusters : public JFactoryT, Calo m_outputAssociations.clear(); } }; - diff --git a/src/detectors/ZDC/ProtoCluster_factory_ZDCEcalTruthProtoClusters.h b/src/detectors/ZDC/ProtoCluster_factory_ZDCEcalTruthProtoClusters.h index 51651336a5..50e4de1dde 100644 --- a/src/detectors/ZDC/ProtoCluster_factory_ZDCEcalTruthProtoClusters.h +++ b/src/detectors/ZDC/ProtoCluster_factory_ZDCEcalTruthProtoClusters.h @@ -58,4 +58,3 @@ class ProtoCluster_factory_ZDCEcalTruthProtoClusters : public JFactoryT m_default_input_tags; FactoryConfigType m_default_cfg; /// Default config for a factories. (!) Must be properly copyable }; - - diff --git a/src/extensions/jana/JChainFactoryT.h b/src/extensions/jana/JChainFactoryT.h index 8a0f328d25..f27988dddd 100644 --- a/src/extensions/jana/JChainFactoryT.h +++ b/src/extensions/jana/JChainFactoryT.h @@ -84,4 +84,3 @@ class JChainFactoryT : public JFactoryT { /// Working input tags (with adjustment by user parameters) std::vector m_input_tags; /// Tag for the input data }; - diff --git a/src/extensions/podio_access/PodioAssociationHelper.h b/src/extensions/podio_access/PodioAssociationHelper.h index 8bf18894a5..d024d1a68c 100644 --- a/src/extensions/podio_access/PodioAssociationHelper.h +++ b/src/extensions/podio_access/PodioAssociationHelper.h @@ -11,4 +11,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/extensions/podio_access/accessor.h b/src/extensions/podio_access/accessor.h index cf48132f88..dd9fb86f73 100644 --- a/src/extensions/podio_access/accessor.h +++ b/src/extensions/podio_access/accessor.h @@ -32,5 +32,3 @@ template struct CONCATE(MEMBER, __LINE__), &CLASS::MEMBER> #define ACCESS(OBJECT, MEMBER) \ (OBJECT).*Access((Only_##MEMBER::type>*)nullptr) - - diff --git a/src/extensions/string/StringHelpers.h b/src/extensions/string/StringHelpers.h index 0c5f57b00c..ed3554c2be 100644 --- a/src/extensions/string/StringHelpers.h +++ b/src/extensions/string/StringHelpers.h @@ -241,4 +241,3 @@ namespace eicrecon::str return str; } } - diff --git a/src/global/digi/SiliconTrackerDigi_factory.h b/src/global/digi/SiliconTrackerDigi_factory.h index 9bd7cd1bde..bdc9debd9e 100644 --- a/src/global/digi/SiliconTrackerDigi_factory.h +++ b/src/global/digi/SiliconTrackerDigi_factory.h @@ -51,4 +51,3 @@ namespace eicrecon { }; } - diff --git a/src/global/reco/MC2SmearedParticle_factory.h b/src/global/reco/MC2SmearedParticle_factory.h index 4de2a0185c..5f68c02dba 100644 --- a/src/global/reco/MC2SmearedParticle_factory.h +++ b/src/global/reco/MC2SmearedParticle_factory.h @@ -38,4 +38,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/global/reco/MatchClusters_factory.h b/src/global/reco/MatchClusters_factory.h index 3d053be95c..ad91edac1b 100644 --- a/src/global/reco/MatchClusters_factory.h +++ b/src/global/reco/MatchClusters_factory.h @@ -39,4 +39,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/global/reco/ReconstructedParticleAssociations_factory.h b/src/global/reco/ReconstructedParticleAssociations_factory.h index b149f0cdd0..dcf723826f 100644 --- a/src/global/reco/ReconstructedParticleAssociations_factory.h +++ b/src/global/reco/ReconstructedParticleAssociations_factory.h @@ -34,4 +34,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/global/reco/ReconstructedParticles_factory.h b/src/global/reco/ReconstructedParticles_factory.h index e8d04834d9..eb6032cd53 100644 --- a/src/global/reco/ReconstructedParticles_factory.h +++ b/src/global/reco/ReconstructedParticles_factory.h @@ -34,4 +34,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/global/tracking/CKFTracking_factory.h b/src/global/tracking/CKFTracking_factory.h index 7fa278e883..ec7b36c063 100644 --- a/src/global/tracking/CKFTracking_factory.h +++ b/src/global/tracking/CKFTracking_factory.h @@ -41,4 +41,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/global/tracking/ParticlesWithTruthPID_factory.h b/src/global/tracking/ParticlesWithTruthPID_factory.h index 3414eda060..c384e3c81f 100644 --- a/src/global/tracking/ParticlesWithTruthPID_factory.h +++ b/src/global/tracking/ParticlesWithTruthPID_factory.h @@ -37,4 +37,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/global/tracking/TrackParamTruthInit_factory.h b/src/global/tracking/TrackParamTruthInit_factory.h index 448db834cb..58b748d1bb 100644 --- a/src/global/tracking/TrackParamTruthInit_factory.h +++ b/src/global/tracking/TrackParamTruthInit_factory.h @@ -38,4 +38,3 @@ class TrackParamTruthInit_factory : }; } // eicrecon - diff --git a/src/global/tracking/TrackParameters_factory.h b/src/global/tracking/TrackParameters_factory.h index 91c16b35bf..4ab401418c 100644 --- a/src/global/tracking/TrackParameters_factory.h +++ b/src/global/tracking/TrackParameters_factory.h @@ -35,4 +35,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/global/tracking/TrackProjector_factory.h b/src/global/tracking/TrackProjector_factory.h index 9d5d2d3d8a..4fc29d5788 100644 --- a/src/global/tracking/TrackProjector_factory.h +++ b/src/global/tracking/TrackProjector_factory.h @@ -37,4 +37,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/global/tracking/TrackSeeding_factory.h b/src/global/tracking/TrackSeeding_factory.h index bac2146bb8..2dc965e4be 100644 --- a/src/global/tracking/TrackSeeding_factory.h +++ b/src/global/tracking/TrackSeeding_factory.h @@ -41,4 +41,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/global/tracking/TrackerHitCollector_factory.h b/src/global/tracking/TrackerHitCollector_factory.h index 280a9b3e35..99baa4fc8a 100644 --- a/src/global/tracking/TrackerHitCollector_factory.h +++ b/src/global/tracking/TrackerHitCollector_factory.h @@ -37,4 +37,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/global/tracking/TrackerHitReconstruction_factory.h b/src/global/tracking/TrackerHitReconstruction_factory.h index 8ff227d4a2..0dd01f9908 100644 --- a/src/global/tracking/TrackerHitReconstruction_factory.h +++ b/src/global/tracking/TrackerHitReconstruction_factory.h @@ -46,5 +46,3 @@ class TrackerHitReconstruction_factory : eicrecon::TrackerHitReconstruction m_reco_algo; /// The reconstruction algorithm }; - - diff --git a/src/global/tracking/TrackerReconstructedParticle_factory.h b/src/global/tracking/TrackerReconstructedParticle_factory.h index 6cfa9229d2..6f98019573 100644 --- a/src/global/tracking/TrackerReconstructedParticle_factory.h +++ b/src/global/tracking/TrackerReconstructedParticle_factory.h @@ -31,4 +31,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/global/tracking/TrackerSourceLinker_factory.h b/src/global/tracking/TrackerSourceLinker_factory.h index 5deb250b70..d30854629c 100644 --- a/src/global/tracking/TrackerSourceLinker_factory.h +++ b/src/global/tracking/TrackerSourceLinker_factory.h @@ -40,4 +40,3 @@ namespace eicrecon { }; } // eicrecon - diff --git a/src/global/tracking/TrackingResult_factory.h b/src/global/tracking/TrackingResult_factory.h index 63fab1947c..f00f975bac 100644 --- a/src/global/tracking/TrackingResult_factory.h +++ b/src/global/tracking/TrackingResult_factory.h @@ -30,5 +30,3 @@ class TrackingResult_factory: eicrecon::Reco::ParticlesFromTrackFit m_particle_maker_algo; /// Track source linker algorithm }; - - diff --git a/src/global/tracking/TruthTrackSeeding_factory.h b/src/global/tracking/TruthTrackSeeding_factory.h index c3e513a67b..9977027fc5 100644 --- a/src/global/tracking/TruthTrackSeeding_factory.h +++ b/src/global/tracking/TruthTrackSeeding_factory.h @@ -43,4 +43,3 @@ class TruthTrackSeeding_factory : public JChainFactoryT m_log; std::shared_ptr m_init_log; }; - diff --git a/src/services/geometry/dd4hep/JDD4hep_service.h b/src/services/geometry/dd4hep/JDD4hep_service.h index ade70886ec..97db955489 100644 --- a/src/services/geometry/dd4hep/JDD4hep_service.h +++ b/src/services/geometry/dd4hep/JDD4hep_service.h @@ -57,4 +57,3 @@ class JDD4hep_service : public JService /// Ensures there is a geometry file that should be opened std::string resolveFileName(const std::string &filename, char *detector_path_env); }; - diff --git a/src/services/io/podio/JEventSourcePODIOsimple.h b/src/services/io/podio/JEventSourcePODIOsimple.h index 228e364b3f..244f3a338f 100644 --- a/src/services/io/podio/JEventSourcePODIOsimple.h +++ b/src/services/io/podio/JEventSourcePODIOsimple.h @@ -47,4 +47,3 @@ class JEventSourcePODIOsimple : public JEventSource { template <> double JEventSourceGeneratorT::CheckOpenable(std::string); - diff --git a/src/services/log/Log_service.h b/src/services/log/Log_service.h index 4eaa0a1fae..fa2df6e899 100644 --- a/src/services/log/Log_service.h +++ b/src/services/log/Log_service.h @@ -36,4 +36,3 @@ class Log_service : public JService JApplication* m_application; std::string m_log_level_str; }; - diff --git a/src/services/rootfile/RootFile_service.h b/src/services/rootfile/RootFile_service.h index ea7a22807c..025e11fd99 100644 --- a/src/services/rootfile/RootFile_service.h +++ b/src/services/rootfile/RootFile_service.h @@ -103,4 +103,3 @@ class RootFile_service : public JService TFile *m_histfile = nullptr; std::once_flag init_flag; }; - diff --git a/src/tests/reco_test/GlobalReconstructionTest_processor.h b/src/tests/reco_test/GlobalReconstructionTest_processor.h index 70482574cb..8531390c7a 100644 --- a/src/tests/reco_test/GlobalReconstructionTest_processor.h +++ b/src/tests/reco_test/GlobalReconstructionTest_processor.h @@ -51,4 +51,3 @@ class GlobalReconstructionTest_processor:public JEventProcessor void printRecoParticles(std::vector reco_particles, const std::string &title); }; - diff --git a/src/tests/track_propagation_test/TrackPropagationTest_processor.h b/src/tests/track_propagation_test/TrackPropagationTest_processor.h index 08d2382401..0a836cf210 100644 --- a/src/tests/track_propagation_test/TrackPropagationTest_processor.h +++ b/src/tests/track_propagation_test/TrackPropagationTest_processor.h @@ -59,4 +59,3 @@ class TrackPropagationTest_processor: /// A surface to propagate to std::shared_ptr m_hcal_surface; }; - diff --git a/src/tests/track_seeding_test/TrackSeedingTest_processor.h b/src/tests/track_seeding_test/TrackSeedingTest_processor.h index 9ca7b66ddd..f8a42d0ff7 100644 --- a/src/tests/track_seeding_test/TrackSeedingTest_processor.h +++ b/src/tests/track_seeding_test/TrackSeedingTest_processor.h @@ -59,4 +59,3 @@ class TrackSeedingTest_processor: /// A surface to propagate to std::shared_ptr m_hcal_surface; }; - diff --git a/src/tests/tracking_test/TrackingTest_processor.h b/src/tests/tracking_test/TrackingTest_processor.h index f49fa6dc57..ae9873ad0f 100644 --- a/src/tests/tracking_test/TrackingTest_processor.h +++ b/src/tests/tracking_test/TrackingTest_processor.h @@ -56,4 +56,3 @@ class TrackingTest_processor:public JEventProcessor std::shared_ptr m_log; TDirectory *m_dir_main; }; - diff --git a/src/utilities/dump_flags/DumpFlags_processor.h b/src/utilities/dump_flags/DumpFlags_processor.h index 689866d22d..95fb594c44 100644 --- a/src/utilities/dump_flags/DumpFlags_processor.h +++ b/src/utilities/dump_flags/DumpFlags_processor.h @@ -128,4 +128,3 @@ class DumpFlags_processor: public JEventProcessor, public eicrecon::SpdlogMixin< return ""; } }; - diff --git a/src/utilities/eicrecon/eicrecon_cli.h b/src/utilities/eicrecon/eicrecon_cli.h index c4b0678712..17fe4a4b53 100644 --- a/src/utilities/eicrecon/eicrecon_cli.h +++ b/src/utilities/eicrecon/eicrecon_cli.h @@ -75,4 +75,3 @@ namespace jana { int Execute(JApplication* app, UserOptions& options); } - diff --git a/src/utilities/eicrecon/print_info.h b/src/utilities/eicrecon/print_info.h index 4bb8980427..4060d4b9fb 100644 --- a/src/utilities/eicrecon/print_info.h +++ b/src/utilities/eicrecon/print_info.h @@ -47,4 +47,3 @@ void printJANAHeaderIMG() { "(( ,M9 d' YM. M \\MM d' YM. ,M' \n" " YMMMM9 _dM_ _dMM_M_ \\M _dM_ _dMM_MMMMMMMM " << std::endl << std::endl; } - From 834ad229d6872472ec9a1d0298db61bd58f2a59e Mon Sep 17 00:00:00 2001 From: Chao Peng Date: Sun, 12 Feb 2023 23:36:14 -0600 Subject: [PATCH 3/8] implement z segment merging --- .../calorimetry/CalorimeterScFiDigi.cc | 24 +++++++++++++++---- .../calorimetry/CalorimeterScFiDigi.h | 6 +++-- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/algorithms/calorimetry/CalorimeterScFiDigi.cc b/src/algorithms/calorimetry/CalorimeterScFiDigi.cc index 4a1dcb453e..b31abfacc4 100644 --- a/src/algorithms/calorimetry/CalorimeterScFiDigi.cc +++ b/src/algorithms/calorimetry/CalorimeterScFiDigi.cc @@ -73,6 +73,7 @@ void CalorimeterScFiDigi::AlgorithmInit(std::shared_ptr& logger) // get decoders try { auto id_desc = m_geoSvc->detector()->readout(m_readout).idSpec(); + id_dec = id_desc.decoder(); id_mask = 0; std::vector> ref_fields; for (size_t i = 0; i < u_fields.size(); ++i) { @@ -81,8 +82,15 @@ void CalorimeterScFiDigi::AlgorithmInit(std::shared_ptr& logger) int ref = i < u_refs.size() ? u_refs[i] : 0; ref_fields.emplace_back(u_fields[i], ref); } + // need to also merge z + if (!m_zsegment.empty()) { + z_idx = id_dec->index(m_zsegment); + // 0 is a placeholder, real value will be determined in merging + ref_fields.emplace_back(m_zsegment, 0); + } ref_mask = id_desc.encode(ref_fields); // debug() << fmt::format("Referece id mask for the fields {:#064b}", ref_mask) << endmsg; + // update z field index from the decoder } catch (...) { m_log->warn("Failed to load ID decoder for {}", m_readout); japp->Quit(); @@ -138,13 +146,16 @@ void CalorimeterScFiDigi::light_guide_digi( void ){ // signal sum for (auto &[id, hits] : merge_map) { - double edep = hits[0]->getEnergy(); - double time = hits[0]->getContributions(0).getTime(); - double max_edep = hits[0]->getEnergy(); + double edep = hits[0]->getEnergy(); + double time = hits[0]->getContributions(0).getTime(); + double max_edep = hits[0]->getEnergy(); + double ztot = id_dec->get(hits[0]->getCellID(), z_idx)*edep; + // sum energy, take time from the most energetic hit // TODO, implement a timing window to sum or split the hits group for (size_t i = 1; i < hits.size(); ++i) { edep += hits[i]->getEnergy(); + ztot += id_dec->get(hits[i]->getCellID(), z_idx)*hits[i]->getEnergy(); if (hits[i]->getEnergy() > max_edep) { max_edep = hits[i]->getEnergy(); for (const auto& c : hits[i]->getContributions()) { @@ -154,6 +165,11 @@ void CalorimeterScFiDigi::light_guide_digi( void ){ } } } + auto mid = id; + // replace z information with energy-weighted-average z over this merging group + if (!m_zsegment.empty()) { + id_dec->set(mid, z_idx, std::llround(ztot/edep)); + } // safety check const double eResRel = (edep > m_threshold) @@ -167,7 +183,7 @@ void CalorimeterScFiDigi::light_guide_digi( void ){ unsigned long long tdc = std::llround((time + m_normDist(generator) * tRes) * stepTDC); auto rawhit = new edm4hep::RawCalorimeterHit( - id, + mid, (adc > m_capADC ? m_capADC : adc), tdc ); diff --git a/src/algorithms/calorimetry/CalorimeterScFiDigi.h b/src/algorithms/calorimetry/CalorimeterScFiDigi.h index 611f7f8d64..b952e66dc4 100644 --- a/src/algorithms/calorimetry/CalorimeterScFiDigi.h +++ b/src/algorithms/calorimetry/CalorimeterScFiDigi.h @@ -59,6 +59,7 @@ class CalorimeterScFiDigi { std::vector u_refs; std::string m_geoSvcName; std::string m_readout; + std::string m_zsegment; // This may be used to declare the data members as JANA configuration parameters. // This should compile OK even without JANA so long as you don't try using it. @@ -74,8 +75,9 @@ class CalorimeterScFiDigi { // unitless counterparts of inputs double dyRangeADC{0}, stepTDC{0}, tRes{0}, eRes[3] = {0., 0., 0.}; //Rndm::Numbers m_normDist; - std::shared_ptr m_geoSvc; - uint64_t id_mask{0}, ref_mask{0}; + std::shared_ptr m_geoSvc; + dd4hep::BitFieldCoder* id_dec = nullptr; + uint64_t id_mask{0}, ref_mask{0}, z_idx{0}; // inputs/outputs std::vector simhits; From be1fd4d0c84d9b7901dc84f0f88c3fd501aa4eb6 Mon Sep 17 00:00:00 2001 From: Chao Peng Date: Mon, 13 Feb 2023 08:46:13 -0600 Subject: [PATCH 4/8] change factory to use the new scfi digi algorithms --- .../ProtoCluster_factory_EcalBarrelScFiProtoClusters.h | 3 ++- .../RawCalorimeterHit_factory_EcalBarrelScFiRawHits.h | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h b/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h index f2966e2311..7ec375b388 100644 --- a/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h +++ b/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h @@ -26,7 +26,8 @@ class ProtoCluster_factory_EcalBarrelScFiProtoClusters : public JFactoryT #include #include -#include +#include #include #include #include @@ -18,7 +18,7 @@ -class RawCalorimeterHit_factory_EcalBarrelScFiRawHits : public JFactoryT, CalorimeterHitDigi { +class RawCalorimeterHit_factory_EcalBarrelScFiRawHits : public JFactoryT, CalorimeterScFiDigi { public: @@ -34,7 +34,7 @@ class RawCalorimeterHit_factory_EcalBarrelScFiRawHits : public JFactoryTGetService(); // TODO: implement named geometry service? // This is another option for exposing the data members as JANA configuration parameters. @@ -63,6 +64,7 @@ class RawCalorimeterHit_factory_EcalBarrelScFiRawHits : public JFactoryTSetDefaultParameter("BEMC:EcalBarrelScFiRawHits:fieldRefNumbers", u_refs); app->SetDefaultParameter("BEMC:EcalBarrelScFiRawHits:geoServiceName", m_geoSvcName); app->SetDefaultParameter("BEMC:EcalBarrelScFiRawHits:readoutClass", m_readout); + app->SetDefaultParameter("BEMC:EcalBarrelScFiRawHits:zSegment", m_zsegment); // Call Init for generic algorithm AlgorithmInit(m_log); From d8789fcaace9cdec3cb8add4d01c99b1229f9fe4 Mon Sep 17 00:00:00 2001 From: Chao Peng Date: Mon, 13 Feb 2023 18:02:47 -0600 Subject: [PATCH 5/8] update the factory so ScFi BECal uses this new merging digi --- src/algorithms/calorimetry/CalorimeterScFiDigi.cc | 5 ++++- src/detectors/BEMC/BEMC.cc | 2 +- .../BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h | 1 - .../BEMC/RawCalorimeterHit_factory_EcalBarrelScFiRawHits.h | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/algorithms/calorimetry/CalorimeterScFiDigi.cc b/src/algorithms/calorimetry/CalorimeterScFiDigi.cc index b31abfacc4..c215af3b62 100644 --- a/src/algorithms/calorimetry/CalorimeterScFiDigi.cc +++ b/src/algorithms/calorimetry/CalorimeterScFiDigi.cc @@ -85,7 +85,9 @@ void CalorimeterScFiDigi::AlgorithmInit(std::shared_ptr& logger) // need to also merge z if (!m_zsegment.empty()) { z_idx = id_dec->index(m_zsegment); - // 0 is a placeholder, real value will be determined in merging + // treat z segment as a field to merge + id_mask |= id_desc.field(m_zsegment)->mask(); + // but new z value will be determined in merging, 0 is a placeholder here ref_fields.emplace_back(m_zsegment, 0); } ref_mask = id_desc.encode(ref_fields); @@ -189,4 +191,5 @@ void CalorimeterScFiDigi::light_guide_digi( void ){ ); rawhits.push_back(rawhit); } + m_log->debug("size before digi: {:d}, after: {:d}", simhits.size(), rawhits.size()); } diff --git a/src/detectors/BEMC/BEMC.cc b/src/detectors/BEMC/BEMC.cc index c42b239819..2a1c8f18b8 100644 --- a/src/detectors/BEMC/BEMC.cc +++ b/src/detectors/BEMC/BEMC.cc @@ -40,7 +40,7 @@ extern "C" { app->Add(new JFactoryGeneratorT()); app->Add(new JFactoryGeneratorT()); - app->Add(new JFactoryGeneratorT()); + // app->Add(new JFactoryGeneratorT()); app->Add(new JFactoryGeneratorT()); app->Add(new JFactoryGeneratorT()); diff --git a/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h b/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h index 7ec375b388..9e0f378e66 100644 --- a/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h +++ b/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h @@ -26,7 +26,6 @@ class ProtoCluster_factory_EcalBarrelScFiProtoClusters : public JFactoryTGetService(); // TODO: implement named geometry service? From f5ac4f475c93cb1f1daec629ebc475b3adce1128 Mon Sep 17 00:00:00 2001 From: Chao Peng Date: Mon, 13 Feb 2023 18:25:49 -0600 Subject: [PATCH 6/8] re-enable merged hits for ScFi --- src/algorithms/calorimetry/CalorimeterScFiDigi.cc | 11 ++++------- src/detectors/BEMC/BEMC.cc | 2 +- ...ProtoCluster_factory_EcalBarrelScFiProtoClusters.h | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/algorithms/calorimetry/CalorimeterScFiDigi.cc b/src/algorithms/calorimetry/CalorimeterScFiDigi.cc index c215af3b62..81d3803c93 100644 --- a/src/algorithms/calorimetry/CalorimeterScFiDigi.cc +++ b/src/algorithms/calorimetry/CalorimeterScFiDigi.cc @@ -151,15 +151,16 @@ void CalorimeterScFiDigi::light_guide_digi( void ){ double edep = hits[0]->getEnergy(); double time = hits[0]->getContributions(0).getTime(); double max_edep = hits[0]->getEnergy(); - double ztot = id_dec->get(hits[0]->getCellID(), z_idx)*edep; + int64_t mid = hits[0]->getCellID(); // sum energy, take time from the most energetic hit // TODO, implement a timing window to sum or split the hits group for (size_t i = 1; i < hits.size(); ++i) { + int64_t ztmp = id_dec->get(hits[i]->getCellID(), z_idx); edep += hits[i]->getEnergy(); - ztot += id_dec->get(hits[i]->getCellID(), z_idx)*hits[i]->getEnergy(); if (hits[i]->getEnergy() > max_edep) { max_edep = hits[i]->getEnergy(); + mid = hits[i]->getCellID(); for (const auto& c : hits[i]->getContributions()) { if (c.getTime() <= time) { time = c.getTime(); @@ -167,11 +168,6 @@ void CalorimeterScFiDigi::light_guide_digi( void ){ } } } - auto mid = id; - // replace z information with energy-weighted-average z over this merging group - if (!m_zsegment.empty()) { - id_dec->set(mid, z_idx, std::llround(ztot/edep)); - } // safety check const double eResRel = (edep > m_threshold) @@ -184,6 +180,7 @@ void CalorimeterScFiDigi::light_guide_digi( void ){ unsigned long long adc = std::llround(ped + edep * (m_corrMeanScale + eResRel) / m_dyRangeADC * m_capADC); unsigned long long tdc = std::llround((time + m_normDist(generator) * tRes) * stepTDC); + // use the cellid from the most energetic hit in this group auto rawhit = new edm4hep::RawCalorimeterHit( mid, (adc > m_capADC ? m_capADC : adc), diff --git a/src/detectors/BEMC/BEMC.cc b/src/detectors/BEMC/BEMC.cc index 2a1c8f18b8..c42b239819 100644 --- a/src/detectors/BEMC/BEMC.cc +++ b/src/detectors/BEMC/BEMC.cc @@ -40,7 +40,7 @@ extern "C" { app->Add(new JFactoryGeneratorT()); app->Add(new JFactoryGeneratorT()); - // app->Add(new JFactoryGeneratorT()); + app->Add(new JFactoryGeneratorT()); app->Add(new JFactoryGeneratorT()); app->Add(new JFactoryGeneratorT()); diff --git a/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h b/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h index 9e0f378e66..f2966e2311 100644 --- a/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h +++ b/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h @@ -26,7 +26,7 @@ class ProtoCluster_factory_EcalBarrelScFiProtoClusters : public JFactoryT Date: Mon, 13 Feb 2023 21:03:14 -0600 Subject: [PATCH 7/8] skip redundant merger for ScFi hits, fix the DetElement used in ScFiHitReco --- src/detectors/BEMC/BEMC.cc | 2 +- .../BEMC/CalorimeterHit_factory_EcalBarrelScFiRecHits.h | 2 +- .../BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/detectors/BEMC/BEMC.cc b/src/detectors/BEMC/BEMC.cc index c42b239819..2a1c8f18b8 100644 --- a/src/detectors/BEMC/BEMC.cc +++ b/src/detectors/BEMC/BEMC.cc @@ -40,7 +40,7 @@ extern "C" { app->Add(new JFactoryGeneratorT()); app->Add(new JFactoryGeneratorT()); - app->Add(new JFactoryGeneratorT()); + // app->Add(new JFactoryGeneratorT()); app->Add(new JFactoryGeneratorT()); app->Add(new JFactoryGeneratorT()); diff --git a/src/detectors/BEMC/CalorimeterHit_factory_EcalBarrelScFiRecHits.h b/src/detectors/BEMC/CalorimeterHit_factory_EcalBarrelScFiRecHits.h index d50f14b5b6..4b3a77bb34 100644 --- a/src/detectors/BEMC/CalorimeterHit_factory_EcalBarrelScFiRecHits.h +++ b/src/detectors/BEMC/CalorimeterHit_factory_EcalBarrelScFiRecHits.h @@ -45,7 +45,7 @@ class CalorimeterHit_factory_EcalBarrelScFiRecHits : public JFactoryTSetDefaultParameter("BEMC:tag", m_input_tag); app->SetDefaultParameter("BEMC:EcalBarrelScFiRecHits:input_tag", m_input_tag, "Name of input collection to use"); diff --git a/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h b/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h index f2966e2311..9e0f378e66 100644 --- a/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h +++ b/src/detectors/BEMC/ProtoCluster_factory_EcalBarrelScFiProtoClusters.h @@ -26,7 +26,7 @@ class ProtoCluster_factory_EcalBarrelScFiProtoClusters : public JFactoryT Date: Mon, 13 Feb 2023 23:29:49 -0600 Subject: [PATCH 8/8] Update src/algorithms/calorimetry/CalorimeterScFiDigi.cc --- src/algorithms/calorimetry/CalorimeterScFiDigi.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/calorimetry/CalorimeterScFiDigi.cc b/src/algorithms/calorimetry/CalorimeterScFiDigi.cc index 81d3803c93..42e6800aa3 100644 --- a/src/algorithms/calorimetry/CalorimeterScFiDigi.cc +++ b/src/algorithms/calorimetry/CalorimeterScFiDigi.cc @@ -129,7 +129,7 @@ void CalorimeterScFiDigi::AlgorithmProcess() { } //------------------------ -// signal_sum_digi +// light_guide_digi //------------------------ void CalorimeterScFiDigi::light_guide_digi( void ){