Skip to content

Commit f2eee94

Browse files
authored
[PWGJE,EMCAL-670] EMCal Clusterizer - add different MinMax time setting (#8453)
1 parent b1a105b commit f2eee94

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

PWGJE/DataModel/EMCALClusters.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ const EMCALClusterDefinition kV3Default(ClusterAlgorithm_t::kV3, 10, 1, "kV3Defa
3535
const EMCALClusterDefinition kV3MostSplit(ClusterAlgorithm_t::kV3, 11, 1, "kV3MostSplit", 0.5, 0.1, -10000, 10000, true, 0.);
3636
const EMCALClusterDefinition kV3LowSeed(ClusterAlgorithm_t::kV3, 12, 1, "kV3LowSeed", 0.3, 0.1, -10000, 10000, true, 0.03);
3737
const EMCALClusterDefinition kV3MostSplitLowSeed(ClusterAlgorithm_t::kV3, 13, 1, "kV3MostSplitLowSeed", 0.3, 0.1, -10000, 10000, true, 0.);
38+
const EMCALClusterDefinition kV3StrictTime(ClusterAlgorithm_t::kV3, 20, 1, "kV3StrictTime", 0.5, 0.1, -500, 500, true, 0.03);
39+
const EMCALClusterDefinition kV3StricterTime(ClusterAlgorithm_t::kV3, 21, 1, "kV3StricterTime", 0.5, 0.1, -100, 100, true, 0.03);
40+
const EMCALClusterDefinition kV3MostStrictTime(ClusterAlgorithm_t::kV3, 22, 1, "kV3MostStrictTime", 0.5, 0.1, -50, 50, true, 0.03);
3841

3942
/// \brief function returns EMCALClusterDefinition for the given name
4043
/// \param name name of the cluster definition
@@ -55,6 +58,12 @@ const EMCALClusterDefinition getClusterDefinitionFromString(const std::string& c
5558
return kV3LowSeed;
5659
} else if (clusterDefinitionName == "kV3MostSplitLowSeed") {
5760
return kV3MostSplitLowSeed;
61+
} else if (clusterDefinitionName == "kV3StrictTime") {
62+
return kV3StrictTime;
63+
} else if (clusterDefinitionName == "kV3StricterTime") {
64+
return kV3StricterTime;
65+
} else if (clusterDefinitionName == "kV3MostStrictTime") {
66+
return kV3MostStrictTime;
5867
} else {
5968
throw std::invalid_argument("Cluster definition name not recognized");
6069
}

PWGJE/Tasks/emcclustermonitor.cxx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <sstream>
1717
#include <string>
1818
#include <vector>
19+
#include <numeric>
1920

2021
#include "Framework/runDataProcessing.h"
2122
#include "Framework/AnalysisTask.h"
@@ -75,6 +76,7 @@ struct ClusterMonitor {
7576

7677
std::vector<int> mVetoBCIDs;
7778
std::vector<int> mSelectBCIDs;
79+
std::vector<float> mCellTime;
7880

7981
/// \brief Create output histograms and initialize geometry
8082
void init(InitContext const&)
@@ -94,6 +96,8 @@ struct ClusterMonitor {
9496
const o2Axis supermoduleAxis{20, -0.5, 19.5, "Supermodule ID"};
9597
o2Axis timeAxis{mClusterTimeBinning, "t_{cl} (ns)"};
9698
o2Axis numberClustersAxis{mNumberClusterBinning, "Number of clusters / event"};
99+
const AxisSpec thAxisCellTimeDiff{3000, -1500, 1500, "#Delta#it{t}_{cell} (ns)"};
100+
const AxisSpec thAxisCellTimeMean{1500, -600, 900, "#LT#it{t}_{cell}#GT (ns)"};
97101

98102
// event properties
99103
mHistManager.add("eventsAll", "Number of events", o2HistType::kTH1F, {{1, 0.5, 1.5}});
@@ -121,6 +125,8 @@ struct ClusterMonitor {
121125
mHistManager.add("clusterDistanceToBadChannel", "Distance to bad channel", o2HistType::kTH1F, {{100, 0, 100}});
122126
mHistManager.add("clusterTimeVsE", "Cluster time vs energy", o2HistType::kTH2F, {timeAxis, energyAxis});
123127
mHistManager.add("clusterAmpFractionLeadingCell", "Fraction of energy in leading cell", o2HistType::kTH1F, {{100, 0, 1}});
128+
mHistManager.add("clusterCellTimeDiff", "Cell time difference in clusters", o2HistType::kTH1D, {thAxisCellTimeDiff});
129+
mHistManager.add("clusterCellTimeMean", "Mean cell time per cluster", o2HistType::kTH1D, {thAxisCellTimeMean});
124130

125131
// add histograms per supermodule
126132
for (int ism = 0; ism < 20; ++ism) {
@@ -238,12 +244,21 @@ struct ClusterMonitor {
238244
auto cellsofcluster = emccluscells.sliceBy(perCluster, cluster.globalIndex());
239245
double maxamp = 0;
240246
double ampfraction = 0;
247+
mCellTime.clear();
248+
mCellTime.reserve(cellsofcluster.size());
241249
for (const auto& cell : cellsofcluster) {
242250
// example how to get any information of the cell associated with cluster
243251
LOG(debug) << "Cell ID:" << cell.calo().amplitude() << " Time " << cell.calo().time();
244252
if (cell.calo().amplitude() > maxamp) {
245253
maxamp = cell.calo().amplitude();
246254
}
255+
mCellTime.push_back(cell.calo().time());
256+
} // end of loop over cells
257+
mHistManager.fill(HIST("clusterCellTimeMean"), std::accumulate(mCellTime.begin(), mCellTime.end(), 0.0f) / mCellTime.size());
258+
for (int iCell1 = 0; iCell1 < mCellTime.size() - 1; iCell1++) {
259+
for (int iCell2 = iCell1 + 1; iCell2 < mCellTime.size(); iCell2++) {
260+
mHistManager.fill(HIST("clusterCellTimeDiff"), mCellTime[iCell1] - mCellTime[iCell2]);
261+
}
247262
}
248263
ampfraction = maxamp / cluster.energy();
249264
mHistManager.fill(HIST("clusterAmpFractionLeadingCell"), ampfraction);

0 commit comments

Comments
 (0)