Skip to content
Closed
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: 3 additions & 3 deletions PWGJE/Core/FastJetUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef PWGJE_CORE_FASTJETUTILITIES_H_
#define PWGJE_CORE_FASTJETUTILITIES_H_

#include <CommonConstants/PhysicsConstants.h>

#include <fastjet/PseudoJet.hh>

#include <cmath>
Expand All @@ -31,8 +33,6 @@
namespace fastjetutilities
{

static constexpr float mPion = 0.139; // TDatabasePDG::Instance()->GetParticle(211)->Mass(); //can be removed when pion mass becomes default for unidentified tracks

// Class defined to store additional info which is passed to the FastJet object
class fastjet_user_info : public fastjet::PseudoJet::UserInfoBase
{
Expand Down Expand Up @@ -78,7 +78,7 @@
*/

template <typename T>
void fillTracks(const T& constituent, std::vector<fastjet::PseudoJet>& constituents, int index = -99999999, int status = static_cast<int>(JetConstituentStatus::track), float mass = mPion)
void fillTracks(const T& constituent, std::vector<fastjet::PseudoJet>& constituents, int index = -99999999, int status = static_cast<int>(JetConstituentStatus::track), float mass = o2::constants::physics::MassPiPlus)
{
if (status == static_cast<int>(JetConstituentStatus::track) || status == static_cast<int>(JetConstituentStatus::candidate)) {
// auto p = std::sqrt((constituent.px() * constituent.px()) + (constituent.py() * constituent.py()) + (constituent.pz() * constituent.pz()));
Expand Down Expand Up @@ -108,13 +108,13 @@
if (hadronicCorrectionType == 1) {
constituentEnergy = constituent.energyCorrectedOneTrack1();
}
if (hadronicCorrectionType == 2) {

Check failure on line 111 in PWGJE/Core/FastJetUtilities.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.
constituentEnergy = constituent.energyCorrectedOneTrack2();
}
if (hadronicCorrectionType == 3) {

Check failure on line 114 in PWGJE/Core/FastJetUtilities.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.
constituentEnergy = constituent.energyCorrectedAllTracks1();
}
if (hadronicCorrectionType == 4) {

Check failure on line 117 in PWGJE/Core/FastJetUtilities.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.
constituentEnergy = constituent.energyCorrectedAllTracks2();
}
float constituentPt = constituentEnergy / std::cosh(constituent.eta());
Expand Down
33 changes: 30 additions & 3 deletions PWGJE/Core/JetDerivedDataUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@
#ifndef PWGJE_CORE_JETDERIVEDDATAUTILITIES_H_
#define PWGJE_CORE_JETDERIVEDDATAUTILITIES_H_

#include "PWGUD/Core/SGSelector.h"

#include "Common/CCDB/EventSelectionParams.h"
#include "Common/CCDB/RCTSelectionFlags.h"
#include "Common/CCDB/TriggerAliases.h"

#include <CommonConstants/PhysicsConstants.h>

#include <Rtypes.h>

#include <array>
Expand All @@ -33,7 +37,7 @@
namespace jetderiveddatautilities
{

static constexpr float mPion = 0.139; // TDatabasePDG::Instance()->GetParticle(211)->Mass(); //can be removed when pion mass becomes default for unidentified tracks
static constexpr float mPion = o2::constants::physics::MassPiPlus; // TDatabasePDG::Instance()->GetParticle(211)->Mass(); //can be removed when pion mass becomes default for unidentified tracks

enum JCollisionSel {
sel8 = 0,
Expand All @@ -45,7 +49,10 @@ enum JCollisionSel {
selNoSameBunchPileup = 6,
selIsGoodZvtxFT0vsPV = 7,
selNoCollInTimeRangeStandard = 8,
selNoCollInRofStandard = 9
selNoCollInRofStandard = 9,
selUpcSingleGapA = 10,
selUpcSingleGapC = 11,
selUpcDoubleGap = 12,
};

enum JCollisionSubGeneratorId {
Expand Down Expand Up @@ -169,11 +176,21 @@ std::vector<int> initialiseEventSelectionBits(const std::string& eventSelectionM
eventSelectionMaskBits.push_back(JCollisionSel::sel7);
eventSelectionMaskBits.push_back(JCollisionSel::selKINT7);
}
if (eventSelectionMasksContainSelection(eventSelectionMasks, "selUPCSingleGapA")) {
eventSelectionMaskBits.push_back(JCollisionSel::selUpcSingleGapA);
}
if (eventSelectionMasksContainSelection(eventSelectionMasks, "selUPCSingleGapC")) {
eventSelectionMaskBits.push_back(JCollisionSel::selUpcSingleGapC);
}
if (eventSelectionMasksContainSelection(eventSelectionMasks, "selUPCDoubleGap")) {
eventSelectionMaskBits.push_back(JCollisionSel::selUpcDoubleGap);
}

return eventSelectionMaskBits;
}

template <typename T>
uint16_t setEventSelectionBit(T const& collision)
uint16_t setEventSelectionBit(T const& collision, int upcSelectionResult = o2::aod::sgselector::TrueGap::NoGap)
{
uint16_t bit = 0;
if (collision.sel8()) {
Expand Down Expand Up @@ -206,6 +223,16 @@ uint16_t setEventSelectionBit(T const& collision)
if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) {
SETBIT(bit, JCollisionSel::selNoCollInRofStandard);
}
if (upcSelectionResult == o2::aod::sgselector::SingleGapA) {
SETBIT(bit, JCollisionSel::selUpcSingleGapA);
}
if (upcSelectionResult == o2::aod::sgselector::SingleGapC) {
SETBIT(bit, JCollisionSel::selUpcSingleGapC);
}
if (upcSelectionResult == o2::aod::sgselector::DoubleGap) {
SETBIT(bit, JCollisionSel::selUpcDoubleGap);
}

return bit;
}

Expand Down
10 changes: 10 additions & 0 deletions PWGJE/DataModel/JetReducedData.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ DECLARE_SOA_COLUMN(CentFT0C, centFT0C, float);
DECLARE_SOA_COLUMN(CentFT0M, centFT0M, float);
DECLARE_SOA_COLUMN(CentFT0CVariant1, centFT0CVariant1, float);
DECLARE_SOA_COLUMN(CentralityVariant1, centralityVariant1, float);
DECLARE_SOA_COLUMN(AmplitudesFV0, amplitudesFV0, std::vector<float>);
DECLARE_SOA_COLUMN(AmplitudesFT0A, amplitudesFT0A, std::vector<float>);
DECLARE_SOA_COLUMN(AmplitudesFT0C, amplitudesFT0C, std::vector<float>);
DECLARE_SOA_COLUMN(AmplitudesFDDA, amplitudesFDDA, std::vector<float>);
DECLARE_SOA_COLUMN(AmplitudesFDDC, amplitudesFDDC, std::vector<float>);
DECLARE_SOA_COLUMN(HadronicRate, hadronicRate, float);
DECLARE_SOA_COLUMN(Weight, weight, float);
DECLARE_SOA_COLUMN(GetSubGeneratorId, getSubGeneratorId, int);
Expand Down Expand Up @@ -134,6 +139,11 @@ DECLARE_SOA_TABLE_STAGED(JCollisions, "JCOLLISION",
jcollision::CentFT0C,
jcollision::CentFT0M,
jcollision::CentFT0CVariant1,
jcollision::AmplitudesFV0,
jcollision::AmplitudesFT0A,
jcollision::AmplitudesFT0C,
jcollision::AmplitudesFDDA,
jcollision::AmplitudesFDDC,
jcollision::HadronicRate,
jcollision::TrackOccupancyInTimeRange,
jcollision::Alias,
Expand Down
2 changes: 1 addition & 1 deletion PWGJE/TableProducer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(FastJet_FOUND)

o2physics_add_dpl_workflow(jet-deriveddata-producer
SOURCES derivedDataProducer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils O2Physics::SGCutParHolder
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(jet-deriveddata-trigger-producer
Expand Down
Loading
Loading