Skip to content

Commit

Permalink
Make the DCHdigi in global coordinates the default
Browse files Browse the repository at this point in the history
  • Loading branch information
BrieucF committed Feb 13, 2024
1 parent a87a20f commit d8e6722
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions DCHdigi/dataFormatExtension/driftChamberHit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ options:

datatypes:

extension::DriftChamberDigi:
extension::DriftChamberDigiLocal:
Description: "Drift chamber digitized hit (before tracking) in local coordinates"
Author: "B. Francois, CERN"
Members:
Expand All @@ -21,13 +21,13 @@ datatypes:
- float eDepError // error measured on eDep [GeV].
- uint32_t clusterCount // number of clusters associated to this hit

extension::DriftChamberDigiLeftRightGlobal:
Description: "Drift chamber digitized hit (before tracking) in local coordinates"
extension::DriftChamberDigi:
Description: "Drift chamber digitized hit (before tracking) in global coordinates"
Author: "B. Francois, CERN"
Members:
- uint64_t cellID // ID of the wire that created this hit
- edm4hep::Vector3d leftPosition // position of the hit assuming it was on the left side of the wire [mm]
- edm4hep::Vector3d rightPosition // position of the hit assuming it was on the right side of the wire [mm]
- edm4hep::Vector3d leftPosition // position of the hit assuming it was on the left side of the wire, radially in the middle of the cell [mm]
- edm4hep::Vector3d rightPosition // position of the hit assuming it was on the right side of the wire, radially in the middle of the cell [mm]
- float time // time of the hit [ns].
- float eDep // energy deposited on the hit [GeV].
- float eDepError // error measured on eDep [GeV].
Expand Down
4 changes: 2 additions & 2 deletions DCHdigi/include/DCHsimpleDigitizerExtendedEdm.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "edm4hep/SimTrackerHitCollection.h"

// EDM4HEP extension
#include "extension/DriftChamberDigiLeftRightGlobalCollection.h"
#include "extension/DriftChamberDigiCollection.h"

// DD4HEP
#include "DD4hep/Detector.h" // for dd4hep::VolumeManager
Expand Down Expand Up @@ -51,7 +51,7 @@ class DCHsimpleDigitizerExtendedEdm : public GaudiAlgorithm {
// Input sim tracker hit collection name
DataHandle<edm4hep::SimTrackerHitCollection> m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this};
// Output digitized tracker hit collection name
DataHandle<extension::DriftChamberDigiLeftRightGlobalCollection> m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this};
DataHandle<extension::DriftChamberDigiCollection> m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this};

// Detector readout name
Gaudi::Property<std::string> m_readoutName{this, "readoutName", "CDCHHits", "Name of the detector readout"};
Expand Down
2 changes: 1 addition & 1 deletion DCHdigi/src/DCHsimpleDigitizerExtendedEdm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ StatusCode DCHsimpleDigitizerExtendedEdm::execute() {
debug() << "Input Sim Hit collection size: " << input_sim_hits->size() << endmsg;

// Digitize the sim hits
extension::DriftChamberDigiLeftRightGlobalCollection* output_digi_hits = m_output_digi_hits.createAndPut();
extension::DriftChamberDigiCollection* output_digi_hits = m_output_digi_hits.createAndPut();
for (const auto& input_sim_hit : *input_sim_hits) {
auto output_digi_hit = output_digi_hits->create();
// smear the hit position: need to go in the wire local frame to smear in the direction aligned/perpendicular with the wire for z/distanceToWire, taking e.g. stereo angle into account
Expand Down

0 comments on commit d8e6722

Please sign in to comment.