- if(cR) MakeBranchR(0);
- if(cRF) MakeBranchRF(0);
-
-}
-
-//_____________________________________________________________
-void AliITSDetTypeRec::MakeTreeC(){
-
- //Create a separate tree to store the clusters
- if(!fLoader){
- Warning("MakeTreeC","ITS loader is null!");
- return;
- }
- if(fLoader->TreeC()== 0x0) fLoader->MakeTree("C");
- MakeBranchC();
-}
-
-//______________________________________________________________
-void AliITSDetTypeRec::MakeBranchC(){
-
- //Make branches in the tree of clusters
-
- if(!fLoader){
- Warning("MakeBranchC","ITS loader is null!");
- return;
- }
- TTree* lTC = fLoader->TreeC();
- if(lTC==0x0){
- Error("MakeTreeC","Can not get TreeC from loader");
- return;
- }
-
- Int_t buffersize = 4000;
- Char_t branchname[30];
- Char_t* cluclass;
- const char *det[4]={"SPD","SDD","SSD","ITS"};
-
- for(Int_t i=0;i<fgkNdettypes;i++){
- cluclass = GetClusterClassName(i);
- if(fCtype==0x0) fCtype = new TObjArray(fgkNdettypes);
- if(!ClustersAddress(i)){
- fCtype->AddAt(new TClonesArray(cluclass,1000),i);
- }
- if(fgkNdettypes==3) sprintf(branchname,"%sClusters%s",det[3],det[i]);
- else sprintf(branchname,"%sClusters%d",det[3],i+1);
- if(fCtype && lTC){
- if(lTC->GetBranch(branchname)){
- Warning("MakeBranchC","Branch %s already exists in TreeC",branchname);
- } else{
- Info("MakeBranchC","Creating branch %s in TreeC",branchname);
- lTC->Branch(branchname,&((*fCtype)[i]),buffersize);
- }
- }
-
- }
-
-}
-
-//_______________________________________________________________
-void AliITSDetTypeRec::GetTreeC(Int_t event){
-
- //Get the clusters tree for this event and
- //sets the branch address
-
-
- if(!fLoader){
- Warning("GetTreeC","ITS loader is null!");
- return;
- }
-
- Char_t branchname[30];
- const char *det[4] = {"SPD","SDD","SSD","ITS"};
- TTree* lTC = fLoader->TreeC();
-
- ResetClusters();
- if(lTC) fLoader->CleanRawClusters();
-
- TBranch* branch;
- if(lTC){
- Char_t* cluclass;
- for(Int_t i=0;i<fgkNdettypes;i++){
- cluclass = GetClusterClassName(i);
- if(fCtype==0x0) fCtype = new TObjArray(fgkNdettypes);
- if(!fCtype->At(i)) fCtype->AddAt(new TClonesArray(cluclass,1000),i);
- if(fgkNdettypes==3) sprintf(branchname,"%sClusters%s",det[3],det[i]);
- else sprintf(branchname,"%sClusters%d",det[3],i+1);
- if(fCtype){
- branch = lTC->GetBranch(branchname);
- if(branch) branch->SetAddress(&((*fCtype)[i]));
- }
- }
- } else{
- Error("GetTreeC","cannot find clusters Tree for vent %d",event);
- }