#include "AliITSdigit.h"
#include "AliITSDetTypeRec.h"
#include "AliITSMap.h"
+#include "AliITSgeomTGeo.h"
ClassImp(AliITSClusterFinder)
SetClusterSize();
SetDeclusterFlag();
}
-/*
+
//______________________________________________________________________
-AliITSClusterFinder::AliITSClusterFinder(const AliITSClusterFinder &source) : TObject(source) {
+AliITSClusterFinder::AliITSClusterFinder(const AliITSClusterFinder &source) : TObject(source),
+fDebug(source.fDebug),
+fModule(source.fModule),
+fDigits(),
+fNdigits(source.fNdigits),
+fDetTypeRec(),
+fClusters(),
+fNRawClusters(source.fNRawClusters),
+fMap(),
+fNperMax(source.fNperMax),
+fDeclusterFlag(source.fDeclusterFlag),
+fClusterSize(source.fClusterSize),
+fNPeaks(source.fNPeaks) {
// Copy constructor
// Copies are not allowed. The method is protected to avoid misuse.
- Fatal("AliITSClusterFinder","Copy constructor not allowed\n");
+ AliError("Copy constructor not allowed\n");
}
-*/
+
//______________________________________________________________________
//AliITSClusterFinder& AliITSClusterFinder::operator=(const AliITSClusterFinder& /* source */){
}
//__________________________________________________________________________
void AliITSClusterFinder::InitGeometry(){
-
-
- //Initialisation of ITS geometry
- if(!fDetTypeRec->GetITSgeom()) {
- Error("InitGeometry","ITS geom is null!");
- return;
- }
- Int_t mmax=fDetTypeRec->GetITSgeom()->GetIndexMax();
- if (mmax>2200) {
- Fatal("AliITSClusterFinder","Too many ITS subdetectors !");
- }
- Int_t m;
- for (m=0; m<mmax; m++) {
- Int_t lay,lad,det; fDetTypeRec->GetITSgeom()->GetModuleId(m,lay,lad,det);
- Float_t x,y,z; fDetTypeRec->GetITSgeom()->GetTrans(lay,lad,det,x,y,z);
- Double_t rot[9]; fDetTypeRec->GetITSgeom()->GetRotMatrix(lay,lad,det,rot);
- Double_t alpha=TMath::ATan2(rot[1],rot[0])+TMath::Pi();
- Double_t ca=TMath::Cos(alpha), sa=TMath::Sin(alpha);
- fYshift[m] = x*ca + y*sa;
- fZshift[m] = (Double_t)z;
- fNdet[m] = (lad-1)*fDetTypeRec->GetITSgeom()->GetNdetectors(lay) + (det-1);
+ //
+ // Initialisation of ITS geometry
+ //
+ Int_t mmax=AliITSgeomTGeo::GetNModules();
+ for (Int_t m=0; m<mmax; m++) {
+ Int_t lay,lad,det; AliITSgeomTGeo::GetModuleId(m,lay,lad,det);
+ fNdet[m] = (lad-1)*AliITSgeomTGeo::GetNDetectors(lay) + (det-1);
fNlayer[m] = lay-1;
}
}
*os << fClusterSize<<",";
*os << fNPeaks<<endl;
}
-/*
-//______________________________________________________________________
-void AliITSClusterFinder::RecPoints2Clusters
-(const TClonesArray *points, Int_t idx, TClonesArray *clusters) {
- //------------------------------------------------------------
- // Conversion AliITSRecPoint -> AliITSclusterV2 for the ITS
- // subdetector indexed by idx
- //------------------------------------------------------------
- if(!fDetTypeRec->GetITSgeom()) {
- Error("RecPoints2Clusters","ITS geom is null!");
- return;
- }
- Int_t lastSPD1=fDetTypeRec->GetITSgeom()->GetModuleIndex(2,1,1)-1;
- TClonesArray &cl=*clusters;
- Int_t ncl=points->GetEntriesFast();
- for (Int_t i=0; i<ncl; i++) {
- AliITSRecPoint *p = (AliITSRecPoint *)points->UncheckedAt(i);
- Float_t lp[5];
- lp[0]=-(-p->GetX()+fYshift[idx]); if (idx<=lastSPD1) lp[0]*=-1; //SPD1
- lp[1]= -p->GetZ()+fZshift[idx];
- lp[2]=p->GetSigmaX2();
- lp[3]=p->GetSigmaZ2();
- lp[4]=p->GetQ()*36./23333.; //electrons -> ADC
- Int_t lab[4];
- lab[0]=p->GetLabel(0); lab[1]=p->GetLabel(1); lab[2]=p->GetLabel(2);
- lab[3]=fNdet[idx];
- CheckLabels(lab);
- Int_t dummy[3]={0,0,0};
- new (cl[i]) AliITSclusterV2(lab,lp, dummy);
- }
-}
-*/
//______________________________________________________________________
void AliITSClusterFinder::Read(istream *is) {
//Standard input for this class
source.Read(&is);
return is;
}
-/*
-void AliITSClusterFinder::RecPoints2Clusters
-(const TClonesArray *points, Int_t idx, TClonesArray *clusters) {
- //------------------------------------------------------------
- // Conversion AliITSRecPoint -> AliITSclusterV2 for the ITS
- // subdetector indexed by idx
- //------------------------------------------------------------
- TClonesArray &cl=*clusters;
- Int_t ncl=points->GetEntriesFast();
- for (Int_t i=0; i<ncl; i++) {
- AliITSRecPoint *p = (AliITSRecPoint *)points->UncheckedAt(i);
- Float_t lp[5];
- lp[0]=-(-p->GetX()+fYshift[idx]); if (idx<=fLastSPD1) lp[0]*=-1; //SPD1
- lp[1]= -p->GetZ()+fZshift[idx];
- lp[2]=p->GetSigmaX2();
- lp[3]=p->GetSigmaZ2();
- lp[4]=p->GetQ()*36./23333.; //electrons -> ADC
- Int_t lab[4];
- lab[0]=p->GetLabel(0); lab[1]=p->GetLabel(1); lab[2]=p->GetLabel(2);
- lab[3]=fNdet[idx];
- CheckLabels(lab);
- Int_t dummy[3]={0,0,0};
- new (cl[i]) AliITSclusterV2(lab,lp, dummy);
- }
-}
-*/