+//____________________________________________________________________________
+void AliPHOSPID::SetInput(TTree *clustersTree, TClonesArray *trackSegments)
+{
+ // Read the clusters tree and creates the
+ // arrays with the EMC and CPV
+ // clusters.
+ // and set the corresponding branch addresses
+
+ fTrackSegments = trackSegments;
+
+ TBranch *emcbranch = clustersTree->GetBranch("PHOSEmcRP");
+ if (!emcbranch) {
+ AliError("can't get the branch with the PHOS EMC clusters !");
+ return;
+ }
+ fEMCRecPoints = new TObjArray(100) ;
+ emcbranch->SetAddress(&fEMCRecPoints);
+ emcbranch->GetEntry(0);
+
+ TBranch *cpvbranch = clustersTree->GetBranch("PHOSCpvRP");
+ if (!cpvbranch) {
+ AliError("can't get the branch with the PHOS CPV clusters !");
+ return;
+ }
+ fCPVRecPoints = new TObjArray(100) ;
+ cpvbranch->SetAddress(&fCPVRecPoints);
+ cpvbranch->GetEntry(0);
+}