-//____________________________________________________________________________
-void AliEMCALClusterizerv1::MakeUnfolding()
-{
- Fatal("AliEMCALClusterizerv1::MakeUnfolding", "--> Unfolding not implemented") ;
-
-// // Unfolds clusters using the shape of an ElectroMagnetic shower
-// // Performs unfolding of all EMC/CPV clusters
-
-// AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ;
-
-// const AliEMCALGeometry * geom = gime->EMCALGeometry() ;
-// TObjArray * emcRecPoints = gime->TowerRecPoints() ;
-// TObjArray * cpvRecPoints = gime->PreShoRecPoints() ;
-// TClonesArray * digits = gime->Digits() ;
-
-// // Unfold first EMC clusters
-// if(fNumberOfTowerClusters > 0){
-
-// Int_t nModulesToUnfold = geom->GetNModules() ;
-
-// Int_t numberofNotUnfolded = fNumberOfTowerClusters ;
-// Int_t index ;
-// for(index = 0 ; index < numberofNotUnfolded ; index++){
-
-// AliEMCALTowerRecPoint * emcRecPoint = (AliEMCALTowerRecPoint *) emcRecPoints->At(index) ;
-// if(emcRecPoint->GetEMCALMod()> nModulesToUnfold)
-// break ;
-
-// Int_t nMultipl = emcRecPoint->GetMultiplicity() ;
-// Int_t * maxAt = new Int_t[nMultipl] ;
-// Float_t * maxAtEnergy = new Float_t[nMultipl] ;
-// Int_t nMax = emcRecPoint->GetNumberOfLocalMax(maxAt, maxAtEnergy,fTowerLocMaxCut,digits) ;
-
-// if( nMax > 1 ) { // if cluster is very flat (no pronounced maximum) then nMax = 0
-// UnfoldCluster(emcRecPoint, nMax, maxAt, maxAtEnergy) ;
-// emcRecPoints->Remove(emcRecPoint);
-// emcRecPoints->Compress() ;
-// index-- ;
-// fNumberOfTowerClusters -- ;
-// numberofNotUnfolded-- ;
-// }
-
-// delete[] maxAt ;
-// delete[] maxAtEnergy ;
-// }
-// }
-// // Unfolding of EMC clusters finished
-
-
-// // Unfold now CPV clusters
-// if(fNumberOfPreShoClusters > 0){
-
-// Int_t nModulesToUnfold = geom->GetNModules() ;
-
-// Int_t numberofPreShoNotUnfolded = fNumberOfPreShoClusters ;
-// Int_t index ;
-// for(index = 0 ; index < numberofPreShoNotUnfolded ; index++){
-
-// AliEMCALRecPoint * recPoint = (AliEMCALRecPoint *) cpvRecPoints->At(index) ;
-
-// if(recPoint->GetEMCALMod()> nModulesToUnfold)
-// break ;
-
-// AliEMCALTowerRecPoint * emcRecPoint = (AliEMCALTowerRecPoint*) recPoint ;
-
-// Int_t nMultipl = emcRecPoint->GetMultiplicity() ;
-// Int_t * maxAt = new Int_t[nMultipl] ;
-// Float_t * maxAtEnergy = new Float_t[nMultipl] ;
-// Int_t nMax = emcRecPoint->GetNumberOfLocalMax(maxAt, maxAtEnergy,fPreShoLocMaxCut,digits) ;
-
-// if( nMax > 1 ) { // if cluster is very flat (no pronounced maximum) then nMax = 0
-// UnfoldCluster(emcRecPoint, nMax, maxAt, maxAtEnergy) ;
-// cpvRecPoints->Remove(emcRecPoint);
-// cpvRecPoints->Compress() ;
-// index-- ;
-// numberofPreShoNotUnfolded-- ;
-// fNumberOfPreShoClusters-- ;
-// }
-
-// delete[] maxAt ;
-// delete[] maxAtEnergy ;
-// }
-// }
-// //Unfolding of PreSho clusters finished
-
-}
-
-//____________________________________________________________________________
-Double_t AliEMCALClusterizerv1::ShowerShape(Double_t r)
-{
- // Shape of the shower (see EMCAL TDR)
- // If you change this function, change also the gradient evaluation in ChiSquare()
-
- Double_t r4 = r*r*r*r ;
- Double_t r295 = TMath::Power(r, 2.95) ;
- Double_t shape = TMath::Exp( -r4 * (1. / (2.32 + 0.26 * r4) + 0.0316 / (1 + 0.0652 * r295) ) ) ;
- return shape ;
-}
-
-//____________________________________________________________________________
-void AliEMCALClusterizerv1::UnfoldCluster(AliEMCALTowerRecPoint * iniTower,
- Int_t nMax,
- AliEMCALDigit ** maxAt,
- Float_t * maxAtEnergy)
-{
- // Performs the unfolding of a cluster with nMax overlapping showers
-
- Fatal("AliEMCALClusterizerv1::UnfoldCluster", "--> Unfolding not implemented") ;
-
- // AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ;
-// const AliEMCALGeometry * geom = gime->EMCALGeometry() ;
-// const TClonesArray * digits = gime->Digits() ;
-// TObjArray * emcRecPoints = gime->TowerRecPoints() ;
-// TObjArray * cpvRecPoints = gime->PreShoRecPoints() ;
-
-// Int_t nPar = 3 * nMax ;
-// Float_t * fitparameters = new Float_t[nPar] ;
-
-// Bool_t rv = FindFit(iniTower, maxAt, maxAtEnergy, nPar, fitparameters) ;
-// if( !rv ) {
-// // Fit failed, return and remove cluster
-// delete[] fitparameters ;
-// return ;
-// }
-
-// // create ufolded rec points and fill them with new energy lists
-// // First calculate energy deposited in each sell in accordance with fit (without fluctuations): efit[]
-// // and later correct this number in acordance with actual energy deposition
-
-// Int_t nDigits = iniTower->GetMultiplicity() ;
-// Float_t * efit = new Float_t[nDigits] ;
-// Float_t xDigit=0.,zDigit=0.,distance=0. ;
-// Float_t xpar=0.,zpar=0.,epar=0. ;
-// Int_t relid[4] ;
-// AliEMCALDigit * digit = 0 ;
-// Int_t * emcDigits = iniTower->GetDigitsList() ;
-
-// Int_t iparam ;
-// Int_t iDigit ;
-// for(iDigit = 0 ; iDigit < nDigits ; iDigit ++){
-// digit = (AliEMCALDigit*) digits->At(emcDigits[iDigit] ) ;
-// geom->AbsToRelNumbering(digit->GetId(), relid) ;
-// geom->RelPosInModule(relid, xDigit, zDigit) ;
-// efit[iDigit] = 0;
-
-// iparam = 0 ;
-// while(iparam < nPar ){
-// xpar = fitparameters[iparam] ;
-// zpar = fitparameters[iparam+1] ;
-// epar = fitparameters[iparam+2] ;
-// iparam += 3 ;
-// distance = (xDigit - xpar) * (xDigit - xpar) + (zDigit - zpar) * (zDigit - zpar) ;
-// distance = TMath::Sqrt(distance) ;
-// efit[iDigit] += epar * ShowerShape(distance) ;
-// }
-// }
-
-
-// // Now create new RecPoints and fill energy lists with efit corrected to fluctuations
-// // so that energy deposited in each cell is distributed betwin new clusters proportionally
-// // to its contribution to efit