Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ALICE3/TableProducer/alice3TrackingTranslator.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in ALICE3/TableProducer/alice3TrackingTranslator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[o2-workflow-options]

Do not use workflow options to customise workflow topology composition in defineDataProcessing. Use process function switches or metadata instead.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -16,6 +16,7 @@
/// \author Nicolò Jacazio, Universita del Piemonte Orientale (IT)
///

#include "ALICE3/DataModel/OTFTracks.h"
#include "ALICE3/DataModel/collisionAlice3.h"
#include "ALICE3/DataModel/tracksAlice3.h"
#include "Common/DataModel/TrackSelectionTables.h"
Expand Down Expand Up @@ -67,6 +68,9 @@
o2::framework::Produces<o2::aod::TrackSelectionExtension> tableTrackSelectionExtension;
o2::framework::Produces<o2::aod::StoredMcParticles> tableStoredMcParticles;
o2::framework::Produces<o2::aod::McCollisions> tableMcCollisions;
o2::framework::Produces<o2::aod::OTFLUTConfigId> tableOTFLUTConfigId;

o2::framework::Configurable<int> maxCollisions{"maxCollisions", 1000, "Nsigma for TOF PID (if enabled)"};

void init(o2::framework::InitContext&)
{
Expand All @@ -80,6 +84,7 @@
if (mTree->SetBranchAddress(branchname, &branchvar)) { \
LOG(fatal) << "Could not set branch address for " << branchname; \
}

struct FileStruct {
FileStruct(std::string filename, std::string treename) : mFile(filename.c_str(), "READ")
{
Expand Down Expand Up @@ -252,6 +257,10 @@

const Long64_t kEvents = fileParticles.getEntries();
for (Long64_t iEvent = 0; iEvent < kEvents; ++iEvent) {
if (iEvent > 0 && iEvent % maxCollisions) {
LOG(info) << "Processing event " << iEvent << "/" << kEvents;
break;
}
fileParticles.setEventEntry(iEvent);
// fileVertices.setEventEntry(iEvent);
fileTracksummary.setEventEntry(iEvent);
Expand All @@ -265,6 +274,7 @@
float collisionY = 0.0f;
float collisionZ = 0.0f;

tableOTFLUTConfigId(0); // dummy for the moment
tableCollisions(0, // bcId
collisionX, // posX
collisionY, // posY
Expand Down Expand Up @@ -326,6 +336,7 @@
fileTracksummary.m_t_vx->at(iParticle),
fileTracksummary.m_t_vy->at(iParticle),
fileTracksummary.m_t_vz->at(iParticle)});

tableStoredMcParticles(tableMcCollisions.lastIndex(), // mcCollisionId
fileTracksummary.m_majorityParticlePDG->at(iParticle), // pdgCode
0, // statusCode
Expand Down Expand Up @@ -540,12 +551,12 @@
flags |= o2::aod::mcparticle::enums::PhysicalPrimary;
bool alreadyAdded = false;
for (const auto& ap : addedParticles[fileParticles.m_particle_type->at(iParticle)]) {
if (std::abs(ap.px - fileParticles.m_px->at(iParticle)) <= 1.e-5 &&

Check failure on line 554 in ALICE3/TableProducer/alice3TrackingTranslator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
std::abs(ap.py - fileParticles.m_py->at(iParticle)) <= 1.e-5 &&

Check failure on line 555 in ALICE3/TableProducer/alice3TrackingTranslator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
std::abs(ap.pz - fileParticles.m_pz->at(iParticle)) <= 1.e-5 &&

Check failure on line 556 in ALICE3/TableProducer/alice3TrackingTranslator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
std::abs(ap.vx - fileParticles.m_vx->at(iParticle)) <= 1.e-5 &&

Check failure on line 557 in ALICE3/TableProducer/alice3TrackingTranslator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
std::abs(ap.vy - fileParticles.m_vy->at(iParticle)) <= 1.e-5 &&

Check failure on line 558 in ALICE3/TableProducer/alice3TrackingTranslator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
std::abs(ap.vz - fileParticles.m_vz->at(iParticle)) <= 1.e-5) {

Check failure on line 559 in ALICE3/TableProducer/alice3TrackingTranslator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
alreadyAdded = true;
break;
}
Expand Down
Loading