-
- list->AddAtAndExpand(hist, index) ;
- char * name = Form("%s_%s", list->GetName(), hist->GetName()) ;
- TParameter<double> * p = new TParameter<double>(name, 9999.9999) ;
- if(saveForCorr) {
- if ( ! fParameterList )
- fParameterList = new TList() ;
- fParameterList->Add(p) ;
+ TH1 * histClone[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ histClone[specie] = CloneMe(hist, specie) ;
+ histClone[specie]->SetDirectory(0) ;
+ list[specie]->AddAtAndExpand(histClone[specie], index) ;
+ if(saveForCorr) {
+ char * name = Form("%s_%s", list[AliRecoParam::kDefault]->GetName(), hist->GetName()) ;
+ TParameter<double> * p = new TParameter<double>(name, 9999.9999) ;
+ if ( fParameterList[specie] == NULL )
+ fParameterList[specie] = new TList() ;
+ fParameterList[specie]->Add(p) ;
+ }