Skip to content

Commit d89e21b

Browse files
authored
[Common] Add bcsel to centrality study (#15808)
1 parent 105ca33 commit d89e21b

3 files changed

Lines changed: 26 additions & 5 deletions

File tree

Common/DataModel/Multiplicity.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ DECLARE_SOA_TABLE(MultBCs, "AOD", "MULTBC", //!
285285
bc::Flags);
286286
using MultBC = MultBCs::iterator;
287287

288+
DECLARE_SOA_TABLE(MultBcSel, "AOD", "MULTBCSEL", //! BC selection bits joinable with multBCs
289+
evsel::Selection);
290+
288291
// crosslinks
289292
namespace mult
290293
{

Common/TableProducer/multiplicityExtraTable.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const int nBCsPerOrbit = o2::constants::lhc::LHCMaxBunches;
4141

4242
struct MultiplicityExtraTable {
4343
Produces<aod::MultBCs> multBC;
44+
Produces<aod::MultBcSel> multBcSel;
4445
Produces<aod::MultNeighs> multNeigh;
4546

4647
Produces<aod::Mults2BC> mult2bc;
@@ -85,7 +86,7 @@ struct MultiplicityExtraTable {
8586

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

88-
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)
89+
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)
8990
{
9091
//+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+
9192
// determine saved BCs and corresponding new BC table index
@@ -260,6 +261,8 @@ struct MultiplicityExtraTable {
260261
multFV0TriggerBits, multFT0TriggerBits, multFDDTriggerBits, multBCTriggerMask, collidingBC,
261262
bc.timestamp(),
262263
bc.flags());
264+
265+
multBcSel(bc.selection_raw());
263266
}
264267
}
265268

Common/Tasks/centralityStudy.cxx

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ struct centralityStudy {
9797
Configurable<bool> rejectITSinROFpileupStandard{"rejectITSinROFpileupStandard", false, "reject collisions in case of in-ROF ITS pileup (standard)"};
9898
Configurable<bool> rejectITSinROFpileupStrict{"rejectITSinROFpileupStrict", false, "reject collisions in case of in-ROF ITS pileup (strict)"};
9999
Configurable<bool> rejectCollInTimeRangeNarrow{"rejectCollInTimeRangeNarrow", false, "reject if extra colls in time range (narrow)"};
100+
Configurable<bool> rejectZNAC{"rejectZNAC", false, "reject if !(kIsBBZNA && kIsBBZNC)"};
100101

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

@@ -225,6 +226,13 @@ struct centralityStudy {
225226

226227
if (doprocessBCs) {
227228
histos.add("hBCSelection", "hBCSelection", kTH1D, {{20, -0.5, 19.5f}});
229+
histos.get<TH1>(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(1, "All BCs");
230+
histos.get<TH1>(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(2, "Colliding BCs");
231+
histos.get<TH1>(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(3, "TVX");
232+
histos.get<TH1>(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(4, "FV0OrA");
233+
histos.get<TH1>(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(5, "upc rej");
234+
histos.get<TH1>(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(6, "zdc rej");
235+
228236
histos.add("hFT0C_BCs", "hFT0C_BCs", kTH1D, {axisMultUltraFineFT0C});
229237
histos.add("hFT0M_BCs", "hFT0M_BCs", kTH1D, {axisMultUltraFineFT0M});
230238
histos.add("hFV0A_BCs", "hFV0A_BCs", kTH1D, {axisMultUltraFineFV0A});
@@ -831,27 +839,31 @@ struct centralityStudy {
831839
genericProcessCollision(collision);
832840
}
833841

834-
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&)
842+
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&)
835843
{
836844
// process BCs, calculate FT0C distribution
837845
// conditionals suggested by FIT team (Jacek O. et al)
838846
histos.fill(HIST("hBCSelection"), 0); // all BCs
847+
839848
if (selectCollidingBCs && !multbc.multCollidingBC())
840849
return;
841850
histos.fill(HIST("hBCSelection"), 1); // colliding
851+
842852
if (selectTVX && !multbc.multTVX())
843853
return;
844854
histos.fill(HIST("hBCSelection"), 2); // TVX
855+
845856
if (selectFV0OrA && !multbc.multFV0OrA())
846857
return;
847858
histos.fill(HIST("hBCSelection"), 3); // FV0OrA
859+
848860
if (vertexZwithT0 < 100.0f) {
849861
if (!multbc.multFT0PosZValid())
850862
return;
851863
if (TMath::Abs(multbc.multFT0PosZ()) > vertexZwithT0)
852864
return;
853865
}
854-
histos.fill(HIST("hBCSelection"), 4); // FV0OrA
866+
histos.fill(HIST("hBCSelection"), 4); // FT0PosZ
855867

856868
if (multbc.multFT0C() < upcRejection.maxFT0CforZNACselection &&
857869
multbc.multZNA() < upcRejection.minZNACsignal &&
@@ -866,8 +878,11 @@ struct centralityStudy {
866878
multbc.multFDDA() < upcRejection.minFDDAsignal) {
867879
return;
868880
}
869-
870-
histos.fill(HIST("hBCSelection"), 5); // znac
881+
histos.fill(HIST("hBCSelection"), 5); // znac amp
882+
if (rejectZNAC && !multbc.selection_bit(o2::aod::evsel::kIsBBZNA) && !multbc.selection_bit(o2::aod::evsel::kIsBBZNC)) {
883+
return;
884+
}
885+
histos.fill(HIST("hBCSelection"), 6); // znac time
871886

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

0 commit comments

Comments
 (0)