From: mcosenti Date: Wed, 10 Sep 2014 21:10:52 +0000 (-0300) Subject: bug fix in initializing one variable that shouldn't be; parameterizing the CPV method... X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=950b56069f7450f0ed532d3e3901b7ecd7b2f11e;p=u%2Fmrichter%2FAliRoot.git bug fix in initializing one variable that shouldn't be; parameterizing the CPV method of the isoltion clusters to be the same as for the candidate cluster; adding more debugging printouts --- diff --git a/PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx b/PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx index 4e062cdc1eb..c0fe99e6ae1 100644 --- a/PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx +++ b/PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx @@ -607,6 +607,14 @@ void AliAnalysisTaskEMCALIsoPhoton::UserExec(Option_t *) if(fESD){ TList *l = fESD->GetList(); + if(fDebug){ + for(int nk=0;nkGetEntries();nk++){ + TObject *obj = (TObject*)l->At(nk); + TString oname = obj->GetName(); + if(oname.Contains("lus")) + printf("Object %d has a clus array named %s +++++++++\n",nk,oname.Data()); + } + } fESDClusters = dynamic_cast(l->FindObject("CaloClusters")); fESDCells = fESD->GetEMCALCells(); if(fDebug) @@ -690,17 +698,32 @@ void AliAnalysisTaskEMCALIsoPhoton::FillClusHists() for(Int_t ic=0;ic(clusters->At(ic)); - if(!c) + if(!c){ + if(fDebug) + printf("cluster pointer does not exist! xxxx\n"); continue; - if(!c->IsEMCAL()) + } + if(!c->IsEMCAL()){ + if(fDebug) + printf("cluster is not EMCAL! xxxx\n"); continue; - if(c->E()E()E()*TMath::Sin(cv.Theta()); - Float_t dphi = TMath::Abs(cv.Phi()-phicl); - Float_t deta = TMath::Abs(cv.Eta()-etacl); + Float_t dphi = (cv.Phi()-phicl); + Float_t deta = (cv.Eta()-etacl); Float_t R = TMath::Sqrt(deta*deta + dphi*dphi); if(R<0.007) continue; if(maxid==id) continue; Double_t matchedpt = GetTrackMatchedPt(c->GetTrackMatchedIndex()); - if(matchedpt>0 && fRemMatchClus) - continue; + if(fCpvFromTrack){ + if(matchedpt>0 && fRemMatchClus ) + continue; + } else { + if(TMath::Abs(c->GetTrackDx())<0.03 && TMath::Abs(c->GetTrackDz())<0.02 && fRemMatchClus){ + if(fDebug) + printf("This isolation cluster is matched to a track!++++++++++++++++++++++++++++++++++++++++++++++++++\n"); + continue; + } + } Double_t nEt = TMath::Max(Et-matchedpt, 0.0); if(nEt<0) printf("nEt=%1.1f\n",nEt); @@ -939,7 +972,7 @@ void AliAnalysisTaskEMCALIsoPhoton::GetTrIso(TVector3 vec, Float_t &iso, Float_t Double_t AliAnalysisTaskEMCALIsoPhoton::GetCrossEnergy(const AliVCluster *cluster, Short_t &idmax) { // Calculate the energy of cross cells around the leading cell. - idmax = -1; + AliVCaloCells *cells = 0; cells = fESDCells; if (!cells)