Skip to content

Commit 2004fc9

Browse files
authored
[PWGJE] EMCal: event selection for emcTmMonitor, track matching optio… (#18606)
1 parent cc0fcac commit 2004fc9

2 files changed

Lines changed: 256 additions & 33 deletions

File tree

‎PWGJE/TableProducer/emcalCorrectionTask.cxx‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ struct EmcalCorrectionTask {
133133
Configurable<bool> useWeightExotic{"useWeightExotic", false, "States if weights should be used for exotic cell cut"};
134134
Configurable<bool> isMC{"isMC", false, "States if run over MC"};
135135
Configurable<bool> applyCellTimeCorrection{"applyCellTimeCorrection", true, "apply a correction to the cell time for data and MC: Shift both average cell times to 0 and smear MC time distribution to fit data better. For MC requires isMC to be true"};
136-
Configurable<float> trackMinPt{"trackMinPt", 0.3, "Minimum pT for tracks to perform track matching, to reduce computing time. Tracks below a certain pT will be loopers anyway."};
137136
Configurable<bool> fillQA{"fillQA", false, "Switch to turn on QA histograms."};
138137
Configurable<bool> useCCDBAlignment{"useCCDBAlignment", false, "EXPERTS ONLY! Switch to use the alignment object stored in CCDB instead of using the default alignment from the global geometry object."};
139138
Configurable<bool> applyTempCalib{"applyTempCalib", false, "Switch to turn on Temperature calibration."};
@@ -147,6 +146,12 @@ struct EmcalCorrectionTask {
147146
Configurable<bool> storePerDFInfo{"storePerDFInfo", false, "store addition information per DF."};
148147
ConfigurableAxis thConfigAxisClusters{"thConfigAxisClusters", {1000, 0.5f, 1000.5f}, ""};
149148
ConfigurableAxis thConfigAxisCells{"thConfigAxisCells", {1000, 0.5f, 1000.5f}, ""};
149+
// Track matching config
150+
struct : ConfigurableGroup {
151+
std::string prefix = "trackmatching";
152+
Configurable<float> trackMinPt{"trackMinPt", 0.3, "Minimum pT (GeV) for tracks to perform track matching, to reduce computing time. Tracks below a certain pT will be loopers anyway."};
153+
Configurable<bool> useAllTracks{"useAllTracks", false, "Flag to use all tracks instead of just global tracks."};
154+
} trackmatching;
150155
// cross talk emulation configs
151156
EmcCrossTalkConf emcCrossTalkConf;
152157

@@ -1494,7 +1499,7 @@ struct EmcalCorrectionTask {
14941499
if (trackEtaEmcal < TrackNotOnEMCal || trackPhiEmcal < TrackNotOnEMCal) {
14951500
continue;
14961501
}
1497-
if (trackMinPt > 0 && track.pt() < trackMinPt) {
1502+
if (trackmatching.trackMinPt > 0 && track.pt() < trackmatching.trackMinPt) {
14981503
continue;
14991504
}
15001505
trackPhi.emplace_back(RecoDecay::constrainAngle(trackPhiEmcal));
@@ -1508,15 +1513,15 @@ struct EmcalCorrectionTask {
15081513
void fillTrackInfo(Tracks const& tracks, std::vector<float>& trackPhi, std::vector<float>& trackEta, std::vector<int64_t>& trackGlobalIndex)
15091514
{
15101515
for (const auto& track : tracks) {
1511-
if (!track.isGlobalTrack()) { // only global tracks
1516+
if (!trackmatching.useAllTracks && !track.isGlobalTrack()) { // only global tracks depending on trackmatching.useAllTracks flag
15121517
continue;
15131518
}
15141519
// Tracks that do not point to the EMCal/DCal/PHOS get default values of -999
15151520
// This way we can cut out tracks that do not point to the EMCal+DCal
15161521
if (track.trackEtaEmcal() < TrackNotOnEMCal || track.trackPhiEmcal() < TrackNotOnEMCal) {
15171522
continue;
15181523
}
1519-
if (trackMinPt > 0 && track.pt() < trackMinPt) {
1524+
if (trackmatching.trackMinPt > 0 && track.pt() < trackmatching.trackMinPt) {
15201525
continue;
15211526
}
15221527
trackPhi.emplace_back(RecoDecay::constrainAngle(track.trackPhiEmcal()));

0 commit comments

Comments
 (0)