fEMCALRecoUtils->RecalculateClusterShowerShapeParameters(fEMCALGeo, event->GetEMCALCells(),cluster);
fEMCALRecoUtils->RecalculateClusterPID(cluster);
}
-
- cluster->SetE(fEMCALRecoUtils->CorrectClusterEnergyLinearity(cluster));
-
+
fEMCALRecoUtils->RecalculateClusterPosition(fEMCALGeo, event->GetEMCALCells(),cluster);
if(DebugLevel() > 2)
printf("Filter, after : i %d, x %f, y %f, z %f\n",cluster->GetID(), position[0], position[1], position[2]);
}
+ cluster->SetE(fEMCALRecoUtils->CorrectClusterEnergyLinearity(cluster));
+
}
//Recalculate track-matching
fEMCALRecoUtils->FindMatches(event);
if(DebugLevel() > 2)
printf("Energy: after recalibration %f; ",c1->E());
+ // Recalculate cluster position
+ fRecoUtils->RecalculateClusterPosition(fEMCALGeo, emCells,c1);
+
// Correct Non-Linearity
c1->SetE(fRecoUtils->CorrectClusterEnergyLinearity(c1));
-
if(DebugLevel() > 2)
printf("after linearity correction %f\n",c1->E());
- // Recalculate cluster position
- fRecoUtils->RecalculateClusterPosition(fEMCALGeo, emCells,c1);
+
if(DebugLevel() > 2)
{
printf("Cor : i %d, E %f, dispersion %f, m02 %f, m20 %f\n",c1->GetID(),c1->E(),c1->GetDispersion(),c1->GetM02(),c1->GetM20());
//Recalculate distance to bad channels, if new list of bad channels provided
GetCaloUtils()->RecalculateClusterDistanceToBadChannel(GetEMCALCells(),clus);
-
- //Correct non linearity
- if(GetCaloUtils()->IsCorrectionOfClusterEnergyOn()){
- GetCaloUtils()->CorrectClusterEnergy(clus) ;
- //printf("Linearity Corrected Energy %f\n",clus->E());
- }
-
+
//Recalculate cluster position
if(GetCaloUtils()->IsRecalculationOfClusterPositionOn()){
GetCaloUtils()->RecalculateClusterPosition(GetEMCALCells(),clus);
//printf("After Corrections: e %f, x %f, y %f, z %f\n",clus->E(),pos[0],pos[1],pos[2]);
}
+ //Correct non linearity
+ if(GetCaloUtils()->IsCorrectionOfClusterEnergyOn()){
+ GetCaloUtils()->CorrectClusterEnergy(clus) ;
+ //printf("Linearity Corrected Energy %f\n",clus->E());
+ }
+
if (fMixedEvent) {
clus->SetID(iclus) ;
}