Skip to content

Commit

Permalink
Remove processor from the name
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Oct 25, 2023
1 parent 1856601 commit 63519ea
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion k4Reco/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"),
Expand All @@ -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);
Expand All @@ -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<dd4hep::rec::SurfaceManager>();
Expand All @@ -94,7 +94,7 @@ StatusCode DDPlanarDigiProcessor::initialize() {
return StatusCode::SUCCESS;
}

std::tuple<TrackerHitPlaneColl, Association> DDPlanarDigiProcessor::operator()(
std::tuple<TrackerHitPlaneColl, Association> 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 "
Expand Down Expand Up @@ -132,7 +132,7 @@ std::tuple<TrackerHitPlaneColl, Association> 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());
}
Expand Down Expand Up @@ -327,7 +327,7 @@ std::tuple<TrackerHitPlaneColl, Association> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -38,7 +38,7 @@
#include <string>
#include <vector>

/** ======= DDPlanarDigiProcessor ========== <br>
/** ======= DDPlanarDigi ========== <br>
* 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.
Expand Down Expand Up @@ -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;
Expand All @@ -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<TrackerHitPlaneColl, Association>(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;
Expand Down Expand Up @@ -133,6 +133,6 @@ struct DDPlanarDigiProcessor final
SmartIF<IUniqueIDGenSvc> m_uidSvc;
};

DECLARE_COMPONENT(DDPlanarDigiProcessor)
DECLARE_COMPONENT(DDPlanarDigi)

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down

0 comments on commit 63519ea

Please sign in to comment.