message: fixing some small bugs in subjet matching
diff: @@ -543,8 +543,8 @@ Bool_t AliAnalysisTaskNewJetSubstructure::FillHistograms() {
  if (CompareSubjets(sub1Det, sub1Hyb, const1Det, const1Hyb)) sub1 = 1;
  else if (CompareSubjets(sub1Det, sub2Hyb, const1Det, const2Hyb)) sub1 = 2;
  else sub1 = 3;
  - if (CompareSubjets(sub2Det, sub1Hyb, const2Det, const1Hyb)) sub2 = 1;
  - else if (CompareSubjets(sub2Det, sub2Hyb, const2Det, const2Hyb)) sub2 = 2;
  + if (CompareSubjets(sub2Det, sub2Hyb, const2Det, const2Hyb)) sub2 = 2;
  + else if (CompareSubjets(sub2Det, sub1Hyb, const2Det, const1Hyb)) sub2 = 1;
  else sub2 = 3;
  }
  else if (fShapesVar[2] != 0) {sub1 = 0; sub2 = 0;}
  @@ -560,6 +560,7 @@ Bool_t AliAnalysisTaskNewJetSubstructure::FillHistograms() {
  }
  }
  +
  fTreeSubstructure->Fill();
  delete sub1Det;
  delete sub2Det;
  @@ -654,28 +655,27 @@ Double_t AliAnalysisTaskNewJetSubstructure::RelativePhi(Double_t mphi,
  //_________________________________________________________________________
  Bool_t AliAnalysisTaskNewJetSubstructure::CompareSubjets(fastjet::PseudoJet *subDet, fastjet::PseudoJet *subHyb, std::vector<fastjet::PseudoJet> *constDet, std::vector<fastjet::PseudoJet>* constHyb)
  {
  - float pT_det = subDet->pt();
  - float sumpT = 0;
  - float delta = 0.001;
  + double pT_det = subDet->pt();
  + double sumpT = 0;
  + double delta = 0.01;
  for (int i = 0; i < constDet->size(); i++)
  {
  - float eta_det = constDet->at(i).eta();
  - float phi_det = constDet->at(i).phi();
  + double eta_det = constDet->at(i).eta();
  + double phi_det = constDet->at(i).phi();
  for (int j = 0; j < constHyb->size(); j++)
  {
  - float eta_hyb = constHyb->at(j).eta();
  - float phi_hyb = constHyb->at(j).phi();
  - float deta = eta_hyb - eta_det;
  + double eta_hyb = constHyb->at(j).eta();
  + double phi_hyb = constHyb->at(j).phi();
  + double deta = eta_hyb - eta_det;
  deta = std::sqrt(deta*deta);
  if (deta > delta) continue;
  - float dphi = phi_hyb - phi_det;
  + double dphi = phi_hyb - phi_det;
  dphi = std::sqrt(dphi*dphi);
  if (dphi > delta) continue;
  sumpT+=constDet->at(i).pt();
  }
  }
  -
  if (sumpT/pT_det > 0.5) return true;
  else return false;
  }
  