message: changed to only one cluster-track pair with smallest dist in QA
diff: @@ -1649,9 +1649,12 @@ void AliAnalysisTaskGammaHadron::FillQAHisograms(Int_t identifier,AliClusterCont
  if(fPlotQA==2)
  {
  Int_t Ntrks = caloCluster->GetNTracksMatched();
  -
  - if(Ntrks>0)
  - {
  + Double_t etadiff=100;
  + Double_t phidiff=100;
  + Double_t etadiffTrack;
  + Double_t phidiffTrack;
  + Double_t mom;
  + Double_t momTrack;
  //..loop over matched tracks
  for (Int_t i = 0; i < Ntrks; ++i)
  {
  @@ -1659,15 +1662,23 @@ void AliAnalysisTaskGammaHadron::FillQAHisograms(Int_t identifier,AliClusterCont
  Double_t veta = track->GetTrackEtaOnEMCal();
  Double_t vphi = track->GetTrackPhiOnEMCal();
  - Double_t mom = track->P();
  + momTrack = track->P();
  Float_t pos[3] = {0};
  caloCluster->GetPosition(pos);
  TVector3 cpos(pos);
  Double_t ceta = cpos.Eta();
  Double_t cphi = cpos.Phi();
  - Double_t etadiff = veta-ceta;
  - Double_t phidiff = TVector2::Phi_mpi_pi(vphi-cphi);
  +
  + etadiffTrack = veta-ceta;
  + phidiffTrack = TVector2::Phi_mpi_pi(vphi-cphi);
  + if(sqrt(pow(etadiffTrack,2)+pow(phidiffTrack,2))<sqrt(pow(etadiff,2)+pow(phidiff,2)))
  + {
  + etadiff = etadiffTrack;
  + phidiff = phidiffTrack;
  + mom = momTrack;
  + }
  + }
  Double_t valueArray[7];
  valueArray[0] = energy;
  @@ -1678,21 +1689,7 @@ void AliAnalysisTaskGammaHadron::FillQAHisograms(Int_t identifier,AliClusterCont
  valueArray[5] = Ntrks;
  valueArray[6] = fCent;
  fClusterProp->Fill(valueArray); //..all clusters - no cuts
  - }
  - }
  - else
  - {
  - Double_t valueArray[7];
  - valueArray[0] = energy;
  - valueArray[1] = caloCluster->GetM02();
  - //..no mathced track
  - valueArray[2] = 0.1;
  - valueArray[3] = 0.1;
  - valueArray[4] = 0;
  - valueArray[5] = 0;
  - valueArray[6] = fCent;
  - fClusterProp->Fill(valueArray); //..all clusters - no cuts
  - }
  +
  }
  //valueArray[6] = phiDistMatched;
  //valueArray[7] = etaDistMatched;
  