#include "AliITSChannelStatus.h"
#include "AliITSDetTypeRec.h"
#include "AliITSRecPoint.h"
+#include "AliITSRecPointContainer.h"
#include "AliITSgeomTGeo.h"
#include "AliITSReconstructor.h"
#include "AliITSClusterParam.h"
//--------------------------------------------------------------------
//This function loads ITS clusters
//--------------------------------------------------------------------
- TBranch *branch=cTree->GetBranch("ITSRecPoints");
- if (!branch) {
- Error("LoadClusters"," can't get the branch !\n");
- return 1;
+
+ TClonesArray *clusters = NULL;
+ AliITSRecPointContainer* rpcont=AliITSRecPointContainer::Instance();
+ clusters=rpcont->FetchClusters(0,cTree);
+ if(!(rpcont->IsSPDActive() || rpcont->IsSDDActive() || rpcont->IsSSDActive())){
+ AliError("ITS is not in a known running configuration: SPD, SDD and SSD are not active");
+ return 1;
}
-
- static TClonesArray dummy("AliITSRecPoint",10000), *clusters=&dummy;
- branch->SetAddress(&clusters);
-
Int_t i=0,j=0,ndet=0;
Int_t detector=0;
for (i=0; i<AliITSgeomTGeo::GetNLayers(); i++) {
ndet=fgLayers[i].GetNdetectors();
Int_t jmax = j + fgLayers[i].GetNladders()*ndet;
for (; j<jmax; j++) {
- if (!cTree->GetEvent(j)) continue;
+ // if (!cTree->GetEvent(j)) continue;
+ clusters = rpcont->UncheckedGetClusters(j);
+ if(!clusters)continue;
Int_t ncl=clusters->GetEntriesFast();
SignDeltas(clusters,GetZ());
fgLayers[i].InsertCluster(new AliITSRecPoint(*c));
}
- clusters->Clear();
// add dead zone "virtual" cluster in SPD, if there is a cluster within
// zwindow cm from the dead zone
if (i<2 && AliITSReconstructor::GetRecoParam()->GetAddVirtualClustersInDeadZone()) {