2525using namespace o2 ::emcal;
2626
2727template <class InputType >
28- ClusterFactory<InputType>::ClusterFactory(gsl::span<const o2::emcal::Cluster> clustersContainer, gsl::span<const InputType> inputsContainer, gsl::span<int > cellsIndices)
28+ ClusterFactory<InputType>::ClusterFactory(gsl::span<const o2::emcal::Cluster> clustersContainer, gsl::span<const InputType> inputsContainer, gsl::span<const int > cellsIndices)
2929{
3030 setClustersContainer (clustersContainer);
3131 setCellsContainer (inputsContainer);
@@ -55,7 +55,7 @@ o2::emcal::AnalysisCluster ClusterFactory<InputType>::buildCluster(int clusterIn
5555 int firstCellIndex = mClustersContainer [clusterIndex].getCellIndexFirst ();
5656 int nCells = mClustersContainer [clusterIndex].getNCells ();
5757
58- gsl::span<int > inputsIndices = gsl::span<int >(&mCellsIndices [firstCellIndex], nCells);
58+ gsl::span<const int > inputsIndices = gsl::span<const int >(&mCellsIndices [firstCellIndex], nCells);
5959
6060 // First calculate the index of input with maximum amplitude and get
6161 // the supermodule number where it sits.
@@ -107,7 +107,7 @@ o2::emcal::AnalysisCluster ClusterFactory<InputType>::buildCluster(int clusterIn
107107// / in cell units
108108// ____________________________________________________________________________
109109template <class InputType >
110- void ClusterFactory<InputType>::evalDispersion(gsl::span<int > inputsIndices, AnalysisCluster& clusterAnalysis) const
110+ void ClusterFactory<InputType>::evalDispersion(gsl::span<const int > inputsIndices, AnalysisCluster& clusterAnalysis) const
111111{
112112 double d = 0 ., wtot = 0 .;
113113 int nstat = 0 ;
@@ -180,7 +180,7 @@ void ClusterFactory<InputType>::evalDispersion(gsl::span<int> inputsIndices, Ana
180180// / Calculates the center of gravity in the local EMCAL-module coordinates
181181// ____________________________________________________________________________
182182template <class InputType >
183- void ClusterFactory<InputType>::evalLocalPosition(gsl::span<int > inputsIndices, AnalysisCluster& clusterAnalysis) const
183+ void ClusterFactory<InputType>::evalLocalPosition(gsl::span<const int > inputsIndices, AnalysisCluster& clusterAnalysis) const
184184{
185185
186186 int nstat = 0 ;
@@ -249,7 +249,7 @@ void ClusterFactory<InputType>::evalLocalPosition(gsl::span<int> inputsIndices,
249249// / Calculates the center of gravity in the global ALICE coordinates
250250// ____________________________________________________________________________
251251template <class InputType >
252- void ClusterFactory<InputType>::evalGlobalPosition(gsl::span<int > inputsIndices, AnalysisCluster& clusterAnalysis) const
252+ void ClusterFactory<InputType>::evalGlobalPosition(gsl::span<const int > inputsIndices, AnalysisCluster& clusterAnalysis) const
253253{
254254
255255 int i = 0 , nstat = 0 ;
@@ -319,7 +319,7 @@ void ClusterFactory<InputType>::evalGlobalPosition(gsl::span<int> inputsIndices,
319319// ____________________________________________________________________________
320320template <class InputType >
321321void ClusterFactory<InputType>::evalLocalPositionFit(double deff, double mLogWeight ,
322- double phiSlope, gsl::span<int > inputsIndices, AnalysisCluster& clusterAnalysis) const
322+ double phiSlope, gsl::span<const int > inputsIndices, AnalysisCluster& clusterAnalysis) const
323323{
324324 int i = 0 , nstat = 0 ;
325325 double clXYZ[3 ] = {0 ., 0 ., 0 .}, clRmsXYZ[3 ] = {0 ., 0 ., 0 .}, xyzi[3 ], wtot = 0 ., w = 0 .;
@@ -416,7 +416,7 @@ void ClusterFactory<InputType>::getDeffW0(const double esum, double& deff, doubl
416416// / Distance is calculate in (phi,eta) units
417417// ______________________________________________________________________________
418418template <class InputType >
419- void ClusterFactory<InputType>::evalCoreEnergy(gsl::span<int > inputsIndices, AnalysisCluster& clusterAnalysis) const
419+ void ClusterFactory<InputType>::evalCoreEnergy(gsl::span<const int > inputsIndices, AnalysisCluster& clusterAnalysis) const
420420{
421421
422422 float coreEnergy = 0 .;
@@ -444,7 +444,7 @@ void ClusterFactory<InputType>::evalCoreEnergy(gsl::span<int> inputsIndices, Ana
444444// / in cell units
445445// ____________________________________________________________________________
446446template <class InputType >
447- void ClusterFactory<InputType>::evalElipsAxis(gsl::span<int > inputsIndices, AnalysisCluster& clusterAnalysis) const
447+ void ClusterFactory<InputType>::evalElipsAxis(gsl::span<const int > inputsIndices, AnalysisCluster& clusterAnalysis) const
448448{
449449 TString gn (mGeomPtr ->GetName ());
450450
@@ -521,7 +521,7 @@ void ClusterFactory<InputType>::evalElipsAxis(gsl::span<int> inputsIndices, Anal
521521// / Finds the maximum energy in the cluster and computes the Summed amplitude of digits/cells
522522// ____________________________________________________________________________
523523template <class InputType >
524- std::tuple<int , float , float > ClusterFactory<InputType>::getMaximalEnergyIndex(gsl::span<int > inputsIndices) const
524+ std::tuple<int , float , float > ClusterFactory<InputType>::getMaximalEnergyIndex(gsl::span<const int > inputsIndices) const
525525{
526526
527527 float energy = 0 .;
@@ -544,7 +544,7 @@ std::tuple<int, float, float> ClusterFactory<InputType>::getMaximalEnergyIndex(g
544544// / Calculates the multiplicity of inputs with energy larger than H*energy
545545// ____________________________________________________________________________
546546template <class InputType >
547- int ClusterFactory<InputType>::getMultiplicityAtLevel(float H, gsl::span<int > inputsIndices, AnalysisCluster& clusterAnalysis) const
547+ int ClusterFactory<InputType>::getMultiplicityAtLevel(float H, gsl::span<const int > inputsIndices, AnalysisCluster& clusterAnalysis) const
548548{
549549 int multipl = 0 ;
550550 for (auto iInput : inputsIndices) {
@@ -559,7 +559,7 @@ int ClusterFactory<InputType>::getMultiplicityAtLevel(float H, gsl::span<int> in
559559// / Time is set to the time of the input with the maximum energy
560560// ____________________________________________________________________________
561561template <class InputType >
562- void ClusterFactory<InputType>::evalTime(gsl::span<int > inputsIndices, AnalysisCluster& clusterAnalysis) const
562+ void ClusterFactory<InputType>::evalTime(gsl::span<const int > inputsIndices, AnalysisCluster& clusterAnalysis) const
563563{
564564 float maxE = 0 ;
565565 unsigned short maxAt = 0 ;
0 commit comments