Conversation
zchochul
commented
Sep 2, 2022
- Changed printfs and couts for LOGFs and LOGs
- Fixing filling phi candidates table filling
|
Error while checking build/O2Physics/o2 for fc72792 at 2022-09-02 10:14: Full log here. |
|
Error while checking build/O2Physics/o2 for 5e282bb at 2022-09-04 17:23: Full log here. |
| void printCuts() | ||
| { | ||
| std::cout << "Debug information for FemtoWorldCollisionSelection \n Max. z-vertex: " << mZvtxMax << "\n Check trigger: " << mCheckTrigger << "\n Trigger: " << mTrigger << "\n Check offline: " << mCheckOffline << "\n"; | ||
| // std::cout << "Debug information for FemtoWorldCollisionSelection \n Max. z-vertex: " << mZvtxMax << "\n Check trigger: " << mCheckTrigger << "\n Trigger: " << mTrigger << "\n Check offline: " << mCheckOffline << "\n"; |
There was a problem hiding this comment.
No comments left, please
| /*for (int i = 0; i < 2; i++) { | ||
| std::string dirName = static_cast<std::string>(dirNames[1]); | ||
| histdetadpi[i][0] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(histNames[0][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); | ||
| histdetadpi[i][1] = mHistogramRegistry->add<TH2>((dirName + static_cast<std::string>(histNames[1][i])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); | ||
| if (plotForEveryRadii) { | ||
| for (int j = 0; j < 9; j++) { | ||
| histdetadpiRadii[i][j] = mHistogramRegistryQA->add<TH2>((dirName + static_cast<std::string>(histNamesRadii[i][j])).c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); | ||
| } | ||
| } | ||
| }*/ |
There was a problem hiding this comment.
Please remove comments
You can test your code locally until you are happy with it and then push it but don't leave pending code commented
| /* | ||
| if (part1.partType() != o2::aod::femtoworldparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtoworldparticle::ParticleType::kV0) { | ||
| LOG(fatal) << "FemtoWorldDetaDphiStar: passed arguments don't agree with FemtoWorldDetaDphiStar instantiation! Please provide kTrack,kV0 candidates."; | ||
| return false; | ||
| } | ||
|
|
||
| bool pass = false; | ||
| for (int i = 0; i < 2; i++) { | ||
| auto indexOfDaughter = part2.index() - 2 + i; | ||
| auto daughter = particles.begin() + indexOfDaughter; | ||
| auto deta = part1.eta() - daughter.eta(); | ||
| auto dphiAvg = AveragePhiStar(part1, *daughter, i); | ||
| histdetadpi[i][0]->Fill(deta, dphiAvg); | ||
| if (pow(dphiAvg, 2) / pow(deltaPhiMax, 2) + pow(deta, 2) / pow(deltaEtaMax, 2) < 1.) { | ||
| pass = true; | ||
| } else { | ||
| histdetadpi[i][1]->Fill(deta, dphiAvg); | ||
| } | ||
| } | ||
| */ |
There was a problem hiding this comment.
Same comment as above
| printf("-Something wrong in isSelectedMinimal--\n"); | ||
| printf("ERROR - Wrong sign for Phi daughters\n"); | ||
| LOGF(info, "-Something wrong in isSelectedMinimal--\n"); | ||
| LOGF(info, "ERROR - Wrong sign for Phi daughters\n"); |
There was a problem hiding this comment.
Consider using
LOGF(error, "....);
and consider using a single line with all error information
Be aware that you can use formatting the same way you do it with printf
| LOGF(info, "-Something wrong in isSelectedMinimal--\n"); | ||
| LOGF(info, "ERROR - Wrong sign for Phi daughters\n"); |
| // float phiPx = posTrack.px() + negTrack.px(); | ||
| // float phiPy = posTrack.py() + negTrack.py(); | ||
| // float phiPz = posTrack.pz() + negTrack.pz(); |
There was a problem hiding this comment.
Please, don't leave code commented
| LOGF(info, "-Something wrong in isSelectedMinimal--\n"); | ||
| LOGF(info, "ERROR - Wrong sign for V0 daughters\n"); |
There was a problem hiding this comment.
Same comment as above
| LOGF(info, "-Something wrong in isSelectedMinimal--\n"); | ||
| LOGF(info, "ERROR - Wrong sign for V0 daughters\n"); |
There was a problem hiding this comment.
Same comments as above
| #o2physics_add_dpl_workflow(femto-world-pair-track-v0 | ||
| # SOURCES femtoWorldPairTaskTrackV0.cxx | ||
| # PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore | ||
| # COMPONENT_NAME Analysis) |
victor-gonzalez
left a comment
There was a problem hiding this comment.
Please, fix the formatting errors and implement the suggested changes
|
Error while checking build/O2Physics/o2 for 5ca42fc at 2022-09-05 17:51: Full log here. |
|
Error while checking build/O2Physics/o2 for 90a7419 at 2022-09-06 11:27: Full log here. |
|
Error while checking build/O2Physics/o2 for 07582c1 at 2022-09-09 15:04: Full log here. |
victor-gonzalez
left a comment
There was a problem hiding this comment.
Please, get rid of all commented code
If you are requiring to merge you code it will go into production
If you are just keeping your changes in a central repository change your PR to draft
| // DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! Compute the overall momentum in GeV/c | ||
| // [](float pt, float eta) -> float { | ||
| // return pt * std::cosh(eta); | ||
| // }); | ||
| // debug variables |
There was a problem hiding this comment.
Please, no commented code
| femtoworldparticle::Py<femtoworldparticle::Pt, femtoworldparticle::Phi>, | ||
| femtoworldparticle::Pz<femtoworldparticle::Pt, femtoworldparticle::Eta>, | ||
| femtoworldparticle::P<femtoworldparticle::Pt, femtoworldparticle::Eta>, // tu koniec poprzedniej wersji | ||
| // femtoworldparticle::P<femtoworldparticle::Pt, femtoworldparticle::Eta>, // tu koniec poprzedniej wersji |
There was a problem hiding this comment.
Please, no commented code
| aod::pidTPCKa, aod::pidTPCPr, aod::pidTPCDe, | ||
| aod::pidTOFEl, aod::pidTOFMu, aod::pidTOFPi, | ||
| aod::pidTOFKa, aod::pidTOFPr, aod::pidTOFDe, aod::pidTOFbeta>; | ||
| // using FilteredFullV0s = soa::Filtered<aod::V0Datas>; /// predefined Join table for o2::aod::V0s = soa::Join<o2::aod::TransientV0s, o2::aod::StoredV0s> to be used when we add v0Filter |
There was a problem hiding this comment.
Please, no commented code
| trackCuts.fillQA<aod::femtoworldparticle::ParticleType::kTrack, aod::femtoworldparticle::TrackType::kNoChild>(track); | ||
| // the bit-wise container of the systematic variations is obtained | ||
| auto cutContainer = trackCuts.getCutContainer<aod::femtoworldparticle::cutContainerType>(track); | ||
| // auto cutContainer = trackCuts.getCutContainer<aod::femtoworldparticle::cutContainerType>(track); |
There was a problem hiding this comment.
Please, no commented code
| } | ||
| } | ||
| PROCESS_SWITCH(femtoWorldProducerTask, processPhi, "Produce Phi candidates tables", true); | ||
| */} |
| /* | ||
| if (p1.p() > cfgCutTable->get("PartOne", "MaxP") || p1.pt() > cfgCutTable->get("PartOne", "MaxPt")) { | ||
| continue; | ||
| } | ||
|
|
||
| if (!isFullPIDSelected(p1.pidcut(), p1.p(), cfgCutTable->get("PartOne", "PIDthr"), vPIDPartOne, cfgNspecies, kNsigma, cfgCutTable->get("PartOne", "nSigmaTPC"), cfgCutTable->get("PartOne", "nSigmaTPCTOF"))) { | ||
| continue; | ||
| } |
There was a problem hiding this comment.
This was commented only temporarily. In next PR I will be adding cuts to the histograms
victor-gonzalez
left a comment
There was a problem hiding this comment.
I still see files with code commented
This is not a good practice for going into production
Commenting code for making it readable is OK. Leaving code commented is not, it makes difficult its interpretation
For the time being I approve the PR to move it forward. But please, spend some time in removing all commented lines of code
|
I'll try to avoid leaving commented code. Thank you for understanding! |