Skip to content

Commit 1c681c8

Browse files
authored
[PWGEM/Dilepton] add cent info in norm table (AliceO2Group#9015)
1 parent 207398b commit 1c681c8

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

PWGEM/Dilepton/DataModel/dileptonTables.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ DECLARE_SOA_TABLE(EMEoIs, "AOD", "EMEOI", //! joinable to aod::Collisions in cre
212212
using EMEoI = EMEoIs::iterator;
213213

214214
DECLARE_SOA_TABLE(EMEventNormInfos, "AOD", "EMEVENTNORMINFO", //! event information for normalization
215-
o2::soa::Index<>, evsel::Alias, evsel::Selection, emevent::PosZint16, emevent::PosZ<emevent::PosZint16>, emevent::Sel8<evsel::Selection>);
215+
o2::soa::Index<>, evsel::Alias, evsel::Selection, emevent::PosZint16, cent::CentFT0C, emevent::PosZ<emevent::PosZint16>, emevent::Sel8<evsel::Selection>);
216216
using EMEventNormInfo = EMEventNormInfos::iterator;
217217

218218
namespace emmcevent

PWGEM/Dilepton/TableProducer/createEMEventDilepton.cxx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ struct CreateEMEventDilepton {
137137
PresliceUnsorted<aod::EMPrimaryElectrons> perCollision_el = aod::emprimaryelectron::collisionId;
138138
PresliceUnsorted<aod::EMPrimaryMuons> perCollision_mu = aod::emprimarymuon::collisionId;
139139

140-
template <bool isMC, bool isTriggerAnalysis, EMEventType eventype, typename TCollisions, typename TBCs>
140+
template <bool isMC, bool isTriggerAnalysis, EMEventType eventtype, typename TCollisions, typename TBCs>
141141
void skimEvent(TCollisions const& collisions, TBCs const&)
142142
{
143143
for (auto& collision : collisions) {
@@ -151,7 +151,13 @@ struct CreateEMEventDilepton {
151151
auto bc = collision.template foundBC_as<TBCs>();
152152
initCCDB(bc);
153153

154-
event_norm_info(collision.alias_raw(), collision.selection_raw(), static_cast<int16_t>(10.f * collision.posZ()));
154+
if constexpr (eventtype == EMEventType::kEvent) {
155+
event_norm_info(collision.alias_raw(), collision.selection_raw(), static_cast<int16_t>(10.f * collision.posZ()), 105.f);
156+
} else if constexpr (eventtype == EMEventType::kEvent_Cent || eventtype == EMEventType::kEvent_Cent_Qvec) {
157+
event_norm_info(collision.alias_raw(), collision.selection_raw(), static_cast<int16_t>(10.f * collision.posZ()), collision.centFT0C());
158+
} else {
159+
event_norm_info(collision.alias_raw(), collision.selection_raw(), static_cast<int16_t>(10.f * collision.posZ()), 105.f);
160+
}
155161

156162
if (!collision.isSelected() || !collision.isEoI()) {
157163
continue;
@@ -175,17 +181,17 @@ struct CreateEMEventDilepton {
175181

176182
event_mult(collision.multFT0A(), collision.multFT0C(), collision.multNTracksPV(), collision.multNTracksPVeta1(), collision.multNTracksPVetaHalf());
177183

178-
if constexpr (eventype == EMEventType::kEvent) {
184+
if constexpr (eventtype == EMEventType::kEvent) {
179185
event_cent(105.f, 105.f, 105.f);
180186
event_qvec(
181187
999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f,
182188
999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f);
183-
} else if constexpr (eventype == EMEventType::kEvent_Cent) {
189+
} else if constexpr (eventtype == EMEventType::kEvent_Cent) {
184190
event_cent(collision.centFT0M(), collision.centFT0A(), collision.centFT0C());
185191
event_qvec(
186192
999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f,
187193
999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f);
188-
} else if constexpr (eventype == EMEventType::kEvent_Cent_Qvec) {
194+
} else if constexpr (eventtype == EMEventType::kEvent_Cent_Qvec) {
189195
event_cent(collision.centFT0M(), collision.centFT0A(), collision.centFT0C());
190196
float q2xft0m = 999.f, q2yft0m = 999.f, q2xft0a = 999.f, q2yft0a = 999.f, q2xft0c = 999.f, q2yft0c = 999.f, q2xbpos = 999.f, q2ybpos = 999.f, q2xbneg = 999.f, q2ybneg = 999.f, q2xbtot = 999.f, q2ybtot = 999.f;
191197
float q3xft0m = 999.f, q3yft0m = 999.f, q3xft0a = 999.f, q3yft0a = 999.f, q3xft0c = 999.f, q3yft0c = 999.f, q3xbpos = 999.f, q3ybpos = 999.f, q3xbneg = 999.f, q3ybneg = 999.f, q3xbtot = 999.f, q3ybtot = 999.f;

0 commit comments

Comments
 (0)