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

Centrality classes #164

Merged
merged 2 commits into from
Dec 7, 2023
Merged

Centrality classes #164

merged 2 commits into from
Dec 7, 2023

Conversation

Hendrik1704
Copy link
Collaborator

This PR implements a CentralityClasses class, where the input is a list or array of multiplicity from events in a certain phase space. Then it generates centrality bins and there is a function to print these to a file.
If you then have a certain dNchdeta and want to know the class, then there is a function that returns the index of the corresponding class as an int.

@Hendrik1704 Hendrik1704 added the enhancement New feature or request label Dec 7, 2023
@Hendrik1704 Hendrik1704 added this to the SPARKX 1.1 milestone Dec 7, 2023
@Hendrik1704 Hendrik1704 self-assigned this Dec 7, 2023
Copy link
Member

@NGoetz NGoetz left a comment

Choose a reason for hiding this comment

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

I have just two little questions before we can merge the PR.

for i in range(1, len(self.centrality_bins_)):
MaxRecord = int(number_events * self.centrality_bins_[i] / 100.0)

self.dNchdetaMax_.append(global_event_record[MinRecord])
Copy link
Member

Choose a reason for hiding this comment

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

Why can this not happen in the loop above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Historic reasons...

Copy link
Member

Choose a reason for hiding this comment

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

Okay it should not affect the performance too much so we can leave it.

events_multiplicity_ : list or numpy.ndarray
Stores the input multiplicity values for each event.
centrality_bins_ : list or numpy.ndarray
Stores the input boundaries of centrality classes.
Copy link
Member

Choose a reason for hiding this comment

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

Why is it called "deta"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is from the usual cuts which are required to generate centrality classes. Its mostly charged particles and they are in a certain pseudorapidity range.

Copy link
Member

@NGoetz NGoetz left a comment

Choose a reason for hiding this comment

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

Thank you for the clearifications!

@NGoetz NGoetz merged commit 2fa1f2e into sparkx_devel Dec 7, 2023
1 check passed
@NGoetz NGoetz deleted the roch/centrality branch December 7, 2023 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants