[PWGDQ] Code development for coherent Jpsi A2 analysis#16698
Conversation
ypwangg
commented
Jun 16, 2026
- Defined some observables in VarManager.h/cxx
- Added some histograms and cuts
- Added configurables and tasks in table-reader-with-assoc for A2 analysis
- Enabled the coherent Jpsi A2 workflow in table-reader-with-assoc-direct
|
O2 linter results: ❌ 627 errors, |
Please consider the following formatting changes to AliceO2Group#16698
| template <typename T> | ||
| bool VarManager::isSelectedinTPC(const T& t) | ||
| { | ||
| bool trackSelected = false; | ||
| if constexpr (requires { t.hasTPC(); }) { | ||
| trackSelected = true; | ||
| if (!t.hasTPC()) { | ||
| trackSelected = false; | ||
| return trackSelected; | ||
| } | ||
| if (std::abs(t.eta()) > 0.8) { // eta cut used in q vector table. Todo: read from config | ||
| trackSelected = false; | ||
| return trackSelected; | ||
| } | ||
| if (t.pt() < 0.15 || t.pt() > 5.) { // pt cut used in q vector table. Todo: read from config | ||
| trackSelected = false; | ||
| return trackSelected; | ||
| } | ||
| if (t.tpcNClsCrossedRows() / t.tpcNClsFound() < 0.8 || t.tpcChi2NCl() > 4.) { | ||
| trackSelected = false; | ||
| return trackSelected; | ||
| } | ||
| if (!((t.itsClusterMap() & (1 << uint8_t(0))) > 0 || (t.itsClusterMap() & (1 << uint8_t(1))) > 0 || (t.itsClusterMap() & (1 << uint8_t(2))) > 0)) { | ||
| trackSelected = false; | ||
| return trackSelected; | ||
| } | ||
| if (t.itsChi2NCl() > 36.) { | ||
| trackSelected = false; | ||
| return trackSelected; | ||
| } | ||
| if (t.dcaZ() > 2) { | ||
| trackSelected = false; | ||
| return trackSelected; | ||
| } | ||
| if (t.dcaXY() > 0.0105 + 0.0350 / std::pow(t.pt(), 1.1)) { | ||
| trackSelected = false; | ||
| return trackSelected; | ||
| } | ||
| } | ||
| return trackSelected; | ||
| } |
There was a problem hiding this comment.
These are all hardcoded selections, which will make it difficult for other analyses (that might use other cuts to compute event plane). I suggest to just have a configurable param in the same-event-pairing to specify an AnalysisCut for the tracks used in the Q vector calculation. You can apply that in the same-event-pairing task, and if it evaluates to true, you can transmit via parameter to the VarManager fill function whether that track should be subtracted or not. The track cut itself can be computed in the track-selection task in parallel with all the other track cuts.
| Configurable<bool> useEfficiencyWeighting{"cfgUseEfficiencyWeighting", false, "Apply efficiency weighting to the pairs from CCDB"}; | ||
| Configurable<int> efficiencyType{"cfgEfficiencyType", 0, "Type of efficiency to apply from CCDB: 0 no efficiency, 1 pt-cent-costhetastar"}; | ||
| Configurable<bool> useRemoteFlow{"cfgUseRemoteFlow", false, "Use remote flow information from CCDB"}; | ||
| Configurable<bool> useLocalFlow{"cfgUseLocalFlow", false, "Use flow information from local cache"}; |
There was a problem hiding this comment.
I would discourage the use of local files for this. Everything in ALICE should be reproducible, and using correction files directly from your local machine is breaking that. Is there a problem in using CCDB ?
| } else if (fConfigOptions.useLocalFlow) { | ||
| TString pathFlow = fConfigCCDB.flowPathLocal.value; | ||
| TFile* fileFlow = TFile::Open(pathFlow.Data(), "READ"); | ||
| if (fileFlow == nullptr || fileFlow->IsZombie()) { | ||
| LOGF(fatal, "Flow resolution file %s cannot be opened", pathFlow.Data()); | ||
| } | ||
| fileFlow->GetObject("ScalarProduct", ResoFlowSP); | ||
| fileFlow->GetObject("EventPlane", ResoFlowEP); | ||
| if (ResoFlowSP == nullptr || ResoFlowEP == nullptr) { | ||
| LOGF(fatal, "Flow resolution histograms not available in file %s", pathFlow.Data()); | ||
| } | ||
| } |
There was a problem hiding this comment.
Same comment as above. The files you plugin here are local and not reproducible