Skip to content

Commit b71020d

Browse files
[PWGDQ] Adding BC tolerance for zorro and new Ev. sel. (AliceO2Group#9354)
Co-authored-by: Lucamicheletti93 <[email protected]>
1 parent 696a38a commit b71020d

File tree

4 files changed

+49
-12
lines changed

4 files changed

+49
-12
lines changed

PWGDQ/Core/CutsLibrary.cxx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3466,7 +3466,7 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName)
34663466
return cut;
34673467
}
34683468

3469-
if (!nameStr.compare("eventStandardSel8")) {
3469+
if (!nameStr.compare("eventStandardSel8")) { // kIsSel8 = kIsTriggerTVX && kNoITSROFrameBorder && kNoTimeFrameBorder
34703470
cut->AddCut(VarManager::kVtxZ, -10.0, 10.0);
34713471
cut->AddCut(VarManager::kIsSel8, 0.5, 1.5);
34723472
return cut;
@@ -3479,14 +3479,14 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName)
34793479
return cut;
34803480
}
34813481

3482-
if (!nameStr.compare("eventStandardSel8NoTFBorder")) {
3482+
if (!nameStr.compare("eventStandardSel8NoTFBorder")) { // Redundant w.r.t. eventStandardSel8, to be removed
34833483
cut->AddCut(VarManager::kVtxZ, -10.0, 10.0);
34843484
cut->AddCut(VarManager::kIsSel8, 0.5, 1.5);
34853485
cut->AddCut(VarManager::kIsNoTFBorder, 0.5, 1.5);
34863486
return cut;
34873487
}
34883488

3489-
if (!nameStr.compare("eventStandardSel8NoTFBNoITSROFB")) {
3489+
if (!nameStr.compare("eventStandardSel8NoTFBNoITSROFB")) { // Redundant w.r.t. eventStandardSel8, to be removed
34903490
cut->AddCut(VarManager::kVtxZ, -10.0, 10.0);
34913491
cut->AddCut(VarManager::kIsSel8, 0.5, 1.5);
34923492
cut->AddCut(VarManager::kIsNoTFBorder, 0.5, 1.5);
@@ -3512,6 +3512,17 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName)
35123512
return cut;
35133513
}
35143514

3515+
if (!nameStr.compare("eventStandardSel8PbPbQualityGoodITSLayersAll")) { // kIsSel8 = kIsTriggerTVX && kNoITSROFrameBorder && kNoTimeFrameBorder
3516+
cut->AddCut(VarManager::kVtxZ, -10.0, 10.0);
3517+
cut->AddCut(VarManager::kIsSel8, 0.5, 1.5);
3518+
cut->AddCut(VarManager::kIsNoTFBorder, 0.5, 1.5);
3519+
cut->AddCut(VarManager::kIsNoITSROFBorder, 0.5, 1.5);
3520+
cut->AddCut(VarManager::kIsNoSameBunch, 0.5, 1.5);
3521+
cut->AddCut(VarManager::kIsGoodZvtxFT0vsPV, 0.5, 1.5);
3522+
cut->AddCut(VarManager::kIsGoodITSLayersAll, 0.5, 1.5);
3523+
return cut;
3524+
}
3525+
35153526
if (!nameStr.compare("eventStandardSel8PbPbQualityTightTrackOccupancy")) {
35163527
cut->AddCut(VarManager::kVtxZ, -10.0, 10.0);
35173528
cut->AddCut(VarManager::kIsSel8, 0.5, 1.5);

PWGDQ/Core/VarManager.h

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ class VarManager : public TObject
189189
kIsGoodZvtxFT0vsPV, // No collisions w/ difference between z_ {PV, tracks} and z_{PV FT0A-C}
190190
kIsVertexITSTPC, // At least one ITS-TPC track
191191
kIsVertexTOFmatched, // At least one TOF-matched track
192-
kIsSel8, // TVX in Run3
192+
kIsSel8, // TVX in Run3 && No time frame border && No ITS read out frame border (from event selection)
193+
kIsGoodITSLayer3, // number of inactive chips on ITS layer 3 is below maximum allowed value
194+
kIsGoodITSLayer0123, // numbers of inactive chips on ITS layers 0-3 are below maximum allowed values
195+
kIsGoodITSLayersAll, // numbers of inactive chips on all ITS layers are below maximum allowed values
193196
kIsINT7,
194197
kIsEMC7,
195198
kIsINT7inMUON,
@@ -1418,6 +1421,15 @@ void VarManager::FillEvent(T const& event, float* values)
14181421
if (fgUsedVars[kIsSel8]) {
14191422
values[kIsSel8] = event.selection_bit(o2::aod::evsel::kIsTriggerTVX) && event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) && event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder);
14201423
}
1424+
if (fgUsedVars[kIsGoodITSLayer3]) {
1425+
values[kIsGoodITSLayer3] = event.selection_bit(o2::aod::evsel::kIsGoodITSLayer3);
1426+
}
1427+
if (fgUsedVars[kIsGoodITSLayer0123]) {
1428+
values[kIsGoodITSLayer0123] = event.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123);
1429+
}
1430+
if (fgUsedVars[kIsGoodITSLayersAll]) {
1431+
values[kIsGoodITSLayersAll] = event.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll);
1432+
}
14211433
if (fgUsedVars[kIsINT7]) {
14221434
values[kIsINT7] = (event.alias_bit(kINT7) > 0);
14231435
}
@@ -1572,6 +1584,15 @@ void VarManager::FillEvent(T const& event, float* values)
15721584
if (fgUsedVars[kIsSel8]) {
15731585
values[kIsSel8] = event.selection_bit(o2::aod::evsel::kIsTriggerTVX) && event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder);
15741586
}
1587+
if (fgUsedVars[kIsGoodITSLayer3]) {
1588+
values[kIsGoodITSLayer3] = event.selection_bit(o2::aod::evsel::kIsGoodITSLayer3);
1589+
}
1590+
if (fgUsedVars[kIsGoodITSLayer0123]) {
1591+
values[kIsGoodITSLayer0123] = event.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123);
1592+
}
1593+
if (fgUsedVars[kIsGoodITSLayersAll]) {
1594+
values[kIsGoodITSLayersAll] = event.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll);
1595+
}
15751596
if (fgUsedVars[kIsINT7]) {
15761597
values[kIsINT7] = (event.alias_bit(kINT7) > 0);
15771598
}

PWGDQ/TableProducer/tableMaker.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,10 @@ struct TableMaker {
183183
Configurable<bool> fIsAmbiguous{"cfgIsAmbiguous", false, "Whether we enable QA plots for ambiguous tracks"};
184184

185185
struct : ConfigurableGroup {
186-
Configurable<bool> fConfigRunZorro{"cfgRunZorro", false, "Enable event selection with zorro [WARNING: under debug, do not enable!]"};
186+
Configurable<bool> fConfigRunZorro{"cfgRunZorro", false, "Enable event selection with zorro"};
187187
Configurable<string> fConfigZorroTrigMask{"cfgZorroTriggerMask", "fDiMuon", "DQ Trigger masks: fSingleE,fLMeeIMR,fLMeeHMR,fDiElectron,fSingleMuLow,fSingleMuHigh,fDiMuon"};
188188
Configurable<bool> fConfigRunZorroSel{"cfgRunZorroSel", false, "Select events with trigger mask"};
189+
Configurable<uint64_t> fBcTolerance{"cfgBcTolerance", 100, "Number of BCs of margin for software triggers"};
189190
} useZorro;
190191

191192
struct : ConfigurableGroup {
@@ -449,9 +450,10 @@ struct TableMaker {
449450

450451
if (useZorro.fConfigRunZorro) {
451452
zorro.setBaseCCDBPath(useCCDBConfigurations.fConfigCcdbPathZorro.value);
453+
zorro.setBCtolerance(useZorro.fBcTolerance);
452454
zorro.initCCDB(fCCDB.service, fCurrentRun, bc.timestamp(), useZorro.fConfigZorroTrigMask.value);
453455
zorro.populateExternalHists(fCurrentRun, reinterpret_cast<TH2D*>(fStatsList->At(3)), reinterpret_cast<TH2D*>(fStatsList->At(4)));
454-
bool zorroSel = zorro.isSelected(bc.globalBC(), 100UL, reinterpret_cast<TH2D*>(fStatsList->At(4)));
456+
bool zorroSel = zorro.isSelected(bc.globalBC(), useZorro.fBcTolerance, reinterpret_cast<TH2D*>(fStatsList->At(4)));
455457
if (zorroSel) {
456458
tag |= (static_cast<uint64_t>(true) << 56); // the same bit is used for this zorro selections from ccdb
457459
}
@@ -920,9 +922,10 @@ struct TableMaker {
920922

921923
if (useZorro.fConfigRunZorro) {
922924
zorro.setBaseCCDBPath(useCCDBConfigurations.fConfigCcdbPathZorro.value);
925+
zorro.setBCtolerance(useZorro.fBcTolerance);
923926
zorro.initCCDB(fCCDB.service, fCurrentRun, bc.timestamp(), useZorro.fConfigZorroTrigMask.value);
924927
zorro.populateExternalHists(fCurrentRun, reinterpret_cast<TH2D*>(fStatsList->At(3)), reinterpret_cast<TH2D*>(fStatsList->At(4)));
925-
bool zorroSel = zorro.isSelected(bc.globalBC(), 100UL, reinterpret_cast<TH2D*>(fStatsList->At(4)));
928+
bool zorroSel = zorro.isSelected(bc.globalBC(), useZorro.fBcTolerance, reinterpret_cast<TH2D*>(fStatsList->At(4)));
926929
if (zorroSel) {
927930
tag |= (static_cast<uint64_t>(true) << 56); // the same bit is used for this zorro selections from ccdb
928931
}

PWGDQ/TableProducer/tableMaker_withAssoc.cxx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,10 @@ struct TableMaker {
178178

179179
// Zorro selection
180180
struct : ConfigurableGroup {
181-
Configurable<bool> fConfigRunZorro{"cfgRunZorro", false, "Enable event selection with zorro [WARNING: under debug, do not enable!]"};
181+
Configurable<bool> fConfigRunZorro{"cfgRunZorro", false, "Enable event selection with zorro"};
182182
Configurable<std::string> fConfigZorroTrigMask{"cfgZorroTriggerMask", "fDiMuon", "DQ Trigger masks: fSingleE,fLMeeIMR,fLMeeHMR,fDiElectron,fSingleMuLow,fSingleMuHigh,fDiMuon"};
183183
Configurable<bool> fConfigRunZorroSel{"cfgRunZorroSel", false, "Select events with trigger mask"};
184+
Configurable<uint64_t> fBcTolerance{"cfgBcTolerance", 100, "Number of BCs of margin for software triggers"};
184185
} fConfigZorro;
185186

186187
// Steer QA output
@@ -796,9 +797,10 @@ struct TableMaker {
796797

797798
if (fConfigZorro.fConfigRunZorro) {
798799
zorro.setBaseCCDBPath(fConfigCCDB.fConfigCcdbPathZorro.value);
800+
zorro.setBCtolerance(fConfigZorro.fBcTolerance);
799801
zorro.initCCDB(fCCDB.service, fCurrentRun, bc.timestamp(), fConfigZorro.fConfigZorroTrigMask.value);
800802
zorro.populateExternalHists(fCurrentRun, reinterpret_cast<TH2D*>(fStatsList->At(kStatsZorroInfo)), reinterpret_cast<TH2D*>(fStatsList->At(kStatsZorroSel)));
801-
bool zorroSel = zorro.isSelected(bc.globalBC(), 100UL, reinterpret_cast<TH2D*>(fStatsList->At(kStatsZorroSel)));
803+
bool zorroSel = zorro.isSelected(bc.globalBC(), fConfigZorro.fBcTolerance, reinterpret_cast<TH2D*>(fStatsList->At(kStatsZorroSel)));
802804
if (zorroSel) {
803805
tag |= (static_cast<uint64_t>(true) << 56); // the same bit is used for this zorro selections from ccdb
804806
}
@@ -1298,9 +1300,9 @@ struct TableMaker {
12981300
}
12991301
} // end loop over skimmed collisions
13001302

1301-
LOG(info) << "Skims in this TF: " << fCollIndexMap.size() << " collisions; " << trackBasic.lastIndex() << " barrel tracks; "
1302-
<< muonBasic.lastIndex() << " muon tracks; " << mftTrack.lastIndex() << " MFT tracks; ";
1303-
LOG(info) << " " << trackBarrelAssoc.lastIndex() << " barrel assocs; " << muonAssoc.lastIndex() << " muon assocs; " << mftAssoc.lastIndex() << " MFT assoc";
1303+
// LOG(info) << "Skims in this TF: " << fCollIndexMap.size() << " collisions; " << trackBasic.lastIndex() << " barrel tracks; "
1304+
//<< muonBasic.lastIndex() << " muon tracks; " << mftTrack.lastIndex() << " MFT tracks; ";
1305+
// LOG(info) << " " << trackBarrelAssoc.lastIndex() << " barrel assocs; " << muonAssoc.lastIndex() << " muon assocs; " << mftAssoc.lastIndex() << " MFT assoc";
13041306
}
13051307

13061308
// produce the full DQ skimmed data model typically for pp/p-Pb or UPC Pb-Pb (no centrality), subscribe to the DQ event filter (filter-pp or filter-PbPb)

0 commit comments

Comments
 (0)