virtual void DoClust(Int_t idet, Int_t ismn, Int_t celltrack[][96],
Int_t cellpid[][96], Double_t celladc[][96],
- TObjArray *pmdisocell, TObjArray *pmdcont) = 0;
+ TObjArray *pmdcont) = 0;
virtual void SetEdepCut(Float_t decut) = 0;
- ClassDef(AliPMDClustering,7) // Does clustering for PMD
+ ClassDef(AliPMDClustering,8) // Does clustering for PMD
};
#endif
#include "AliPMDcludata.h"
#include "AliPMDcluster.h"
-#include "AliPMDisocell.h"
#include "AliPMDClustering.h"
#include "AliPMDClusteringV1.h"
#include "AliLog.h"
Int_t celltrack[48][96],
Int_t cellpid[48][96],
Double_t celladc[48][96],
- TObjArray *pmdisocell, TObjArray *pmdcont)
+ TObjArray *pmdcont)
{
// main function to call other necessary functions to do clustering
//
Double_t cellenergy[11424];
-
- // call the isolated cell search method
-
- FindIsoCell(idet, ismn, celladc, pmdisocell);
-
// ndimXr and ndimYr are different because of different module size
Int_t ndimXr = 0;
clusdata[1] = fCoord[1][i1][i2];
clusdata[2] = edepcell[i12];
clusdata[3] = 1.;
- clusdata[4] = 0.5;
- clusdata[5] = 0.0;
+ clusdata[4] = 999.5;
+ clusdata[5] = 999.5;
clxy[0] = i1*10000 + i2;
Double_t x2, Double_t y2)
{
return TMath::Sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
-}
-// ------------------------------------------------------------------------ //
-void AliPMDClusteringV1::FindIsoCell(Int_t idet, Int_t ismn, Double_t celladc[][96], TObjArray *pmdisocell)
-{
- // Does isolated cell search for offline calibration
-
- AliPMDisocell *isocell = 0;
-
- const Int_t kMaxRow = 48;
- const Int_t kMaxCol = 96;
- const Int_t kCellNeighbour = 6;
-
- Int_t id1, jd1;
-
- Int_t neibx[6] = {1,0,-1,-1,0,1};
- Int_t neiby[6] = {0,1,1,0,-1,-1};
-
-
- for(Int_t irow = 0; irow < kMaxRow; irow++)
- {
- for(Int_t icol = 0; icol < kMaxCol; icol++)
- {
- if(celladc[irow][icol] > 0)
- {
- Int_t isocount = 0;
- for(Int_t ii = 0; ii < kCellNeighbour; ii++)
- {
- id1 = irow + neibx[ii];
- jd1 = icol + neiby[ii];
- if (id1 < 0) id1 = 0;
- if (id1 > kMaxRow-1) id1 = kMaxRow - 1;
- if (jd1 < 0) jd1 = 0;
- if (jd1 > kMaxCol-1) jd1 = kMaxCol - 1;
- Float_t adc = (Float_t) celladc[id1][jd1];
- if(adc < 1.)
- {
- isocount++;
- if(isocount == kCellNeighbour)
- {
- Float_t cadc = (Float_t) celladc[irow][icol];
-
- isocell = new AliPMDisocell(idet,ismn,irow,icol,cadc);
- pmdisocell->Add(isocell);
-
- }
- }
- } // neigh cell cond.
- }
- }
- }
-
-
}
// ------------------------------------------------------------------------ //
void AliPMDClusteringV1::SetEdepCut(Float_t decut)
AliPMDClusteringV1 &operator=(const AliPMDClusteringV1 &pmdclv1);
virtual ~AliPMDClusteringV1();
+
void DoClust(Int_t idet, Int_t ismn, Int_t celltrack[][96],
Int_t cellpid[][96], Double_t celladc[][96],
- TObjArray *pmdisocell, TObjArray *pmdcont);
+ TObjArray *pmdcont);
+
Int_t CrClust(Double_t ave, Double_t cutoff, Int_t nmx1,
Int_t iord1[], Double_t edepcell[]);
void RefClust(Int_t incr, Double_t edepcell[]);
Double_t Distance(Double_t x1, Double_t y1,
Double_t x2, Double_t y2);
- void FindIsoCell(Int_t idet, Int_t ism,
- Double_t celladc[][96], TObjArray *pmdisocell);
+
void SetEdepCut(Float_t decut);
protected:
Float_t fCutoff; // Energy(ADC) cutoff per cell before clustering
- ClassDef(AliPMDClusteringV1,7) // Does clustering for PMD
+ ClassDef(AliPMDClusteringV1,8) // Does clustering for PMD
};
#endif
#include "AliPMDcludata.h"
#include "AliPMDcluster.h"
-#include "AliPMDisocell.h"
#include "AliPMDClustering.h"
#include "AliPMDClusteringV2.h"
#include "AliLog.h"
Int_t celltrack[48][96],
Int_t cellpid[48][96],
Double_t celladc[48][96],
- TObjArray *pmdisocell, TObjArray *pmdcont)
+ TObjArray *pmdcont)
{
// main function to call other necessary functions to do clustering
//
Double_t edepcell[kNMX];
- // call the isolated cell search method
-
- FindIsoCell(idet, ismn, celladc, pmdisocell);
-
-
-
if (ismn < 12)
{
ndimXr = 96;
Double_t x2, Double_t y2)
{
return TMath::Sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
-}
-// ------------------------------------------------------------------------ //
-void AliPMDClusteringV2::FindIsoCell(Int_t idet, Int_t ismn, Double_t celladc[][96], TObjArray *pmdisocell)
-{
- // Does isolated cell search for offline calibration
-
- AliPMDisocell *isocell = 0;
-
- const Int_t kMaxRow = 48;
- const Int_t kMaxCol = 96;
- const Int_t kCellNeighbour = 6;
-
- Int_t id1, jd1;
-
- Int_t neibx[6] = {1,0,-1,-1,0,1};
- Int_t neiby[6] = {0,1,1,0,-1,-1};
-
-
- for(Int_t irow = 0; irow < kMaxRow; irow++)
- {
- for(Int_t icol = 0; icol < kMaxCol; icol++)
- {
- if(celladc[irow][icol] > 0)
- {
- Int_t isocount = 0;
- for(Int_t ii = 0; ii < kCellNeighbour; ii++)
- {
- id1 = irow + neibx[ii];
- jd1 = icol + neiby[ii];
- Float_t adc = (Float_t) celladc[id1][jd1];
- if(adc == 0.)
- {
- isocount++;
- if(isocount == kCellNeighbour)
- {
- Float_t cadc = (Float_t) celladc[irow][icol];
-
- isocell = new AliPMDisocell(idet,ismn,irow,icol,cadc);
- pmdisocell->Add(isocell);
-
- }
- }
- } // neigh cell cond.
- }
- }
- }
-
-
}
// ------------------------------------------------------------------------ //
void AliPMDClusteringV2::SetEdepCut(Float_t decut)
void DoClust(Int_t idet, Int_t ismn, Int_t celltrack[][96],
Int_t cellpid[][96], Double_t celladc[][96],
- TObjArray *pmdisocell, TObjArray *pmdcont);
+ TObjArray *pmdcont);
Int_t CrClust(Double_t ave, Double_t cutoff, Int_t nmx1,
Int_t iord1[], Double_t edepcell[]);
void RefClust(Int_t incr, Double_t edepcell[]);
Double_t rcl[], Double_t rcs[], Double_t cells[],
TArrayI &testncl, TArrayI &testindex);
Double_t Distance(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
- void FindIsoCell(Int_t idet, Int_t ismn, Double_t celladc[][96], TObjArray *pmdisocell);
+
void SetEdepCut(Float_t decut);
protected:
Float_t fCutoff; // Energy(ADC) cutoff per cell before clustering
- ClassDef(AliPMDClusteringV2,6) // Does clustering for PMD
+ ClassDef(AliPMDClusteringV2,7) // Does clustering for PMD
};
#endif
{
fClusData[i] = clusdata[i];
}
- if(fClusData[3] > 19.){
- //AliError(Form("Too many clusters %f > 19",fClusData[3]));
- fClusData[3] = 19.;
- }
-
+
for (Int_t i = 0; i < 19; i++)
{
fClusCellDataX[i] = celldataX[i];
{
this->fClusData[i] = pmdcluster.fClusData[i];
}
- if(fClusData[3] > 19.){
- //AliError(Form("Too many clusters %f > 19",fClusData[3]));
- fClusData[3] = 19.;
- }
for(Int_t i=0; i<19; i++)
{
this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
{
this->fClusData[i] = pmdcluster.fClusData[i];
}
- if(fClusData[3] > 19.){
- //AliError(Form("Too many clusters %f > 19",fClusData[3]));
- fClusData[3] = 19.;
- }
for(Int_t i=0; i<19; i++)
{
this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];