Skip to content

Commit

Permalink
Common/Mult: add pvZ from T0 for centrality
Browse files Browse the repository at this point in the history
  • Loading branch information
ddobrigk committed Sep 6, 2024
1 parent d4abd42 commit c2cb53e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 14 deletions.
30 changes: 18 additions & 12 deletions Common/DataModel/Multiplicity.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ DECLARE_SOA_COLUMN(MultBCFV0A, multBCFV0A, float); //!
DECLARE_SOA_COLUMN(MultBCFDDA, multBCFDDA, float); //!
DECLARE_SOA_COLUMN(MultBCFDDC, multBCFDDC, float); //!

DECLARE_SOA_COLUMN(MultBCFZNA, multBCFZNA, float); //!
DECLARE_SOA_COLUMN(MultBCFZNC, multBCFZNC, float); //!
DECLARE_SOA_COLUMN(MultBCFZEM1, multBCFZEM1, float); //!
DECLARE_SOA_COLUMN(MultBCFZEM2, multBCFZEM2, float); //!
DECLARE_SOA_COLUMN(MultBCFZPA, multBCFZPA, float); //!
DECLARE_SOA_COLUMN(MultBCFZPC, multBCFZPC, float); //!
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); //!
Expand All @@ -192,19 +192,25 @@ 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_TABLE(MultsBC, "AOD", "MULTBC", //!
multBC::MultBCFT0A,
multBC::MultBCFT0C,
multBC::MultBCFT0PosZ,
multBC::MultBCFT0PosZValid,
multBC::MultBCFV0A,
multBC::MultBCFDDA,
multBC::MultBCFDDC,
multBC::MultBCFZNA,
multBC::MultBCFZNC,
multBC::MultBCFZEM1,
multBC::MultBCFZEM2,
multBC::MultBCFZPA,
multBC::MultBCFZPC,
multBC::MultBCZNA,
multBC::MultBCZNC,
multBC::MultBCZEM1,
multBC::MultBCZEM2,
multBC::MultBCZPA,
multBC::MultBCZPC,
multBC::MultBCTVX,
multBC::MultBCFV0OrA,
multBC::MultBCV0triggerBits,
Expand Down
9 changes: 7 additions & 2 deletions Common/TableProducer/multiplicityExtraTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ struct MultiplicityExtraTable {
float multZPA = -1.f;
float multZPC = -1.f;

float posZFT0 = -1e+3;
bool posZFT0valid = false;

uint8_t multFT0TriggerBits = 0;
uint8_t multFV0TriggerBits = 0;
uint8_t multFDDTriggerBits = 0;
Expand All @@ -146,7 +149,7 @@ struct MultiplicityExtraTable {
bool collidingBC = CollidingBunch.test(localBC);

if (bc.has_ft0()) {
auto ft0 = bc.ft0();
const auto& ft0 = bc.ft0();
std::bitset<8> triggers = ft0.triggerMask();
Tvx = triggers[o2::fit::Triggers::bitVertex];
multFT0TriggerBits = static_cast<uint8_t>(triggers.to_ulong());
Expand All @@ -158,6 +161,8 @@ struct MultiplicityExtraTable {
for (auto amplitude : ft0.amplitudeC()) {
multFT0C += amplitude;
}
posZFT0 = ft0.posZ();
posZFT0valid = ft0.isValidTime();
} else {
multFT0A = -999.0f;
multFT0C = -999.0f;
Expand Down Expand Up @@ -208,7 +213,7 @@ struct MultiplicityExtraTable {
}

bc2mult(bc2multArray[bc.globalIndex()]);
multBC(multFT0A, multFT0C, multFV0A, multFDDA, multFDDC, multZNA, multZNC, multZEM1, multZEM2, multZPA, multZPC, Tvx, isFV0OrA, multFV0TriggerBits, multFT0TriggerBits, multFDDTriggerBits, multBCTriggerMask, collidingBC);
multBC(multFT0A, multFT0C, posZFT0, posZFT0valid, multFV0A, multFDDA, multFDDC, multZNA, multZNC, multZEM1, multZEM2, multZPA, multZPC, Tvx, isFV0OrA, multFV0TriggerBits, multFT0TriggerBits, multFDDTriggerBits, multBCTriggerMask, collidingBC);
}
}

Expand Down

0 comments on commit c2cb53e

Please sign in to comment.