}
//____________________________________________________________________________
-Bool_t AliEMCALClusterizerv1::FindFit(AliEMCALRecPoint * RecPoint, AliEMCALDigit ** maxAt,
- Float_t* maxAtEnergy,
+Bool_t AliEMCALClusterizerv1::FindFit(AliEMCALRecPoint * recPoint, AliEMCALDigit ** maxAt,
+ const Float_t* maxAtEnergy,
Int_t nPar, Float_t * fitparameters) const
{
// Calls TMinuit to fit the energy distribution of a cluster with several maxima
gMinuit->SetFCN(AliEMCALClusterizerv1::UnfoldingChiSquare) ;
// To set the address of the minimization function
TList * toMinuit = new TList();
- toMinuit->AddAt(RecPoint,0) ;
+ toMinuit->AddAt(recPoint,0) ;
toMinuit->AddAt(fDigitsArr,1) ;
toMinuit->AddAt(fGeom,2) ;
Int_t index ;
for(index = 0 ; index < numberofNotUnfolded ; index++){
- AliEMCALRecPoint * RecPoint = dynamic_cast<AliEMCALRecPoint *>( fRecPoints->At(index) ) ;
+ AliEMCALRecPoint * recPoint = dynamic_cast<AliEMCALRecPoint *>( fRecPoints->At(index) ) ;
TVector3 gpos;
Int_t absId;
- RecPoint->GetGlobalPosition(gpos);
+ recPoint->GetGlobalPosition(gpos);
fGeom->GetAbsCellIdFromEtaPhi(gpos.Eta(),gpos.Phi(),absId);
if(absId > nModulesToUnfold)
break ;
- Int_t nMultipl = RecPoint->GetMultiplicity() ;
+ Int_t nMultipl = recPoint->GetMultiplicity() ;
AliEMCALDigit ** maxAt = new AliEMCALDigit*[nMultipl] ;
Float_t * maxAtEnergy = new Float_t[nMultipl] ;
- Int_t nMax = RecPoint->GetNumberOfLocalMax(maxAt, maxAtEnergy,fECALocMaxCut,fDigitsArr) ;
+ Int_t nMax = recPoint->GetNumberOfLocalMax(maxAt, maxAtEnergy,fECALocMaxCut,fDigitsArr) ;
if( nMax > 1 ) { // if cluster is very flat (no pronounced maximum) then nMax = 0
- UnfoldCluster(RecPoint, nMax, maxAt, maxAtEnergy) ;
- fRecPoints->Remove(RecPoint);
+ UnfoldCluster(recPoint, nMax, maxAt, maxAtEnergy) ;
+ fRecPoints->Remove(recPoint);
fRecPoints->Compress() ;
index-- ;
fNumberOfECAClusters-- ;
numberofNotUnfolded-- ;
}
else{
- RecPoint->SetNExMax(1) ; //Only one local maximum
+ recPoint->SetNExMax(1) ; //Only one local maximum
}
delete[] maxAt ;
Float_t xpar=0.,zpar=0.,epar=0. ;
AliEMCALDigit * digit = 0 ;
- Int_t * Digits = iniTower->GetDigitsList() ;
+ Int_t * digitsList = iniTower->GetDigitsList() ;
Int_t iparam ;
Int_t iDigit ;
for(iDigit = 0 ; iDigit < nDigits ; iDigit ++){
- digit = dynamic_cast<AliEMCALDigit*>( fDigitsArr->At(Digits[iDigit] ) ) ;
+ digit = dynamic_cast<AliEMCALDigit*>( fDigitsArr->At(digitsList[iDigit] ) ) ;
fGeom->RelPosCellInSModule(digit->GetId(), yDigit, xDigit, zDigit);
efit[iDigit] = 0;
// so that energy deposited in each cell is distributed between new clusters proportionally
// to its contribution to efit
- Float_t * Energies = iniTower->GetEnergiesList() ;
+ Float_t * energiesList = iniTower->GetEnergiesList() ;
Float_t ratio ;
iparam = 0 ;
epar = fitparameters[iparam+2] ;
iparam += 3 ;
- AliEMCALRecPoint * RecPoint = 0 ;
+ AliEMCALRecPoint * recPoint = 0 ;
if(fNumberOfECAClusters >= fRecPoints->GetSize())
fRecPoints->Expand(2*fNumberOfECAClusters) ;
(*fRecPoints)[fNumberOfECAClusters] = new AliEMCALRecPoint("") ;
- RecPoint = dynamic_cast<AliEMCALRecPoint *>( fRecPoints->At(fNumberOfECAClusters) ) ;
+ recPoint = dynamic_cast<AliEMCALRecPoint *>( fRecPoints->At(fNumberOfECAClusters) ) ;
fNumberOfECAClusters++ ;
- RecPoint->SetNExMax((Int_t)nPar/3) ;
+ recPoint->SetNExMax((Int_t)nPar/3) ;
Float_t eDigit ;
for(iDigit = 0 ; iDigit < nDigits ; iDigit ++){
- digit = dynamic_cast<AliEMCALDigit*>( fDigitsArr->At( Digits[iDigit] ) ) ;
+ digit = dynamic_cast<AliEMCALDigit*>( fDigitsArr->At( digitsList[iDigit] ) ) ;
fGeom->RelPosCellInSModule(digit->GetId(), yDigit, xDigit, zDigit);
ratio = epar * ShowerShape(xDigit - xpar,zDigit - zpar) / efit[iDigit] ;
- eDigit = Energies[iDigit] * ratio ;
- RecPoint->AddDigit( *digit, eDigit ) ;
+ eDigit = energiesList[iDigit] * ratio ;
+ recPoint->AddDigit( *digit, eDigit ) ;
}
}
TList * toMinuit = dynamic_cast<TList*>( gMinuit->GetObjectFit() ) ;
- AliEMCALRecPoint * RecPoint = dynamic_cast<AliEMCALRecPoint*>( toMinuit->At(0) ) ;
+ AliEMCALRecPoint * recPoint = dynamic_cast<AliEMCALRecPoint*>( toMinuit->At(0) ) ;
TClonesArray * digits = dynamic_cast<TClonesArray*>( toMinuit->At(1) ) ;
// A bit buggy way to get an access to the geometry
// To be revised!
AliEMCALGeometry *geom = dynamic_cast<AliEMCALGeometry *>(toMinuit->At(2));
- Int_t * Digits = RecPoint->GetDigitsList() ;
+ Int_t * digitsList = recPoint->GetDigitsList() ;
- Int_t nOdigits = RecPoint->GetDigitsMultiplicity() ;
+ Int_t nOdigits = recPoint->GetDigitsMultiplicity() ;
- Float_t * Energies = RecPoint->GetEnergiesList() ;
+ Float_t * energiesList = recPoint->GetEnergiesList() ;
fret = 0. ;
Int_t iparam ;
for( iDigit = 0 ; iDigit < nOdigits ; iDigit++) {
- digit = dynamic_cast<AliEMCALDigit*>( digits->At( Digits[iDigit] ) );
+ digit = dynamic_cast<AliEMCALDigit*>( digits->At( digitsList[iDigit] ) );
Double_t xDigit=0 ;
Double_t zDigit=0 ;
efit += x[iParam] * ShowerShape(dx,dz) ;
iParam++ ;
}
- Double_t sum = 2. * (efit - Energies[iDigit]) / Energies[iDigit] ; // Here we assume, that sigma = sqrt(E)
+ Double_t sum = 2. * (efit - energiesList[iDigit]) / energiesList[iDigit] ; // Here we assume, that sigma = sqrt(E)
iParam = 0 ;
while(iParam < nPar ){
Double_t xpar = x[iParam] ;
efit += epar * ShowerShape(xDigit - xpar,zDigit - zpar) ;
}
- fret += (efit-Energies[iDigit])*(efit-Energies[iDigit])/Energies[iDigit] ;
+ fret += (efit-energiesList[iDigit])*(efit-energiesList[iDigit])/energiesList[iDigit] ;
// Here we assume, that sigma = sqrt(E)
}
}
TString taskName(Version()) ;
printf("--------------- ");
- printf(taskName.Data()) ;
+ printf("%s",taskName.Data()) ;
printf(" ");
printf("Clusterizing digits: ");
printf("\n ECA Local Maximum cut = %f", fECALocMaxCut);
-#ifndef ALIEMCALSDigitizer_H
-#define ALIEMCALSDigitizer_H
+#ifndef ALIEMCALSDIGITIZER_H
+#define ALIEMCALSDIGITIZER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
//_________________________________________________________________________
-// Task Class for making SDigits in EMCAL
-//
+// This is a TTask that makes SDigits out of Hits
+// A Summable Digits is the sum of all hits originating
+// from one in one tower of the EMCAL
+// A threshold for assignment of the primary to SDigit is applied
+//
+// SDigits need to hold the energy sum of the hits, but AliEMCALDigit
+// can (should) only store amplitude. Therefore, the SDigit energy is
+// "digitized" before being stored and must be "calibrated" back to an
+// energy before SDigits are summed to form true Digits
+//
+//
//*-- Author: Sahal Yacoob (LBL)
// based on : AliPHOSSDigitizer
//_________________________________________________________________________
-//
-// Modif:
-// August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction
-// July 2003 Yves Schutz: new IO (à la PHOS)
// --- ROOT system ---
#include "TTask.h"
ClassDef(AliEMCALSDigitizer,6) // description
};
-#endif // AliEMCALSDigitizer_H
+#endif // AliEMCALSDIGITIZER_H
//_________________________________________________________________________
// Implementation version v0 of EMCAL Manager class
-//*--
+// An object of this class does not produce hits nor digits
+// It is the one to use if you do not want to produce outputs in TREEH or TREED
+// This class places a Geometry of the EMCAL in the ALICE Detector as defined in AliEMCALGeometry.cxx
//*-- Author: Yves Schutz (SUBATECH)
//*-- and : Sahal Yacoob (LBL / UCT)
// : Aleksei Pavlinov (WSU) SHASHLYK
void CreateEmod(const char* mother="SMOD", const char* child="EMOD");
// TRD1
void Trd1Tower3X3(const double *parSCM0);
- void Trd1Tower4X4();
+ void Trd1Tower4X4() const;
void PbInTrap(const double parTRAP[11], TString n);
// 1X1 case - Nov 22, 2006
void Trd1Tower1X1(double *parSCM0);
- void PbInTrd1(double *parTrd1, TString n);
+ void PbInTrd1(const double *parTrd1, TString n);
// TRD2 - 1th design
void Scm0InTrd2(const AliEMCALGeometry * g, const Double_t emodPar[5], Double_t parSCM0[5]);
void Division2X2InScm0(const AliEMCALGeometry * g, const Double_t parSCM0[5]);
void PbmoInTrd2(const AliEMCALGeometry * g, const Double_t emodPar[5], Double_t parPBMO[5]);
void Division2X2InPbmo(const AliEMCALGeometry * g, const Double_t parPBMO[5]);
- TList *GetShishKebabModules() {return fShishKebabModules;}
+ TList *GetShishKebabModules() const {return fShishKebabModules;}
AliEMCALShishKebabTrd1Module *GetShishKebabModule(Int_t neta=0);
protected: