Skip to content

TPC: Improve allowed number of bins and custom binning options#12659

Merged
martenole merged 2 commits intoAliceO2Group:devfrom
wiechula:SACs
Feb 6, 2024
Merged

TPC: Improve allowed number of bins and custom binning options#12659
martenole merged 2 commits intoAliceO2Group:devfrom
wiechula:SACs

Conversation

@wiechula
Copy link
Collaborator

@wiechula wiechula commented Feb 5, 2024

No description provided.

* Bin index was unsingend short limiting number of bins
* Binning vector can now be
  - empty: use default uniform binning
  - single number: use number as number of bins for uniform binning
  - exact bin limits
if (binning.size() == 0) {
LOGP(info, "Empty binning provided, will use default uniform y/x binning with {} bins", mNY2XBins);
return;
} else if (binning.size() == 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Fine with me, although in principle for uniform binning one can also call setNY2XBins before doing the initialization. But I see that this way will make it simpler to use the script with different binning settings.

/// \param iz Bin index in Z/X
/// \return global bin number
unsigned short getGlbVoxBin(int ix, int ip, int iz) const;
size_t getGlbVoxBin(int ix, int ip, int iz) const;
Copy link
Contributor

Choose a reason for hiding this comment

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

unsigned int should have been sufficient, but I doubt that it has an impact to stay with size_t

@wiechula
Copy link
Collaborator Author

wiechula commented Feb 6, 2024

Can this be merged?

@martenole martenole merged commit 7693d74 into AliceO2Group:dev Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants