fRecoDone(0),
fSPDSeg()
{
+ // default c-tor
for (int i=0;i<2;i++) {
fNFiredChips[i] = 0;
fClArr[i] = 0;
//____________________________________________________________________
-void AliITSMultReconstructor::ReconstructMix(TTree* clusterTree, TTree* clusterTreeMix, Float_t* vtx, Float_t*)
+void AliITSMultReconstructor::ReconstructMix(TTree* clusterTree, TTree* clusterTreeMix, const Float_t* vtx, Float_t*)
{
//
// RS NOTE - this is old reconstructor invocation, to be used from VertexFinder and in analysis mode
// count clusters
// loop over the SPD subdetectors
int nclLayer = 0;
- int detMin = AliITSgeomTGeo::GetModuleIndex(il+1,1,1);
+ int detMin = TMath::Max(0,AliITSgeomTGeo::GetModuleIndex(il+1,1,1));
int detMax = AliITSgeomTGeo::GetModuleIndex(il+2,1,1);
for (int idt=detMin;idt<detMax;idt++) {
if (!fCreateClustersCopy) itsClusters = rpcont->UncheckedGetClusters(idt);
if (!cluster) continue;
if (fCreateClustersCopy) cluster = new ((*fClArr[il])[nclLayer]) AliITSRecPoint(*cluster);
clArr.AddAtAndExpand(cluster,nclLayer++);
- nClustersInChip[ fSPDSeg.GetChipFromLocal(0,cluster->GetDetLocalZ()) ]++;
+ Int_t chipNo = fSPDSeg.GetChipFromLocal(0,cluster->GetDetLocalZ());
+ if(chipNo>=0)nClustersInChip[ chipNo ]++;
}
for(Int_t ifChip=5;ifChip--;) if (nClustersInChip[ifChip]) fNFiredChips[il]++;
}
fNFiredChips[1] = 0;
AliITSRecPointContainer* rpcont=AliITSRecPointContainer::Instance();
- TClonesArray* itsClusters=rpcont->FetchClusters(0,itsClusterTree);
+ TClonesArray* itsClusters=NULL;
+ rpcont->FetchClusters(0,itsClusterTree);
if(!rpcont->IsSPDActive()){
AliWarning("No SPD rec points found, multiplicity not calculated");
return;
// number of clusters in each chip of the current module
Int_t nClustersInChip[5] = {0,0,0,0,0};
Int_t layer = 0;
+ Int_t ladder=0;
+ Int_t det=0;
+ AliITSgeomTGeo::GetModuleId(iIts,layer,ladder,det);
+ --layer; // layer is from 1 to 6 in AliITSgeomTGeo, but from 0 to 5 here
+ if(layer<0 || layer >1)continue;
// loop over clusters
while(nClusters--) {
AliITSRecPoint* cluster = (AliITSRecPoint*)itsClusters->UncheckedAt(nClusters);
-
- layer = cluster->GetLayer();
- if (layer>1) continue;
-
+
// find the chip for the current cluster
Float_t locz = cluster->GetDetLocalZ();
Int_t iChip = fSPDSeg.GetChipFromLocal(0,locz);
}
//____________________________________________________________________
-void AliITSMultReconstructor::FlagClustersInOverlapRegions (Int_t iC1, Int_t iC2WithBestDist) {
-
+void AliITSMultReconstructor::FlagClustersInOverlapRegions (Int_t iC1, Int_t iC2WithBestDist)
+{
+ // Flags clusters in the overlapping regions
Float_t distClSameMod=0.;
Float_t distClSameModMin=0.;
Int_t iClOverlap =0;