@@ -282,6 +282,14 @@ inline TString* varUnits() { return static_cast<TString*>(VarManager::fgVariable
282282// Global function used to define needed histogram classes
283283void DefineHistograms (HistogramManager* histMan, const TString& histClasses, const char * histGroups); // defines histograms for all tasks
284284
285+ // template <typename TMap>
286+ // void PrintBitMap(TMap map, int nbits)
287+ // {
288+ // for (int i = 0; i < nbits; i++) {
289+ // cout << ((map & (TMap(1) << i)) > 0 ? "1" : "0");
290+ // }
291+ // }
292+
285293// Analysis task that produces event decisions and the Hash table used in event mixing
286294struct AnalysisEventSelection {
287295 Produces<aod::EventCuts> eventSel;
@@ -4942,6 +4950,31 @@ struct AnalysisDileptonTrack {
49424950 // auto groupedMCTracks = tracksMC.sliceBy(aod::reducedtrackMC::reducedMCeventId, event.reducedMCevent().globalIndex());
49434951 for (auto const & mctrack : mcTracks) {
49444952
4953+ // if ((std::abs(mctrack.pdgCode()) > 400 && std::abs(mctrack.pdgCode()) < 599) ||
4954+ // (std::abs(mctrack.pdgCode()) > 4000 && std::abs(mctrack.pdgCode()) < 5999) ||
4955+ // mctrack.mcReducedFlags() > 0) {
4956+ // /*cout << ">>>>>>>>>>>>>>>>>>>>>>> track idx / pdg / selections: " << mctrack.globalIndex() << " / " << mctrack.pdgCode() << " / ";
4957+ // PrintBitMap(mctrack.mcReducedFlags(), 16);
4958+ // cout << endl;
4959+ // if (mctrack.has_mothers()) {
4960+ // for (auto& m : mctrack.mothersIds()) {
4961+ // if (m < mcTracks.size()) { // protect against bad mother indices
4962+ // auto aMother = mcTracks.rawIteratorAt(m);
4963+ // cout << "<<<<<< mother idx / pdg: " << m << " / " << aMother.pdgCode() << endl;
4964+ // }
4965+ // }
4966+ // }
4967+ //
4968+ // if (mctrack.has_daughters()) {
4969+ // for (int d = mctrack.daughtersIds()[0]; d <= mctrack.daughtersIds()[1]; ++d) {
4970+ // if (d < mcTracks.size()) { // protect against bad daughter indices
4971+ // auto aDaughter = mcTracks.rawIteratorAt(d);
4972+ // cout << "<<<<<< daughter idx / pdg: " << d << " / " << aDaughter.pdgCode() << endl;
4973+ // }
4974+ // }
4975+ // }*/
4976+ // }
4977+
49454978 VarManager::FillTrackMC (mcTracks, mctrack);
49464979 // NOTE: Signals are checked here mostly based on the skimmed MC stack, so depending on the requested signal, the stack could be incomplete.
49474980 // NOTE: However, the working model is that the decisions on MC signals are precomputed during skimming and are stored in the mcReducedFlags member.
0 commit comments