Skip to content

Commit 311b94d

Browse files
committed
Add evsel isFlangeEvent
1 parent c5d1739 commit 311b94d

File tree

3 files changed

+56
-24
lines changed

3 files changed

+56
-24
lines changed

Common/DataModel/Multiplicity.h

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,19 @@ namespace o2::aod
2626
{
2727
namespace mult
2828
{
29-
DECLARE_SOA_COLUMN(MultFV0A, multFV0A, float); //!
30-
DECLARE_SOA_COLUMN(MultFV0AOuter, multFV0AOuter, float); //!
31-
DECLARE_SOA_COLUMN(MultFV0C, multFV0C, float); //!
32-
DECLARE_SOA_COLUMN(MultFT0A, multFT0A, float); //!
33-
DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float); //!
34-
DECLARE_SOA_COLUMN(MultFDDA, multFDDA, float); //!
35-
DECLARE_SOA_COLUMN(MultFDDC, multFDDC, float); //!
36-
DECLARE_SOA_COLUMN(MultZNA, multZNA, float); //!
37-
DECLARE_SOA_COLUMN(MultZNC, multZNC, float); //!
38-
DECLARE_SOA_COLUMN(MultZEM1, multZEM1, float); //!
39-
DECLARE_SOA_COLUMN(MultZEM2, multZEM2, float); //!
40-
DECLARE_SOA_COLUMN(MultZPA, multZPA, float); //!
41-
DECLARE_SOA_COLUMN(MultZPC, multZPC, float); //!
42-
DECLARE_SOA_DYNAMIC_COLUMN(MultFV0M, multFV0M, //!
29+
DECLARE_SOA_COLUMN(MultFV0A, multFV0A, float); //!
30+
DECLARE_SOA_COLUMN(MultFV0C, multFV0C, float); //!
31+
DECLARE_SOA_COLUMN(MultFT0A, multFT0A, float); //!
32+
DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float); //!
33+
DECLARE_SOA_COLUMN(MultFDDA, multFDDA, float); //!
34+
DECLARE_SOA_COLUMN(MultFDDC, multFDDC, float); //!
35+
DECLARE_SOA_COLUMN(MultZNA, multZNA, float); //!
36+
DECLARE_SOA_COLUMN(MultZNC, multZNC, float); //!
37+
DECLARE_SOA_COLUMN(MultZEM1, multZEM1, float); //!
38+
DECLARE_SOA_COLUMN(MultZEM2, multZEM2, float); //!
39+
DECLARE_SOA_COLUMN(MultZPA, multZPA, float); //!
40+
DECLARE_SOA_COLUMN(MultZPC, multZPC, float); //!
41+
DECLARE_SOA_DYNAMIC_COLUMN(MultFV0M, multFV0M, //!
4342
[](float multFV0A, float multFV0C) -> float { return multFV0A + multFV0C; });
4443
DECLARE_SOA_DYNAMIC_COLUMN(MultFT0M, multFT0M, //!
4544
[](float multFT0A, float multFT0C) -> float { return multFT0A + multFT0C; });
@@ -100,6 +99,10 @@ DECLARE_SOA_COLUMN(TimeToPrevious, timeToPrevious, float); //!
10099
DECLARE_SOA_COLUMN(TimeToNext, timeToNext, float); //!
101100
DECLARE_SOA_COLUMN(TimeToNeNext, timeToNeNext, float); //!
102101

102+
// Extra information from FIT detectors
103+
DECLARE_SOA_COLUMN(MultFV0AOuter, multFV0AOuter, float); //! FV0 without innermost ring
104+
DECLARE_SOA_COLUMN(FT0TriggerMask, ft0TriggerMask, uint8_t); //!
105+
103106
} // namespace mult
104107
DECLARE_SOA_TABLE(FV0Mults, "AOD", "FV0MULT", //! Multiplicity with the FV0 detector
105108
mult::MultFV0A, mult::MultFV0C,
@@ -126,6 +129,11 @@ DECLARE_SOA_TABLE(PVMults, "AOD", "PVMULT", //! Multiplicity from the PV contrib
126129
mult::IsInelGt1<mult::MultNTracksPVeta1>);
127130
DECLARE_SOA_TABLE(MFTMults, "AOD", "MFTMULT", //! Multiplicity with MFT
128131
mult::MFTNalltracks, mult::MFTNtracks);
132+
133+
DECLARE_SOA_TABLE(FITExtraMults, "AOD", "FITEXTRAMULT", //! Extra information from FIT detectors
134+
mult::MultFV0AOuter,
135+
mult::FT0TriggerMask);
136+
129137
using BarrelMults = soa::Join<TrackletMults, TPCMults, PVMults>;
130138
using Mults = soa::Join<BarrelMults, FV0Mults, FT0Mults, FDDMults, ZDCMults>;
131139
using MultsRun3 = soa::Join<TPCMults, PVMults, FV0Mults, FT0Mults, FDDMults, ZDCMults>;

Common/Tasks/centralityStudy.cxx

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "Common/DataModel/Multiplicity.h"
2121

2222
#include <CCDB/BasicCCDBManager.h>
23+
#include <DataFormatsFIT/Triggers.h>
2324
#include <DataFormatsParameters/GRPECSObject.h>
2425
#include <Framework/AnalysisDataModel.h>
2526
#include <Framework/AnalysisHelpers.h>
@@ -91,6 +92,7 @@ struct centralityStudy {
9192
Configurable<bool> requireIsVertexTOFmatched{"requireIsVertexTOFmatched", false, "require events with at least one of vertex contributors matched to TOF"};
9293
Configurable<bool> requireIsVertexTRDmatched{"requireIsVertexTRDmatched", false, "require events with at least one of vertex contributors matched to TRD"};
9394
Configurable<bool> rejectSameBunchPileup{"rejectSameBunchPileup", true, "reject collisions in case of pileup with another collision in the same foundBC"};
95+
Configurable<bool> rejectIsFlangeEvent{"rejectIsFlangeEvent", false, "At least one channel with -350 TDC < time < -450 TDC"};
9496

9597
Configurable<bool> rejectITSinROFpileupStandard{"rejectITSinROFpileupStandard", false, "reject collisions in case of in-ROF ITS pileup (standard)"};
9698
Configurable<bool> rejectITSinROFpileupStrict{"rejectITSinROFpileupStrict", false, "reject collisions in case of in-ROF ITS pileup (strict)"};
@@ -201,8 +203,12 @@ struct centralityStudy {
201203
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(11, "Neighbour rejection");
202204
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(12, "no ITS in-ROF pileup (standard)");
203205
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(13, "no ITS in-ROF pileup (strict)");
206+
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(14, "is UPC event");
207+
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(15, "rejectCollInTimeRangeNarrow");
208+
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(16, "em/upc rejection");
209+
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(17, "isFlangeEvent");
204210

205-
histos.add("hFT0A_Collisions", "hFT0C_Collisions", kTH1D, {axisMultUltraFineFT0A});
211+
histos.add("hFT0A_Collisions", "hFT0A_Collisions", kTH1D, {axisMultUltraFineFT0A});
206212
histos.add("hFT0C_Collisions", "hFT0C_Collisions", kTH1D, {axisMultUltraFineFT0C});
207213
histos.add("hFT0M_Collisions", "hFT0M_Collisions", kTH1D, {axisMultUltraFineFT0M});
208214
histos.add("hFV0A_Collisions", "hFV0A_Collisions", kTH1D, {axisMultUltraFineFV0A});
@@ -372,6 +378,10 @@ struct centralityStudy {
372378
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(11, "Neighbour rejection");
373379
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(12, "no ITS in-ROF pileup (standard)");
374380
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(13, "no ITS in-ROF pileup (strict)");
381+
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(14, "is UPC event");
382+
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(15, "rejectCollInTimeRangeNarrow");
383+
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(16, "em/upc rejection");
384+
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(17, "isFlangeEvent");
375385

376386
histPointers.insert({histPath + "hFT0C_Collisions", histos.add((histPath + "hFT0C_Collisions").c_str(), "hFT0C_Collisions", {kTH1D, {{axisMultUltraFineFT0C}}})});
377387
histPointers.insert({histPath + "hFT0A_Collisions", histos.add((histPath + "hFT0A_Collisions").c_str(), "hFT0A_Collisions", {kTH1D, {{axisMultUltraFineFT0A}}})});
@@ -608,7 +618,7 @@ struct centralityStudy {
608618
if (!passRejectCollInTimeRangeNarrow) {
609619
return;
610620
}
611-
histos.fill(HIST("hCollisionSelection"), 14 /* Not ITS ROF pileup (strict) */);
621+
histos.fill(HIST("hCollisionSelection"), 14 /* Reject collision in narrow time range */);
612622
getHist(TH1, histPath + "hCollisionSelection")->Fill(14);
613623

614624
if (collision.multFT0C() < upcRejection.maxFT0CforZNACselection &&
@@ -627,6 +637,18 @@ struct centralityStudy {
627637
histos.fill(HIST("hCollisionSelection"), 15 /* pass em/upc rejection */);
628638
getHist(TH1, histPath + "hCollisionSelection")->Fill(15);
629639

640+
if (rejectIsFlangeEvent) {
641+
if constexpr (requires { collision.ft0TriggerMask(); }) {
642+
constexpr int IsFlangeEventId = 7;
643+
std::bitset<8> ft0TriggerMask = collision.ft0TriggerMask();
644+
if (ft0TriggerMask[IsFlangeEventId]) {
645+
return;
646+
}
647+
}
648+
}
649+
histos.fill(HIST("hCollisionSelection"), 16 /* reject flange events */);
650+
getHist(TH1, histPath + "hCollisionSelection")->Fill(16);
651+
630652
// if we got here, we also finally fill the FT0C histogram, please
631653
histos.fill(HIST("hNPVContributors"), collision.multNTracksPV());
632654
histos.fill(HIST("hFT0A_Collisions"), collision.multFT0A() * scaleSignalFT0C);
@@ -789,22 +811,22 @@ struct centralityStudy {
789811
}
790812
}
791813

792-
void processCollisions(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections, aod::Mults2BC, aod::FV0AOuterMults>::iterator const& collision, aod::MultBCs const&)
814+
void processCollisions(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections, aod::Mults2BC, aod::FITExtraMults>::iterator const& collision, aod::MultBCs const&)
793815
{
794816
genericProcessCollision(collision);
795817
}
796818

797-
void processCollisionsWithResolutionStudy(soa::Join<aod::MultsRun3, aod::MFTMults, aod::Mult2MCExtras, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections, aod::Mults2BC, aod::FV0AOuterMults>::iterator const& collision, soa::Join<aod::MultMCExtras, aod::MultHepMCHIs> const&)
819+
void processCollisionsWithResolutionStudy(soa::Join<aod::MultsRun3, aod::MFTMults, aod::Mult2MCExtras, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections, aod::Mults2BC, aod::FITExtraMults>::iterator const& collision, soa::Join<aod::MultMCExtras, aod::MultHepMCHIs> const&)
798820
{
799821
genericProcessCollision(collision);
800822
}
801823

802-
void processCollisionsWithCentrality(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::Mults2BC, aod::FV0AOuterMults>::iterator const& collision, aod::MultBCs const&)
824+
void processCollisionsWithCentrality(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::Mults2BC, aod::FITExtraMults>::iterator const& collision, aod::MultBCs const&)
803825
{
804826
genericProcessCollision(collision);
805827
}
806828

807-
void processCollisionsWithCentralityWithNeighbours(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::MultNeighs, aod::FV0AOuterMults>::iterator const& collision)
829+
void processCollisionsWithCentralityWithNeighbours(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::MultNeighs, aod::FITExtraMults>::iterator const& collision)
808830
{
809831
genericProcessCollision(collision);
810832
}

Common/Tools/Multiplicity/MultModule.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static const int defaultParameters[nTablesConst][nParameters]{
145145

146146
// table index : match order above
147147
enum tableIndex { kFV0Mults, // standard
148-
kFV0AOuterMults, // standard
148+
kFITExtraMults, // standard
149149
kFT0Mults, // standard
150150
kFDDMults, // standard
151151
kZDCMults, // standard
@@ -191,7 +191,7 @@ struct products : o2::framework::ProducesGroup {
191191
//__________________________________________________
192192
// multiplicity tables
193193
o2::framework::Produces<aod::FV0Mults> tableFV0;
194-
o2::framework::Produces<aod::FV0AOuterMults> tableFV0AOuter;
194+
o2::framework::Produces<aod::FITExtraMults> tableFITExtraMults;
195195
o2::framework::Produces<aod::FT0Mults> tableFT0;
196196
o2::framework::Produces<aod::FDDMults> tableFDD;
197197
o2::framework::Produces<aod::ZDCMults> tableZDC;
@@ -256,6 +256,7 @@ struct multEntry {
256256
float multZPA = 0.0f;
257257
float multZPC = 0.0f;
258258
int multTracklets = 0;
259+
uint8_t fitTriggerMask{};
259260

260261
int multNContribs = 0; // PVMult 0.8
261262
int multNContribsEta1 = 0; // PVMult 1.0
@@ -705,6 +706,7 @@ class MultModule
705706
}
706707
if (collision.has_foundFT0()) {
707708
const auto& ft0 = collision.foundFT0();
709+
mults.fitTriggerMask = ft0.triggerMask();
708710
for (const auto& amplitude : ft0.amplitudeA()) {
709711
mults.multFT0A += amplitude;
710712
}
@@ -750,8 +752,8 @@ class MultModule
750752
if (internalOpts.mEnabledTables[kFV0Mults]) {
751753
cursors.tableFV0(mults.multFV0A, mults.multFV0C);
752754
}
753-
if (internalOpts.mEnabledTables[kFV0AOuterMults]) {
754-
cursors.tableFV0AOuter(mults.multFV0AOuter);
755+
if (internalOpts.mEnabledTables[kFITExtraMults]) {
756+
cursors.tableFITExtraMults(mults.multFV0AOuter, mults.fitTriggerMask);
755757
}
756758
if (internalOpts.mEnabledTables[kFT0Mults]) {
757759
cursors.tableFT0(mults.multFT0A, mults.multFT0C);

0 commit comments

Comments
 (0)