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
20 changes: 10 additions & 10 deletions PWGUD/Core/SGSelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

template <typename BC>
struct SelectionResult {
int value; // The original integer return value
BC* bc; // Pointer to the BC object
int value; // The original integer return value
const BC* bc; // Pointer to the BC object
};

namespace o2::aod::sgselector
Expand All @@ -51,17 +51,17 @@
SGSelector() : myRCTChecker{"CBT"}, myRCTCheckerHadron{"CBT_hadronPID"}, myRCTCheckerZDC{"CBT", true}, myRCTCheckerHadronZDC{"CBT_hadronPID", true} {}

template <typename CC, typename BCs, typename TCs, typename FWs>
int Print(SGCutParHolder /*diffCuts*/, CC& collision, BCs& /*bcRange*/, TCs& /*tracks*/, FWs& /*fwdtracks*/)
int Print(SGCutParHolder const& /*diffCuts*/, CC const& collision, BCs const& /*bcRange*/, TCs const& /*tracks*/, FWs const& /*fwdtracks*/)
{
LOGF(info, "Size of array %i", collision.size());
return 1;

Check failure on line 57 in PWGUD/Core/SGSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
}

template <typename CC, typename BCs, typename BC>
SelectionResult<BC> IsSelected(SGCutParHolder diffCuts, CC& collision, BCs& bcRange, BC& oldbc)
SelectionResult<BC> IsSelected(SGCutParHolder const& diffCuts, CC const& collision, BCs const& bcRange, BC const& oldbc)
{
// LOGF(info, "Collision %f", collision.collisionTime());
// LOGF(info, "Number of close BCs: %i", bcRange.size());

Check failure on line 64 in PWGUD/Core/SGSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
SelectionResult<BC> result;
result.bc = &oldbc;
if (collision.numContrib() < diffCuts.minNTracks() || collision.numContrib() > diffCuts.maxNTracks()) {
Expand Down Expand Up @@ -128,27 +128,27 @@
{
// if (fwdtrack.trackType() == 0 || fwdtrack.trackType() == 3)
if (fwdtrack.trackType() == o2::aod::fwdtrack::ForwardTrackTypeEnum::GlobalMuonTrack || fwdtrack.trackType() == o2::aod::fwdtrack::ForwardTrackTypeEnum::MuonStandaloneTrack)
return 1;

Check failure on line 131 in PWGUD/Core/SGSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
else
return 0;
}

template <typename CC>
int trueGap(CC& collision, float fv0, float ft0a, float ft0c, float zdc_cut)
int trueGap(CC const& collision, const float fv0, const float ft0a, const float ft0c, const float zdc_cut)
{
float fit_cut[3] = {fv0, ft0a, ft0c};
const float fit_cut[3] = {fv0, ft0a, ft0c};
int gap = collision.gapSide();
int true_gap = gap;
float FV0A, FT0A, FT0C, ZNA, ZNC;
FV0A = collision.totalFV0AmplitudeA();

Check failure on line 143 in PWGUD/Core/SGSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
FT0A = collision.totalFT0AmplitudeA();
FT0C = collision.totalFT0AmplitudeC();

Check failure on line 145 in PWGUD/Core/SGSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
ZNA = collision.energyCommonZNA();
ZNC = collision.energyCommonZNC();

Check failure on line 147 in PWGUD/Core/SGSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
if (gap == o2::aod::sgselector::SingleGapA) { // gap == 0

Check failure on line 148 in PWGUD/Core/SGSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
if (FV0A > fit_cut[0] || FT0A > fit_cut[1] || ZNA > zdc_cut)

Check failure on line 149 in PWGUD/Core/SGSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
true_gap = o2::aod::sgselector::NoGap; // -1

Check failure on line 150 in PWGUD/Core/SGSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
} else if (gap == o2::aod::sgselector::SingleGapC) { // gap == 1

Check failure on line 151 in PWGUD/Core/SGSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
if (FT0C > fit_cut[2] || ZNC > zdc_cut)
true_gap = o2::aod::sgselector::NoGap; // -1
} else if (gap == o2::aod::sgselector::DoubleGap) { // gap == 2
Expand All @@ -168,7 +168,7 @@

// check CBT flags
template <typename CC>
bool isCBTOk(CC& collision)
bool isCBTOk(CC const& collision)
{
if (myRCTChecker(collision))
return true;
Expand All @@ -177,7 +177,7 @@

// check CBT+hadronPID flags
template <typename CC>
bool isCBTHadronOk(CC& collision)
bool isCBTHadronOk(CC const& collision)
{
if (myRCTCheckerHadron(collision))
return true;
Expand All @@ -186,7 +186,7 @@

// check CBT+ZDC flags
template <typename CC>
bool isCBTZdcOk(CC& collision)
bool isCBTZdcOk(CC const& collision)
{
if (myRCTCheckerZDC(collision))
return true;
Expand All @@ -195,7 +195,7 @@

// check CBT+hadronPID+ZDC flags
template <typename CC>
bool isCBTHadronZdcOk(CC& collision)
bool isCBTHadronZdcOk(CC const& collision)
{
if (myRCTCheckerHadronZDC(collision))
return true;
Expand Down
Loading