Skip to content

[FV0] pile-up simulation#4500

Merged
sawenzel merged 3 commits intoAliceO2Group:devfrom
arvindkhuntia:fv0-pileup
Oct 6, 2020
Merged

[FV0] pile-up simulation#4500
sawenzel merged 3 commits intoAliceO2Group:devfrom
arvindkhuntia:fv0-pileup

Conversation

@arvindkhuntia
Copy link
Copy Markdown
Collaborator

(1) FV0 simulation with proper pile-up
(2) Tuning of digitisation parameter

mslupeck
mslupeck previously approved these changes Oct 4, 2020
Copy link
Copy Markdown
Collaborator

@mslupeck mslupeck left a comment

Choose a reason for hiding this comment

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

The failed test is unrelated to this PR.

Copy link
Copy Markdown
Collaborator

@shahor02 shahor02 left a comment

Choose a reason for hiding this comment

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

Hi @arvindkhuntia @mslupeck please see a few comments below.

public:
Digitizer()
: mTimeStamp(0), mIntRecord(), mEventId(-1), mSrcId(-1), mMCLabels(), mPmtChargeVsTime(), mNBins(), mPmtResponseGlobal(), mPmtResponseTemp()
: mTimeStamp(0), mIntRecord(), mEventId(-1), mSrcId(-1), mMCLabels(), mCache(), mPmtChargeVsTime(), mNBins(), NTimeBinsPerBC(), mPmtResponseGlobal(), mPmtResponseTemp()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

data members start with mXXX.

private:
static constexpr int BCCacheMin = 0, BCCacheMax = 7, NBC2Cache = 1 + BCCacheMax - BCCacheMin;
void createPulse(float mipFraction, int parID, double hitTime, std::array<o2::InteractionRecord, NBC2Cache> const& cachedIR,
int nCachedIR, const int& detID);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

detId is 4B int, no need to pass 8B reference, then dereference it, pass by value.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

Comment on lines +146 to +155
mPmtResponseTemp = mPmtResponseGlobal;
///Time of flight subtracted from Hit time //TODO have different TOF according to thr ring number
Size_t NBinShift = std::lround((hitTime - FV0DigParam::Instance().globalTimeOfFlight) / FV0DigParam::Instance().waveformBinWidth);

for (int m = 0; m < NBinShift; m++) {
mPmtResponseTemp.push_back(0);
}
/// rotate the vector element to shift all the elements by hit time
std::rotate(mPmtResponseTemp.rbegin(), mPmtResponseTemp.rbegin() + NBinShift, mPmtResponseTemp.rend());
mPmtResponseTemp.resize(FV0DigParam::Instance().waveformNbins);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

with 1st NBinShift filled by 0s, the rest filled by values from mPmtResponseGlobal. If this is what you want, I thing it will be faster to do

mPmtResponseTemp.resize(FV0DigParam::Instance().waveformNbins, 0);
memcpy(&mPmtResponseTemp[NBinShift], &mPmtResponseGlobal[0], sizeof(double)*(FV0DigParam::Instance().waveformNbins-NBinShift));

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, indeed this is what we want. Thank you for the suggestion.

@sawenzel
Copy link
Copy Markdown
Collaborator

sawenzel commented Oct 5, 2020

Did you test this already with the embedding pileup test in prodtest/check_embedding_pileup.sh?

@arvindkhuntia
Copy link
Copy Markdown
Collaborator Author

Did you test this already with the embedding pileup test in prodtest/check_embedding_pileup.sh?

yes, I have checked with the check_embedding_pileup.sh but only with FV0 detector and it showed pileup 1 embedding 1.

sawenzel
sawenzel previously approved these changes Oct 5, 2020
Copy link
Copy Markdown
Collaborator

@sawenzel sawenzel left a comment

Choose a reason for hiding this comment

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

For me it's fine. Maybe you could address @shahor02 comment and then we can go on.

@arvindkhuntia arvindkhuntia dismissed stale reviews from sawenzel and mslupeck via b901683 October 5, 2020 11:40
Copy link
Copy Markdown
Collaborator

@jotwinow jotwinow left a comment

Choose a reason for hiding this comment

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

Please go ahead with the PR

@sawenzel sawenzel merged commit efde4e3 into AliceO2Group:dev Oct 6, 2020
tklemenz pushed a commit to tklemenz/AliceO2 that referenced this pull request Nov 12, 2020
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.

5 participants