Skip to content
Merged
Show file tree
Hide file tree
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
17 changes: 13 additions & 4 deletions PWGCF/Core/AnalysisConfigurableCuts.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file AnalysisConfigurableCuts.h
/// \brief Convenience classes to support configurable cuts
/// \author victor.gonzalez.sebastian@gmail.com

#ifndef PWGCF_CORE_ANALYSISCONFIGURABLECUTS_H_
#define PWGCF_CORE_ANALYSISCONFIGURABLECUTS_H_

#include <TMath.h>
#include <TNamed.h>
#include <TObject.h>

#include <Rtypes.h>

#include <string>
#include <vector>
#include <Rtypes.h>
#include <TObject.h>
#include <TNamed.h>
#include <TMath.h>

namespace o2
{
Expand Down Expand Up @@ -95,6 +102,8 @@ class TrackSelectionTuneCfg
bool mUseIt = false; ///< use this track selection tuning configuration
int mTPCclusters = 0; ///< minimum number of TPC clusters
bool mUseTPCclusters = false; ///< use or not the number of TPC clusters
int mITSclusters = 0; ///< minimum number of ITS clusters
bool mUseITSclusters = false; ///< use or not the number of ITS clusters
int mTPCxRows = 70; ///< minimum number of TPC crossed rows
bool mUseTPCxRows = false; ///< use or not the number of TPC crossed rows
float mTPCXRoFClusters = 0.8; ///< minimum value of the TPC ratio no of crossed rows over findable clusters
Expand Down
33 changes: 19 additions & 14 deletions PWGCF/TableProducer/dptDptFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ bool onlyInOneSide = false; ///< select only tracks that don't cross the
extern TpcExcludeTrack tpcExcluder; ///< the TPC excluder object instance

/* selection criteria from PWGMM */
static constexpr int kTrackTypePWGMM = 4;
static constexpr int TrackTypePWGMM = 4;
// default quality criteria for tracks with ITS contribution
static constexpr o2::aod::track::TrackSelectionFlags::flagtype TrackSelectionITS =
o2::aod::track::TrackSelectionFlags::kITSNCls | o2::aod::track::TrackSelectionFlags::kITSChi2NDF |
Expand Down Expand Up @@ -769,6 +769,11 @@ struct DptDptTrackSelection {
}
if (tune.mUseIt) {
for (auto const& filter : trackFilters) {
if (tune.mUseITSclusters) {
filter->stdTrackSelection->ResetITSRequirements();
filter->stdTrackSelection->SetRequireHitsInITSLayers(1, {0, 1, 2});
filter->stdTrackSelection->SetMinNClustersITS(tune.mITSclusters);
}
if (tune.mUseTPCclusters) {
filter->stdTrackSelection->SetMinNClustersTPC(tune.mTPCclusters);
}
Expand Down Expand Up @@ -1136,8 +1141,8 @@ inline bool triggerSelection<aod::McCollision>(aod::McCollision const&)
//////////////////////////////////////////////////////////////////////////////////
/// Multiplicity extraction
//////////////////////////////////////////////////////////////////////////////////
static constexpr float kValidPercentileLowLimit = 0.0f;
static constexpr float kValidPercentileUpLimit = 100.0f;
static constexpr float ValidPercentileLowLimit = 0.0f;
static constexpr float ValidPercentileUpLimit = 100.0f;

/// \brief Extract the collision multiplicity from the event selection information
template <typename CollisionObject>
Expand Down Expand Up @@ -1224,7 +1229,7 @@ template <typename CollisionObject>
inline bool centralitySelectionMult(CollisionObject collision, float& centmult)
{
float mult = getCentMultPercentile(collision);
if (mult < kValidPercentileUpLimit && kValidPercentileLowLimit < mult) {
if (mult < ValidPercentileUpLimit && ValidPercentileLowLimit < mult) {
centmult = mult;
collisionFlags.set(CollSelCENTRALITYBIT);
return true;
Expand Down Expand Up @@ -1303,7 +1308,7 @@ inline bool centralitySelection<soa::Join<aod::CollisionsEvSelRun2Cent, aod::McC
template <>
inline bool centralitySelection<aod::McCollision>(aod::McCollision const&, float& centmult)
{
if (centmult < kValidPercentileUpLimit && kValidPercentileLowLimit < centmult) {
if (centmult < ValidPercentileUpLimit && ValidPercentileLowLimit < centmult) {
return true;
} else {
return false;
Expand Down Expand Up @@ -1493,14 +1498,14 @@ struct TpcExcludeTrack {
}
explicit TpcExcludeTrack(TpcExclusionMethod m)
{
static constexpr float kDefaultPhiBinShift = 0.5f;
static constexpr int kDefaultNoOfPhiBins = 72;
static constexpr float DefaultPhiBinShift = 0.5f;
static constexpr int DefaultNoOfPhiBins = 72;
switch (m) {
case kNOEXCLUSION:
method = m;
break;
case kSTATIC:
if (phibinshift == kDefaultPhiBinShift && phibins == kDefaultNoOfPhiBins) {
if (phibinshift == DefaultPhiBinShift && phibins == DefaultNoOfPhiBins) {
method = m;
} else {
LOGF(fatal, "Static TPC exclusion method with bin shift: %.2f and number of bins %d. Please fix it", phibinshift, phibins);
Expand Down Expand Up @@ -1529,8 +1534,8 @@ struct TpcExcludeTrack {
template <typename TrackObject>
bool exclude(TrackObject const& track)
{
constexpr int kNoOfTpcSectors = 18;
constexpr float kTpcPhiSectorWidth = (constants::math::TwoPI) / kNoOfTpcSectors;
constexpr int NoOfTpcSectors = 18;
constexpr float TpcPhiSectorWidth = (constants::math::TwoPI) / NoOfTpcSectors;

switch (method) {
case kNOEXCLUSION: {
Expand All @@ -1546,7 +1551,7 @@ struct TpcExcludeTrack {
}
} break;
case kDYNAMIC: {
float phiInTpcSector = std::fmod(track.phi(), kTpcPhiSectorWidth);
float phiInTpcSector = std::fmod(track.phi(), TpcPhiSectorWidth);
if (track.sign() > 0) {
return (phiInTpcSector < positiveUpCut->Eval(track.pt())) && (positiveLowCut->Eval(track.pt()) < phiInTpcSector);
} else {
Expand Down Expand Up @@ -1580,7 +1585,7 @@ inline bool matchTrackType(TrackObject const& track)
{
using namespace o2::aod::track;

if (tracktype == kTrackTypePWGMM) {
if (tracktype == TrackTypePWGMM) {
// under tests MM track selection
// see: https://indico.cern.ch/event/1383788/contributions/5816953/attachments/2805905/4896281/TrackSel_GlobalTracks_vs_MMTrackSel.pdf
// it should be equivalent to this
Expand Down Expand Up @@ -1672,8 +1677,8 @@ void exploreMothers(ParticleObject& particle, MCCollisionObject& collision)

inline float getCharge(float pdgCharge)
{
static constexpr int kNoOfBasicChargesPerUnitCharge = 3;
float charge = (pdgCharge / kNoOfBasicChargesPerUnitCharge >= 1) ? 1.0 : ((pdgCharge / kNoOfBasicChargesPerUnitCharge <= -1) ? -1.0 : 0);
static constexpr int NoOfBasicChargesPerUnitCharge = 3;
float charge = (pdgCharge / NoOfBasicChargesPerUnitCharge >= 1) ? 1.0 : ((pdgCharge / NoOfBasicChargesPerUnitCharge <= -1) ? -1.0 : 0);
return charge;
}

Expand Down
Loading