Skip to content

Commit

Permalink
Additional setters and getters
Browse files Browse the repository at this point in the history
  • Loading branch information
austinschneider committed Sep 12, 2024
1 parent f9eb0ca commit 56d93a3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions projects/interactions/private/InteractionCollection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ bool InteractionCollection::MatchesPrimary(dataclasses::InteractionRecord const
return primary_type == record.signature.primary_type;
}

siren::dataclasses::ParticleType InteractionCollection::GetPrimaryType() const {
return primary_type;
}

void InteractionCollection::SetPrimaryType(siren::dataclasses::ParticleType primary_type) {
this->primary_type = primary_type;
}

std::map<siren::dataclasses::ParticleType, double> InteractionCollection::TotalCrossSectionByTarget(siren::dataclasses::InteractionRecord const & record) const {
std::map<siren::dataclasses::ParticleType, double> result;
for(siren::dataclasses::ParticleType target : target_types) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ void register_InteractionCollection(pybind11::module_ & m) {
.def("TotalDecayWidth",&InteractionCollection::TotalDecayWidth)
.def("TotalDecayLength",&InteractionCollection::TotalDecayLength)
.def("MatchesPrimary",&InteractionCollection::MatchesPrimary)
.def("GetPrimaryType",&InteractionCollection::GetPrimaryType)
.def("SetPrimaryType",&InteractionCollection::SetPrimaryType)
;
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ class InteractionCollection {
};
double TotalDecayWidth(siren::dataclasses::InteractionRecord const & record) const;
double TotalDecayLength(siren::dataclasses::InteractionRecord const & record) const;
siren::dataclasses::ParticleType GetPrimaryType() const;
void SetPrimaryType(siren::dataclasses::ParticleType primary_type);
virtual bool MatchesPrimary(dataclasses::InteractionRecord const & record) const;
std::map<siren::dataclasses::ParticleType, double> TotalCrossSectionByTarget(siren::dataclasses::InteractionRecord const & record) const;
std::map<siren::dataclasses::ParticleType, double> TotalCrossSectionByTargetAllFinalStates(siren::dataclasses::InteractionRecord const & record) const;
Expand Down

0 comments on commit 56d93a3

Please sign in to comment.