镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
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
6 changes: 4 additions & 2 deletions Common/CCDB/EventSelectionParams.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "EventSelectionParams.h"

namespace evsel
namespace o2::aod::evsel
{
const char* selectionLabels[kNsel] = {
"kIsBBV0A",
Expand Down Expand Up @@ -48,7 +48,9 @@ const char* selectionLabels[kNsel] = {
"kNoPileupTPC",
"kIsTriggerTVX",
"kIsINT1"};
}
} // namespace o2::aod::evsel

using namespace o2::aod::evsel;

EventSelectionParams::EventSelectionParams(int system, int run)
{
Expand Down
12 changes: 5 additions & 7 deletions Common/CCDB/EventSelectionParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <Rtypes.h>
#include <TMath.h>

namespace evsel
namespace o2::aod::evsel
{
// Event selection criteria
enum EventSelectionFlags {
Expand Down Expand Up @@ -58,9 +58,7 @@ enum EventSelectionFlags {

extern const char* selectionLabels[kNsel];

} // namespace evsel

using namespace evsel;
} // namespace o2::aod::evsel

class EventSelectionParams
{
Expand All @@ -70,9 +68,9 @@ class EventSelectionParams
void SetOnVsOfParams(float newV0MOnVsOfA, float newV0MOnVsOfB, float newSPDOnVsOfA, float newSPDOnVsOfB);
bool* GetSelection(int iSelection);

bool selectionBarrel[kNsel];
bool selectionMuonWithPileupCuts[kNsel];
bool selectionMuonWithoutPileupCuts[kNsel];
bool selectionBarrel[o2::aod::evsel::kNsel];
bool selectionMuonWithPileupCuts[o2::aod::evsel::kNsel];
bool selectionMuonWithoutPileupCuts[o2::aod::evsel::kNsel];

// time-of-flight offset
float fV0ADist = 329.00 / TMath::Ccgs() * 1e9; // ns
Expand Down
38 changes: 18 additions & 20 deletions Common/Core/CollisionAssociation.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <vector>
#include <memory>

#include "CommonConstants/LHCConstants.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/ASoAHelpers.h"
Expand All @@ -41,9 +42,6 @@ enum TrackSelection {
} // namespace track_association
} // namespace o2::aod

using namespace o2;
using namespace o2::aod;

template <bool isCentralBarrel>
class CollisionAssociation
{
Expand All @@ -59,7 +57,7 @@ class CollisionAssociation
void setFillTableOfCollIdsPerTrack(bool fill = true) { mFillTableOfCollIdsPerTrack = fill; }

template <typename TTracks, typename Slice, typename Assoc, typename RevIndices>
void runStandardAssoc(Collisions const& collisions,
void runStandardAssoc(o2::aod::Collisions const& collisions,
TTracks const& tracks,
Slice& perCollisions,
Assoc& association,
Expand All @@ -72,23 +70,23 @@ class CollisionAssociation
if constexpr (isCentralBarrel) {
bool hasGoodQuality = true;
switch (mTrackSelection) {
case track_association::TrackSelection::CentralBarrelRun2: {
case o2::aod::track_association::TrackSelection::CentralBarrelRun2: {
unsigned char itsClusterMap = track.itsClusterMap();
if (!(track.tpcNClsFound() >= 50 && track.flags() & track::ITSrefit && track.flags() & track::TPCrefit && (TESTBIT(itsClusterMap, 0) || TESTBIT(itsClusterMap, 1)))) {
if (!(track.tpcNClsFound() >= 50 && track.flags() & o2::aod::track::ITSrefit && track.flags() & o2::aod::track::TPCrefit && (TESTBIT(itsClusterMap, 0) || TESTBIT(itsClusterMap, 1)))) {
hasGoodQuality = false;
}
break;
}
case track_association::TrackSelection::None: {
case o2::aod::track_association::TrackSelection::None: {
break;
}
case track_association::TrackSelection::GlobalTrackWoDCA: {
case o2::aod::track_association::TrackSelection::GlobalTrackWoDCA: {
if (!track.isGlobalTrackWoDCA()) {
hasGoodQuality = false;
}
break;
}
case track_association::TrackSelection::QualityTracksITS: {
case o2::aod::track_association::TrackSelection::QualityTracksITS: {
if (!track.isQualityTrackITS()) {
hasGoodQuality = false;
}
Expand Down Expand Up @@ -117,11 +115,11 @@ class CollisionAssociation
}

template <typename TTracksUnfiltered, typename TTracks, typename TAmbiTracks, typename Assoc, typename RevIndices>
void runAssocWithTime(Collisions const& collisions,
void runAssocWithTime(o2::aod::Collisions const& collisions,
TTracksUnfiltered const& tracksUnfiltered,
TTracks const& tracks,
TAmbiTracks const& ambiguousTracks,
BCs const& bcs,
o2::aod::BCs const& bcs,
Assoc& association,
RevIndices& reverseIndices)
{
Expand Down Expand Up @@ -172,11 +170,11 @@ class CollisionAssociation
if constexpr (isCentralBarrel) {
if (mUsePvAssociation && track.isPVContributor()) {
trackTime = track.collision().collisionTime(); // if PV contributor, we assume the time to be the one of the collision
trackTimeRes = constants::lhc::LHCBunchSpacingNS; // 1 BC
trackTimeRes = o2::constants::lhc::LHCBunchSpacingNS; // 1 BC
}
}

const float deltaTime = trackTime - collTime + bcOffset * constants::lhc::LHCBunchSpacingNS;
const float deltaTime = trackTime - collTime + bcOffset * o2::constants::lhc::LHCBunchSpacingNS;
float sigmaTimeRes2 = collTimeRes2 + trackTimeRes * trackTimeRes;
LOGP(debug, "collision time={}, collision time res={}, track time={}, track time res={}, bc collision={}, bc track={}, delta time={}", collTime, collision.collisionTimeRes(), track.trackTime(), track.trackTimeRes(), collBC, globalBC[track.filteredIndex()], deltaTime);

Expand All @@ -195,7 +193,7 @@ class CollisionAssociation
if constexpr (isCentralBarrel) {
if (mUsePvAssociation && track.isPVContributor()) {
thresholdTime = trackTimeRes;
} else if (TESTBIT(track.flags(), track::TrackTimeResIsRange)) {
} else if (TESTBIT(track.flags(), o2::aod::track::TrackTimeResIsRange)) {
thresholdTime = std::sqrt(sigmaTimeRes2) + mTimeMargin;
} else {
thresholdTime = mNumSigmaForTimeCompat * std::sqrt(sigmaTimeRes2) + mTimeMargin;
Expand Down Expand Up @@ -234,12 +232,12 @@ class CollisionAssociation
}

private:
float mNumSigmaForTimeCompat{4.}; // number of sigma for time compatibility
float mTimeMargin{500.}; // additional time margin in ns
int mTrackSelection{track_association::TrackSelection::GlobalTrackWoDCA}; // track selection for central barrel tracks (standard association only)
bool mUsePvAssociation{true}; // use the information of PV contributors
bool mIncludeUnassigned{true}; // include tracks that were originally not assigned to any collision
bool mFillTableOfCollIdsPerTrack{false}; // fill additional table with vectors of compatible collisions per track
float mNumSigmaForTimeCompat{4.}; // number of sigma for time compatibility
float mTimeMargin{500.}; // additional time margin in ns
int mTrackSelection{o2::aod::track_association::TrackSelection::GlobalTrackWoDCA}; // track selection for central barrel tracks (standard association only)
bool mUsePvAssociation{true}; // use the information of PV contributors
bool mIncludeUnassigned{true}; // include tracks that were originally not assigned to any collision
bool mFillTableOfCollIdsPerTrack{false}; // fill additional table with vectors of compatible collisions per track
};

#endif // COMMON_CORE_COLLISIONASSOCIATION_H_
Loading