#include "AliRun.h"
#include "AliITSClusterFinderV2.h"
#include "AliITSRecPoint.h"
-#include "AliITSclusterV2.h"
-#include "AliITSsimulationFastPoints.h"
-#include "AliITS.h"
-#include "AliITSgeom.h"
+#include "AliITSDetTypeRec.h"
+//#include "AliITSgeom.h"
#include <TParticle.h>
#include "AliMC.h"
extern AliRun *gAlice;
-AliITSClusterFinderV2::AliITSClusterFinderV2():AliITSClusterFinder(){
+AliITSClusterFinderV2::AliITSClusterFinderV2(AliITSDetTypeRec* dettyp):AliITSClusterFinder(dettyp),
+fNModules(0),
+fEvent(0){
//Default constructor
- fEvent = 0;
- fModule = 0;
-
- AliITSgeom *geom=(AliITSgeom*)fITS->GetITSgeom();
-
- fNModules = geom->GetIndexMax();
+ fNModules = dettyp->GetITSgeom()->GetIndexMax();
}
-
+/*
//______________________________________________________________________
AliITSClusterFinderV2::AliITSClusterFinderV2(const AliITSClusterFinderV2 &source) : AliITSClusterFinder(source) {
// Copy constructor
// Copies are not allowed. The method is protected to avoid misuse.
Fatal("AliITSClusterFinderV2","Copy constructor not allowed\n");
}
-
+*/
//______________________________________________________________________
-AliITSClusterFinderV2& AliITSClusterFinderV2::operator=(const AliITSClusterFinderV2& /* source */){
+//AliITSClusterFinderV2& AliITSClusterFinderV2::operator=(const AliITSClusterFinderV2& /* source */){
// Assignment operator
// Assignment is not allowed. The method is protected to avoid misuse.
- Fatal("= operator","Assignment operator not allowed\n");
- return *this;
-}
+ //Fatal("= operator","Assignment operator not allowed\n");
+ //return *this;
+//}
//______________________________________________________________________
//______________________________________________________________________
void AliITSClusterFinderV2::
-MakeCluster(Int_t k,Int_t max,AliBin *bins,UInt_t m,AliITSclusterV2 &c) {
+MakeCluster(Int_t k,Int_t max,AliBin *bins,UInt_t m,AliITSRecPoint &c) {
//------------------------------------------------------------
//make cluster using digits of this peak
//------------------------------------------------------------
Int_t i=k/max, j=k-i*max;
c.SetQ(c.GetQ()+q);
- c.SetY(c.GetY()+i*q);
- c.SetZ(c.GetZ()+j*q);
+ c.SetYZ(GetModule(),c.GetY()+i*q,c.GetZ()+j*q);
c.SetSigmaY2(c.GetSigmaY2()+i*i*q);
c.SetSigmaZ2(c.GetSigmaZ2()+j*j*q);
if (bins[k+max].GetMask() == m) MakeCluster(k+max,max,bins,m,c);
if (bins[k+1 ].GetMask() == m) MakeCluster(k+1 ,max,bins,m,c);
}
-
-//______________________________________________________________________
-Int_t AliITSClusterFinderV2::Hits2Clusters(TTree *hTree, TTree *cTree) {
- //------------------------------------------------------------
- // This function creates ITS clusters
- //------------------------------------------------------------
-
- AliITSgeom *geom=fITS->GetITSgeom();
- Int_t mmax=geom->GetIndexMax();
-
- fITS->InitModules(-1,mmax);
- fITS->FillModules(hTree,0);
-
- TClonesArray *clusters=new TClonesArray("AliITSclusterV2",1000);
- TBranch *branch=cTree->GetBranch("Clusters");
- if (!branch) cTree->Branch("Clusters",&clusters);
- else branch->SetAddress(&clusters);
-
- static TClonesArray *points=fITS->RecPoints();
- AliITSsimulationFastPoints sim;
- Int_t ncl=0;
- for (Int_t m=0; m<mmax; m++) {
- AliITSmodule *mod=fITS->GetModule(m);
- sim.CreateFastRecPoints(mod,m,gRandom);
-
- RecPoints2Clusters(points, m, clusters);
- fITS->ResetRecPoints();
-
- ncl+=clusters->GetEntriesFast();
- cTree->Fill();
- clusters->Clear();
- }
-
- Info("Hits2Clusters","Number of found fast clusters : %d",ncl);
-
- //cTree->Write();
-
- delete clusters;
-
- return 0;
-}
-