-
Notifications
You must be signed in to change notification settings - Fork 613
[DPG] Refactor tpcSkimsTableCreator #13246
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: ❌ 1 errors, |
|
@lubynets Nice work! |
| constexpr static o2::track::PID::ID PidKaon{o2::track::PID::Kaon}; | ||
| constexpr static o2::track::PID::ID PidProton{o2::track::PID::Proton}; | ||
|
|
||
| constexpr static double MassElectorn{o2::track::pid_constants::sMasses[PidElectron]}; |
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.
| constexpr static double MassElectorn{o2::track::pid_constants::sMasses[PidElectron]}; | |
| constexpr static double MassElectron{o2::track::pid_constants::sMasses[PidElectron]}; |
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.
Done
| template <bool doUseCorrecteddEdx = false, typename T, typename C, typename V0Casc> | ||
| void fillSkimmedV0Table(V0Casc const& v0casc, T const& track, C const& collision, float nSigmaTPC, float nSigmaTOF, float dEdxExp, o2::track::PID::ID id, int runnumber, double dwnSmplFactor, float hadronicRate) |
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.
| template <bool doUseCorrecteddEdx = false, typename T, typename C, typename V0Casc> | |
| void fillSkimmedV0Table(V0Casc const& v0casc, T const& track, C const& collision, float nSigmaTPC, float nSigmaTOF, float dEdxExp, o2::track::PID::ID id, int runnumber, double dwnSmplFactor, float hadronicRate) | |
| template <bool DoUseCorrectedDeDx = false, typename T, typename C, typename V0Casc> | |
| void fillSkimmedV0Table(V0Casc const& v0casc, T const& track, C const& collision, float nSigmaTPC, float nSigmaTOF, float dEdxExp, o2::track::PID::ID id, int runnumber, double dwnSmplFactor, float hadronicRate) |
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.
Done
| template <bool IsCorrecteddEdx, bool IsWithdEdx, typename TrksType, typename BCType> | ||
| void runWithTrQAGeneric(Colls const& collisions, TrksType const& myTracks, V0sWithID const& myV0s, CascsWithID const& myCascs, aod::TracksQAVersion const& tracksQA, Preslice<TrksType> const& perCollisionTracksType) |
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.
| template <bool IsCorrecteddEdx, bool IsWithdEdx, typename TrksType, typename BCType> | |
| void runWithTrQAGeneric(Colls const& collisions, TrksType const& myTracks, V0sWithID const& myV0s, CascsWithID const& myCascs, aod::TracksQAVersion const& tracksQA, Preslice<TrksType> const& perCollisionTracksType) | |
| template <bool IsCorrectedDeDx, bool IsWithDeDx, typename TrksType, typename BCType> | |
| void runWithTrQAGeneric(Colls const& collisions, TrksType const& myTracks, V0sWithID const& myV0s, CascsWithID const& myCascs, aod::TracksQAVersion const& tracksQA, Preslice<TrksType> const& perCollisionTracksType) |
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.
Done
| constexpr static double MassPion{o2::track::pid_constants::sMasses[PidPion]}; | ||
| constexpr static double MassKaon{o2::track::pid_constants::sMasses[PidKaon]}; | ||
| constexpr static double MassProton{o2::track::pid_constants::sMasses[PidProton]}; | ||
| constexpr static double MassDeuteron{o2::track::pid_constants::sMasses[PidDeuteron]}; | ||
| constexpr static double MassTriton{o2::track::pid_constants::sMasses[PidTriton]}; |
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.
Why are these needed? The PDG masses are in the common constant header.
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.
Done (used common constant header).
| template <bool doCorrectdEdx, bool isWithdEdx, typename T, typename TQA, typename C> | ||
| void fillSkimmedTPCTOFTableWithTrkQAGeneric(T const& track, TQA const& trackQA, bool existTrkQA, C const& collision, float nSigmaTPC, float nSigmaTOF, float nSigmaITS, float dEdxExp, o2::track::PID::ID id, int runnumber, double dwnSmplFactor, double hadronicRate, int bcGlobalIndex, int bcTimeFrameId, int bcBcInTimeFrame) |
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.
| template <bool doCorrectdEdx, bool isWithdEdx, typename T, typename TQA, typename C> | |
| void fillSkimmedTPCTOFTableWithTrkQAGeneric(T const& track, TQA const& trackQA, bool existTrkQA, C const& collision, float nSigmaTPC, float nSigmaTOF, float nSigmaITS, float dEdxExp, o2::track::PID::ID id, int runnumber, double dwnSmplFactor, double hadronicRate, int bcGlobalIndex, int bcTimeFrameId, int bcBcInTimeFrame) | |
| template <bool DoCorrectDeDx, bool IsWithDeDx, typename T, typename TQA, typename C> | |
| void fillSkimmedTPCTOFTableWithTrkQAGeneric(T const& track, TQA const& trackQA, bool existTrkQA, C const& collision, float nSigmaTPC, float nSigmaTOF, float nSigmaITS, float dEdxExp, o2::track::PID::ID id, int runnumber, double dwnSmplFactor, double hadronicRate, int bcGlobalIndex, int bcTimeFrameId, int bcBcInTimeFrame) |
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.
Done
| const auto trackocc = collision.trackOccupancyInTimeRange(); | ||
| const auto ft0occ = collision.ft0cOccupancyInTimeRange(); |
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.
| const auto trackocc = collision.trackOccupancyInTimeRange(); | |
| const auto ft0occ = collision.ft0cOccupancyInTimeRange(); | |
| const auto trackOcc = collision.trackOccupancyInTimeRange(); | |
| const auto ft0Occ = collision.ft0cOccupancyInTimeRange(); |
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.
Done
| double nSigmaTofTpctof; | ||
| double nSigmaTpcTpctof; |
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.
| double nSigmaTofTpctof; | |
| double nSigmaTpcTpctof; | |
| double nSigmaTofTpcTof; | |
| double nSigmaTpcTpcTof; |
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.
Since initially it was nSigmaTPC_TPCTOF, I think the first part TPC must be separated from the second part TPCTOF. That's why I merged Tpctof in a single substring.
@vkucera, thanks! |
I don't think there is a rule for it in O2Physics. The C++ Core Guideline Con.1 considers it to be "pedantic" though. :-) Btw, the misc-const-correctness check in clang-tidy can fix the missing |
Ok, I mixed it with another practice - avoiding |
|
Dear @alcaliva, thanks for enabling auto-merge! Could you please merge the PR? |
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
Reduced code repetition:
TreeWriterTPCTOF.Readability and code cosmetics:
constandconst&where possible and necessary,removed;constfrom function arguments passed by valuesqrtsNNfrom member functions' arguments sincesqrtsNNis a struct's configurable;TreeWriterTPCTOF::processStandard2()function intoTreeWriterTPCTOF::processStandardWithCorrecteddEdx()for keeping the same naming style in the entire source file.Minor bugfixes:
downsamplingTsalisTritonsanddownsamplingTsalisDeuteronsvariables for tritons and deuterons respectively (instead ofdownsamplingTsalisProtons);perCollisionTracksWithCorrecteddEdxinstead ofperCollisionTracksinTreeWriterTPCTOF::processWithTrQAWithCorrecteddEdx().Addressed linter error messages:
_symbol from configurable names, configurable string names are made consistent with their variable names;full commit of linter error fixes.
FYI @amaringarcia