Skip to content

Commit ea40bb3

Browse files
authored
[PWGJE,EMCAL-670] Add time differences into the clusterdefinition (#8896)
1 parent a3e641d commit ea40bb3

File tree

3 files changed

+43
-24
lines changed

3 files changed

+43
-24
lines changed

PWGJE/DataModel/EMCALClusterDefinition.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
// Class for the cluster definition, i.e. what is considered a cluster by the clusterizer.
13-
// The cluster definition contains information about the used algorithm, seed threshold,
14-
// cell energy, gradient as well as timing cut
15-
//
16-
/// \author Florian Jonas <florian.jonas@cern.ch>
12+
/// \file EMCALClusterDefinition.h
13+
/// \brief Class for the cluster definition, i.e. what is considered a cluster by the clusterizer. The cluster definition contains information about the used algorithm, seed threshold, cell energy, gradient as well as timing cut
14+
/// \author Florian Jonas <florian.jonas@cern.ch>, Marvin Hemmer <marvin.hemmer@cern.ch>
1715

1816
#ifndef PWGJE_DATAMODEL_EMCALCLUSTERDEFINITION_H_
1917
#define PWGJE_DATAMODEL_EMCALCLUSTERDEFINITION_H_
@@ -38,16 +36,17 @@ struct EMCALClusterDefinition {
3836
std::string name = "kUndefined"; // name of the cluster definition
3937
double seedEnergy = 0.1; // seed threshold (GeV)
4038
double minCellEnergy = 0.05; // minimum cell energy (GeV)
41-
double timeMin = -10000; // minimum time (ns)
42-
double timeMax = 10000; // maximum time (ns)
39+
double timeMin = -10000.; // minimum time (ns)
40+
double timeMax = 10000.; // maximum time (ns)
41+
double timeDiff = 20000.; // maximum time difference (ns) between seed cell and aggregation cell
4342
bool doGradientCut = true; // apply gradient cut if true
4443
double gradientCut = -1; // gradient cut
4544
bool recalcShowerShape5x5 = false; // recalculate shower shape using 5x5 cells
4645

4746
// default constructor
4847
EMCALClusterDefinition() = default;
4948
// constructor
50-
EMCALClusterDefinition(ClusterAlgorithm_t pAlgorithm, int pStorageID, int pSelectedCellType, std::string pName, double pSeedEnergy, double pMinCellEnergy, double pTimeMin, double pTimeMax, bool pDoGradientCut, double pGradientCut, bool precalcShowerShape5x5)
49+
EMCALClusterDefinition(ClusterAlgorithm_t pAlgorithm, int pStorageID, int pSelectedCellType, std::string pName, double pSeedEnergy, double pMinCellEnergy, double pTimeMin, double pTimeMax, double ptimeDiff, bool pDoGradientCut, double pGradientCut, bool precalcShowerShape5x5)
5150
{
5251
algorithm = pAlgorithm;
5352
storageID = pStorageID;
@@ -57,6 +56,7 @@ struct EMCALClusterDefinition {
5756
minCellEnergy = pMinCellEnergy;
5857
timeMin = pTimeMin;
5958
timeMax = pTimeMax;
59+
timeDiff = ptimeDiff;
6060
doGradientCut = pDoGradientCut;
6161
gradientCut = pGradientCut;
6262
recalcShowerShape5x5 = precalcShowerShape5x5;
@@ -65,7 +65,7 @@ struct EMCALClusterDefinition {
6565
// implement comparison operators for int std::string and ClusterAlgorithm_t
6666
bool operator==(const EMCALClusterDefinition& rhs) const
6767
{
68-
return (algorithm == rhs.algorithm && storageID == rhs.storageID && name == rhs.name && seedEnergy == rhs.seedEnergy && minCellEnergy == rhs.minCellEnergy && timeMin == rhs.timeMin && timeMax == rhs.timeMax && gradientCut == rhs.gradientCut && doGradientCut == rhs.doGradientCut && recalcShowerShape5x5 == rhs.recalcShowerShape5x5);
68+
return (algorithm == rhs.algorithm && storageID == rhs.storageID && name == rhs.name && seedEnergy == rhs.seedEnergy && minCellEnergy == rhs.minCellEnergy && timeMin == rhs.timeMin && timeMax == rhs.timeMax && timeDiff == rhs.timeDiff && gradientCut == rhs.gradientCut && doGradientCut == rhs.doGradientCut && recalcShowerShape5x5 == rhs.recalcShowerShape5x5);
6969
}
7070
bool operator!=(const EMCALClusterDefinition& rhs) const
7171
{

PWGJE/DataModel/EMCALClusters.h

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
// Table definitions for EMCAL analysis clusters
13-
//
12+
/// \file EMCALClusters.h
13+
/// \brief Table definitions for EMCAL analysis clusters
1414
/// \author Raymond Ehlers <raymond.ehlers@cern.ch>, ORNL
1515

1616
#ifndef PWGJE_DATAMODEL_EMCALCLUSTERS_H_
@@ -28,17 +28,23 @@ namespace emcalcluster
2828

2929
// define global cluster definitions
3030
// New definitions should be added here!
31-
const EMCALClusterDefinition kV3NoSplit(ClusterAlgorithm_t::kV3, 0, 1, "kV3NoSplit", 0.5, 0.1, -10000, 10000, false, 0., false);
32-
const EMCALClusterDefinition kV3NoSplitLowSeed(ClusterAlgorithm_t::kV3, 1, 1, "kV3NoSplitLowSeed", 0.3, 0.1, -10000, 10000, false, 0., false);
33-
const EMCALClusterDefinition kV3NoSplitLowerSeed(ClusterAlgorithm_t::kV3, 2, 1, "kV3NoSplitLowerSeed", 0.2, 0.1, -10000, 10000, false, 0., false);
34-
const EMCALClusterDefinition kV3Default(ClusterAlgorithm_t::kV3, 10, 1, "kV3Default", 0.5, 0.1, -10000, 10000, true, 0.03, false);
35-
const EMCALClusterDefinition kV3MostSplit(ClusterAlgorithm_t::kV3, 11, 1, "kV3MostSplit", 0.5, 0.1, -10000, 10000, true, 0., false);
36-
const EMCALClusterDefinition kV3LowSeed(ClusterAlgorithm_t::kV3, 12, 1, "kV3LowSeed", 0.3, 0.1, -10000, 10000, true, 0.03, false);
37-
const EMCALClusterDefinition kV3MostSplitLowSeed(ClusterAlgorithm_t::kV3, 13, 1, "kV3MostSplitLowSeed", 0.3, 0.1, -10000, 10000, true, 0., false);
38-
const EMCALClusterDefinition kV3StrictTime(ClusterAlgorithm_t::kV3, 20, 1, "kV3StrictTime", 0.5, 0.1, -500, 500, true, 0.03, false);
39-
const EMCALClusterDefinition kV3StricterTime(ClusterAlgorithm_t::kV3, 21, 1, "kV3StricterTime", 0.5, 0.1, -100, 100, true, 0.03, false);
40-
const EMCALClusterDefinition kV3MostStrictTime(ClusterAlgorithm_t::kV3, 22, 1, "kV3MostStrictTime", 0.5, 0.1, -50, 50, true, 0.03, false);
41-
const EMCALClusterDefinition kV3Default5x5(ClusterAlgorithm_t::kV3, 30, 1, "kV3Default5x5", 0.5, 0.1, -10000, 10000, true, 0.03, true);
31+
const EMCALClusterDefinition kV3NoSplit(ClusterAlgorithm_t::kV3, 0, 1, "kV3NoSplit", 0.5, 0.1, -10000, 10000, 20000, false, 0., false);
32+
const EMCALClusterDefinition kV3NoSplitLowSeed(ClusterAlgorithm_t::kV3, 1, 1, "kV3NoSplitLowSeed", 0.3, 0.1, -10000, 10000, 20000, false, 0., false);
33+
const EMCALClusterDefinition kV3NoSplitLowerSeed(ClusterAlgorithm_t::kV3, 2, 1, "kV3NoSplitLowerSeed", 0.2, 0.1, -10000, 10000, 20000, false, 0., false);
34+
const EMCALClusterDefinition kV3Default(ClusterAlgorithm_t::kV3, 10, 1, "kV3Default", 0.5, 0.1, -10000, 10000, 20000, true, 0.03, false);
35+
const EMCALClusterDefinition kV3MostSplit(ClusterAlgorithm_t::kV3, 11, 1, "kV3MostSplit", 0.5, 0.1, -10000, 10000, 20000, true, 0., false);
36+
const EMCALClusterDefinition kV3LowSeed(ClusterAlgorithm_t::kV3, 12, 1, "kV3LowSeed", 0.3, 0.1, -10000, 10000, 20000, true, 0.03, false);
37+
const EMCALClusterDefinition kV3MostSplitLowSeed(ClusterAlgorithm_t::kV3, 13, 1, "kV3MostSplitLowSeed", 0.3, 0.1, -10000, 10000, 20000, true, 0., false);
38+
const EMCALClusterDefinition kV3StrictTime(ClusterAlgorithm_t::kV3, 20, 1, "kV3StrictTime", 0.5, 0.1, -500, 500, 20000, true, 0.03, false);
39+
const EMCALClusterDefinition kV3StricterTime(ClusterAlgorithm_t::kV3, 21, 1, "kV3StricterTime", 0.5, 0.1, -100, 100, 20000, true, 0.03, false);
40+
const EMCALClusterDefinition kV3MostStrictTime(ClusterAlgorithm_t::kV3, 22, 1, "kV3MostStrictTime", 0.5, 0.1, -50, 50, 20000, true, 0.03, false);
41+
const EMCALClusterDefinition kV3Default5x5(ClusterAlgorithm_t::kV3, 30, 1, "kV3Default5x5", 0.5, 0.1, -10000, 10000, 20000, true, 0.03, true);
42+
const EMCALClusterDefinition kV3SmallTimeDiff(ClusterAlgorithm_t::kV3, 40, 1, "kV3SmallTimeDiff", 0.5, 0.1, -10000, 10000, 500, true, 0.03, false);
43+
const EMCALClusterDefinition kV3SmallerTimeDiff(ClusterAlgorithm_t::kV3, 41, 1, "kV3SmallerTimeDiff", 0.5, 0.1, -10000, 10000, 100, true, 0.03, false);
44+
const EMCALClusterDefinition kV3SmallestTimeDiff(ClusterAlgorithm_t::kV3, 42, 1, "kV3SmallestTimeDiff", 0.5, 0.1, -10000, 10000, 50, true, 0.03, false);
45+
const EMCALClusterDefinition kV3MostSplitSmallTimeDiff(ClusterAlgorithm_t::kV3, 43, 1, "kV3MostSplitSmallTimeDiff", 0.5, 0.1, -10000, 10000, 500, true, 0., false);
46+
const EMCALClusterDefinition kV3MostSplitSmallerTimeDiff(ClusterAlgorithm_t::kV3, 44, 1, "kV3MostSplitSmallerTimeDiff", 0.5, 0.1, -10000, 10000, 100, true, 0., false);
47+
const EMCALClusterDefinition kV3MostSplitSmallestTimeDiff(ClusterAlgorithm_t::kV3, 45, 1, "kV3MostSplitSmallestTimeDiff", 0.5, 0.1, -10000, 10000, 50, true, 0., false);
4248

4349
/// \brief function returns EMCALClusterDefinition for the given name
4450
/// \param name name of the cluster definition
@@ -67,6 +73,18 @@ const EMCALClusterDefinition getClusterDefinitionFromString(const std::string& c
6773
return kV3MostStrictTime;
6874
} else if (clusterDefinitionName == "kV3Default5x5") {
6975
return kV3Default5x5;
76+
} else if (clusterDefinitionName == "kV3SmallTimeDiff") {
77+
return kV3SmallTimeDiff;
78+
} else if (clusterDefinitionName == "kV3SmallerTimeDiff") {
79+
return kV3SmallerTimeDiff;
80+
} else if (clusterDefinitionName == "kV3SmallestTimeDiff") {
81+
return kV3SmallestTimeDiff;
82+
} else if (clusterDefinitionName == "kV3MostSplitSmallTimeDiff") {
83+
return kV3MostSplitSmallTimeDiff;
84+
} else if (clusterDefinitionName == "kV3MostSplitSmallerTimeDiff") {
85+
return kV3MostSplitSmallerTimeDiff;
86+
} else if (clusterDefinitionName == "kV3MostSplitSmallestTimeDiff") {
87+
return kV3MostSplitSmallestTimeDiff;
7088
} else {
7189
throw std::invalid_argument("Cluster definition name not recognized");
7290
}

PWGJE/TableProducer/emcalCorrectionTask.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,15 @@ struct EmcalCorrectionTask {
163163
mClusterFactories.setExoticCellInCrossMinAmplitude(exoticCellInCrossMinAmplitude);
164164
mClusterFactories.setUseWeightExotic(useWeightExotic);
165165
for (const auto& clusterDefinition : mClusterDefinitions) {
166-
mClusterizers.emplace_back(std::make_unique<o2::emcal::Clusterizer<o2::emcal::Cell>>(1E9, clusterDefinition.timeMin, clusterDefinition.timeMax, clusterDefinition.gradientCut, clusterDefinition.doGradientCut, clusterDefinition.seedEnergy, clusterDefinition.minCellEnergy));
166+
mClusterizers.emplace_back(std::make_unique<o2::emcal::Clusterizer<o2::emcal::Cell>>(clusterDefinition.timeDiff, clusterDefinition.timeMin, clusterDefinition.timeMax, clusterDefinition.gradientCut, clusterDefinition.doGradientCut, clusterDefinition.seedEnergy, clusterDefinition.minCellEnergy));
167167
LOG(info) << "Cluster definition initialized: " << clusterDefinition.toString();
168168
LOG(info) << "timeMin: " << clusterDefinition.timeMin;
169169
LOG(info) << "timeMax: " << clusterDefinition.timeMax;
170+
LOG(info) << "timeDiff: " << clusterDefinition.timeDiff;
170171
LOG(info) << "gradientCut: " << clusterDefinition.gradientCut;
171172
LOG(info) << "seedEnergy: " << clusterDefinition.seedEnergy;
172173
LOG(info) << "minCellEnergy: " << clusterDefinition.minCellEnergy;
173-
LOG(info) << "storageID" << clusterDefinition.storageID;
174+
LOG(info) << "storageID: " << clusterDefinition.storageID;
174175
}
175176
for (const auto& clusterizer : mClusterizers) {
176177
clusterizer->setGeometry(geometry);

0 commit comments

Comments
 (0)