-
Notifications
You must be signed in to change notification settings - Fork 613
[PWGJE,PWGUD] adding upc selections to JE framework #14243
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
Conversation
|
O2 linter results: ❌ 51 errors, |
|
Dear UD experts, I have added a small modification to your isSelected function which allows one to optionally extract a vector with the amplitude values of the FIT detectors in bcs compatible with a UPC event. These can then be used later by analysers to make tighter event selections. However the functionality of the task should be unchanged by this addition |
2f81f28 to
edb13a4
Compare
PWGJE/Core/JetDerivedDataUtilities.h
Outdated
| namespace jetderiveddatautilities | ||
| { | ||
|
|
||
| static constexpr float mPion = 0.139; // TDatabasePDG::Instance()->GetParticle(211)->Mass(); //can be removed when pion mass becomes default for unidentified tracks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will fix it in a seperate PR
| Configurable<float> dcaZMax{"dcaZMax", 0.2, "maximum DCAZ selection for tracks - only applied for reassociation"}; | ||
| Configurable<int> upcBCRangeTimeWindow{"upcBCRangeTimeWindow", 1000, "time range in ns for bunch crossing range checking in upc gap determination"}; | ||
| Configurable<int> upcminNBCs{"upcminNBCs", 7, "minuimum number of bunch crossing to check in upc gap determination"}; | ||
| Configurable<int> upcMinNTracks{"upcMinNBC", 0, "minuimum number of tracks in upc event"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a copy paste error. The Laben should be "upcMinNTracks"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
| if (collision.isCollisionSelected()) { | ||
|
|
||
| products.storedJCollisionsTable(collision.posX(), collision.posY(), collision.posZ(), collision.multFV0A(), collision.multFV0C(), collision.multFT0A(), collision.multFT0C(), collision.centFV0A(), collision.centFV0M(), collision.centFT0A(), collision.centFT0C(), collision.centFT0M(), collision.centFT0CVariant1(), collision.hadronicRate(), collision.trackOccupancyInTimeRange(), collision.alias_raw(), collision.eventSel(), collision.rct_raw(), collision.triggerSel()); | ||
| std::vector<float> amplitudesFV0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vector creation and destruction in for each collision creates unnecessary heap allocation overhead. Consider instead something like:
// Outside loop
std::vector<float> amplitudesFV0;
// ... define others ...
for (auto const& collision : collisions) {
if (collision.isCollisionSelected()) {
amplitudesFV0.clear();
// ... clear others ...
// Copy data
auto amplitudesFV0Span = collision.amplitudesFV0();
amplitudesFV0.assign(amplitudesFV0Span.begin(), amplitudesFV0Span.end()); // More efficient than back_inserter
// ...
}
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem with this is that the task is flirting with the 100 member limit as it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this related to members?
|
@nzardosh Don't waste CPU. |
|
Dear @nzardosh, the modification of the UD part looks ok to me, so I approve, but one question on the usage: Do you put some constraints on the bcrange? I wonder if one can hit a large range, and then the vectors would go large, which may cause some memory issues. |
Dear @rolavick thanks! If I understand correctly this upcCuts.SetNDtcoll(config.upcBCRangeTimeWindow); should set the range? or is there a better way you would recommend i can do it? thanks |
rolavick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please incorporate this MegaLinter error
PWGUD/Core/SGSelector.h:65: Add #include for vector<> [build/include_what_you_use] [4]
thanks
alibuild
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto-approving on behalf of @nzardosh.
No description provided.