]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterFinderV2.cxx
Adding the AliAnalysisGUI class which is the main class that controls the GUI.
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderV2.cxx
index 4e4c5861102ac6a71c233135e51a51714161217e..0a1cd6a186d855e679d7b66ded0d7b69d85c5dc3 100644 (file)
 #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"
 
@@ -34,31 +32,28 @@ ClassImp(AliITSClusterFinderV2)
 
 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;
+//}
 
 
 //______________________________________________________________________
@@ -232,7 +227,7 @@ MarkPeak(Int_t k, Int_t max, AliBin *bins, UInt_t m) {
 
 //______________________________________________________________________
 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
   //------------------------------------------------------------
@@ -240,8 +235,7 @@ MakeCluster(Int_t k,Int_t max,AliBin *bins,UInt_t m,AliITSclusterV2 &c) {
   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);
 
@@ -252,45 +246,3 @@ MakeCluster(Int_t k,Int_t max,AliBin *bins,UInt_t m,AliITSclusterV2 &c) {
   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;
-}
-