Skip to content

Commit ba15342

Browse files
authored
[PWGJE,EMCAL-850] Add TVX check histogram for EMCal QA (#10767)
1 parent 68e793d commit ba15342

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

PWGJE/Tasks/emcEventSelectionQA.cxx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,25 @@ using namespace o2::framework::expressions;
2929

3030
using BCEvSels = o2::soa::Join<o2::aod::BCs, o2::aod::BcSels>;
3131
using CollEventSels = o2::soa::Join<o2::aod::Collisions, o2::aod::EvSels>;
32+
using FilteredCells = o2::soa::Filtered<aod::Calos>;
3233

3334
struct EmcEventSelectionQA {
3435
o2::framework::HistogramRegistry mHistManager{"EMCALEventSelectionQAHistograms"};
3536

3637
// Require EMCAL cells (CALO type 1)
3738
Filter emccellfilter = aod::calo::caloType == 1;
3839

40+
const int mRun3MinNumber = 300000;
41+
3942
void init(o2::framework::InitContext const&)
4043
{
4144
using O2HistType = o2::framework::HistType;
4245
using O2Axis = o2::framework::AxisSpec;
4346

4447
O2Axis matchingAxis{3, -0.5, 2.5, "Matching Status (0, 1, 2+ collisions)", "Matching status"}, // 0, no vertex,1 vertex found , 2 multiple vertices found
45-
bcAxis{4001, -0.5, 4000.5, "bcid", "BC ID"};
48+
bcAxis{4001, -0.5, 4000.5, "bcid", "BC ID"},
49+
amplitudeAxisLarge{1000, 0., 100., "amplitudeLarge", "Amplitude (GeV)"},
50+
timeAxisLarge{1500, -600, 900, "celltime", "#it{t}_{cell} (ns)"};
4651

4752
mHistManager.add("hCollisionMatching", "Collision Status", O2HistType::kTH1F, {matchingAxis});
4853
mHistManager.add("hCollisionMatchingReadout", "Collision Status EMCAL Readout", O2HistType::kTH1F, {matchingAxis});
@@ -71,10 +76,12 @@ struct EmcEventSelectionQA {
7176
mHistManager.add("hBCEmcalEJ2", "Bunch crossings with EJ2 trigger from CTP", O2HistType::kTH1F, {bcAxis});
7277
mHistManager.add("hBCEmcalDJ2", "Bunch crossings with DJ2 trigger from CTP", O2HistType::kTH1F, {bcAxis});
7378
mHistManager.add("hBCTVX", "Bunch crossings with FIT TVX trigger from CTP", O2HistType::kTH1F, {bcAxis});
79+
mHistManager.add("hBCNoTVXEmcalReadout", "Bunch crossings with no FIT TVX trigger from CTP but with EMCal im readout", O2HistType::kTH1F, {bcAxis});
7480
mHistManager.add("hBCEmcalCellContent", "Bunch crossings with non-0 EMCAL cell content", O2HistType::kTH1F, {bcAxis});
7581
mHistManager.add("hBCCollisionCounter_TVX", "Number of BCs with a certain number of rec. colls", O2HistType::kTH2F, {bcAxis, matchingAxis});
7682
mHistManager.add("hBCEMCalReadoutAndEmcalCellContent", "Bunch crossings with EMCAL trigger from CTP and non-0 EMCAL cell content", O2HistType::kTH1F, {bcAxis});
7783
mHistManager.add("hBCNotEMCalReadoutButEmcalCellContent", "Bunch crossings without EMCAL trigger from CTP but with non-0 EMCAL cell content", O2HistType::kTH1F, {bcAxis});
84+
mHistManager.add("hAmplitudevsCellTimeNoReadout", "Amplitude vs cell time for bunch crossings without EMCAL trigger from CTP but with non-0 EMCAL cell content", O2HistType::kTH2D, {timeAxisLarge, amplitudeAxisLarge});
7885

7986
initCollisionHistogram(mHistManager.get<TH1>(HIST("hCollisionMatching")).get());
8087
initCollisionHistogram(mHistManager.get<TH1>(HIST("hCollisionMatchingReadout")).get());
@@ -92,6 +99,7 @@ struct EmcEventSelectionQA {
9299
}
93100

94101
PresliceUnsorted<CollEventSels> perFoundBC = aod::evsel::foundBCId;
102+
Preslice<FilteredCells> cellsPerFoundBC = aod::calo::bcId;
95103

96104
void process(BCEvSels const& bcs, CollEventSels const& collisions, soa::Filtered<aod::Calos> const& cells)
97105
{
@@ -112,7 +120,7 @@ struct EmcEventSelectionQA {
112120
bool isEMCALreadout = false;
113121
auto bcID = bc.globalBC() % 3564;
114122

115-
if (bc.runNumber() > 300000) {
123+
if (bc.runNumber() > mRun3MinNumber) {
116124
// in case of run3 not all BCs contain EMCAL data, require trigger selection also for min. bias
117125
// in addition select also L0/L1 triggers as triggers with EMCAL in reaodut
118126
if (bc.alias_bit(kTVXinEMC) || bc.alias_bit(kEMC7) || bc.alias_bit(kEG1) || bc.alias_bit(kEG2) || bc.alias_bit(kDG1) || bc.alias_bit(kDG2) || bc.alias_bit(kEJ1) || bc.alias_bit(kEJ2) || bc.alias_bit(kDJ1) || bc.alias_bit(kDJ2)) {
@@ -176,6 +184,10 @@ struct EmcEventSelectionQA {
176184
mHistManager.fill(HIST("hBCEMCalReadoutAndEmcalCellContent"), bcID);
177185
} else {
178186
mHistManager.fill(HIST("hBCNotEMCalReadoutButEmcalCellContent"), bcID);
187+
auto cellsInBC = cells.sliceBy(cellsPerFoundBC, bc.globalIndex());
188+
for (const auto& cell : cellsInBC) {
189+
mHistManager.fill(HIST("hAmplitudevsCellTimeNoReadout"), cell.time(), cell.amplitude());
190+
}
179191
}
180192
}
181193
}
@@ -199,6 +211,9 @@ struct EmcEventSelectionQA {
199211
mHistManager.fill(HIST("hCollisionMatching"), collisionStatus);
200212
if (isEMCALreadout) {
201213
mHistManager.fill(HIST("hCollisionMatchingReadout"), collisionStatus);
214+
if (!bc.selection_bit(aod::evsel::kIsTriggerTVX)) {
215+
mHistManager.fill(HIST("hBCNoTVXEmcalReadout"), bcID);
216+
}
202217
// various triggers
203218
if (bc.alias_bit(kTVXinEMC)) {
204219
mHistManager.fill(HIST("hCollisionMatchingMB"), collisionStatus);

0 commit comments

Comments
 (0)