Skip to content
Merged
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
3 changes: 3 additions & 0 deletions Common/DataModel/Multiplicity.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
[](int multPveta1) -> bool { return multPveta1 > 1; });

// forward track counters
DECLARE_SOA_COLUMN(MFTNalltracks, mftNalltracks, int); //! overall counter, uses AO2D coll assoc

Check failure on line 58 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(MFTNtracks, mftNtracks, int); //! reassigned, uses mult group software

Check failure on line 59 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

// MC
DECLARE_SOA_COLUMN(MultMCFT0A, multMCFT0A, int); //!
Expand Down Expand Up @@ -101,7 +101,7 @@

// Extra information from FIT detectors
DECLARE_SOA_COLUMN(MultFV0AOuter, multFV0AOuter, float); //! FV0 without innermost ring
DECLARE_SOA_COLUMN(FT0TriggerMask, ft0TriggerMask, uint8_t); //!

Check failure on line 104 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

} // namespace mult
DECLARE_SOA_TABLE(FV0Mults, "AOD", "FV0MULT", //! Multiplicity with the FV0 detector
Expand Down Expand Up @@ -285,6 +285,9 @@
bc::Flags);
using MultBC = MultBCs::iterator;

DECLARE_SOA_TABLE(MultBcSel, "AOD", "MULTBCSEL", //! BC selection bits joinable with multBCs
evsel::Selection);

// crosslinks
namespace mult
{
Expand All @@ -292,7 +295,7 @@
}
namespace multBC
{
DECLARE_SOA_INDEX_COLUMN(FT0Mult, ft0Mult);

Check failure on line 298 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
}

// for QA purposes
Expand Down
5 changes: 4 additions & 1 deletion Common/TableProducer/multiplicityExtraTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

struct MultiplicityExtraTable {
Produces<aod::MultBCs> multBC;
Produces<aod::MultBcSel> multBcSel;
Produces<aod::MultNeighs> multNeigh;

Produces<aod::Mults2BC> mult2bc;
Expand Down Expand Up @@ -85,7 +86,7 @@

using BCsWithRun3Matchings = soa::Join<aod::BCs, aod::Timestamps, aod::Run3MatchedToBCSparse>;

void processBCs(soa::Join<BCsWithRun3Matchings, aod::BCFlags> const& bcs, aod::FV0As const&, aod::FT0s const&, aod::FDDs const&, aod::Zdcs const&, soa::Join<aod::Collisions, aod::EvSels> const& collisions)
void processBCs(soa::Join<BCsWithRun3Matchings, aod::BCFlags, aod::BcSels> const& bcs, aod::FV0As const&, aod::FT0s const&, aod::FDDs const&, aod::Zdcs const&, soa::Join<aod::Collisions, aod::EvSels> const& collisions)
{
//+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+
// determine saved BCs and corresponding new BC table index
Expand Down Expand Up @@ -115,7 +116,7 @@
float multFT0C = 0.f;
if (bc.has_ft0()) {
auto ft0 = bc.ft0();
for (auto amplitude : ft0.amplitudeC()) {

Check failure on line 119 in Common/TableProducer/multiplicityExtraTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
multFT0C += amplitude;
}
} else {
Expand Down Expand Up @@ -194,10 +195,10 @@
multFT0TriggerBits = static_cast<uint8_t>(triggers.to_ulong());

// calculate T0 charge
for (auto amplitude : ft0.amplitudeA()) {

Check failure on line 198 in Common/TableProducer/multiplicityExtraTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
multFT0A += amplitude;
}
for (auto amplitude : ft0.amplitudeC()) {

Check failure on line 201 in Common/TableProducer/multiplicityExtraTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
multFT0C += amplitude;
}
posZFT0 = ft0.posZ();
Expand All @@ -211,7 +212,7 @@
std::bitset<8> fV0Triggers = fv0.triggerMask();
multFV0TriggerBits = static_cast<uint8_t>(fV0Triggers.to_ulong());

for (auto amplitude : fv0.amplitude()) {

Check failure on line 215 in Common/TableProducer/multiplicityExtraTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
multFV0A += amplitude;
}
isFV0OrA = fV0Triggers[o2::fit::Triggers::bitA];
Expand All @@ -224,10 +225,10 @@
std::bitset<8> fFDDTriggers = fdd.triggerMask();
multFDDTriggerBits = static_cast<uint8_t>(fFDDTriggers.to_ulong());

for (auto amplitude : fdd.chargeA()) {

Check failure on line 228 in Common/TableProducer/multiplicityExtraTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
multFDDA += amplitude;
}
for (auto amplitude : fdd.chargeC()) {

Check failure on line 231 in Common/TableProducer/multiplicityExtraTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
multFDDC += amplitude;
}
} else {
Expand Down Expand Up @@ -260,6 +261,8 @@
multFV0TriggerBits, multFT0TriggerBits, multFDDTriggerBits, multBCTriggerMask, collidingBC,
bc.timestamp(),
bc.flags());

multBcSel(bc.selection_raw());
}
}

Expand Down
23 changes: 19 additions & 4 deletions Common/Tasks/centralityStudy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ struct centralityStudy {
Configurable<bool> rejectITSinROFpileupStandard{"rejectITSinROFpileupStandard", false, "reject collisions in case of in-ROF ITS pileup (standard)"};
Configurable<bool> rejectITSinROFpileupStrict{"rejectITSinROFpileupStrict", false, "reject collisions in case of in-ROF ITS pileup (strict)"};
Configurable<bool> rejectCollInTimeRangeNarrow{"rejectCollInTimeRangeNarrow", false, "reject if extra colls in time range (narrow)"};
Configurable<bool> rejectZNAC{"rejectZNAC", false, "reject if !(kIsBBZNA && kIsBBZNC)"};

Configurable<bool> selectUPCcollisions{"selectUPCcollisions", false, "select collisions tagged with UPC flag"};

Expand Down Expand Up @@ -225,6 +226,13 @@ struct centralityStudy {

if (doprocessBCs) {
histos.add("hBCSelection", "hBCSelection", kTH1D, {{20, -0.5, 19.5f}});
histos.get<TH1>(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(1, "All BCs");
histos.get<TH1>(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(2, "Colliding BCs");
histos.get<TH1>(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(3, "TVX");
histos.get<TH1>(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(4, "FV0OrA");
histos.get<TH1>(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(5, "upc rej");
histos.get<TH1>(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(6, "zdc rej");

histos.add("hFT0C_BCs", "hFT0C_BCs", kTH1D, {axisMultUltraFineFT0C});
histos.add("hFT0M_BCs", "hFT0M_BCs", kTH1D, {axisMultUltraFineFT0M});
histos.add("hFV0A_BCs", "hFV0A_BCs", kTH1D, {axisMultUltraFineFV0A});
Expand Down Expand Up @@ -831,27 +839,31 @@ struct centralityStudy {
genericProcessCollision(collision);
}

void processBCs(soa::Join<aod::BC2Mults, aod::MultBCs>::iterator const& multbc, soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal> const&)
void processBCs(soa::Join<aod::BC2Mults, aod::MultBCs, aod::MultBcSel>::iterator const& multbc, soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal> const&)
{
// process BCs, calculate FT0C distribution
// conditionals suggested by FIT team (Jacek O. et al)
histos.fill(HIST("hBCSelection"), 0); // all BCs

if (selectCollidingBCs && !multbc.multCollidingBC())
return;
histos.fill(HIST("hBCSelection"), 1); // colliding

if (selectTVX && !multbc.multTVX())
return;
histos.fill(HIST("hBCSelection"), 2); // TVX

if (selectFV0OrA && !multbc.multFV0OrA())
return;
histos.fill(HIST("hBCSelection"), 3); // FV0OrA

if (vertexZwithT0 < 100.0f) {
if (!multbc.multFT0PosZValid())
return;
if (TMath::Abs(multbc.multFT0PosZ()) > vertexZwithT0)
return;
}
histos.fill(HIST("hBCSelection"), 4); // FV0OrA
histos.fill(HIST("hBCSelection"), 4); // FT0PosZ

if (multbc.multFT0C() < upcRejection.maxFT0CforZNACselection &&
multbc.multZNA() < upcRejection.minZNACsignal &&
Expand All @@ -866,8 +878,11 @@ struct centralityStudy {
multbc.multFDDA() < upcRejection.minFDDAsignal) {
return;
}

histos.fill(HIST("hBCSelection"), 5); // znac
histos.fill(HIST("hBCSelection"), 5); // znac amp
if (rejectZNAC && !multbc.selection_bit(o2::aod::evsel::kIsBBZNA) && !multbc.selection_bit(o2::aod::evsel::kIsBBZNC)) {
return;
}
histos.fill(HIST("hBCSelection"), 6); // znac time

// if we got here, we also finally fill the FT0C histogram, please
histos.fill(HIST("hFT0C_BCs"), multbc.multFT0C() * scaleSignalFT0C);
Expand Down
Loading