Skip to content

Commit

Permalink
Merge pull request #408 from eic/remove-reco-flags-diffs
Browse files Browse the repository at this point in the history
fix: propagate parameters from reco_flags to cpp plugins
  • Loading branch information
wdconinc authored Jan 14, 2023
2 parents a5685ae + b88c8b6 commit f296eba
Show file tree
Hide file tree
Showing 73 changed files with 108 additions and 3,468 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/linux-eic-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,16 @@ jobs:
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
export JANA_PLUGIN_PATH=$PWD/lib/EICrecon/plugins${JANA_PLUGIN_PATH:+:${JANA_PLUGIN_PATH}}
chmod a+x bin/*
$PWD/bin/eicrecon -Ppodio:output_file=rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root -Pplugins=dump_flags,janadot -Pdump_flags:json=${{ matrix.detector_config }}_flags.json
$PWD/bin/eicrecon -Ppodio:output_file=rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root -Pplugins=dump_flags,janadot -Pdump_flags:json=${{ matrix.particle }}_${{ matrix.detector_config }}_flags.json
- uses: actions/upload-artifact@v3
with:
name: eicrecon_rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
path: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.detector_config }}_flags.json
path: ${{ matrix.detector_config }}_flags.json
name: ${{ matrix.particle }}_${{ matrix.detector_config }}_flags.json
path: ${{ matrix.particle }}_${{ matrix.detector_config }}_flags.json
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -222,16 +222,16 @@ jobs:
export DETECTOR_CONFIG=${DETECTOR}_${{ matrix.detector_config }}
export JANA_PLUGIN_PATH=$PWD/lib/EICrecon/plugins${JANA_PLUGIN_PATH:+:${JANA_PLUGIN_PATH}}
chmod a+x bin/*
$PWD/bin/run_eicrecon_reco_flags.py sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }} -Pplugins=dump_flags,janadot -Pdump_flags:json=${{ matrix.detector_config }}_right_flags.json
$PWD/bin/run_eicrecon_reco_flags.py sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }} -Pplugins=dump_flags,janadot -Pdump_flags:json=${{ matrix.particle }}_${{ matrix.detector_config }}_right_flags.json
- uses: actions/upload-artifact@v3
with:
name: run_eicrecon_reco_flags_rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root
path: rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.tree.edm4eic.root
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.detector_config }}_right_flags.json
path: ${{ matrix.detector_config }}_right_flags.json
name: ${{ matrix.particle }}_${{ matrix.detector_config }}_right_flags.json
path: ${{ matrix.particle }}_${{ matrix.detector_config }}_right_flags.json
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
Expand All @@ -255,11 +255,15 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: arches_right_flags.json
name: pi_arches_right_flags.json
- uses: actions/download-artifact@v3
with:
name: pi_brycecanyon_right_flags.json
- run: |
apk add doxygen graphviz
doxygen Doxyfile
cp arches_right_flags.json docs/arches_flags.json
cp pi_arches_right_flags.json docs/arches_flags.json
cp pi_brycecanyon_right_flags.json docs/brycecanyon_flags.json
cp -r docs publishing_docs
mv html publishing_docs/doxygen
- uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion src/algorithms/tracking/CKFTrackingConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace eicrecon {
struct CKFTrackingConfig {
std::vector<double> m_etaBins = {}; // {this, "etaBins", {}};
std::vector<double> m_chi2CutOff = {50.}; //{this, "chi2CutOff", {15.}};
std::vector<double> m_chi2CutOff = {15.}; //{this, "chi2CutOff", {15.}};
std::vector<size_t> m_numMeasurementsCutOff = {10}; //{this, "numMeasurementsCutOff", {10}};
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class ProtoCluster_factory_B0ECalIslandProtoClusters : public JFactoryT<edm4eic:
m_input_tag = "B0ECalRecHits";

m_splitCluster=false; // from ATHENA reconstruction.py
m_minClusterHitEdep=30.0 * dd4hep::MeV; // from ATHENA reconstruction.py
m_minClusterCenterEdep=1.0 * dd4hep::MeV; // from ATHENA reconstruction.py
m_minClusterHitEdep=1.0 * dd4hep::MeV; // from ATHENA reconstruction.py
m_minClusterCenterEdep=30.0 * dd4hep::MeV; // from ATHENA reconstruction.py

// neighbour checking distances
m_sectorDist=5.0 * dd4hep::cm; // from ATHENA reconstruction.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class RawCalorimeterHit_factory_B0ECalRawHits : public JFactoryT<edm4hep::RawCal
u_eRes = {0.0,0.02,0.0};
m_tRes = 0.0 * dd4hep::ns;
m_capADC = 16384;
m_dyRangeADC = 1 * dd4hep::GeV;
m_dyRangeADC = 20 * dd4hep::GeV;
m_pedMeanADC = 100;
m_pedSigmaADC = 1;
m_resolutionTDC = 1e-11;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ class RawCalorimeterHit_factory_EcalBarrelScFiRawHits : public JFactoryT<edm4hep
m_input_tag = "EcalBarrelScFiHits";
u_eRes = {0.0 * dd4hep::MeV};
m_tRes = 0.0 * dd4hep::ns;
m_capADC = 8096;
m_dyRangeADC = 100 * dd4hep::MeV;
m_pedMeanADC = 400;
m_pedSigmaADC = 3.2;
m_capADC = 16384;
m_dyRangeADC = 750 * dd4hep::MeV;
m_pedMeanADC = 20;
m_pedSigmaADC = 0.3;
m_resolutionTDC = 10 * dd4hep::picosecond;
m_corrMeanScale = 1.0;
m_geoSvcName = "ActsGeometryProvider";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ class CalorimeterHit_factory_EcalEndcapPInsertRecHits : public JFactoryT<edm4eic
m_input_tag = "EcalEndcapPInsertRawHits";

// digitization settings, must be consistent with digi class
m_capADC=8096;//{this, "capacityADC", 8096};
m_dyRangeADC=100. * dd4hep::MeV;//{this, "dynamicRangeADC", 100. * dd4hep::MeV};
m_pedMeanADC=400;//{this, "pedestalMean", 400};
m_pedSigmaADC=3.2;//{this, "pedestalSigma", 3.2};
m_capADC=16384;//{this, "capacityADC", 8096};
m_dyRangeADC=3. * dd4hep::GeV;//{this, "dynamicRangeADC", 100. * dd4hep::MeV};
m_pedMeanADC=100;//{this, "pedestalMean", 400};
m_pedSigmaADC=0.7;//{this, "pedestalSigma", 3.2};
m_resolutionTDC=10 * dd4hep::picosecond;//{this, "resolutionTDC", 10 * ps};

// zero suppression values
m_thresholdFactor=4.0;//{this, "thresholdFactor", 0.0};
m_thresholdValue=0.0;//{this, "thresholdValue", 0.0};
m_thresholdFactor=5.0;//{this, "thresholdFactor", 0.0};
m_thresholdValue=2.0;//{this, "thresholdValue", 0.0};

// energy correction with sampling fraction
m_sampFrac=0.998;//{this, "samplingFraction", 1.0};
m_sampFrac=0.03;//{this, "samplingFraction", 1.0};

// geometry service to get ids, ignored if no names provided
m_geoSvcName="geoServiceName";
Expand Down
14 changes: 7 additions & 7 deletions src/detectors/EEMC/CalorimeterHit_factory_EcalEndcapPRecHits.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ class CalorimeterHit_factory_EcalEndcapPRecHits : public JFactoryT<edm4eic::Calo
m_input_tag = "EcalEndcapPRawHits";

// digitization settings, must be consistent with digi class
m_capADC=8096;//{this, "capacityADC", 8096};
m_dyRangeADC=100. * dd4hep::MeV;//{this, "dynamicRangeADC", 100. * dd4hep::MeV};
m_pedMeanADC=400;//{this, "pedestalMean", 400};
m_pedSigmaADC=3.2;//{this, "pedestalSigma", 3.2};
m_capADC=16384;//{this, "capacityADC", 8096};
m_dyRangeADC=3. * dd4hep::GeV;//{this, "dynamicRangeADC", 100. * dd4hep::MeV};
m_pedMeanADC=100;//{this, "pedestalMean", 400};
m_pedSigmaADC=0.7;//{this, "pedestalSigma", 3.2};
m_resolutionTDC=10 * dd4hep::picosecond;//{this, "resolutionTDC", 10 * ps};

// zero suppression values
m_thresholdFactor=4.0;//{this, "thresholdFactor", 0.0};
m_thresholdValue=0.0;//{this, "thresholdValue", 0.0};
m_thresholdFactor=5.0;//{this, "thresholdFactor", 0.0};
m_thresholdValue=2.0;//{this, "thresholdValue", 0.0};

// energy correction with sampling fraction
m_sampFrac=0.998;//{this, "samplingFraction", 1.0};
m_sampFrac=0.03;//{this, "samplingFraction", 1.0};

// geometry service to get ids, ignored if no names provided
m_geoSvcName="geoServiceName";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ class Cluster_factory_EcalEndcapPInsertTruthClusters : public JFactoryT<edm4eic:
m_input_protoclust_tag="EcalEndcapPInsertTruthProtoClusters";

m_sampFrac=1.0;//{this, "samplingFraction", 1.0};
m_logWeightBase=3.6;//{this, "logWeightBase", 3.6};
m_logWeightBase=6.2;//{this, "logWeightBase", 3.6};
m_depthCorrection=0.0;//{this, "depthCorrection", 0.0};
m_energyWeight="log";//{this, "energyWeight", "log"};
m_moduleDimZName="";//{this, "moduleDimZName", ""};
// Constrain the cluster position eta to be within
// the eta of the contributing hits. This is useful to avoid edge effects
// for endcaps.
m_enableEtaBounds=false;//{this, "enableEtaBounds", false};
m_enableEtaBounds=true;//{this, "enableEtaBounds", false};


app->SetDefaultParameter("EEMC:EcalEndcapPInsertTruthClusters:input_protoclust_tag", m_input_protoclust_tag, "Name of input collection to use");
Expand Down
4 changes: 2 additions & 2 deletions src/detectors/EEMC/Cluster_factory_EcalEndcapPTruthClusters.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ class Cluster_factory_EcalEndcapPTruthClusters : public JFactoryT<edm4eic::Clust
m_input_protoclust_tag="EcalEndcapPTruthProtoClusters";

m_sampFrac=1.0;//{this, "samplingFraction", 1.0};
m_logWeightBase=3.6;//{this, "logWeightBase", 3.6};
m_logWeightBase=6.2;//{this, "logWeightBase", 3.6};
m_depthCorrection=0.0;//{this, "depthCorrection", 0.0};
m_energyWeight="log";//{this, "energyWeight", "log"};
m_moduleDimZName="";//{this, "moduleDimZName", ""};
// Constrain the cluster position eta to be within
// the eta of the contributing hits. This is useful to avoid edge effects
// for endcaps.
m_enableEtaBounds=false;//{this, "enableEtaBounds", false};
m_enableEtaBounds=true;//{this, "enableEtaBounds", false};


app->SetDefaultParameter("EEMC:EcalEndcapPTruthClusters:input_protoclust_tag", m_input_protoclust_tag, "Name of input collection to use");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ class ProtoCluster_factory_EcalEndcapPInsertIslandProtoClusters : public JFactor
m_input_tag = "EcalEndcapPInsertRecHits";

m_splitCluster=false; // from ATHENA reconstruction.py
m_minClusterHitEdep=1.0 * dd4hep::MeV; // from ATHENA reconstruction.py
m_minClusterCenterEdep=30.0 * dd4hep::MeV; // from ATHENA reconstruction.py
m_minClusterHitEdep=0.0 * dd4hep::MeV; // from ATHENA reconstruction.py
m_minClusterCenterEdep=10.0 * dd4hep::MeV; // from ATHENA reconstruction.py

// neighbour checking distances
m_sectorDist=5.0 * dd4hep::cm; // from ATHENA reconstruction.py
u_localDistXY={}; //{this, "localDistXY", {}};
u_localDistXY={10.0 * dd4hep::cm, 10.0 * dd4hep::cm}; //{this, "localDistXY", {}};
u_localDistXZ={}; //{this, "localDistXZ", {}};
u_localDistYZ={}; //{this, "localDistYZ", {}};
u_globalDistRPhi={}; //{this, "globalDistRPhi", {}};
u_globalDistEtaPhi={};//{this, "globalDistEtaPhi", {}};
u_dimScaledLocalDistXY={1.8,1.8};// from ATHENA reconstruction.py
u_dimScaledLocalDistXY={1.5,1.5};// from ATHENA reconstruction.py


app->SetDefaultParameter("EEMC:EcalEndcapPInsertIslandProtoClusters:input_tag", m_input_tag, "Name of input collection to use");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ class ProtoCluster_factory_EcalEndcapPIslandProtoClusters : public JFactoryT<edm
m_input_tag = "EcalEndcapPRecHits";

m_splitCluster=false; // from ATHENA reconstruction.py
m_minClusterHitEdep=1.0 * dd4hep::MeV; // from ATHENA reconstruction.py
m_minClusterCenterEdep=30.0 * dd4hep::MeV; // from ATHENA reconstruction.py
m_minClusterHitEdep=0.0 * dd4hep::MeV; // from ATHENA reconstruction.py
m_minClusterCenterEdep=10.0 * dd4hep::MeV; // from ATHENA reconstruction.py

// neighbour checking distances
m_sectorDist=5.0 * dd4hep::cm; // from ATHENA reconstruction.py
u_localDistXY={}; //{this, "localDistXY", {}};
u_localDistXY={10.0 * dd4hep::cm, 10.0 * dd4hep::cm}; //{this, "localDistXY", {}};
u_localDistXZ={}; //{this, "localDistXZ", {}};
u_localDistYZ={}; //{this, "localDistYZ", {}};
u_globalDistRPhi={}; //{this, "globalDistRPhi", {}};
u_globalDistEtaPhi={};//{this, "globalDistEtaPhi", {}};
u_dimScaledLocalDistXY={1.8,1.8};// from ATHENA reconstruction.py
u_dimScaledLocalDistXY={1.5,1.5};// from ATHENA reconstruction.py


app->SetDefaultParameter("EEMC:EcalEndcapPIslandProtoClusters:input_tag", m_input_tag, "Name of input collection to use");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class RawCalorimeterHit_factory_EcalEndcapNRawHits : public JFactoryT<edm4hep::R

// Set default values for all config. parameters in CalorimeterHitDigi algorithm
m_input_tag = "EcalEndcapNHits";
u_eRes = {};
u_eRes = {0.0 * dd4hep::MeV, 20 * dd4hep::MeV, 0.0 * dd4hep::MeV};
m_tRes = 0.0 * dd4hep::ns;
m_capADC = 16384;
m_dyRangeADC = 20 * dd4hep::GeV;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ class RawCalorimeterHit_factory_EcalEndcapPInsertRawHits : public JFactoryT<edm4

// Set default values for all config. parameters in CalorimeterHitDigi algorithm
m_input_tag = "EcalEndcapPInsertHits";
u_eRes = {};
u_eRes = {3.16 * dd4hep::MeV, 1.5 * dd4hep::MeV, 0.0 * dd4hep::MeV};
m_tRes = 0.0 * dd4hep::ns;
m_capADC = 8096;
m_dyRangeADC = 100 * dd4hep::MeV;
m_pedMeanADC = 400;
m_pedSigmaADC = 3.2;
m_capADC = 16384;
m_dyRangeADC = 3 * dd4hep::GeV;
m_pedMeanADC = 100;
m_pedSigmaADC = 0.7;
m_resolutionTDC = 10 * dd4hep::picosecond;
m_corrMeanScale = 1.0;
m_corrMeanScale = 0.03;
u_fields={};
u_refs={};
u_refs={1, 1};
m_geoSvcName = "ActsGeometryProvider";
m_readout = "";
m_geoSvc = app->GetService<JDD4hep_service>(); // TODO: implement named geometry service?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ class RawCalorimeterHit_factory_EcalEndcapPRawHits : public JFactoryT<edm4hep::R

// Set default values for all config. parameters in CalorimeterHitDigi algorithm
m_input_tag = "EcalEndcapPHits";
u_eRes = {};
u_eRes = {3.16 * dd4hep::MeV, 1.5 * dd4hep::MeV, 0.0 * dd4hep::MeV};
m_tRes = 0.0 * dd4hep::ns;
m_capADC = 8096;
m_dyRangeADC = 100 * dd4hep::MeV;
m_pedMeanADC = 400;
m_pedSigmaADC = 3.2;
m_capADC = 16384;
m_dyRangeADC = 3 * dd4hep::GeV;
m_pedMeanADC = 100;
m_pedSigmaADC = 0.7;
m_resolutionTDC = 10 * dd4hep::picosecond;
m_corrMeanScale = 1.0;
m_corrMeanScale = 0.03;
u_fields={};
u_refs={};
u_refs={1, 1};
m_geoSvcName = "ActsGeometryProvider";
m_readout = "";
m_geoSvc = app->GetService<JDD4hep_service>(); // TODO: implement named geometry service?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CalorimeterHit_factory_HcalBarrelMergedHits : public JFactoryT<edm4eic::Ca
m_input_tag = "HcalBarrelRecHits";

m_readout="HcalBarrelHits";
u_fields={"layer", "slice"};
u_fields={"tower", "tile"};
u_refs={1, 0};

m_geoSvc= app->GetService<JDD4hep_service>();
Expand Down
20 changes: 10 additions & 10 deletions src/detectors/HCAL/CalorimeterHit_factory_HcalBarrelRecHits.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,26 @@ class CalorimeterHit_factory_HcalBarrelRecHits : public JFactoryT<edm4eic::Calor
m_input_tag = "HcalBarrelRawHits";

// digitization settings, must be consistent with digi class
m_capADC=8096; // best guess
m_dyRangeADC=50. * dd4hep::GeV; // best guess
m_pedMeanADC=10; // best guess
m_pedSigmaADC=2; // best guess
m_resolutionTDC=1 * dd4hep::nanosecond; // best guess
m_capADC=256; // best guess
m_dyRangeADC=20. * dd4hep::MeV; // best guess
m_pedMeanADC=20; // best guess
m_pedSigmaADC=0.3; // best guess
m_resolutionTDC=10 * dd4hep::picosecond; // best guess

// zero suppression values
m_thresholdFactor=5.0;// from ATHENA's reconstruction.py
m_thresholdValue=0.0;//{this, "thresholdValue", 0.0};
m_thresholdValue=1.0;//{this, "thresholdValue", 0.0};

// energy correction with sampling fraction
m_sampFrac=0.033; // average, from sPHENIX simulations

// geometry service to get ids, ignored if no names provided
m_geoSvcName="geoServiceName";
m_readout="HcalBarrelHits";
m_layerField="tower";
m_sectorField="sector";
m_readout="HcalBarrelHits";
m_layerField="tower";
m_sectorField="sector";

m_localDetElement="";
m_localDetElement="";
u_localDetFields={};

// app->SetDefaultParameter("HCAL:tag", m_input_tag);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class CalorimeterHit_factory_HcalEndcapNRecHits : public JFactoryT<edm4eic::Calo
// digitization settings, must be consistent with digi class
m_capADC=1024;//{this, "capacityADC", 8096};
m_dyRangeADC=3.6 * dd4hep::MeV;//{this, "dynamicRangeADC", 100. * dd4hep::MeV};
m_pedMeanADC=400;//{this, "pedestalMean", 400};
m_pedSigmaADC=3.2;//{this, "pedestalSigma", 3.2};
m_pedMeanADC=20;//{this, "pedestalMean", 400};
m_pedSigmaADC=0.3;//{this, "pedestalSigma", 3.2};
m_resolutionTDC=10 * dd4hep::picosecond;//{this, "resolutionTDC", 10 * ps};

// zero suppression values
m_thresholdFactor=4.0;//{this, "thresholdFactor", 0.0};
m_thresholdValue=0.0;//{this, "thresholdValue", 0.0};
m_thresholdValue=1.0;//{this, "thresholdValue", 0.0};

// energy correction with sampling fraction
m_sampFrac=0.998;//{this, "samplingFraction", 1.0};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CalorimeterHit_factory_HcalEndcapPInsertRecHits : public JFactoryT<edm4eic
m_thresholdValue=0.0;//{this, "thresholdValue", 0.0};

// energy correction with sampling fraction
m_sampFrac=1.0;//{this, "samplingFraction", 1.0};
m_sampFrac=0.998;//{this, "samplingFraction", 1.0};

// geometry service to get ids, ignored if no names provided
m_geoSvcName="geoServiceName";
Expand Down
Loading

0 comments on commit f296eba

Please sign in to comment.