Commit 0639e38d authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Added samplingFraction to SamplingReco

	modified:   EcalTungstenSamplingReco.cpp
parent 18c5c3c3
Pipeline #6980 passed with stages
in 8 minutes and 42 seconds
......@@ -8,6 +8,7 @@ LABEL maintainer="Whitney Armstrong <warmstrong@anl.gov>" \
base="eic_container/eic"
RUN cd /tmp \
&& export CLICOLOR_FORCE=1 \
&& git clone https://eicweb.phy.anl.gov/EIC/NPDet.git \
&& mkdir -p NPDet/build && cd NPDet/build \
&& cmake ../. -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/usr/local \
......@@ -15,6 +16,7 @@ RUN cd /tmp \
&& cd /tmp && rm -rf /tmp/NPDet
RUN cd /tmp \
&& export CLICOLOR_FORCE=1 \
&& git clone https://eicweb.phy.anl.gov/EIC/eicd.git \
&& mkdir -p eicd/build && cd eicd/build \
&& cmake ../. -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/usr/local \
......@@ -22,6 +24,7 @@ RUN cd /tmp \
&& cd /tmp && rm -rf /tmp/eicd
RUN cd /tmp \
&& export CLICOLOR_FORCE=1 \
&& git clone -b @JUGGLER_BRANCH@ https://eicweb.phy.anl.gov/EIC/juggler.git \
&& mkdir -p juggler/build && cd juggler/build \
&& cmake ../. -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/usr/local \
......
......@@ -33,6 +33,7 @@ namespace Jug::Reco {
DataHandle<RawHits> m_inputHitCollection{"inputHitCollection", Gaudi::DataHandle::Reader, this};
DataHandle<RecHits> m_outputHitCollection{"outputHitCollection", Gaudi::DataHandle::Writer, this};
Gaudi::Property<double> m_minModuleEdep{this, "minModuleEdep", 5.0*MeV};
Gaudi::Property<double> m_samplingFraction{this, "samplingFraction", 1.0};
/// Pointer to the geometry service
SmartIF<IGeoSvc> m_geoSvc;
......@@ -76,8 +77,13 @@ namespace Jug::Reco {
auto pos = m_geoSvc->cellIDPositionConverter()->findContext(id)->volumePlacement().position();
// cell dimension
auto dim = m_geoSvc->cellIDPositionConverter()->cellDimensions(id);
hits.push_back(eic::CalorimeterHit{
id, energy, time, {gpos.x()/dd4hep::mm, gpos.y()/dd4hep::mm, gpos.z()/dd4hep::mm}, {pos.x()/dd4hep::mm, pos.y()/dd4hep::mm, pos.z()/dd4hep::mm}, {dim[0]/dd4hep::mm, dim[1]/dd4hep::mm, 0.0}, 0});
hits.push_back(eic::CalorimeterHit{id,
energy / m_samplingFraction,
time,
{gpos.x() / dd4hep::mm, gpos.y() / dd4hep::mm, gpos.z() / dd4hep::mm},
{pos.x() / dd4hep::mm, pos.y() / dd4hep::mm, pos.z() / dd4hep::mm},
{dim[0] / dd4hep::mm, dim[1] / dd4hep::mm, 0.0},
0});
}
}
......
......@@ -25,6 +25,7 @@ using namespace Gaudi::Units;
namespace Jug::Reco {
class EcalTungstenSamplingReco : public GaudiAlgorithm {
public:
Gaudi::Property<double> m_samplingFraction{this, "samplingFraction", 0.25};
Gaudi::Property<double> m_minModuleEdep{this, "minModuleEdep", 0.5 * MeV};
DataHandle<eic::RawCalorimeterHitCollection> m_inputHitCollection{"inputHitCollection", Gaudi::DataHandle::Reader,
this};
......@@ -74,7 +75,7 @@ namespace Jug::Reco {
// cell dimension
auto dim = m_geoSvc->cellIDPositionConverter()->cellDimensions(id);
hits.push_back(eic::CalorimeterHit{id,
energy,
energy/m_samplingFraction,
time,
{gpos.x() / dd4hep::mm, gpos.y() / dd4hep::mm, gpos.z() / dd4hep::mm},
{pos.x() / dd4hep::mm, pos.y() / dd4hep::mm, pos.z() / dd4hep::mm},
......
......@@ -13,7 +13,9 @@ The juggler internal units are (`GeV`, `mm`, `ns`, and `radians`).
#### Units Table
todo...
| G4 | DD4hep | Gaudi | Juggler |
|----|--------|-------|---------|
### Running Juggler
......@@ -23,6 +25,8 @@ Here is an example for topside
../where_ever/../juggler/build/run gaudirun.py options/example_reconstruction.py
```
## Components
### `JugBase`
### `JugDigi`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment