Skip to content

Conversation

@dsekihat
Copy link
Contributor

MC/PWGEM: add cfg and ini for VM2ll

@dsekihat dsekihat requested a review from a team as a code owner October 26, 2025 18:04
@github-actions
Copy link

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0
async-2024-PbPb-apass1
async-2024-ppRef-apass1
async-2024-PbPb-apass2
async-2023-PbPb-apass5

Comment out the Pythia8 function to disable it.
@jackal1-66
Copy link
Collaborator

Ciao Daiki, can you please add

std::string path{"o2sim_Kine.root"};
  // Check that file exists, can be opened and has the correct tree
  TFile file(path.c_str(), "READ");
  if (file.IsZombie())
  {
    std::cerr << "Cannot open ROOT file " << path << "\n";
    return 1;
  }
  auto tree = (TTree *)file.Get("o2sim");
  if (!tree)
  {
    std::cerr << "Cannot find tree o2sim in file " << path << "\n";
    return 1;
  }
  std::vector<o2::MCTrack> *tracks{};
  tree->SetBranchAddress("MCTrack", &tracks);

  // Check if all events are filled
  auto nEvents = tree->GetEntries();
  for (Long64_t i = 0; i < nEvents; ++i)
  {
    tree->GetEntry(i);
    if (tracks->empty())
    {
      std::cerr << "Empty entry found at event " << i << "\n";
      return 1;
    }
  }
  // check if each event has at least two oxygen ions
  for (int i = 0; i < nEvents; i++)
  {
    auto check = tree->GetEntry(i);
    int count = 0;
    for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack)
    {
      auto track = tracks->at(idxMCTrack);
      if (track.GetPdgCode() == 1000080160)
      {
        count++;
      }
    }
    if (count < 2)
    {
      std::cerr << "Event " << i << " has less than 2 oxygen ions\n";
      return 1;
    }
  }

in the test? Right before return 0;
It's a very basic test, but it should work.

@dsekihat
Copy link
Contributor Author

Ciao Marco, Thank you. I added those lines.

@jackal1-66 jackal1-66 enabled auto-merge (squash) November 11, 2025 07:07
@jackal1-66 jackal1-66 merged commit b8289dc into AliceO2Group:master Nov 11, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants