Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TrackClusterMergeSplitter to output track-cluster associations (PFA0) #1699

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
68672a9
Add hooks for track-cluster match outputs
ruse-traveler Jan 9, 2025
90a9ccc
Update algorithm to operate on clusters
ruse-traveler Jan 9, 2025
335d224
Begin filling in cluster reconstruction calculation
ruse-traveler Jan 9, 2025
68fa03d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 9, 2025
f8605e8
Add position calculation
ruse-traveler Jan 10, 2025
de78ffb
Fix typos in input collection names
ruse-traveler Jan 10, 2025
1d04aa8
Merge branch 'output-splitmerge-track-associations' of github.com:eic…
ruse-traveler Jan 10, 2025
30b92d3
Add missing edm4eic version header
ruse-traveler Jan 15, 2025
021e11b
Be safer with creating new clusters
ruse-traveler Jan 15, 2025
0307731
Rework weight calculation to accomodate cluster re-reconstruction
ruse-traveler Jan 15, 2025
f8d2050
Fill track-cluster match output
ruse-traveler Jan 15, 2025
3dab6d8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 15, 2025
bf31964
Add missed edm4eic version header
ruse-traveler Jan 16, 2025
178ecb8
Merge branch 'output-splitmerge-track-associations' of github.com:eic…
ruse-traveler Jan 16, 2025
b4b0aca
Add shape calculation
ruse-traveler Feb 3, 2025
303f3f2
Wire in associations
ruse-traveler Feb 4, 2025
a2ff2f1
Copy associations of unused clusters into output
ruse-traveler Feb 4, 2025
f7476b4
Fill in mergerd cluster associations
ruse-traveler Feb 4, 2025
14deb24
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 4, 2025
b5a364c
Merge branch 'main' into output-splitmerge-track-associations
ruse-traveler Feb 11, 2025
8141330
Fix HcalEndcapNClusterAssociations typo
ruse-traveler Feb 11, 2025
1c17703
Merge branch 'output-splitmerge-track-associations' of github.com:eic…
ruse-traveler Feb 11, 2025
0c75eb9
Template ObjectID comparator
ruse-traveler Feb 11, 2025
bd55165
Rewrite splitting weight calculation to use maps
ruse-traveler Feb 22, 2025
32af87f
Merge branch 'main' into output-splitmerge-track-associations
ruse-traveler Feb 22, 2025
cc282d2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 22, 2025
143df2a
Merge main
ruse-traveler Mar 10, 2025
8288600
Remove shape calculation from merge/splitter
ruse-traveler Mar 10, 2025
30c9ab2
Merge branch 'output-splitmerge-track-associations' of github.com:eic…
ruse-traveler Mar 10, 2025
9d33912
Make split/merge shape parameters consistent with RecoCoG
ruse-traveler Mar 10, 2025
a8537b1
IWYU
veprbl Mar 11, 2025
004b053
Merge branch 'main' into output-splitmerge-track-associations
ruse-traveler Mar 13, 2025
87c0458
Disable saving split/merge track-cluster matches to output
ruse-traveler Mar 13, 2025
f79708b
Merge branch 'output-splitmerge-track-associations' of github.com:eic…
ruse-traveler Mar 13, 2025
27711f5
Merge branch 'main' into output-splitmerge-track-associations
ruse-traveler Mar 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
387 changes: 283 additions & 104 deletions src/algorithms/calorimetry/TrackClusterMergeSplitter.cc

Large diffs are not rendered by default.

87 changes: 64 additions & 23 deletions src/algorithms/calorimetry/TrackClusterMergeSplitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,24 @@

#include <DD4hep/Detector.h>
#include <algorithms/algorithm.h>
#include <edm4eic/ProtoClusterCollection.h>
#include <edm4eic/CalorimeterHit.h>
#include <edm4eic/ClusterCollection.h>
#include <edm4eic/EDM4eicVersion.h>
#include <edm4eic/MCRecoClusterParticleAssociationCollection.h>
#if EDM4EIC_VERSION_MAJOR >= 8
#include <edm4eic/TrackClusterMatchCollection.h>
#endif
#include <edm4eic/Track.h>
#include <edm4eic/TrackPoint.h>
#include <edm4eic/TrackSegmentCollection.h>
#include <edm4hep/Vector3f.h>
#include <podio/ObjectID.h>
#if EDM4EIC_VERSION_MAJOR >= 7
#include <edm4eic/MCRecoCalorimeterHitAssociationCollection.h>
#else
#include <edm4hep/SimCalorimeterHitCollection.h>
#endif
#include <algorithm>
#include <map>
#include <optional>
#include <set>
#include <string>
#include <string_view>
Expand All @@ -26,14 +37,14 @@
namespace eicrecon {

// --------------------------------------------------------------------------
//! Comparator struct for protoclusters
//! Comparator struct for object IDs
// --------------------------------------------------------------------------
/*! Organizes protoclusters by their ObjectID's in decreasing collection
/*! Organizes objects by their ObjectID's in decreasing collection
* ID first, and second by decreasing index second.
*/
struct CompareProto {
template <typename T> struct CompareObjectID {

bool operator() (const edm4eic::ProtoCluster& lhs, const edm4eic::ProtoCluster& rhs) const {
bool operator() (const T& lhs, const T& rhs) const {
if (lhs.getObjectID().collectionID == rhs.getObjectID().collectionID) {
return (lhs.getObjectID().index < rhs.getObjectID().index);
} else {
Expand All @@ -43,16 +54,24 @@ namespace eicrecon {

}; // end CompareObjectID

// specialization for clusters, hits
using CompareClust = CompareObjectID<edm4eic::Cluster>;
using CompareHit = CompareObjectID<edm4eic::CalorimeterHit>;



// --------------------------------------------------------------------------
//! Convenience types
// --------------------------------------------------------------------------
using VecTrk = std::vector<edm4eic::Track>;
using VecProj = std::vector<edm4eic::TrackPoint>;
using VecClust = std::vector<edm4eic::ProtoCluster>;
using SetClust = std::set<edm4eic::ProtoCluster, CompareProto>;
using MapToVecProj = std::map<edm4eic::ProtoCluster, VecProj, CompareProto>;
using MapToVecClust = std::map<edm4eic::ProtoCluster, VecClust, CompareProto>;
using VecClust = std::vector<edm4eic::Cluster>;
using SetClust = std::set<edm4eic::Cluster, CompareClust>;
using MapToVecTrk = std::map<edm4eic::Cluster, VecTrk, CompareClust>;
using MapToVecProj = std::map<edm4eic::Cluster, VecProj, CompareClust>;
using MapToVecClust = std::map<edm4eic::Cluster, VecClust, CompareClust>;
using MapToWeight = std::map<edm4eic::CalorimeterHit, double, CompareHit>;
using VecWeights = std::vector<MapToWeight>;



Expand All @@ -61,11 +80,21 @@ namespace eicrecon {
// --------------------------------------------------------------------------
using TrackClusterMergeSplitterAlgorithm = algorithms::Algorithm<
algorithms::Input<
edm4eic::ProtoClusterCollection,
edm4eic::TrackSegmentCollection
edm4eic::ClusterCollection,
edm4eic::TrackSegmentCollection,
std::optional<edm4eic::MCRecoClusterParticleAssociationCollection>,
#if EDM4EIC_VERSION_MAJOR >= 7
std::optional<edm4eic::MCRecoCalorimeterHitAssociationCollection>
#else
std::optional<edm4hep::SimCalorimeterHitCollection>
#endif
>,
algorithms::Output<
edm4eic::ProtoClusterCollection
edm4eic::ClusterCollection,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we were discussing that this should not re-implement shape calculation, and that was factorized out of RecoCoG, but a copy of RecoCoG still becomes part of this algorithm? And we don't actually output associations without shapes anymore, which, I believe, was the original point of this PR. This makes me think that we should have just made a factory to propagate associations from protoclusters to clusters instead of doing this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the primary point of this PR was to output specifically track-cluster matches. To do this, this requires updating the algorithm to operate on clusters rather than protoclusters since -- quite reasonably in my opinion! -- we don't have track-protocluster matches. I don't think an association propagator would help us in this context (esp. since it would necessitate a data-model change).

The partial duplication of RecoCoG then followed from that switch to clusters. My intent wasn't so much to completely duplicate the algorithm but to update various quantities in a way that's consistent with what RecoCoG does, including the handling of particle-cluster associations. My thinking is that the merging functionality here is useful beyond PF reconstruction, and so I would prefer that the produced clusters here are consistent with those that RecoCoG produces.

That being said, in the interest of keeping PF development moving, I would be willing to excise the RecoCoG bits and go with a "bare-bones" energy/position reconstruction for the time being. That should be good enough for implementing the rest of the baseline. But we should revisit this topic, though, since this certainly won't be the last reclustering algorithm we write!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the primary point of this PR was to output specifically track-cluster matches. To do this, this requires updating the algorithm to operate on clusters rather than protoclusters since -- quite reasonably in my opinion! -- we don't have track-protocluster matches. I don't think an association propagator would help us in this context (esp. since it would necessitate a data-model change).

Right, so my suggestion was to add track-protocluster association type. Then a factory (that is separate from RecoCoG) would convert track-protocluster associations to track-cluster associations. I now realize this would require factory to do matching between protoclusters and clusters, which is possible but is not as trivial as I'd like it to be.

The partial duplication of RecoCoG then followed from that switch to clusters. My intent wasn't so much to completely duplicate the algorithm but to update various quantities in a way that's consistent with what RecoCoG does, including the handling of particle-cluster associations. My thinking is that the merging functionality here is useful beyond PF reconstruction, and so I would prefer that the produced clusters here are consistent with those that RecoCoG produces.

Right, but that's not making it better, if we do things "like RecoCoG, but sometimes not". And, if we want to make this the default for non-PF clustering path, then it makes even more sense to use RecoCoG.

That being said, in the interest of keeping PF development moving, I would be willing to excise the RecoCoG bits and go with a "bare-bones" energy/position reconstruction for the time being. That should be good enough for implementing the rest of the baseline. But we should revisit this topic, though, since this certainly won't be the last reclustering algorithm we write!

No need to excise parts of RecoCoG. If we go the way proposed in the PR, it better be fit for your purpose. My counter-argument against expediency is that if TrackClusterMergeSplitter development is not aligned with rest of the facilities in EICrecon, you can't expect everyone else to align with it, which is fine if your plan to do all of development yourself.

Copy link
Contributor Author

@ruse-traveler ruse-traveler Mar 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading my response back, I feel that not only was my tone unprofessional and dismissive, I did not clearly articulate (or articulate at all) some of my questions and concerns, and for that I apologize.

The approach took here was informed by the intent to eventually move this algorithm downstream of a centralized track-cluster matching algorithm. As such, this algorithm reclusters already constructed clusters. This PR was my first thought as to how to do such a reclustering and I sincerely believed it was aligned with our framework. However, it clearly isn't and certainly isn't the best approach.

The points you raised make sense, and it didn't occur to me to go back through the protoclusters. I'm not completely clear on how this might look, though, so help me understand. My first thought is that such an algorithm flow might look something like this:

<start>-->[protoclusters]--(Reco CoG)-->[clusters]----(track matching)-->[cluster matches]--
--(convert clusters)-->[protoclusters]----(copy matches)-->[protocluster matches]--
--(merge/split)-->[protoclusters + matches]-->(Reco CoG)-->[clusters]--
--(copy matches)-->[updated matches]--><end>

Is this in the right direction?

Copy link
Member

@veprbl veprbl Mar 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading my response back, I feel that not only was my tone unprofessional and dismissive, I did not clearly articulate (or articulate at all) some of my questions and concerns, and for that I apologize.

No, it was all good points and I was able to finally understand some of these things better. I did have to push back on merge splitter being able to do its thing in isolation.

The approach took here was informed by the intent to eventually move this algorithm downstream of a centralized track-cluster matching algorithm. As such, this algorithm reclusters already constructed clusters. This PR was my first thought as to how to do such a reclustering and I sincerely believed it was aligned with our framework. However, it clearly isn't and certainly isn't the best approach.

I'm starting to think that edm4eic::ProtoCluster is not such a great type. edm4eic::Cluster is already a superset of it, and we could have used just that one type.

The points you raised make sense, and it didn't occur to me to go back through the protoclusters. I'm not completely clear on how this might look, though, so help me understand. My first thought is that such an algorithm flow might look something like this:

<start>-->[protoclusters]--(Reco CoG)-->[clusters]----(track matching)-->[cluster matches]--
--(convert clusters)-->[protoclusters]----(copy matches)-->[protocluster matches]--
--(merge/split)-->[protoclusters + matches]-->(Reco CoG)-->[clusters]--
--(copy matches)-->[updated matches]--><end>

Is this in the right direction?

To be honest, I can not tell with one-dimensional graph. This is what I think could work and provide maximal reuse of existing facilities:

flowchart TD
    RecHits--> CalorimeterIslandCluster:::algo --> IslandProtoClusters
    IslandProtoClusters --> CalorimeterClusterRecoCoG:::algo --> ClustersWithoutShapes
    --> CalorimeterClusterShape:::algo
    CalorimeterClusterRecoCoG:::algo --> ClusterAssociationsWithoutShapes
    --> CalorimeterClusterShape:::algo
    --> Clusters
    CalorimeterClusterShape:::algo --> ClusterAssociations
    Clusters --> TrackClusterMergeSplitter:::algo
    ClusterAssociations --> TrackClusterMergeSplitter:::algo
    CalorimeterTrackProjections --> TrackClusterMergeSplitter:::algo
    --> SplitMergeProtoClusters --> CalorimeterClusterRecoCoG':::algo
    TrackClusterMergeSplitter:::algo -->|remove?| SplitMergeProtoClustersAssociations
    TrackClusterMergeSplitter:::algo --> TrackSplitMergeProtoClusterMatches

    CalorimeterClusterRecoCoG':::algo --> SplitMergeClustersWithoutShapes
    --> CalorimeterClusterShape':::algo
    CalorimeterClusterRecoCoG':::algo --> SplitMergeClusterAssociationsWithoutShapes
    --> CalorimeterClusterShape':::algo
    --> SplitMergeClusters
    CalorimeterClusterShape':::algo --> SplitMergeClusterAssociations

    TrackSplitMergeProtoClusterMatches --> CalorimeterProtoClusterMatchPromotion:::algo --> SplitMergeClusterTrackMatches
    SplitMergeClustersWithoutShapes --> CalorimeterProtoClusterMatchPromotion

    SplitMergeClusters --> ...
    SplitMergeClusterAssociations --> ...
    SplitMergeClusterTrackMatches --> ...

    classDef algo fill:#f96
Loading

We would need a new "CalorimeterProtoClusterMatchPromotion" algorithm operating on a new type for "TrackSplitMergeProtoClusterMatches".

(you can click quote my message to see source code of mermaid diagram and modify, if you want to adjust it)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see! Thanks! The diagram is extremely helpful!!

I did have to push back on merge splitter being able to do its thing in isolation.

Completely fair! I was falling into bad habits of writing big, monolithic pieces of code while working on this PR. The above topology looks a lot more workable!

I'm starting to think that edm4eic::ProtoCluster is not such a great type. edm4eic::Cluster is already a superset of it, and we could have used just that one type.

If we stick with protoclusters for the time being, would we also need an algorithm to "demote" clusters into protoclusters that could be fed into the merge/splitter?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we stick with protoclusters for the time being, would we also need an algorithm to "demote" clusters into protoclusters that could be fed into the merge/splitter?

The diagram above has TrackClusterMergeSplitter consuming a collection of edm4eic::Clusters (don't you need cluster positions to do the matching?) and outputting edm4eic::ProtoClusters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... so demotion happens inside TrackClusterMergeSplitter, at least to what's drawn.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhhh I see! Makes sense! That would make it pretty straightforward to keep track of the protocluster energies and positions without having to duplicate getEnergy() and getPosition() as functions.

#if EDM4EIC_VERSION_MAJOR >= 8
edm4eic::TrackClusterMatchCollection,
#endif
std::optional<edm4eic::MCRecoClusterParticleAssociationCollection>
>
>;

Expand All @@ -74,8 +103,8 @@ namespace eicrecon {
// --------------------------------------------------------------------------
//! Track-Based Cluster Merger/Splitter
// --------------------------------------------------------------------------
/*! An algorithm which takes a collection of proto-clusters, matches
* track projections, and then decides to merge or split those proto-
/*! An algorithm which takes a collection of clusters, matches
* track projections, and then decides to merge or split those
* clusters based on average E/p from simulations.
*
* Heavily inspired by Eur. Phys. J. C (2017) 77:466
Expand All @@ -91,8 +120,16 @@ namespace eicrecon {
TrackClusterMergeSplitter(std::string_view name) :
TrackClusterMergeSplitterAlgorithm {
name,
{"InputProtoClusterCollection", "InputTrackProjections"},
{"OutputProtoClusterCollection"},
#if EDM4EIC_VERSION_MAJOR >= 7
{"InputClusterCollection", "InputTrackProjections", "InputMCClusterAssociations", "InputMCHitAssociations"},
#else
{"InputClusterCollection", "InputTrackProjections", "InputMCClusterAssociations", "InputMCHits"},
#endif
#if EDM4EIC_VERSION_MAJOR >= 8
{"OutputProtoClusterCollection", "OutputTrackClusterMatches", "OutputMCClusterAssociations"},
#else
{"OutputProtoClusterCollection", "OutputMCClusterAssociations"},
#endif
"Merges or splits clusters based on tracks projected to them."
} {}

Expand All @@ -103,11 +140,15 @@ namespace eicrecon {
private:

// private methods
void get_projections(const edm4eic::TrackSegmentCollection* projections, VecProj& relevant_projects) const;
void match_clusters_to_tracks(const edm4eic::ProtoClusterCollection* clusters, const VecProj& projections, MapToVecProj& matches) const;
void merge_and_split_clusters(const VecClust& to_merge, const VecProj& to_split, edm4eic::ProtoClusterCollection* out_protoclusters) const;
float get_cluster_energy(const edm4eic::ProtoCluster& clust) const;
edm4hep::Vector3f get_cluster_position(const edm4eic::ProtoCluster& clust) const;
void get_projections(const edm4eic::TrackSegmentCollection* projections, VecProj& relevant_projects, VecTrk& relevant_trks) const;
void match_clusters_to_tracks(const edm4eic::ClusterCollection* clusters, const VecProj& projections, const VecTrk& tracks, MapToVecProj& matched_projects, MapToVecTrk& matched_tracks) const;
void merge_and_split_clusters(const VecClust& to_merge, const VecProj& to_split, std::vector<edm4eic::MutableCluster>& new_clusters) const;
void make_cluster(const VecClust& old_clusts, edm4eic::MutableCluster& new_clust, std::optional<MapToWeight> split_weights = std::nullopt) const;
#if EDM4EIC_VERSION_MAJOR >= 7
void collect_associations(const edm4eic::MutableCluster& new_clust, const VecClust& old_clusts, const edm4eic::MCRecoClusterParticleAssociationCollection* old_clust_assocs, const edm4eic::MCRecoCalorimeterHitAssociationCollection* old_hit_assocs, edm4eic::MCRecoClusterParticleAssociationCollection* new_clust_assocs) const;
#else
void collect_associations(const edm4eic::MutableCluster& new_clust, const VecClust& old_clusts, const edm4eic::MCRecoClusterParticleAssociationCollection* old_clust_assocs, const edm4hep::SimCalorimeterHitCollection* old_sim_hits, edm4eic::MCRecoClusterParticleAssociationCollection* new_clust_assocs) const;
#endif

// calorimeter id
int m_idCalo {0};
Expand Down
41 changes: 18 additions & 23 deletions src/detectors/BHCAL/BHCAL.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,20 @@ extern "C" {

app->Add(
new JOmniFactoryGeneratorT<TrackClusterMergeSplitter_factory>(
"HcalBarrelSplitMergeProtoClusters",
{"HcalBarrelIslandProtoClusters",
"CalorimeterTrackProjections"},
{"HcalBarrelSplitMergeProtoClusters"},
"HcalBarrelSplitMergeClustersWithoutShapes",
{"HcalBarrelClusters",
"CalorimeterTrackProjections",
"HcalBarrelClusterAssociations",
#if EDM4EIC_VERSION_MAJOR >= 7
"HcalBarrelRawHitAssociations"},
#else
"HcalBarrelHits"},
#endif
{"HcalBarrelSplitMergeClustersWithoutShapes",
#if EDM4EIC_VERSION_MAJOR >= 8
"HcalBarrelTrackSplitMergeClusterMatches",
#endif
"HcalBarrelSplitMergeClusterAssociationsWithoutShapes"},
{
.idCalo = "HcalBarrel_ID",
.minSigCut = -2.0,
Expand All @@ -211,34 +221,19 @@ extern "C" {
)
);

app->Add(
new JOmniFactoryGeneratorT<CalorimeterClusterRecoCoG_factory>(
"HcalBarrelSplitMergeClustersWithoutShapes",
{"HcalBarrelSplitMergeProtoClusters", // edm4eic::ProtoClusterCollection
"HcalBarrelHits"}, // edm4hep::SimCalorimeterHitCollection
{"HcalBarrelSplitMergeClustersWithoutShapes", // edm4eic::Cluster
"HcalBarrelSplitMergeClusterAssociationsWithoutShapes"}, // edm4eic::MCRecoClusterParticleAssociation
{
.energyWeight = "log",
.sampFrac = 1.0,
.logWeightBase = 6.2,
.enableEtaBounds = false
},
app // TODO: Remove me once fixed
)
);

app->Add(
new JOmniFactoryGeneratorT<CalorimeterClusterShape_factory>(
"HcalBarrelSplitMergeClusters",
{"HcalBarrelSplitMergeClustersWithoutShapes",
"HcalBarrelSplitMergeClusterAssociationsWithoutShapes"},
{"HcalBarrelSplitMergeClusters",
"HcalBarrelSplitMergeClusterAssociations"},
{},
{
.energyWeight = "log",
.logWeightBase = 6.2
},
app
)
);

}
}
51 changes: 22 additions & 29 deletions src/detectors/EEMC/EEMC.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,25 +185,6 @@ extern "C" {
)
);

app->Add(
new JOmniFactoryGeneratorT<TrackClusterMergeSplitter_factory>(
"EcalEndcapNSplitMergeProtoClusters",
{"EcalEndcapNIslandProtoClusters",
"CalorimeterTrackProjections"},
{"EcalEndcapNSplitMergeProtoClusters"},
{
.idCalo = "EcalEndcapN_ID",
.minSigCut = -1.0,
.avgEP = 1.0,
.sigEP = 0.10,
.drAdd = 0.08,
.sampFrac = 1.0,
.transverseEnergyProfileScale = 1.0
},
app // TODO: remove me once fixed
)
);

#if EDM4EIC_VERSION_MAJOR >= 8
app->Add(new JOmniFactoryGeneratorT<CalorimeterParticleIDPreML_factory>(
"EcalEndcapNParticleIDPreML",
Expand Down Expand Up @@ -248,19 +229,31 @@ extern "C" {
#endif

app->Add(
new JOmniFactoryGeneratorT<CalorimeterClusterRecoCoG_factory>(
"EcalEndcapNSplitMergeClustersWithoutShapes",
{"EcalEndcapNSplitMergeProtoClusters", // edm4eic::ProtoClusterCollection
"EcalEndcapNHits"}, // edm4hep::SimCalorimeterHitCollection
{"EcalEndcapNSplitMergeClustersWithoutShapes", // edm4eic::Cluster
"EcalEndcapNSplitMergeClusterAssociationsWithoutShapes"}, // edm4eic::MCRecoClusterParticleAssociation
new JOmniFactoryGeneratorT<TrackClusterMergeSplitter_factory>(
"EcalEndcapNSplitMergeClustersWithoutShapes",
{"EcalEndcapNClustersWithoutPID",
"CalorimeterTrackProjections",
"EcalEndcapNClusterAssociations",
#if EDM4EIC_VERSION_MAJOR >= 7
"EcalEndcapNRawHitAssociations"},
#else
"EcalEndcapNHits"},
#endif
{"EcalEndcapNSplitMergeClustersWithoutShapes",
#if EDM4EIC_VERSION_MAJOR >= 8
"EcalEndcapNTrackSplitMergeClusterMatches",
#endif
"EcalEndcapNSplitMergeClusterAssociationsWithoutShapes"},
{
.energyWeight = "log",
.idCalo = "EcalEndcapN_ID",
.minSigCut = -1.0,
.avgEP = 1.0,
.sigEP = 0.10,
.drAdd = 0.08,
.sampFrac = 1.0,
.logWeightBase = 3.6,
.enableEtaBounds = false
.transverseEnergyProfileScale = 1.0
},
app // TODO: Remove me once fixed
app // TODO: remove me once fixed
)
);

Expand Down
34 changes: 14 additions & 20 deletions src/detectors/EHCAL/EHCAL.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,20 @@ extern "C" {
);
app->Add(
new JOmniFactoryGeneratorT<TrackClusterMergeSplitter_factory>(
"HcalEndcapNSplitMergeProtoClusters",
{"HcalEndcapNIslandProtoClusters",
"CalorimeterTrackProjections"},
{"HcalEndcapNSplitMergeProtoClusters"},
"HcalEndcapNSplitMergeClustersWithoutShapes",
{"HcalEndcapNClusters",
"CalorimeterTrackProjections",
"HcalEndcapNClusterAssociations",
#if EDM4EIC_VERSION_MAJOR >= 7
"HcalEndcapNRawHitAssociations"},
#else
"HcalEndcapNHits"},
#endif
{"HcalEndcapNSplitMergeClustersWithoutShapes",
#if EDM4EIC_VERSION_MAJOR >= 8
"HcalEndcapNTrackSplitMergeClusterMatches",
#endif
"HcalEndcapNSplitMergeClusterAssociationsWithoutShapes"},
{
.idCalo = "HcalEndcapN_ID",
.minSigCut = -2.0,
Expand All @@ -179,22 +189,6 @@ extern "C" {
app // TODO: remove me once fixed
)
);
app->Add(
new JOmniFactoryGeneratorT<CalorimeterClusterRecoCoG_factory>(
"HcalEndcapNSplitMergeClustersWithoutShapes",
{"HcalEndcapNSplitMergeProtoClusters", // edm4eic::ProtoClusterCollection
"HcalEndcapNHits"}, // edm4hep::SimCalorimeterHitCollection
{"HcalEndcapNSplitMergeClustersWithoutShapes", // edm4eic::Cluster
"HcalEndcapNSplitMergeClusterAssociationsWithoutShapes"}, // edm4eic::MCRecoClusterParticleAssociation
{
.energyWeight = "log",
.sampFrac = 1.0,
.logWeightBase = 6.2,
.enableEtaBounds = false
},
app // TODO: Remove me once fixed
)
);
app->Add(
new JOmniFactoryGeneratorT<CalorimeterClusterShape_factory>(
"HcalEndcapNSplitMergeClusters",
Expand Down
35 changes: 14 additions & 21 deletions src/detectors/FEMC/FEMC.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,20 @@ extern "C" {

app->Add(
new JOmniFactoryGeneratorT<TrackClusterMergeSplitter_factory>(
"EcalEndcapPSplitMergeProtoClusters",
{"EcalEndcapPIslandProtoClusters",
"CalorimeterTrackProjections"},
{"EcalEndcapPSplitMergeProtoClusters"},
"EcalEndcapPSplitMergeClustersWithoutShapes",
{"EcalEndcapPClusters",
"CalorimeterTrackProjections",
"EcalEndcapPClusterAssociations",
#if EDM4EIC_VERSION_MAJOR >= 7
"EcalEndcapPRawHitAssociations"},
#else
"EcalEndcapPHits"},
#endif
{"EcalEndcapPSplitMergeClustersWithoutShapes",
#if EDM4EIC_VERSION_MAJOR >= 8
"EcalEndcapPTrackSplitMergeClusterMatches",
#endif
"EcalEndcapPSplitMergeClusterAssociationsWithoutShapes"},
{
.idCalo = "EcalEndcapP_ID",
.minSigCut = -2.0,
Expand All @@ -177,23 +187,6 @@ extern "C" {
)
);

app->Add(
new JOmniFactoryGeneratorT<CalorimeterClusterRecoCoG_factory>(
"EcalEndcapPSplitMergeClustersWithoutShapes",
{"EcalEndcapPSplitMergeProtoClusters", // edm4eic::ProtoClusterCollection
"EcalEndcapPHits"}, // edm4hep::SimCalorimeterHitCollection
{"EcalEndcapPSplitMergeClustersWithoutShapes", // edm4eic::Cluster
"EcalEndcapPSplitMergeClusterAssociationsWithoutShapes"}, // edm4eic::MCRecoClusterParticleAssociation
{
.energyWeight = "log",
.sampFrac = 1.0,
.logWeightBase = 3.6,
.enableEtaBounds = false
},
app // TODO: Remove me once fixed
)
);

app->Add(
new JOmniFactoryGeneratorT<CalorimeterClusterShape_factory>(
"EcalEndcapPSplitMergeClusters",
Expand Down
Loading
Loading