diff --git a/benchmarks/clustering/barrel_clusters.sh b/benchmarks/clustering/barrel_clusters.sh index 5e19e09eeb565f3a82c643e34ed9cf32f7adbed9..4223d3b6ee9078d6c232b04983cc39e5e74de670 100644 --- a/benchmarks/clustering/barrel_clusters.sh +++ b/benchmarks/clustering/barrel_clusters.sh @@ -17,6 +17,10 @@ if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then export JUGGLER_N_EVENTS=100 fi +if [[ ! -n "${CB_EMCAL_SAMP_FRAC}" ]] ; then + export CB_EMCAL_SAMP_FRAC=0.014 +fi + export JUGGLER_FILE_NAME_TAG="barrel_clusters" export JUGGLER_GEN_FILE="${JUGGLER_FILE_NAME_TAG}.hepmc" diff --git a/benchmarks/clustering/options/calorimeter_clustering.py b/benchmarks/clustering/options/calorimeter_clustering.py index a45e642a7cc4e694a14dce0cc6cf7aba21a27f3f..f2ac4f2599bbf5fc57246da75bd47ce0878bb151 100644 --- a/benchmarks/clustering/options/calorimeter_clustering.py +++ b/benchmarks/clustering/options/calorimeter_clustering.py @@ -12,6 +12,11 @@ if "JUGGLER_DETECTOR" in os.environ : if "JUGGLER_DETECTOR_PATH" in os.environ : detector_name = str(os.environ["JUGGLER_DETECTOR_PATH"]) + "/" + detector_name +# get sampling fraction from system environment variable, 1.0 by default +sf = 1.0 +if "CB_EMCAL_SAMP_FRAC" in os.environ : + sf = str(os.environ["CB_EMCAL_SAMP_FRAC"]) + # todo add checks input_sim_file = str(os.environ["JUGGLER_SIM_FILE"]) output_rec_file = str(os.environ["JUGGLER_REC_FILE"]) @@ -70,6 +75,7 @@ ec_barrel_cluster = IslandCluster("ec_barrel_cluster", minClusterCenterEdep=1*units.MeV, groupRange=2.0, OutputLevel=DEBUG) + crystal_ec_cluster = IslandCluster("crystal_ec_cluster", inputHitCollection="RecoEcalHits", outputClusterCollection="EcalClusters", @@ -82,8 +88,17 @@ simple_cluster = SimpleClustering("simple_cluster", outputClusters="SimpleClusters", OutputLevel=DEBUG) +ec_barrel_clusterreco = RecoCoG("ec_barrel_clusterreco", + clusterCollection="EcalBarrelClusters", + logWeightBase=6.2, + samplingFraction=sf) -clusterreco = RecoCoG("cluster_reco", clusterCollection="EcalClusters", logWeightBase=4.2, moduleDimZName="CrystalBox_z_length",OutputLevel=DEBUG) +clusterreco = RecoCoG("cluster_reco", + clusterCollection="EcalClusters", + logWeightBase=4.2, + moduleDimZName="CrystalBox_z_length", + samplingFraction=sf, + OutputLevel=DEBUG) out = PodioOutput("out", filename=output_rec_file) @@ -93,7 +108,7 @@ ApplicationMgr( TopAlg = [podioinput, copier, calcopier, ecdigi, emcaldigi, crystal_ec_reco, ecal_reco, - ec_barrel_cluster, crystal_ec_cluster, clusterreco, + ec_barrel_cluster, crystal_ec_cluster, ec_barrel_clusterreco, clusterreco, simple_cluster, out], EvtSel = 'NONE', diff --git a/benchmarks/ecal/options/emcal_barrel_reco.py b/benchmarks/ecal/options/emcal_barrel_reco.py index 63125734b21c886c50d7ffd64a0e0e2cac1e5b0b..a5354e3d6b63bff39e2030b6425801d94860b9a0 100644 --- a/benchmarks/ecal/options/emcal_barrel_reco.py +++ b/benchmarks/ecal/options/emcal_barrel_reco.py @@ -33,6 +33,11 @@ n_events = 100 if "JUGGLER_N_EVENTS" in os.environ : n_events = str(os.environ["JUGGLER_N_EVENTS"]) +# get sampling fraction from system environment variable, 1.0 by default +sf = 1.0 +if "CB_EMCAL_SAMP_FRAC" in os.environ : + sf = str(os.environ["CB_EMCAL_SAMP_FRAC"]) + geo_service = GeoSvc("GeoSvc", detectors=["{}.xml".format(detector_name)]) podioevent = EICDataSvc("EventDataSvc", inputs=[input_sim_file], OutputLevel=DEBUG) @@ -99,7 +104,8 @@ embarrelcluster = IslandCluster("ecal_barrel_cluster", # Reconstruct the cluster with Center of Gravity method embarrelclusterreco = RecoCoG("ecal_barrel_clusterreco", clusterCollection="EcalBarrelClusters", - logWeightBase=6.2) + logWeightBase=6.2, + samplingFraction=sf) out = PodioOutput("out", filename=output_rec_file) diff --git a/benchmarks/ecal/run_emcal_barrel_electrons.sh b/benchmarks/ecal/run_emcal_barrel_electrons.sh index 6450e6428d18f4c49baf4f6f86b41818fdce2d83..95b7e270f522fdd9e248312481a7dbb3acb54ade 100755 --- a/benchmarks/ecal/run_emcal_barrel_electrons.sh +++ b/benchmarks/ecal/run_emcal_barrel_electrons.sh @@ -25,6 +25,10 @@ if [[ ! -n "${E_end}" ]] ; then export E_end=5.0 fi +if [[ ! -n "${CB_EMCAL_SAMP_FRAC}" ]] ; then + export CB_EMCAL_SAMP_FRAC=0.014 +fi + export JUGGLER_FILE_NAME_TAG="emcal_barrel_uniform_electrons" export JUGGLER_GEN_FILE="${JUGGLER_FILE_NAME_TAG}.hepmc" diff --git a/benchmarks/ecal/run_emcal_barrel_pions.sh b/benchmarks/ecal/run_emcal_barrel_pions.sh index 5115a63d9cd097b7de6819db6453ac3f97aea8b8..05d3db92f89cdc2c8192132a9592c903ec6ad6c8 100755 --- a/benchmarks/ecal/run_emcal_barrel_pions.sh +++ b/benchmarks/ecal/run_emcal_barrel_pions.sh @@ -25,6 +25,10 @@ if [[ ! -n "${E_end}" ]] ; then export E_end=5.0 fi +if [[ ! -n "${CB_EMCAL_SAMP_FRAC}" ]] ; then + export CB_EMCAL_SAMP_FRAC=0.01 +fi + export JUGGLER_FILE_NAME_TAG="emcal_barrel_uniform_pions" export JUGGLER_GEN_FILE="${JUGGLER_FILE_NAME_TAG}.hepmc"