#include "AliITSclustererV2.h"
#include "AliITSclusterV2.h"
+#include "AliITSDetTypeRec.h"
#include "AliRawReader.h"
#include "AliITSRawStreamSPD.h"
#include "AliITSRawStreamSDD.h"
fHlSSD=2.00;
fTanP=0.0275;
fTanN=0.0075;
+
}
else branch->SetAddress(&clusters);
Int_t mmax=(Int_t)dTree->GetEntries();
+ if (mmax!=fNModules) {
+ Error("Digits2Clusters","Number of entries != number of modules !");
+ return 1;
+ }
for (fI=0; fI<mmax; fI++) {
dTree->GetEvent(fI);
//**** Fast clusters *******************************
#include "TParticle.h"
-#include "AliITS.h"
+//#include "AliITS.h"
#include "AliITSmodule.h"
#include "AliITSRecPoint.h"
#include "AliITSsimulationFastPoints.h"
#include "AliITSRecPoint.h"
-/*
+
static void CheckLabels(Int_t lab[3]) {
//------------------------------------------------------------
// Tries to find mother's labels
else ;//cerr<<"CheckLabels : No empty labels !\n";
}
}
-*/
+
+/*
static void CheckLabels(Int_t lab[3]) {
//------------------------------------------------------------
// Tries to find mother's labels
}
}
-
+*/
static void CheckLabels2(Int_t lab[10]) {
//------------------------------------------------------------
// Tries to find mother's labels
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[0]=-(-p->GetDetLocalX()+fYshift[idx]); if (idx<=fLastSPD1) lp[0]*=-1; //SPD1
lp[1]= -p->GetZ()+fZshift[idx];
- lp[2]=p->GetSigmaX2();
+ lp[2]=p->GetSigmaDetLocX2();
lp[3]=p->GetSigmaZ2();
lp[4]=p->GetQ()*36./23333.; //electrons -> ADC
Int_t lab[4];
}
}
-Int_t AliITSclustererV2::Hits2Clusters(TTree *hTree, TTree *cTree) {
- //------------------------------------------------------------
- // This function creates ITS clusters
- //------------------------------------------------------------
- if (!gAlice) {
- Error("Hits2Clusters","gAlice==0 !");
- return 1;
- }
-
- AliITS *its = (AliITS*)gAlice->GetModule("ITS");
- if (!its) {
- Error("Hits2Clusters","Can't find the ITS !");
- return 2;
- }
- AliITSgeom *geom=its->GetITSgeom();
- Int_t mmax=geom->GetIndexMax();
-
- its->InitModules(-1,mmax);
- its->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=its->RecPoints();
- AliITSsimulationFastPoints sim;
- Int_t ncl=0;
- for (Int_t m=0; m<mmax; m++) {
- AliITSmodule *mod=its->GetModule(m);
- sim.CreateFastRecPoints(mod,m,gRandom);
-
- RecPoints2Clusters(points, m, clusters);
- its->ResetRecPoints();
-
- ncl+=clusters->GetEntriesFast();
- cTree->Fill();
- clusters->Clear();
- }
-
- Info("Hits2Clusters","Number of found fast clusters : %d",ncl);
-
- //cTree->Write();
-
- delete clusters;
-
- return 0;
-}
-
//***********************************
#ifndef V1
Int_t kNzBins = fNzSPD + 2;
Int_t kNyBins = fNySPD + 2;
Int_t kMaxBin = kNzBins * kNyBins;
- AliBin* bins = NULL;
+ AliBin *binsSPD = new AliBin[kMaxBin];
+ AliBin *binsSPDInit = new AliBin[kMaxBin];
+ AliBin *bins = NULL;
// read raw data input stream
while (kTRUE) {
}
nClustersSPD += nClusters;
- delete bins;
+ bins = NULL;
}
if (!next) break;
- bins = new AliBin[kMaxBin];
+ bins = binsSPD;
+ memcpy(binsSPD,binsSPDInit,sizeof(AliBin)*kMaxBin);
}
// fill the current digit into the bins array
bins[index].SetQ(1);
}
+ delete [] binsSPDInit;
+ delete [] binsSPD;
+
Info("FindClustersSPD", "found clusters in ITS SPD: %d", nClustersSPD);
}
Int_t nClustersSDD = 0;
Int_t kNzBins = fNzSDD + 2;
Int_t kMaxBin = kNzBins * (fNySDD+2);
- AliBin* bins[2] = {NULL, NULL};
+ AliBin *binsSDDInit = new AliBin[kMaxBin];
+ AliBin *binsSDD1 = new AliBin[kMaxBin];
+ AliBin *binsSDD2 = new AliBin[kMaxBin];
+ AliBin *bins[2] = {NULL, NULL};
// read raw data input stream
while (kTRUE) {
FindClustersSDD(bins, kMaxBin, kNzBins, NULL, clusters[iModule]);
Int_t nClusters = clusters[iModule]->GetEntriesFast();
nClustersSDD += nClusters;
- delete[] bins[0];
- delete[] bins[1];
+ bins[0] = bins[1] = NULL;
}
if (!next) break;
- bins[0] = new AliBin[kMaxBin];
- bins[1] = new AliBin[kMaxBin];
+ bins[0]=binsSDD1;
+ bins[1]=binsSDD2;
+ memcpy(binsSDD1,binsSDDInit,sizeof(AliBin)*kMaxBin);
+ memcpy(binsSDD2,binsSDDInit,sizeof(AliBin)*kMaxBin);
}
// fill the current digit into the bins array
}
}
+ delete[] binsSDD1;
+ delete[] binsSDD2;
+ delete[] binsSDDInit;
+
Info("FindClustersSDD", "found clusters in ITS SDD: %d", nClustersSDD);
}
Int_t cused2[3000];
for (Int_t i=0;i<3000;i++) {cnegative[i]=0; cused1[i]=0;}
for (Int_t i=0;i<3000;i++) {cpositive[i]=0; cused2[i]=0;}
+ for (Int_t i=0;i<30000;i++){negativepair[i]=positivepair[i]=0;}
static Short_t pairs[1000][1000];
memset(pairs,0,sizeof(Short_t)*1000000);
// Short_t ** pairs = new Short_t*[1000];
#else //V1
#include "AliITSDetType.h"
-
+#include "AliITS.h"
#include "AliITSsegmentationSPD.h"
#include "AliITSClusterFinderSPD.h"