Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
a30b72e
[PWGHF] added a function to isolation e
sashingo Dec 3, 2024
e880f2a
[PWGHF] added a function to isolation e (fixed o2 linter)
sashingo Dec 11, 2024
48a7947
Merge branch 'AliceO2Group:master' into master
sashingo Dec 16, 2024
e1db786
Merge branch 'AliceO2Group:master' into master
sashingo Dec 17, 2024
47e7853
Merge branch 'AliceO2Group:master' into master
sashingo Jan 7, 2025
87b0365
Merge branch 'AliceO2Group:master' into master
sashingo Jan 8, 2025
089bed5
PWGHF:added isolation cut based on track and apply the cuts on E/p
sashingo Jan 8, 2025
93a746b
PWGHF:fixed a warning
sashingo Jan 8, 2025
aee502e
Merge branch 'AliceO2Group:master' into master
sashingo Jan 20, 2025
0b9ecfd
Merge branch 'AliceO2Group:master' into master
sashingo Jan 23, 2025
af1eb6e
Merge branch 'AliceO2Group:master' into master
sashingo Jan 24, 2025
962b2f2
Merge branch 'AliceO2Group:master' into master
sashingo Jan 28, 2025
6311ea6
Merge branch 'AliceO2Group:master' into master
sashingo Jan 29, 2025
299ede0
Merge branch 'AliceO2Group:master' into master
sashingo Feb 6, 2025
6a7d9ca
Merge branch 'AliceO2Group:master' into master
sashingo Feb 7, 2025
25dd365
Merge branch 'AliceO2Group:master' into master
sashingo Feb 14, 2025
0bb2c34
Merge branch 'AliceO2Group:master' into master
sashingo Feb 23, 2025
7434e75
PWGHF:updated to calculate mass of Zee
sashingo Feb 23, 2025
fa894c5
fixed clang format
sashingo Feb 23, 2025
7281b97
fixed O2 linter erros
sashingo Feb 23, 2025
3d3308a
fixed O2 linter
sashingo Feb 23, 2025
030db91
fixed O2 linter
sashingo Feb 23, 2025
d361234
fixed magelinter error
sashingo Feb 23, 2025
b3aa11a
fixed MegaLinter error
sashingo Feb 23, 2025
f0b4201
fixed MegaLinter error
sashingo Feb 23, 2025
e697d1b
Merge branch 'AliceO2Group:master' into master
sashingo Feb 24, 2025
b22dd6a
Merge branch 'AliceO2Group:master' into master
sashingo Feb 27, 2025
8150615
minor modification
sashingo Feb 27, 2025
2974d1a
Merge branch 'AliceO2Group:master' into master
sashingo Feb 27, 2025
51b22c3
updated with Vit's suggestions
sashingo Mar 3, 2025
74b90fc
updated with Vit's suggestions
sashingo Mar 4, 2025
f19edcf
small modification
sashingo Mar 5, 2025
ec95512
Merge branch 'AliceO2Group:master' into master
sashingo Mar 6, 2025
f10e45e
Merge branch 'AliceO2Group:master' into master
sashingo Mar 10, 2025
16d2127
added minimum pT cut to calculate Zee mass
sashingo Mar 10, 2025
2080ad2
Merge branch 'AliceO2Group:master' into master
sashingo Mar 19, 2025
f89d0d0
Merge branch 'AliceO2Group:master' into master
sashingo Mar 28, 2025
1a9ecd6
Merge branch 'AliceO2Group:master' into master
sashingo Apr 3, 2025
2854a0d
Merge branch 'AliceO2Group:master' into master
sashingo Apr 25, 2025
3bfea57
Merge branch 'AliceO2Group:master' into master
sashingo May 6, 2025
9c426e1
Merge branch 'AliceO2Group:master' into master
sashingo May 12, 2025
bc0f1da
added software trigger
sashingo May 12, 2025
78f09a5
modified O2 linte error
sashingo May 12, 2025
149197d
fixed linter errors
sashingo May 13, 2025
19d7c83
modified hierarchy order of includes
sashingo May 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PWGHF/HFL/Tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

o2physics_add_dpl_workflow(task-electron-weak-boson
SOURCES taskElectronWeakBoson.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(task-muon-charm-beauty-separation
Expand Down
78 changes: 78 additions & 0 deletions PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
/// \brief task for WeakBoson (W/Z) based on electron in mid-rapidity
/// \author S. Sakai & S. Ito (Univ. of Tsukuba)
#include <vector>
#include <string>

#include "CCDB/BasicCCDBManager.h"

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
Expand All @@ -30,6 +33,8 @@
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/DataModel/PIDResponse.h"

#include "EventFiltering/Zorro.h"

#include "PWGJE/DataModel/EMCALClusters.h"
#include "PWGHF/Core/HfHelper.h"

Expand Down Expand Up @@ -76,6 +81,14 @@ struct HfTaskElectronWeakBoson {
Configurable<float> energyIsolationMax{"energyIsolationMax", 0.1, "isolation cut on energy"};
Configurable<int> trackIsolationMax{"trackIsolationMax", 3, "Maximum number of tracks in isolation cone"};

// Skimmed dataset processing configurations
Configurable<bool> cfgSkimmedProcessing{"cfgSkimmedProcessing", true, "Enables processing of skimmed datasets"};
Configurable<std::string> cfgTriggerName{"cfgTriggerName", "fGammaHighPtEMCAL", "Trigger of interest (comma separated for multiple)"};

// CCDB service object
Configurable<std::string> cfgCCDBPath{"cfgCCDBPath", "Users/m/mpuccio/EventFiltering/OTS/", "Path to CCDB for trigger data"};
Service<o2::ccdb::BasicCCDBManager> ccdb;

struct HfElectronCandidate {
float pt, eta, phi, energy;
int charge;
Expand Down Expand Up @@ -112,8 +125,23 @@ struct HfTaskElectronWeakBoson {
// Histogram registry: an object to hold your registrygrams
HistogramRegistry registry{"registry"};

// Zorro objects for skimmed data processing
Zorro zorro;
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

void init(InitContext const&)
{
// Configure CCDB
ccdb->setURL("http://alice-ccdb.cern.ch");
ccdb->setCaching(true);
ccdb->setLocalObjectValidityChecking();
// CCDB path for debug
LOGF(info, "CCDB path for Zorro: %s", cfgCCDBPath.value.c_str());

// Setup Zorro Summary
if (cfgSkimmedProcessing) {
zorroSummary.setObject(zorro.getZorroSummary());
}

// define axes you want to use
const AxisSpec axisZvtx{400, -20, 20, "Zvtx"};
Expand All @@ -135,9 +163,11 @@ struct HfTaskElectronWeakBoson {
const AxisSpec axisIsoTrack{20, -0.5, 19.5, "Isolation Track"};
const AxisSpec axisInvMassZ{200, 0, 200, "M_{ee} (GeV/c^{2})"};
const AxisSpec axisInvMassDy{200, 0, 2, "M_{ee} (GeV/c^{2})"};
const AxisSpec axisTrigger{3, 0, 2, "Trigger status of zorro"};

// create registrygrams
registry.add("hZvtx", "Z vertex", kTH1F, {axisZvtx});
registry.add("hEventCounterInit", "hEventCounterInit", kTH1F, {axisCounter});
registry.add("hEventCounter", "hEventCounter", kTH1F, {axisCounter});
registry.add("hITSchi2", "ITS #chi^{2}", kTH1F, {axisChi2});
registry.add("hTPCchi2", "TPC #chi^{2}", kTH1F, {axisChi2});
Expand All @@ -163,7 +193,11 @@ struct HfTaskElectronWeakBoson {
registry.add("hIsolationTrack", "Isolation Track", kTH2F, {{axisE}, {axisIsoTrack}});
registry.add("hInvMassZeeLs", "invariant mass for Z LS pair", kTH2F, {{axisPt}, {axisInvMassZ}});
registry.add("hInvMassZeeUls", "invariant mass for Z ULS pair", kTH2F, {{axisPt}, {axisInvMassZ}});

// hisotgram for EMCal trigger
registry.add("hEMCalTrigger", "EMCal trigger", kTH1F, {axisTrigger});
}

bool isIsolatedCluster(const o2::aod::EMCALCluster& cluster,
const SelectedClusters& clusters)
{
Expand Down Expand Up @@ -226,10 +260,54 @@ struct HfTaskElectronWeakBoson {
}

void process(soa::Filtered<aod::Collisions>::iterator const& collision,
aod::BCsWithTimestamps const&,
SelectedClusters const& emcClusters,
TrackEle const& tracks,
o2::aod::EMCALMatchedTracks const& matchedtracks)
{
registry.fill(HIST("hEventCounterInit"), 0.5);

// Get BC for this collision
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
uint64_t globalBC = bc.globalBC();
int runNumber = bc.runNumber();

// Initialize Zorro for the first event (once per run)
static bool isFirstEvent = true;
static int lastRunNumber = -1;

if ((isFirstEvent || runNumber != lastRunNumber) && cfgSkimmedProcessing) {
LOGF(info, "Initializing Zorro for run %d", runNumber);
uint64_t currentTimestamp = bc.timestamp();

// add configurable for CCDB path
zorro.setBaseCCDBPath(cfgCCDBPath.value);

// debug for timestamp
LOGF(info, "Using CCDB path: %s, timestamp: %llu", cfgCCDBPath.value.c_str(), currentTimestamp);

// initialize Zorro
zorro.initCCDB(ccdb.service, runNumber, currentTimestamp, cfgTriggerName);
isFirstEvent = false;
lastRunNumber = runNumber;
}

// Check if this is a triggered event using Zorro
bool isTriggered = true;
if (cfgSkimmedProcessing) {
isTriggered = zorro.isSelected(globalBC);
registry.fill(HIST("hEMCalTrigger"), isTriggered ? 1 : 0);

// Skip event if not triggered and we're processing skimmed data
if (!isTriggered && cfgSkimmedProcessing) {
return;
}
}

// initialze for inclusive-electron
selectedElectronsIso.clear();
selectedElectronsAss.clear();

registry.fill(HIST("hEventCounter"), 0.5);

// LOGF(info, "Collision index : %d", collision.index());
Expand Down
Loading