Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ class AnalysisCluster
float getCoreEnergy() const { return mCoreEnergy; }
void setCoreEnergy(float energy) { mCoreEnergy = energy; }

float getFCross() const { return mFCross; }
void setFCross(float fCross) { mFCross = fCross; }

///
/// Returns TLorentzVector with momentum of the cluster. Only valid for clusters
/// identified as photons or pi0 (overlapped gamma) produced on the vertex
Expand Down Expand Up @@ -223,12 +226,13 @@ class AnalysisCluster
float mTime = 0.; ///< Time of the digit/cell with maximal energy deposition

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

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

ClassDefNV(AnalysisCluster, 1);
ClassDefNV(AnalysisCluster, 2);
};

} // namespace emcal
} // namespace o2
#endif //ANALYSISCLUSTER_H
#endif // ANALYSISCLUSTER_H
5 changes: 3 additions & 2 deletions Detectors/EMCAL/base/include/EMCALBase/ClusterFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,10 @@ class ClusterFactory
/// \brief Look to cell neighbourhood and reject if it seems exotic
/// \param towerId: tower ID of cell with largest energy fraction in cluster
/// \param ecell: energy of the cell with largest energy fraction in cluster
/// \param exoticTime time of the cell with largest energy fraction in cluster
/// \param exoticTime: time of the cell with largest energy fraction in cluster
/// \param fCross: exoticity parameter (1-E_cross/E_cell^max) will be caluclated for this check
/// \return bool true if cell is found exotic
bool isExoticCell(short towerId, float ecell, float const exoticTime) const;
bool isExoticCell(short towerId, float ecell, float const exoticTime, float& fCross) const;

/// \brief Calculate the energy in the cross around the energy of a given cell.
/// \param absID: controlled cell absolute ID number
Expand Down
12 changes: 8 additions & 4 deletions Detectors/EMCAL/base/src/ClusterFactory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ o2::emcal::AnalysisCluster ClusterFactory<InputType>::buildCluster(int clusterIn

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

float fCross = 0.;

try {
clusterAnalysis.setIsExotic(isExoticCell(towerId, inputEnergyMax, exoticTime));
clusterAnalysis.setIsExotic(isExoticCell(towerId, inputEnergyMax, exoticTime, fCross));
clusterAnalysis.setFCross(fCross);
} catch (UninitLookUpTableException& e) {
LOG(error) << e.what();
}
Expand Down Expand Up @@ -253,7 +256,7 @@ void ClusterFactory<InputType>::evalLocalPosition(gsl::span<const int> inputsInd
clRmsXYZ[i] += (w * xyzi[i] * xyzi[i]);
}
} // w > 0
} // dig loop
} // dig loop

// cout << " wtot " << wtot << endl;

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

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

if (1 - eCross / ecell > mExoticCellFraction) {
if (fCross > mExoticCellFraction) {
LOG(debug) << "EXOTIC CELL id " << towerId << ", eCell " << ecell << ", eCross " << eCross << ", 1-eCross/eCell " << 1 - eCross / ecell;
return true;
}
Expand Down