Skip to content

Commit e7d217a

Browse files
authored
[EMCAL-688] EMCAL: Add fCross to the AnalysisCluster (#14282)
- Add fCross the exoticity parameter to the AnalysisCluster so we can easily access it later in the emcalCorrectionTask in O2Physics
1 parent 0c5140e commit e7d217a

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

DataFormats/Detectors/EMCAL/include/DataFormatsEMCAL/AnalysisCluster.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ class AnalysisCluster
182182
float getCoreEnergy() const { return mCoreEnergy; }
183183
void setCoreEnergy(float energy) { mCoreEnergy = energy; }
184184

185+
float getFCross() const { return mFCross; }
186+
void setFCross(float fCross) { mFCross = fCross; }
187+
185188
///
186189
/// Returns TLorentzVector with momentum of the cluster. Only valid for clusters
187190
/// identified as photons or pi0 (overlapped gamma) produced on the vertex
@@ -223,12 +226,13 @@ class AnalysisCluster
223226
float mTime = 0.; ///< Time of the digit/cell with maximal energy deposition
224227

225228
bool mIsExotic = false; //!<! Cluster marked as "exotic" (high energy deposition concentrated in a single cell)
229+
float mFCross = 0.f; //! exoticity parameter (1-E_cross/E_cell^max)
226230

227231
int mInputIndMax = -1; ///< index of digit/cell with max energy
228232

229-
ClassDefNV(AnalysisCluster, 1);
233+
ClassDefNV(AnalysisCluster, 2);
230234
};
231235

232236
} // namespace emcal
233237
} // namespace o2
234-
#endif //ANALYSISCLUSTER_H
238+
#endif // ANALYSISCLUSTER_H

Detectors/EMCAL/base/include/EMCALBase/ClusterFactory.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,10 @@ class ClusterFactory
277277
/// \brief Look to cell neighbourhood and reject if it seems exotic
278278
/// \param towerId: tower ID of cell with largest energy fraction in cluster
279279
/// \param ecell: energy of the cell with largest energy fraction in cluster
280-
/// \param exoticTime time of the cell with largest energy fraction in cluster
280+
/// \param exoticTime: time of the cell with largest energy fraction in cluster
281+
/// \param fCross: exoticity parameter (1-E_cross/E_cell^max) will be caluclated for this check
281282
/// \return bool true if cell is found exotic
282-
bool isExoticCell(short towerId, float ecell, float const exoticTime) const;
283+
bool isExoticCell(short towerId, float ecell, float const exoticTime, float& fCross) const;
283284

284285
/// \brief Calculate the energy in the cross around the energy of a given cell.
285286
/// \param absID: controlled cell absolute ID number

Detectors/EMCAL/base/src/ClusterFactory.cxx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,11 @@ o2::emcal::AnalysisCluster ClusterFactory<InputType>::buildCluster(int clusterIn
7373

7474
float exoticTime = mInputsContainer[inputIndMax].getTimeStamp();
7575

76+
float fCross = 0.;
77+
7678
try {
77-
clusterAnalysis.setIsExotic(isExoticCell(towerId, inputEnergyMax, exoticTime));
79+
clusterAnalysis.setIsExotic(isExoticCell(towerId, inputEnergyMax, exoticTime, fCross));
80+
clusterAnalysis.setFCross(fCross);
7881
} catch (UninitLookUpTableException& e) {
7982
LOG(error) << e.what();
8083
}
@@ -253,7 +256,7 @@ void ClusterFactory<InputType>::evalLocalPosition(gsl::span<const int> inputsInd
253256
clRmsXYZ[i] += (w * xyzi[i] * xyzi[i]);
254257
}
255258
} // w > 0
256-
} // dig loop
259+
} // dig loop
257260

258261
// cout << " wtot " << wtot << endl;
259262

@@ -600,7 +603,7 @@ std::tuple<int, float, float, bool> ClusterFactory<InputType>::getMaximalEnergyI
600603
/// Look to cell neighbourhood and reject if it seems exotic
601604
//____________________________________________________________________________
602605
template <class InputType>
603-
bool ClusterFactory<InputType>::isExoticCell(short towerId, float ecell, float const exoticTime) const
606+
bool ClusterFactory<InputType>::isExoticCell(short towerId, float ecell, float const exoticTime, float& fCross) const
604607
{
605608
if (ecell < mExoticCellMinAmplitude) {
606609
return false; // do not reject low energy cells
@@ -612,8 +615,9 @@ bool ClusterFactory<InputType>::isExoticCell(short towerId, float ecell, float c
612615
}
613616

614617
float eCross = getECross(towerId, ecell, exoticTime);
618+
fCross = 1.f - eCross / ecell;
615619

616-
if (1 - eCross / ecell > mExoticCellFraction) {
620+
if (fCross > mExoticCellFraction) {
617621
LOG(debug) << "EXOTIC CELL id " << towerId << ", eCell " << ecell << ", eCross " << eCross << ", 1-eCross/eCell " << 1 - eCross / ecell;
618622
return true;
619623
}

0 commit comments

Comments
 (0)