+ AliDebug(1,Form("(cluster-fired chips in layer 1 : %d, layer 2: %d)",fNFiredChips[0],fNFiredChips[1]));
+}
+//____________________________________________________________________
+void
+AliITSMultReconstructor::LoadClusterFiredChips(TTree* itsClusterTree) {
+ // This method
+ // - gets the clusters from the cluster tree
+ // - counts the number of (cluster)fired chips
+
+ AliDebug(1,"Loading cluster-fired chips ...");
+
+ fNFiredChips[0] = 0;
+ fNFiredChips[1] = 0;
+
+ AliITSsegmentationSPD *seg = new AliITSsegmentationSPD();
+
+ TClonesArray* itsClusters = new TClonesArray("AliITSRecPoint");
+ TBranch* itsClusterBranch=itsClusterTree->GetBranch("ITSRecPoints");
+
+ itsClusterBranch->SetAddress(&itsClusters);
+
+ Int_t nItsSubs = (Int_t)itsClusterTree->GetEntries();
+
+ // loop over the its subdetectors
+ for (Int_t iIts=0; iIts < nItsSubs; iIts++) {
+
+ if (!itsClusterTree->GetEvent(iIts))
+ continue;
+
+ Int_t nClusters = itsClusters->GetEntriesFast();
+
+ // number of clusters in each chip of the current module
+ Int_t nClustersInChip[5] = {0,0,0,0,0};
+ Int_t layer = 0;
+
+ // 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 = seg->GetChipFromLocal(0,locz);
+ nClustersInChip[iChip]++;
+
+ }// end of cluster loop
+
+ // get number of fired chips in the current module
+ if(layer<2)
+ for(Int_t ifChip=0; ifChip<5; ifChip++) {
+ if(nClustersInChip[ifChip] >= 1) fNFiredChips[layer]++;
+ }
+
+ } // end of its "subdetector" loop
+
+ if (itsClusters) {
+ itsClusters->Delete();
+ delete itsClusters;
+ delete seg;
+ itsClusters = 0;
+ }
+ AliDebug(1,Form("(cluster-fired chips in layer 1 : %d, layer 2: %d)",fNFiredChips[0],fNFiredChips[1]));