Skip to content

Commit

Permalink
Merge branch 'master' into pPhi_11.12
Browse files Browse the repository at this point in the history
  • Loading branch information
prchakra authored Dec 13, 2024
2 parents 24362bf + 753dd11 commit 3c8de8a
Show file tree
Hide file tree
Showing 155 changed files with 10,536 additions and 3,873 deletions.
6 changes: 3 additions & 3 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/PWGCF/TableProducer @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul @lgraczykCern @prchakra @lauraser @ariedel-cern @EmilGorm @otonvd @shouqiye
/PWGCF/Tasks @alibuild @jgrosseo @saganatt @victor-gonzalez @zchochul @lgraczykCern @prchakra @lauraser @ariedel-cern @EmilGorm @otonvd @shouqiye
/PWGDQ @alibuild @iarsene @dsekihat @feisenhu @lucamicheletti93
/PWGEM @alibuild @mikesas @rbailhac @feisenhu
/PWGEM @alibuild @feisenhu @dsekihat @ivorobye
/PWGEM/Dilepton @alibuild @mikesas @rbailhac @dsekihat @ivorobye @feisenhu
/PWGEM/PhotonMeson @alibuild @mikesas @rbailhac @m-c-danisch @novitzky @mhemmer-cern @dsekihat
/PWGHF @alibuild @vkucera @fcolamar @fgrosa @fcatalan92 @mfaggin @mmazzilli @deepathoms @NicoleBastid @hahassan7 @jpxrk @apalasciano
Expand All @@ -43,8 +43,8 @@
/PWGLF/TableProducer/GlobalEventProperties @alibuild @njacazio @skundu692 @gbencedi @omvazque
/PWGLF/Tasks/Nuspex @alibuild @njacazio @skundu692 @fmazzasc @chiarapinto @maciacco
/PWGLF/TableProducer/Nuspex @alibuild @njacazio @skundu692 @fmazzasc @chiarapinto @maciacco
/PWGLF/Tasks/Resonances @alibuild @njacazio @skundu692 @BongHwi @smaff92
/PWGLF/TableProducer/Resonances @alibuild @njacazio @skundu692 @BongHwi @smaff92
/PWGLF/Tasks/Resonances @alibuild @njacazio @skundu692 @dmallick2 @smaff92
/PWGLF/TableProducer/Resonances @alibuild @njacazio @skundu692 @dmallick2 @smaff92
/PWGLF/Tasks/Strangeness @alibuild @njacazio @skundu692 @ercolessi @ChiaraDeMartin95
/PWGLF/TableProducer/Strangeness @alibuild @njacazio @skundu692 @ercolessi @ChiaraDeMartin95

Expand Down
25 changes: 15 additions & 10 deletions Common/Core/RecoDecay.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,23 @@ struct RecoDecay {
/// Constrains angle to be within a range.
/// \note Inspired by TVector2::Phi_0_2pi in ROOT.
/// \param angle angle
/// \param min minimum of the range
/// \return value within [min, min + 2π).
/// \param minimum minimum of the range
/// \param harmonic harmonic number
/// \return value of angle within [minimum, minimum + 2π / harmonic).
template <typename T, typename U = float>
static T constrainAngle(T angle, U min = 0.)
static T constrainAngle(T angle, U minimum = 0.0F, unsigned int harmonic = 1U)
{
while (angle < min) {
angle += o2::constants::math::TwoPI;
auto period = o2::constants::math::TwoPI;
if (harmonic != 1U) {
period /= harmonic;
}
while (angle >= min + o2::constants::math::TwoPI) {
angle -= o2::constants::math::TwoPI;
while (angle < minimum) {
angle += period;
}
return (T)angle;
while (angle >= minimum + period) {
angle -= period;
}
return angle;
}

/// Calculates cosine of pointing angle.
Expand Down Expand Up @@ -1072,7 +1077,7 @@ struct RecoDecay {
auto mother = particlesMC.rawIteratorAt(particleMother.mothersIds().front() - particlesMC.offset());
auto PDGParticleIMother = std::abs(mother.pdgCode()); // PDG code of the mother
if (PDGParticleIMother < 9 || (PDGParticleIMother > 20 && PDGParticleIMother < 38)) {
auto PDGPaticle = std::abs(particleMother.pdgCode());
// auto PDGPaticle = std::abs(particleMother.pdgCode());
if (
(PDGParticleIMother / 100 == 5 || // b mesons
PDGParticleIMother / 1000 == 5) // b baryons
Expand All @@ -1095,7 +1100,7 @@ struct RecoDecay {
}
auto mother = particlesMC.rawIteratorAt(iMother - particlesMC.offset());
// Check status code
auto motherStatusCode = std::abs(mother.getGenStatusCode());
// auto motherStatusCode = std::abs(mother.getGenStatusCode());
auto PDGParticleIMother = std::abs(mother.pdgCode()); // PDG code of the mother
// Check mother's PDG code.
// printf("getMother: ");
Expand Down
85 changes: 40 additions & 45 deletions Common/DataModel/Multiplicity.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ DECLARE_SOA_DYNAMIC_COLUMN(IsInelGt0, isInelGt0, //! is INEL > 0
[](int multPveta1) -> bool { return multPveta1 > 0; });
DECLARE_SOA_DYNAMIC_COLUMN(IsInelGt1, isInelGt1, //! is INEL > 1
[](int multPveta1) -> bool { return multPveta1 > 1; });

// forward track counters
DECLARE_SOA_COLUMN(MFTNtracks, mftNtracks, int); //!

// MC
DECLARE_SOA_COLUMN(MultMCFT0A, multMCFT0A, int); //!
DECLARE_SOA_COLUMN(MultMCFT0C, multMCFT0C, int); //!
Expand Down Expand Up @@ -108,9 +112,12 @@ DECLARE_SOA_TABLE(PVMults, "AOD", "PVMULT", //! Multiplicity from the PV contrib
mult::MultNTracksPVetaHalf,
mult::IsInelGt0<mult::MultNTracksPVeta1>,
mult::IsInelGt1<mult::MultNTracksPVeta1>);
DECLARE_SOA_TABLE(MFTMults, "AOD", "MFTMULT", //! Multiplicity with MFT
mult::MFTNtracks);
using BarrelMults = soa::Join<TrackletMults, TPCMults, PVMults>;
using Mults = soa::Join<BarrelMults, FV0Mults, FT0Mults, FDDMults, ZDCMults>;
using FT0Mult = FT0Mults::iterator;
using MFTMult = MFTMults::iterator;
using Mult = Mults::iterator;

DECLARE_SOA_TABLE(MultsExtra_000, "AOD", "MULTEXTRA", //!
Expand Down Expand Up @@ -206,54 +213,42 @@ DECLARE_SOA_TABLE(PVMultZeqs, "AOD", "PVMULTZEQ", //! Multiplicity equalized for
using MultZeqs = soa::Join<FV0MultZeqs, FT0MultZeqs, FDDMultZeqs, PVMultZeqs>;
using MultZeq = MultZeqs::iterator;

namespace multBC
namespace mult
{
DECLARE_SOA_COLUMN(MultBCFT0A, multBCFT0A, float); //!
DECLARE_SOA_COLUMN(MultBCFT0C, multBCFT0C, float); //!
DECLARE_SOA_COLUMN(MultBCFV0A, multBCFV0A, float); //!
DECLARE_SOA_COLUMN(MultBCFDDA, multBCFDDA, float); //!
DECLARE_SOA_COLUMN(MultBCFDDC, multBCFDDC, float); //!
// extra BC information
DECLARE_SOA_COLUMN(MultTVX, multTVX, bool); //!
DECLARE_SOA_COLUMN(MultFV0OrA, multFV0OrA, bool); //!
DECLARE_SOA_COLUMN(MultV0triggerBits, multV0triggerBits, uint8_t); //!
DECLARE_SOA_COLUMN(MultT0triggerBits, multT0triggerBits, uint8_t); //!
DECLARE_SOA_COLUMN(MultFDDtriggerBits, multFDDtriggerBits, uint8_t); //!
DECLARE_SOA_COLUMN(MultTriggerMask, multTriggerMask, uint64_t); //! CTP trigger mask
DECLARE_SOA_COLUMN(MultCollidingBC, multCollidingBC, bool); //! CTP trigger mask

DECLARE_SOA_COLUMN(MultBCZNA, multBCZNA, float); //!
DECLARE_SOA_COLUMN(MultBCZNC, multBCZNC, float); //!
DECLARE_SOA_COLUMN(MultBCZEM1, multBCZEM1, float); //!
DECLARE_SOA_COLUMN(MultBCZEM2, multBCZEM2, float); //!
DECLARE_SOA_COLUMN(MultBCZPA, multBCZPA, float); //!
DECLARE_SOA_COLUMN(MultBCZPC, multBCZPC, float); //!

DECLARE_SOA_COLUMN(MultBCTVX, multBCTVX, bool); //!
DECLARE_SOA_COLUMN(MultBCFV0OrA, multBCFV0OrA, bool); //!
DECLARE_SOA_COLUMN(MultBCV0triggerBits, multBCV0triggerBits, uint8_t); //!
DECLARE_SOA_COLUMN(MultBCT0triggerBits, multBCT0triggerBits, uint8_t); //!
DECLARE_SOA_COLUMN(MultBCFDDtriggerBits, multBCFDDtriggerBits, uint8_t); //!
DECLARE_SOA_COLUMN(MultBCTriggerMask, multBCTriggerMask, uint64_t); //! CTP trigger mask
DECLARE_SOA_COLUMN(MultBCColliding, multBCColliding, bool); //! CTP trigger mask

DECLARE_SOA_COLUMN(MultBCFT0PosZ, multBCFT0PosZ, float); //! Position along Z computed with the FT0 information within the BC
DECLARE_SOA_COLUMN(MultBCFT0PosZValid, multBCFT0PosZValid, bool); //! Validity of the position along Z computed with the FT0 information within the BC

} // namespace multBC
DECLARE_SOA_COLUMN(MultFT0PosZ, multFT0PosZ, float); //! Position along Z computed with the FT0 information within the BC
DECLARE_SOA_COLUMN(MultFT0PosZValid, multFT0PosZValid, bool); //! Validity of the position along Z computed with the FT0 information
} // namespace mult
DECLARE_SOA_TABLE(MultBCs, "AOD", "MULTBC", //!
multBC::MultBCFT0A,
multBC::MultBCFT0C,
multBC::MultBCFT0PosZ,
multBC::MultBCFT0PosZValid,
multBC::MultBCFV0A,
multBC::MultBCFDDA,
multBC::MultBCFDDC,
multBC::MultBCZNA,
multBC::MultBCZNC,
multBC::MultBCZEM1,
multBC::MultBCZEM2,
multBC::MultBCZPA,
multBC::MultBCZPC,
multBC::MultBCTVX,
multBC::MultBCFV0OrA,
multBC::MultBCV0triggerBits,
multBC::MultBCT0triggerBits,
multBC::MultBCFDDtriggerBits,
multBC::MultBCTriggerMask,
multBC::MultBCColliding,
mult::MultFT0A,
mult::MultFT0C,
mult::MultFT0PosZ,
mult::MultFT0PosZValid,
mult::MultFV0A,
mult::MultFDDA,
mult::MultFDDC,
mult::MultZNA,
mult::MultZNC,
mult::MultZEM1,
mult::MultZEM2,
mult::MultZPA,
mult::MultZPC,
mult::MultTVX,
mult::MultFV0OrA,
mult::MultV0triggerBits,
mult::MultT0triggerBits,
mult::MultFDDtriggerBits,
mult::MultTriggerMask,
mult::MultCollidingBC,
timestamp::Timestamp,
bc::Flags);
using MultBC = MultBCs::iterator;

Expand Down
5 changes: 5 additions & 0 deletions Common/TableProducer/Converters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,8 @@ o2physics_add_dpl_workflow(trackqa-converter
SOURCES trackQAConverter.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(trackqa-converter-002
SOURCES trackQA002Converter.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
97 changes: 97 additions & 0 deletions Common/TableProducer/Converters/trackQA002Converter.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// 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.
#include <limits>

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"

using namespace o2;
using namespace o2::framework;

struct TrackQAConverter002 {
Produces<aod::TracksQA_002> tracksQA_002;

void process000(aod::TracksQA_000 const& tracksQA_000)
{
for (const auto& trackQA : tracksQA_000) {
tracksQA_002(
trackQA.trackId(),
trackQA.tpcTime0(),
trackQA.tpcdcaR(),
trackQA.tpcdcaZ(),
trackQA.tpcClusterByteMask(),
trackQA.tpcdEdxMax0R(),
trackQA.tpcdEdxMax1R(),
trackQA.tpcdEdxMax2R(),
trackQA.tpcdEdxMax3R(),
trackQA.tpcdEdxTot0R(),
trackQA.tpcdEdxTot1R(),
trackQA.tpcdEdxTot2R(),
trackQA.tpcdEdxTot3R(),
// dummy values, not available in _000
std::numeric_limits<int8_t>::min(), // deltaRefContParamY
std::numeric_limits<int8_t>::min(), // deltaRefContParamZ
std::numeric_limits<int8_t>::min(), // deltaRefContParamSnp
std::numeric_limits<int8_t>::min(), // deltaRefContParamTgl
std::numeric_limits<int8_t>::min(), // deltaRefContParamQ2Pt
std::numeric_limits<int8_t>::min(), // deltaRefGloParamY
std::numeric_limits<int8_t>::min(), // deltaRefGloParamZ
std::numeric_limits<int8_t>::min(), // deltaRefGloParamSnp
std::numeric_limits<int8_t>::min(), // deltaRefGloParamTgl
std::numeric_limits<int8_t>::min(), // deltaRefGloParamQ2Pt
std::numeric_limits<int8_t>::min(), // dTofdX
std::numeric_limits<int8_t>::min()); // dTofdY
}
}
PROCESS_SWITCH(TrackQAConverter002, process000, "process v000-to-v002 conversion", false);

void process001(aod::TracksQA_001 const& tracksQA_001)
{
for (const auto& trackQA : tracksQA_001) {
tracksQA_002(
trackQA.trackId(),
trackQA.tpcTime0(),
trackQA.tpcdcaR(),
trackQA.tpcdcaZ(),
trackQA.tpcClusterByteMask(),
trackQA.tpcdEdxMax0R(),
trackQA.tpcdEdxMax1R(),
trackQA.tpcdEdxMax2R(),
trackQA.tpcdEdxMax3R(),
trackQA.tpcdEdxTot0R(),
trackQA.tpcdEdxTot1R(),
trackQA.tpcdEdxTot2R(),
trackQA.tpcdEdxTot3R(),
trackQA.deltaRefContParamY(),
trackQA.deltaRefITSParamZ(),
trackQA.deltaRefContParamSnp(),
trackQA.deltaRefContParamTgl(),
trackQA.deltaRefContParamQ2Pt(),
trackQA.deltaRefGloParamY(),
trackQA.deltaRefGloParamZ(),
trackQA.deltaRefGloParamSnp(),
trackQA.deltaRefGloParamTgl(),
trackQA.deltaRefGloParamQ2Pt(),
// dummy values, not available in _001
std::numeric_limits<int8_t>::min(), // dTofdX
std::numeric_limits<int8_t>::min()); // dTofdY
}
}
PROCESS_SWITCH(TrackQAConverter002, process001, "process v001-to-v002 conversion", false);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<TrackQAConverter002>(cfgc),
};
}
Loading

0 comments on commit 3c8de8a

Please sign in to comment.