Skip to content

Commit 564c03c

Browse files
authored
Merge branch 'AliceO2Group:master' into master
2 parents 434f9f2 + 29ff952 commit 564c03c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+5092
-1300
lines changed

CODEOWNERS

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@
4141
/PWGEM/PhotonMeson @alibuild @mikesas @rbailhac @m-c-danisch @novitzky @mhemmer-cern @dsekihat @jokonig
4242
/PWGHF @alibuild @vkucera @fcolamar @fgrosa @fcatalan92 @mfaggin @mmazzilli @deepathoms @NicoleBastid @hahassan7 @jpxrk @apalasciano @zhangbiao-phy @gluparel @stefanopolitano @xinyepeng @singhra1994
4343
# PWG-LF
44-
/PWGLF @alibuild @sustripathy @skundu692 @mpuccio
45-
/PWGLF/DataModel @alibuild @sustripathy @skundu692 @mpuccio @gbencedi @abmodak @fmazzasc @maciacco @dmallick2 @smaff92 @ercolessi @romainschotter
46-
/PWGLF/Tasks/GlobalEventProperties @alibuild @sustripathy @skundu692 @mpuccio @gbencedi @abmodak @omvazque
47-
/PWGLF/TableProducer/GlobalEventProperties @alibuild @sustripathy @skundu692 @mpuccio @gbencedi @abmodak @omvazque
48-
/PWGLF/Tasks/Nuspex @alibuild @sustripathy @skundu692 @mpuccio @fmazzasc @maciacco
49-
/PWGLF/TableProducer/Nuspex @alibuild @sustripathy @skundu692 @mpuccio @fmazzasc @maciacco
50-
/PWGLF/Tasks/Resonances @alibuild @sustripathy @skundu692 @mpuccio @dmallick2 @smaff92
51-
/PWGLF/TableProducer/Resonances @alibuild @sustripathy @skundu692 @mpuccio @dmallick2 @smaff92
52-
/PWGLF/Tasks/Strangeness @alibuild @sustripathy @skundu692 @mpuccio @ercolessi @romainschotter
53-
/PWGLF/TableProducer/Strangeness @alibuild @sustripathy @mpuccio @skundu692 @ercolessi @romainschotter
54-
/PWGLF/TableProducer/QC @alibuild @sustripathy @skundu692 @mpuccio @gbencedi @abmodak @fmazzasc @maciacco @dmallick2 @smaff92 @ercolessi @romainschotter
55-
/PWGLF/Tasks/QC @alibuild @sustripathy @skundu692 @mpuccio @gbencedi @abmodak @fmazzasc @maciacco @dmallick2 @smaff92 @ercolessi @romainschotter
56-
/PWGLF/Utils @alibuild @sustripathy @skundu692 @mpuccio @gbencedi @abmodak @fmazzasc @maciacco @dmallick2 @smaff92 @ercolessi @romainschotter
44+
/PWGLF @alibuild @omvazque @skundu692 @mpuccio
45+
/PWGLF/DataModel @alibuild @omvazque @skundu692 @mpuccio @gbencedi @abmodak @fmazzasc @maciacco @dmallick2 @smaff92 @ercolessi @romainschotter
46+
/PWGLF/Tasks/GlobalEventProperties @alibuild @omvazque @skundu692 @mpuccio @gbencedi @abmodak @omvazque
47+
/PWGLF/TableProducer/GlobalEventProperties @alibuild @omvazque @skundu692 @mpuccio @gbencedi @abmodak @omvazque
48+
/PWGLF/Tasks/Nuspex @alibuild @omvazque @skundu692 @mpuccio @fmazzasc @maciacco
49+
/PWGLF/TableProducer/Nuspex @alibuild @omvazque @skundu692 @mpuccio @fmazzasc @maciacco
50+
/PWGLF/Tasks/Resonances @alibuild @omvazque @skundu692 @mpuccio @dmallick2 @smaff92
51+
/PWGLF/TableProducer/Resonances @alibuild @omvazque @skundu692 @mpuccio @dmallick2 @smaff92
52+
/PWGLF/Tasks/Strangeness @alibuild @omvazque @skundu692 @mpuccio @ercolessi @romainschotter
53+
/PWGLF/TableProducer/Strangeness @alibuild @omvazque @mpuccio @skundu692 @ercolessi @romainschotter
54+
/PWGLF/TableProducer/QC @alibuild @omvazque @skundu692 @mpuccio @gbencedi @abmodak @fmazzasc @maciacco @dmallick2 @smaff92 @ercolessi @romainschotter
55+
/PWGLF/Tasks/QC @alibuild @omvazque @skundu692 @mpuccio @gbencedi @abmodak @fmazzasc @maciacco @dmallick2 @smaff92 @ercolessi @romainschotter
56+
/PWGLF/Utils @alibuild @omvazque @skundu692 @mpuccio @gbencedi @abmodak @fmazzasc @maciacco @dmallick2 @smaff92 @ercolessi @romainschotter
5757

5858
# PWG-MM (fused with LF, LF conveners included. Directories to be merged in the future)
5959
/PWGMM @alibuild @mpuccio @skundu692 @aalkin @jgcn

PWGCF/Femto/Core/cascadeBuilder.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@ struct ConfOmegaBits : o2::framework::ConfigurableGroup {
9090

9191
#undef CASCADE_DEFAULT_BITS
9292

93-
#define CASCADE_DEFAULT_SELECTION(defaultMassMin, defaultMassMax, defaultPdgCode) \
94-
o2::framework::Configurable<int> pdgCode{"pdgCode", defaultPdgCode, "Track PDG code"}; \
95-
o2::framework::Configurable<int> sign{"sign", 1, "Sign of the charge of the Cascade "}; \
96-
o2::framework::Configurable<float> ptMin{"ptMin", 0.f, "Minimum pT"}; \
97-
o2::framework::Configurable<float> ptMax{"ptMax", 999.f, "Maximum pT"}; \
98-
o2::framework::Configurable<float> etaMin{"etaMin", -10.f, "Minimum eta"}; \
99-
o2::framework::Configurable<float> etaMax{"etaMax", 10.f, "Maximum eta"}; \
100-
o2::framework::Configurable<float> phiMin{"phiMin", 0.f, "Minimum eta"}; \
101-
o2::framework::Configurable<float> phiMax{"phiMax", 1.f * o2::constants::math::TwoPI, "Maximum phi"}; \
102-
o2::framework::Configurable<float> massMin{"massMin", defaultMassMin, "Minimum invariant mass for Cascade"}; \
103-
o2::framework::Configurable<float> massMax{"massMax", defaultMassMax, "Maximum invariant mass for Cascade"}; \
93+
#define CASCADE_DEFAULT_SELECTION(defaultMassMin, defaultMassMax, defaultPdgCode) \
94+
o2::framework::Configurable<int> pdgCodeAbs{"pdgCodeAbs", defaultPdgCode, "Cascade PDG code. Set sign to +1 to select antiparticle"}; \
95+
o2::framework::Configurable<int> sign{"sign", -1, "Sign of the charge of the Cascade"}; \
96+
o2::framework::Configurable<float> ptMin{"ptMin", 0.f, "Minimum pT"}; \
97+
o2::framework::Configurable<float> ptMax{"ptMax", 999.f, "Maximum pT"}; \
98+
o2::framework::Configurable<float> etaMin{"etaMin", -10.f, "Minimum eta"}; \
99+
o2::framework::Configurable<float> etaMax{"etaMax", 10.f, "Maximum eta"}; \
100+
o2::framework::Configurable<float> phiMin{"phiMin", 0.f, "Minimum eta"}; \
101+
o2::framework::Configurable<float> phiMax{"phiMax", 1.f * o2::constants::math::TwoPI, "Maximum phi"}; \
102+
o2::framework::Configurable<float> massMin{"massMin", defaultMassMin, "Minimum invariant mass for Cascade"}; \
103+
o2::framework::Configurable<float> massMax{"massMax", defaultMassMax, "Maximum invariant mass for Cascade"}; \
104104
o2::framework::Configurable<o2::aod::femtodatatypes::CascadeMaskType> mask{"mask", 0x0, "Bitmask for cascade selection"};
105105

106106
struct ConfXiSelection : o2::framework::ConfigurableGroup {

PWGCF/Femto/Core/cascadeHistManager.h

Lines changed: 113 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ constexpr char PrefixLambdaCascade[] = "LambdaCascadeQa/";
157157
constexpr std::string_view AnalysisDir = "Kinematics/";
158158
constexpr std::string_view QaDir = "QA/";
159159

160+
constexpr int AbsChargeDaughters = 1;
161+
160162
/// \class FemtoDreamEventHisto
161163
/// \brief Class for histogramming event properties
162164
// template <femtomodes::Mode mode>
@@ -171,47 +173,128 @@ class CascadeHistManager
171173
CascadeHistManager() = default;
172174
~CascadeHistManager() = default;
173175

174-
template <modes::Mode mode>
176+
template <modes::Mode mode, typename T>
175177
void init(o2::framework::HistogramRegistry* registry,
176178
std::map<CascadeHist, std::vector<o2::framework::AxisSpec>> const& cascadeSpecs,
179+
T const& ConfCascadeSelection,
177180
std::map<trackhistmanager::TrackHist, std::vector<o2::framework::AxisSpec>> const& BachelorSpecs,
178181
std::map<trackhistmanager::TrackHist, std::vector<o2::framework::AxisSpec>> const& PosDauSpecs,
179182
std::map<trackhistmanager::TrackHist, std::vector<o2::framework::AxisSpec>> const& NegDauSpecs)
180183
{
181184
mHistogramRegistry = registry;
182-
mBachelorManager.template init<mode>(registry, BachelorSpecs);
183-
mPosDauManager.template init<mode>(registry, PosDauSpecs);
184-
mNegDauManager.template init<mode>(registry, NegDauSpecs);
185+
mPdgCode = std::abs(ConfCascadeSelection.pdgCodeAbs.value);
186+
187+
int bachelorPdgCodeAbs = 0;
188+
int posDauPdgCodeAbs = 0;
189+
int negDauPdgCodeAbs = 0;
190+
const int absCharge = 1;
191+
int signBachelor = 0;
192+
const int signPlus = 1;
193+
const int signMinus = -1;
194+
195+
if (mPdgCode == PDG_t::kXiMinus) {
196+
if (ConfCascadeSelection.sign.value < 0) {
197+
bachelorPdgCodeAbs = std::abs(PDG_t::kPiMinus);
198+
signBachelor = -1;
199+
posDauPdgCodeAbs = std::abs(PDG_t::kProton);
200+
negDauPdgCodeAbs = std::abs(PDG_t::kPiMinus);
201+
} else {
202+
mPdgCode = -1 * mPdgCode; // Xi+ has negative pdg code
203+
bachelorPdgCodeAbs = std::abs(PDG_t::kPiPlus);
204+
signBachelor = 1;
205+
posDauPdgCodeAbs = std::abs(PDG_t::kPiPlus);
206+
negDauPdgCodeAbs = std::abs(PDG_t::kProtonBar);
207+
}
208+
} else if (mPdgCode == PDG_t::kOmegaMinus) {
209+
if (ConfCascadeSelection.sign.value < 0) {
210+
bachelorPdgCodeAbs = std::abs(PDG_t::kKMinus);
211+
signBachelor = -1;
212+
posDauPdgCodeAbs = std::abs(PDG_t::kProton);
213+
negDauPdgCodeAbs = std::abs(PDG_t::kPiMinus);
214+
} else {
215+
mPdgCode = -1 * mPdgCode; // Omega+ has negative pdg code
216+
bachelorPdgCodeAbs = std::abs(PDG_t::kKPlus);
217+
signBachelor = 1;
218+
posDauPdgCodeAbs = std::abs(PDG_t::kPiPlus);
219+
negDauPdgCodeAbs = std::abs(PDG_t::kProtonBar);
220+
}
221+
} else {
222+
LOG(fatal) << "PDG code for Cascade has to be either Xi or Omega";
223+
}
224+
225+
mBachelorManager.template init<mode>(registry, BachelorSpecs, absCharge, signBachelor, bachelorPdgCodeAbs);
226+
mPosDauManager.template init<mode>(registry, PosDauSpecs, absCharge, signPlus, posDauPdgCodeAbs);
227+
mNegDauManager.template init<mode>(registry, NegDauSpecs, absCharge, signMinus, negDauPdgCodeAbs);
228+
185229
if constexpr (modes::isFlagSet(mode, modes::Mode::kAnalysis)) {
186230
initAnalysis(cascadeSpecs);
187231
}
188-
if constexpr (modes::isFlagSet(mode, modes::Mode::kQa)) {
189-
initQa(cascadeSpecs);
190-
}
191232
}
192233

193-
template <typename T1, typename T2, typename T3, typename T4>
194-
void enableOptionalHistograms(T1 const& CascadeConfBinningQa, T2 const& BachelorConfBinningQa, T3 const& PosDauConfBinningQa, T4 const& NegDauConfBinningQa)
195-
{
196-
mBachelorManager.enableOptionalHistograms(BachelorConfBinningQa);
197-
mPosDauManager.enableOptionalHistograms(PosDauConfBinningQa);
198-
mNegDauManager.enableOptionalHistograms(NegDauConfBinningQa);
199-
mPlot2d = CascadeConfBinningQa.plot2d.value;
200-
}
201-
202-
template <modes::Mode mode, typename T1, typename T2, typename T3, typename T4>
234+
template <modes::Mode mode, typename T1, typename T2, typename T3, typename T4, typename T5>
203235
void init(o2::framework::HistogramRegistry* registry,
204236
std::map<CascadeHist, std::vector<o2::framework::AxisSpec>> const& cascadeSpecs,
205-
T1 const& CascadeConfBinningQa,
237+
T1 const& ConfCascadeSelection,
238+
T2 const& ConfCascadeBinningQa,
206239
std::map<trackhistmanager::TrackHist, std::vector<o2::framework::AxisSpec>> const& BachelorSpecs,
207-
T2 const& BachelorConfBinningQa,
240+
T3 const& ConfBachelorQaBinning,
208241
std::map<trackhistmanager::TrackHist, std::vector<o2::framework::AxisSpec>> const& PosDauSpecs,
209-
T3 const& PosDauConfBinningQa,
242+
T4& ConfPosDauQaBinning,
210243
std::map<trackhistmanager::TrackHist, std::vector<o2::framework::AxisSpec>> const& NegDauSpecs,
211-
T4 const& NegDauConfBinningQa)
244+
T5& ConfNegDauQaBinning)
212245
{
213-
enableOptionalHistograms(CascadeConfBinningQa, BachelorConfBinningQa, PosDauConfBinningQa, NegDauConfBinningQa);
214-
this->template init<mode>(registry, cascadeSpecs, BachelorSpecs, PosDauSpecs, NegDauSpecs);
246+
mHistogramRegistry = registry;
247+
mPdgCode = std::abs(ConfCascadeSelection.pdgCodeAbs.value);
248+
this->enableOptionalHistograms(ConfCascadeBinningQa);
249+
250+
int bachelorPdgCodeAbs = 0;
251+
int posDauPdgCodeAbs = 0;
252+
int negDauPdgCodeAbs = 0;
253+
const int absCharge = 1;
254+
int signBachelor = 0;
255+
const int signPlus = 1;
256+
const int signMinus = -1;
257+
258+
if (mPdgCode == PDG_t::kXiMinus) {
259+
if (ConfCascadeSelection.sign.value < 0) {
260+
bachelorPdgCodeAbs = std::abs(PDG_t::kPiMinus);
261+
signBachelor = -1;
262+
posDauPdgCodeAbs = std::abs(PDG_t::kProton);
263+
negDauPdgCodeAbs = std::abs(PDG_t::kPiMinus);
264+
} else {
265+
mPdgCode = -1 * mPdgCode; // Xi+ has negative pdg code
266+
bachelorPdgCodeAbs = std::abs(PDG_t::kPiPlus);
267+
signBachelor = 1;
268+
posDauPdgCodeAbs = std::abs(PDG_t::kPiPlus);
269+
negDauPdgCodeAbs = std::abs(PDG_t::kProtonBar);
270+
}
271+
} else if (mPdgCode == PDG_t::kOmegaMinus) {
272+
if (ConfCascadeSelection.sign.value < 0) {
273+
bachelorPdgCodeAbs = std::abs(PDG_t::kKMinus);
274+
signBachelor = -1;
275+
posDauPdgCodeAbs = std::abs(PDG_t::kProton);
276+
negDauPdgCodeAbs = std::abs(PDG_t::kPiMinus);
277+
} else {
278+
mPdgCode = -1 * mPdgCode; // Omega+ has negative pdg code
279+
bachelorPdgCodeAbs = std::abs(PDG_t::kKPlus);
280+
signBachelor = 1;
281+
posDauPdgCodeAbs = std::abs(PDG_t::kPiPlus);
282+
negDauPdgCodeAbs = std::abs(PDG_t::kProtonBar);
283+
}
284+
} else {
285+
LOG(fatal) << "PDG code for Cascade has to be either Xi or Omega";
286+
}
287+
288+
mBachelorManager.template init<mode>(registry, BachelorSpecs, absCharge, signBachelor, bachelorPdgCodeAbs, ConfBachelorQaBinning);
289+
mPosDauManager.template init<mode>(registry, PosDauSpecs, absCharge, signPlus, posDauPdgCodeAbs, ConfPosDauQaBinning);
290+
mNegDauManager.template init<mode>(registry, NegDauSpecs, absCharge, signMinus, negDauPdgCodeAbs, ConfNegDauQaBinning);
291+
292+
if constexpr (modes::isFlagSet(mode, modes::Mode::kAnalysis)) {
293+
initAnalysis(cascadeSpecs);
294+
}
295+
if constexpr (modes::isFlagSet(mode, modes::Mode::kQa)) {
296+
initQa(cascadeSpecs);
297+
}
215298
}
216299

217300
template <modes::Mode mode, typename T1, typename T2>
@@ -237,6 +320,12 @@ class CascadeHistManager
237320
}
238321

239322
private:
323+
template <typename T>
324+
void enableOptionalHistograms(T const& CascadeConfBinningQa)
325+
{
326+
mPlot2d = CascadeConfBinningQa.plot2d.value;
327+
}
328+
240329
void initAnalysis(std::map<CascadeHist, std::vector<o2::framework::AxisSpec>> const& cascadeSpecs)
241330
{
242331
std::string analysisDir = std::string(cascadePrefix) + std::string(AnalysisDir);
@@ -313,6 +402,7 @@ class CascadeHistManager
313402
trackhistmanager::TrackHistManager<bachelorPrefix> mBachelorManager;
314403
trackhistmanager::TrackHistManager<posDauPrefix> mPosDauManager;
315404
trackhistmanager::TrackHistManager<negDauPrefix> mNegDauManager;
405+
int mPdgCode = 0;
316406
};
317407
}; // namespace cascadehistmanager
318408
}; // namespace o2::analysis::femto

PWGCF/Femto/Core/collisionBuilder.h

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ struct ConfCollisionBits : o2::framework::ConfigurableGroup {
8787
struct ConfCcdb : o2::framework::ConfigurableGroup {
8888
std::string prefix = std::string("ConfCcdb");
8989
o2::framework::Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "URL to ccdb"};
90-
o2::framework::Configurable<std::string> grpPath{"grpPath", "GLO/Config/GRPMagField", "Path to GRP object (Run3 -> GLO/Config/GRPMagField/Run2 -> GLO/GRP/GRP"};
90+
o2::framework::Configurable<std::string> grpPath{"grpPath", "GLO/Config/GRPMagField", "Path to GRP object (Run3 -> GLO/Config/GRPMagField, Run2 -> GLO/GRP/GRP"};
9191
o2::framework::Configurable<std::string> triggerPath{"triggerPath", "EventFiltering/Zorro/", "CCDB path for trigger information"};
92+
o2::framework::Configurable<int> magFieldForced{"magFieldForced", 0, "Force value for magnetic field (kG). This will skip calls to the ccdb. Deactivate by setting value to 0"};
9293
};
9394

9495
struct ConfCollisionRctFlags : o2::framework::ConfigurableGroup {
@@ -390,6 +391,7 @@ class CollisionBuilder
390391
mUseRctFlags = true;
391392
mRctFlagsChecker.init(confRct.label.value, confRct.useZdc.value, confRct.treatLimitedAcceptanceAsBad.value);
392393
}
394+
mMagFieldForced = confCcdb.magFieldForced.value;
393395
mGrpPath = confCcdb.grpPath.value;
394396
mSubGeneratorId = confFilter.subGeneratorId.value;
395397

@@ -403,12 +405,16 @@ class CollisionBuilder
403405
{
404406
if (mRunNumber != bc.runNumber()) {
405407
mRunNumber = bc.runNumber();
406-
static o2::parameters::GRPMagField* grpo = nullptr;
407-
grpo = ccdb->template getForRun<o2::parameters::GRPMagField>(mGrpPath, mRunNumber);
408-
if (grpo == nullptr) {
409-
LOG(fatal) << "GRP object not found for Run " << mRunNumber;
408+
if (mMagFieldForced == 0) {
409+
static o2::parameters::GRPMagField* grpo = nullptr;
410+
grpo = ccdb->template getForRun<o2::parameters::GRPMagField>(mGrpPath, mRunNumber);
411+
if (grpo == nullptr) {
412+
LOG(fatal) << "GRP object not found for Run " << mRunNumber;
413+
}
414+
mMagField = static_cast<int>(grpo->getNominalL3Field()); // get magnetic field in kG
415+
} else {
416+
mMagField = mMagFieldForced;
410417
}
411-
mMagField = static_cast<int>(grpo->getNominalL3Field()); // get magnetic field in kG
412418

413419
if (mUseTrigger) {
414420
mZorro.initCCDB(ccdb.service, mRunNumber, bc.timestamp(), mTriggerNames);
@@ -525,11 +531,7 @@ class CollisionBuilder
525531
mcBuilder.template fillMcCollisionWithLabel<system>(mcProducts, col, mcCols);
526532
}
527533

528-
void
529-
reset()
530-
{
531-
mCollisionAlreadyFilled = false;
532-
}
534+
void reset() { mCollisionAlreadyFilled = false; }
533535

534536
private:
535537
CollisionSelection<HistName> mCollisionSelection;
@@ -538,6 +540,7 @@ class CollisionBuilder
538540
bool mUseTrigger = false;
539541
int mRunNumber = -1;
540542
std::string mGrpPath = std::string("");
543+
int mMagFieldForced = 0;
541544
int mMagField = 0;
542545
aod::rctsel::RCTFlagsChecker mRctFlagsChecker;
543546
bool mUseRctFlags = false;

0 commit comments

Comments
 (0)