From 63519ea8499b04f57bafd2b784972c55328715e9 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 25 Oct 2023 15:13:44 +0200 Subject: [PATCH] Remove processor from the name --- k4Reco/CMakeLists.txt | 2 +- ...DPlanarDigiProcessor.cpp => DDPlanarDigi.cpp} | 16 ++++++++-------- .../{DDPlanarDigiProcessor.h => DDPlanarDigi.h} | 14 +++++++------- ...PlanarDigiProcessor.py => runDDPlanarDigi.py} | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) rename k4Reco/DDPlanarDigi/components/{DDPlanarDigiProcessor.cpp => DDPlanarDigi.cpp} (95%) rename k4Reco/DDPlanarDigi/components/{DDPlanarDigiProcessor.h => DDPlanarDigi.h} (95%) rename k4Reco/DDPlanarDigi/options/{runDDPlanarDigiProcessor.py => runDDPlanarDigi.py} (95%) diff --git a/k4Reco/CMakeLists.txt b/k4Reco/CMakeLists.txt index 6ab7504..976c0dc 100644 --- a/k4Reco/CMakeLists.txt +++ b/k4Reco/CMakeLists.txt @@ -17,7 +17,7 @@ See the License for the specific language governing permissions and limitations under the License. ]] -set(sources DDPlanarDigi/components/DDPlanarDigiProcessor.cpp +set(sources DDPlanarDigi/components/DDPlanarDigi.cpp ) gaudi_add_module(k4RecoPlugins SOURCES ${sources} diff --git a/k4Reco/DDPlanarDigi/components/DDPlanarDigiProcessor.cpp b/k4Reco/DDPlanarDigi/components/DDPlanarDigi.cpp similarity index 95% rename from k4Reco/DDPlanarDigi/components/DDPlanarDigiProcessor.cpp rename to k4Reco/DDPlanarDigi/components/DDPlanarDigi.cpp index 73e1e13..cc2fed0 100644 --- a/k4Reco/DDPlanarDigi/components/DDPlanarDigiProcessor.cpp +++ b/k4Reco/DDPlanarDigi/components/DDPlanarDigi.cpp @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "DDPlanarDigiProcessor.h" +#include "DDPlanarDigi.h" #include "edm4hep/EventHeaderCollection.h" #include "edm4hep/MCRecoTrackerHitPlaneAssociationCollection.h" @@ -39,7 +39,7 @@ enum { hu = 0, hv, hT, hitE, hitsAccepted, diffu, diffv, diffT, hSize }; -DDPlanarDigiProcessor::DDPlanarDigiProcessor(const std::string& name, ISvcLocator* svcLoc) +DDPlanarDigi::DDPlanarDigi(const std::string& name, ISvcLocator* svcLoc) : MultiTransformer(name, svcLoc, { KeyValue("SimTrackerHitCollectionName", "SimTrackerHits"), @@ -53,10 +53,10 @@ DDPlanarDigiProcessor::DDPlanarDigiProcessor(const std::string& name, ISvcLocato } if (m_resULayer.size() != m_resVLayer.size()) { - error() << "DDPlanarDigiProcessor - Inconsistent number of resolutions given for U and V coordinate: " + error() << "DDPlanarDigi - Inconsistent number of resolutions given for U and V coordinate: " << "ResolutionU :" << m_resULayer.size() << " != ResolutionV : " << m_resVLayer.size(); - throw std::runtime_error("DDPlanarDigiProcessor: Inconsistent number of resolutions given for U and V coordinate"); + throw std::runtime_error("DDPlanarDigi: Inconsistent number of resolutions given for U and V coordinate"); } m_histograms.resize(hSize); @@ -76,7 +76,7 @@ DDPlanarDigiProcessor::DDPlanarDigiProcessor(const std::string& name, ISvcLocato m_geoSvc = serviceLocator()->service(m_geoSvcName); } -StatusCode DDPlanarDigiProcessor::initialize() { +StatusCode DDPlanarDigi::initialize() { const auto detector = m_geoSvc->getDetector(); const auto surfMan = detector->extension(); @@ -94,7 +94,7 @@ StatusCode DDPlanarDigiProcessor::initialize() { return StatusCode::SUCCESS; } -std::tuple DDPlanarDigiProcessor::operator()( +std::tuple DDPlanarDigi::operator()( const SimTrackerHitCollection& simTrackerHits, const Header& headers) const { auto seed = m_uidSvc->getUniqueID(headers[0].getEventNumber(), headers[0].getRunNumber(), m_collName); info() << "Using seed " << seed << " for event " << headers[0].getEventNumber() << " and run " @@ -132,7 +132,7 @@ std::tuple DDPlanarDigiProcessor::operator()( if (sI == surfaceMap->end()) { std::stringstream err; - err << " DDPlanarDigiProcessor::processEvent(): no surface found for cellID : " << std::endl; + err << " DDPlanarDigi::processEvent(): no surface found for cellID : " << std::endl; // << cellid_decoder( hit ).valueString() ; throw std::runtime_error(err.str()); } @@ -327,7 +327,7 @@ std::tuple DDPlanarDigiProcessor::operator()( return std::make_tuple(std::move(trkhitVec), std::move(thsthcol)); } -StatusCode DDPlanarDigiProcessor::finalize() { +StatusCode DDPlanarDigi::finalize() { auto file = TFile::Open(m_outputFileName.value().c_str(), "RECREATE"); auto names = {"hu", "hv", "hT", "hitE", "hitsAccepted", "diffu", "diffv", "diffT", "hSize"}; auto it = names.begin(); diff --git a/k4Reco/DDPlanarDigi/components/DDPlanarDigiProcessor.h b/k4Reco/DDPlanarDigi/components/DDPlanarDigi.h similarity index 95% rename from k4Reco/DDPlanarDigi/components/DDPlanarDigiProcessor.h rename to k4Reco/DDPlanarDigi/components/DDPlanarDigi.h index 8087fdb..3e8b808 100644 --- a/k4Reco/DDPlanarDigi/components/DDPlanarDigiProcessor.h +++ b/k4Reco/DDPlanarDigi/components/DDPlanarDigi.h @@ -16,8 +16,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef DDPLANARDIGIPROCESSOR_H -#define DDPLANARDIGIPROCESSOR_H +#ifndef DDPLANARDIGI_H +#define DDPLANARDIGI_H #include "Gaudi/Accumulators/Histogram.h" #include "Gaudi/Property.h" @@ -38,7 +38,7 @@ #include #include -/** ======= DDPlanarDigiProcessor ==========
+/** ======= DDPlanarDigi ==========
* Creates TrackerHits from SimTrackerHits, smearing them according to the input parameters. * The positions of "digitized" TrackerHits are obtained by gaussian smearing positions * of SimTrackerHits perpendicular and along the ladder according to the specified point resolutions. @@ -67,7 +67,7 @@ * * @author F.Gaede CERN/DESY, S. Aplin DESY * @date Dec 2014 - * Originally in https://github.com/iLCSoft/MarlinTrkProcessors/blob/master/source/Digitisers/include/DDPlanarDigiProcessor.h + * Originally in https://github.com/iLCSoft/MarlinTrkProcessors/blob/master/source/Digitisers/include/DDPlanarDigi.h */ using SimTrackerHitCollection = edm4hep::SimTrackerHitCollection; @@ -76,10 +76,10 @@ using Header = edm4hep::EventHeaderCollection; using TrackerHitPlaneColl = edm4hep::TrackerHitPlaneCollection; using Association = edm4hep::MCRecoTrackerHitPlaneAssociationCollection; -struct DDPlanarDigiProcessor final +struct DDPlanarDigi final : Gaudi::Functional::MultiTransformer< std::tuple(const SimTrackerHitCollection&, const Header&), BaseClass_t> { - DDPlanarDigiProcessor(const std::string& name, ISvcLocator* svcLoc); + DDPlanarDigi(const std::string& name, ISvcLocator* svcLoc); StatusCode initialize() override; StatusCode finalize() override; @@ -133,6 +133,6 @@ struct DDPlanarDigiProcessor final SmartIF m_uidSvc; }; -DECLARE_COMPONENT(DDPlanarDigiProcessor) +DECLARE_COMPONENT(DDPlanarDigi) #endif diff --git a/k4Reco/DDPlanarDigi/options/runDDPlanarDigiProcessor.py b/k4Reco/DDPlanarDigi/options/runDDPlanarDigi.py similarity index 95% rename from k4Reco/DDPlanarDigi/options/runDDPlanarDigiProcessor.py rename to k4Reco/DDPlanarDigi/options/runDDPlanarDigi.py index a9dc1b1..16358eb 100644 --- a/k4Reco/DDPlanarDigi/options/runDDPlanarDigiProcessor.py +++ b/k4Reco/DDPlanarDigi/options/runDDPlanarDigi.py @@ -18,7 +18,7 @@ # from Gaudi.Configuration import INFO from Configurables import ApplicationMgr, k4DataSvc, PodioInput, PodioOutput -from Configurables import DDPlanarDigiProcessor +from Configurables import DDPlanarDigi from Configurables import GeoSvc from Configurables import UniqueIDGenSvc import os @@ -30,7 +30,7 @@ geoservice.OutputLevel = INFO geoservice.EnableGeant4Geo = False -processor = DDPlanarDigiProcessor() +processor = DDPlanarDigi() processor.SubDetectorName = "Vertex" processor.IsStrip = False processor.ResolutionU = [0.003, 0.003, 0.003, 0.003, 0.003, 0.003]