}
//____________________________________________________________________________
-Bool_t AliEMCALClusterizerv1::FindFit(AliEMCALTowerRecPoint * emcRP, int * maxAt, Float_t * maxAtEnergy,
+Bool_t AliEMCALClusterizerv1::FindFit(AliEMCALTowerRecPoint * emcRP, AliEMCALDigit ** maxAt, Float_t * maxAtEnergy,
Int_t nPar, Float_t * fitparameters) const
{
// Calls TMinuit to fit the energy distribution of a cluster with several maxima
AliEMCALGeometry * geom = gime->EMCALGeometry() ;
for(iDigit = 0; iDigit < nDigits; iDigit++){
- digit = (AliEMCALDigit *) maxAt[iDigit];
+ digit = maxAt[iDigit];
Int_t relid[4] ;
Float_t x = 0.;
//____________________________________________________________________________
void AliEMCALClusterizerv1::UnfoldCluster(AliEMCALTowerRecPoint * iniTower,
Int_t nMax,
- int * maxAt,
+ AliEMCALDigit ** maxAt,
Float_t * maxAtEnergy)
{
// Performs the unfolding of a cluster with nMax overlapping showers
void GetCalibrationParameters(void) ;
- Bool_t FindFit(AliEMCALTowerRecPoint * emcRP, int * MaxAt, Float_t * maxAtEnergy,
+ Bool_t FindFit(AliEMCALTowerRecPoint * emcRP, AliEMCALDigit ** MaxAt, Float_t * maxAtEnergy,
Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit
void Init() ;
virtual void MakeUnfolding() ;
void UnfoldCluster(AliEMCALTowerRecPoint * iniEmc,Int_t Nmax,
- int * maxAt,Float_t * maxAtEnergy ) ; //Unfolds cluster using TMinuit package
+ AliEMCALDigit ** maxAt,Float_t * maxAtEnergy ) ; //Unfolds cluster using TMinuit package
void PrintRecPoints(Option_t * option) ;
private:
Bool_t operator==(const AliEMCALDigit &rValue) const;
AliEMCALDigit& operator+(AliEMCALDigit const &rValue) ;
- AliEMCALDigit& AliEMCALDigit::operator*(Float_t factor) ;
+ AliEMCALDigit& operator*(Float_t factor) ;
Int_t Compare(const TObject * obj) const ;
const Float_t GetEta() const ;
}
//____________________________________________________________________________
-Int_t AliEMCALTowerRecPoint::GetNumberOfLocalMax(Int_t * maxAt, Float_t * maxAtEnergy,
+Int_t AliEMCALTowerRecPoint::GetNumberOfLocalMax(AliEMCALDigit ** maxAt, Float_t * maxAtEnergy,
Float_t locMaxCut,TClonesArray * digits) const
{
// Calculates the number of local maxima in the cluster using fLocalMaxCut as the minimum
Int_t iDigit ;
for(iDigit = 0; iDigit < fMulDigit; iDigit++)
- maxAt[iDigit] = (Int_t) digits->At(fDigitsList[iDigit]) ;
+ maxAt[iDigit] = (AliEMCALDigit*) digits->At(fDigitsList[iDigit]) ;
for(iDigit = 0 ; iDigit < fMulDigit; iDigit++) {
- if(maxAt[iDigit] != -1) {
- digit = (AliEMCALDigit *) maxAt[iDigit] ;
+ if(maxAt[iDigit]) {
+ digit = maxAt[iDigit] ;
for(iDigitN = 0; iDigitN < fMulDigit; iDigitN++) {
digitN = (AliEMCALDigit *) digits->At(fDigitsList[iDigitN]) ;
if ( AreNeighbours(digit, digitN) ) {
if (fEnergyList[iDigit] > fEnergyList[iDigitN] ) {
- maxAt[iDigitN] = -1 ;
+ maxAt[iDigitN] = 0 ;
// but may be digit too is not local max ?
if(fEnergyList[iDigit] < fEnergyList[iDigitN] + locMaxCut)
- maxAt[iDigit] = -1 ;
+ maxAt[iDigit] = 0 ;
}
else {
- maxAt[iDigit] = -1 ;
+ maxAt[iDigit] = 0 ;
// but may be digitN too is not local max ?
if(fEnergyList[iDigit] > fEnergyList[iDigitN] - locMaxCut)
- maxAt[iDigitN] = -1 ;
+ maxAt[iDigitN] = 0 ;
}
} // if Areneighbours
} // while digitN
iDigitN = 0 ;
for(iDigit = 0; iDigit < fMulDigit; iDigit++) {
- if(maxAt[iDigit] != -1){
+ if(maxAt[iDigit] ){
maxAt[iDigitN] = maxAt[iDigit] ;
maxAtEnergy[iDigitN] = fEnergyList[iDigit] ;
iDigitN++ ;
Int_t GetMultiplicity(void) const { return fMulDigit ; } // gets the number of digits making this recpoint
Int_t GetMultiplicityAtLevel(const Float_t level) const ; // computes multiplicity of digits with
// energy above relative level
- virtual Int_t GetNumberOfLocalMax(Int_t * maxAt, Float_t * maxAtEnergy,
+ virtual Int_t GetNumberOfLocalMax(AliEMCALDigit ** maxAt, Float_t * maxAtEnergy,
Float_t locMaxCut,TClonesArray * digits ) const ;
// searches for the local maxima
Float_t GetTime(void) const{return fTime ; }
}
//____________________________________________________________________________
-Bool_t AliPHOSClusterizerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * maxAt, Float_t * maxAtEnergy,
+Bool_t AliPHOSClusterizerv1::FindFit(AliPHOSEmcRecPoint * emcRP, AliPHOSDigit ** maxAt, Float_t * maxAtEnergy,
Int_t nPar, Float_t * fitparameters) const
{
// Calls TMinuit to fit the energy distribution of a cluster with several maxima
const AliPHOSGeometry * geom = gime->PHOSGeometry() ;
for(iDigit = 0; iDigit < nDigits; iDigit++){
- digit = (AliPHOSDigit *) maxAt[iDigit];
+ digit = maxAt[iDigit];
Int_t relid[4] ;
Float_t x = 0.;
break ;
Int_t nMultipl = emcRecPoint->GetMultiplicity() ;
- Int_t * maxAt = new Int_t[nMultipl] ;
+ AliPHOSDigit ** maxAt = new AliPHOSDigit*[nMultipl] ;
Float_t * maxAtEnergy = new Float_t[nMultipl] ;
Int_t nMax = emcRecPoint->GetNumberOfLocalMax(maxAt, maxAtEnergy,fEmcLocMaxCut,digits) ;
AliPHOSEmcRecPoint * emcRecPoint = (AliPHOSEmcRecPoint*) recPoint ;
Int_t nMultipl = emcRecPoint->GetMultiplicity() ;
- Int_t * maxAt = new Int_t[nMultipl] ;
+ AliPHOSDigit ** maxAt = new AliPHOSDigit*[nMultipl] ;
Float_t * maxAtEnergy = new Float_t[nMultipl] ;
Int_t nMax = emcRecPoint->GetNumberOfLocalMax(maxAt, maxAtEnergy,fCpvLocMaxCut,digits) ;
//____________________________________________________________________________
void AliPHOSClusterizerv1::UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,
Int_t nMax,
- int * maxAt,
+ AliPHOSDigit ** maxAt,
Float_t * maxAtEnergy)
{
// Performs the unfolding of a cluster with nMax overlapping showers
void GetCalibrationParameters(void) ;
- Bool_t FindFit(AliPHOSEmcRecPoint * emcRP, int * MaxAt, Float_t * maxAtEnergy,
+ Bool_t FindFit(AliPHOSEmcRecPoint * emcRP, AliPHOSDigit ** MaxAt, Float_t * maxAtEnergy,
Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit
void Init() ;
virtual void MakeUnfolding() ;
void UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,Int_t Nmax,
- int * maxAt,Float_t * maxAtEnergy ) ; //Unfolds cluster using TMinuit package
+ AliPHOSDigit ** maxAt,Float_t * maxAtEnergy ) ; //Unfolds cluster using TMinuit package
void PrintRecPoints(Option_t * option) ;
private:
}
//____________________________________________________________________________
-Int_t AliPHOSEmcRecPoint::GetNumberOfLocalMax(Int_t * maxAt, Float_t * maxAtEnergy,
+Int_t AliPHOSEmcRecPoint::GetNumberOfLocalMax( AliPHOSDigit ** maxAt, Float_t * maxAtEnergy,
Float_t locMaxCut,TClonesArray * digits) const
{
// Calculates the number of local maxima in the cluster using fLocalMaxCut as the minimum
Int_t iDigit ;
for(iDigit = 0; iDigit < fMulDigit; iDigit++)
- maxAt[iDigit] = (Int_t) digits->At(fDigitsList[iDigit]) ;
+ maxAt[iDigit] = (AliPHOSDigit*) digits->At(fDigitsList[iDigit]) ;
for(iDigit = 0 ; iDigit < fMulDigit; iDigit++) {
- if(maxAt[iDigit] != -1) {
- digit = (AliPHOSDigit *) maxAt[iDigit] ;
+ if(maxAt[iDigit]) {
+ digit = maxAt[iDigit] ;
for(iDigitN = 0; iDigitN < fMulDigit; iDigitN++) {
digitN = (AliPHOSDigit *) digits->At(fDigitsList[iDigitN]) ;
if ( AreNeighbours(digit, digitN) ) {
if (fEnergyList[iDigit] > fEnergyList[iDigitN] ) {
- maxAt[iDigitN] = -1 ;
+ maxAt[iDigitN] = 0 ;
// but may be digit too is not local max ?
if(fEnergyList[iDigit] < fEnergyList[iDigitN] + locMaxCut)
- maxAt[iDigit] = -1 ;
+ maxAt[iDigit] = 0 ;
}
else {
- maxAt[iDigit] = -1 ;
+ maxAt[iDigit] = 0 ;
// but may be digitN too is not local max ?
if(fEnergyList[iDigit] > fEnergyList[iDigitN] - locMaxCut)
- maxAt[iDigitN] = -1 ;
+ maxAt[iDigitN] = 0 ;
}
} // if Areneighbours
} // while digitN
iDigitN = 0 ;
for(iDigit = 0; iDigit < fMulDigit; iDigit++) {
- if(maxAt[iDigit] != -1){
+ if(maxAt[iDigit]){
maxAt[iDigitN] = maxAt[iDigit] ;
maxAtEnergy[iDigitN] = fEnergyList[iDigit] ;
iDigitN++ ;
Int_t GetMultiplicity(void) const { return fMulDigit ; } // gets the number of digits making this recpoint
Int_t GetMultiplicityAtLevel(const Float_t level) const ; // computes multiplicity of digits with
// energy above relative level
- virtual Int_t GetNumberOfLocalMax(Int_t * maxAt, Float_t * maxAtEnergy,
+ virtual Int_t GetNumberOfLocalMax(AliPHOSDigit ** maxAt, Float_t * maxAtEnergy,
Float_t locMaxCut,TClonesArray * digits ) const ;
// searches for the local maxima
Float_t GetTime(void) const{return fTime ; }
// if multiplicity less then 2 - nothing to unfold
if(GetMultiplicity()<2) return 1;
- Int_t maxAt[1000];
+ AliPHOSDigit * maxAt[1000];
Float_t maxAtEnergy[1000];
Float_t LocMaxCut, LogWeight;
Int_t relid[4] ;
for(Int_t iMax=0; iMax<Nmax; iMax++)
{
- AliPHOSDigit* digitMax = (AliPHOSDigit*)maxAt[iMax];
+ AliPHOSDigit* digitMax = maxAt[iMax];
Float_t eMax = maxAtEnergy[iMax];
fGeom->AbsToRelNumbering(digitMax->GetId(), relid) ;
fGeom->RelPosInModule(relid, xMax, zMax);
for(Int_t iMax=0; iMax<Nmax; iMax++)
{
- AliPHOSDigit* digitMax = (AliPHOSDigit*)maxAt[iMax];
+ AliPHOSDigit* digitMax = maxAt[iMax];
fGeom->AbsToRelNumbering(digitMax->GetId(), relid) ;
fGeom->RelPosInModule(relid, xMax, zMax);
Float_t eMax = maxAtEnergy[iMax];