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
3 changes: 2 additions & 1 deletion PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2025 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -11,21 +11,21 @@

/// \file FemtoDreamCollisionSelection.h
/// \brief FemtoDreamCollisionSelection - event selection within the o2femtodream framework
/// \author Andi Mathis, TU München, andreas.mathis@ph.tum.de

Check failure on line 14 in PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#ifndef PWGCF_FEMTODREAM_CORE_FEMTODREAMCOLLISIONSELECTION_H_
#define PWGCF_FEMTODREAM_CORE_FEMTODREAMCOLLISIONSELECTION_H_

#include <string>
#include <iostream>

Check failure on line 20 in PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include "Common/CCDB/TriggerAliases.h"
#include "Common/DataModel/EventSelection.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/Logger.h"

using namespace o2::framework;

Check failure on line 26 in PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.

namespace o2::analysis::femtoDream

Check failure on line 28 in PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/namespace]

Use snake_case for names of namespaces. Double underscores are not allowed.
{

/// \class FemtoDreamCollisionSelection
Expand Down Expand Up @@ -195,7 +195,7 @@
double s11 = 0.;

int numOfTracks = col.numContrib();
if (numOfTracks < 3)

Check failure on line 198 in PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h

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.
return -9999.;

for (auto const& track : tracks) {
Expand All @@ -203,7 +203,7 @@
double eta = track.eta();
double px = track.px();
double py = track.py();
if (TMath::Abs(pt) < mSphericityPtmin || TMath::Abs(eta) > 0.8) {

Check failure on line 206 in PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h

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.

Check failure on line 206 in PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
continue;
}

Expand All @@ -223,9 +223,9 @@
s01 /= ptTot;

// Calculate the trace of the sphericity matrix:
double T = s00 + s11;

Check failure on line 226 in PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
// Calculate the determinant of the sphericity matrix:
double D = s00 * s11 - s01 * s01; // S10 = S01

Check failure on line 228 in PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

// Calculate the eigenvalues of the sphericity matrix:
double lambda1 = 0.5 * (T + std::sqrt(T * T - 4. * D));
Expand All @@ -243,7 +243,8 @@
}

mHistogramRegistry->fill(HIST("Event/Sphericity_before"), spt);
if (spt > mMinSphericity) mHistogramRegistry->fill(HIST("Event/Sphericity_after"), spt);
if (spt > mMinSphericity)
mHistogramRegistry->fill(HIST("Event/Sphericity_after"), spt);

return spt;
}
Expand Down
Loading