17 #include <TClonesArray.h>
18 #include <TDatabasePDG.h>
19 #include <TParticlePDG.h>
21 #include <THnSparse.h>
22 #include <TParticle.h>
24 #include <THashList.h>
30 #include "AliEMCALGeometry.h"
31 #include "AliAnalysisManager.h"
32 #include "AliVEventHandler.h"
68 dphi = TVector2::Phi_mpi_pi(
fMomentum.Phi() - jet.
Phi());;
70 return TMath::Sqrt(dphi*dphi + deta*deta);
81 return GetDistance(jet, deta, dphi);
98 fReconstructed(kFALSE),
110 fDmesonParticle(source.fDmesonParticle),
112 fSoftPionPt(source.fSoftPionPt),
113 fInvMass2Prong(source.fInvMass2Prong),
115 fMCLabel(source.fMCLabel),
116 fReconstructed(source.fReconstructed),
117 fParton(source.fParton),
118 fPartonType(source.fPartonType),
119 fAncestor(source.fAncestor),
120 fSelectionType(source.fSelectionType)
136 fD.SetPtEtaPhiE(0,0,0,0);
141 fReconstructed = kFALSE;
145 for (
auto &jet : fJets) {
146 jet.second.fMomentum.SetPtEtaPhiE(0,0,0,0);
147 jet.second.fNConstituents = 0;
149 jet.second.fMaxChargedPt = 0;
150 jet.second.fMaxNeutralPt = 0;
157 Printf(
"Printing D Meson Jet object.");
158 Printf(
"D Meson: pT = %.3f, eta = %.3f, phi = %.3f, inv. mass = %.3f", fD.Pt(), fD.Eta(), fD.Phi_0_2pi(), fD.M());
159 Printf(
"Soft pion pT: %.3f. 2-Prong Invariant mass = %.3f", fSoftPionPt, fInvMass2Prong);
160 for (
auto &jet : fJets) {
161 Printf(
"Jet %s: pT = %.3f, eta = %.3f, phi = %.3f", jet.first.c_str(), jet.second.Pt(), jet.second.Eta(), jet.second.Phi_0_2pi());
162 Printf(
"Jet N Consituents = %d", jet.second.fNConstituents);
171 std::map<std::string, AliJetInfo>::const_iterator it = fJets.find(n);
172 if (it == fJets.end())
return 0;
176 if ((*it).second.Pt() > 0) {
177 TVector3 dvect = fD.Vect();
178 TVector3 jvect = (*it).second.fMomentum.Vect();
183 ::Error(
"AliAnalysisTaskDmesonJets::AliDmesonJetInfo::GetZ",
"Zero jet momentum!");
187 z = (dvect * jvect) / jetMom;
190 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
201 std::map<std::string, AliJetInfo>::const_iterator it = fJets.find(n);
202 if (it == fJets.end())
return 0;
206 if ((*it).second.Pt() > 0) {
207 TVector3 dvect = fD.Vect();
208 TVector3 jvect = (*it).second.fMomentum.Vect();
210 Double_t corrpt = (*it).second.fCorrPt > 0 ? (*it).second.fCorrPt : 0.;
211 jvect.SetPerp(corrpt);
219 z = (dvect * jvect) / jetMom;
234 std::map<std::string, AliJetInfo>::const_iterator it = fJets.find(n);
235 if (it == fJets.end())
return 0;
237 return GetDistance((*it).second, deta, dphi);
248 return GetDistance(n, deta, dphi);
259 dphi = TVector2::Phi_mpi_pi(fD.Phi() - jet.
Phi());;
260 deta = fD.Eta() - jet.
Eta();
261 return TMath::Sqrt(dphi*dphi + deta*deta);
272 return GetDistance(jet, deta, dphi);
281 std::map<std::string, AliJetInfo>::const_iterator it = fJets.find(n);
282 if (it == fJets.end()) {
283 ::Error(
"AliAnalysisTaskDmesonJets::AliDmesonJetInfo::GetJet",
"Could not find jet info for the jet definition '%s'!",
287 return &((*it).second);
296 std::map<std::string, AliJetInfo>::iterator it = fJets.find(n);
297 if (it == fJets.end()) {
298 ::Error(
"AliAnalysisTaskDmesonJets::AliDmesonJetInfo::GetJet",
"Could not find jet info for the jet definition '%s'!",
302 return &((*it).second);
343 std::map<std::string, AliJetInfo>::const_iterator it = source.
fJets.find(n);
344 if (it == source.
fJets.end())
return;
399 fArea = source.
fArea;
435 fPt = source.
fD.Pt();
436 fEta = source.
fD.Eta();
476 fPartonPt = source.
fParton->Pt();
507 fInvMass(source.fD.M()),
517 fInvMass = source.
fD.M();
541 f2ProngInvMass(source.fInvMass2Prong),
542 fDeltaInvMass(source.fD.M() - source.fInvMass2Prong)
652 fJetType(source.fJetType),
653 fRadius(source.fRadius),
654 fJetAlgo(source.fJetAlgo),
655 fRecoScheme(source.fRecoScheme),
656 fMinJetPt(source.fMinJetPt),
657 fMaxJetPt(source.fMaxJetPt),
658 fMinJetPhi(source.fMinJetPhi),
659 fMaxJetPhi(source.fMaxJetPhi),
660 fMinJetEta(source.fMinJetEta),
661 fMaxJetEta(source.fMaxJetEta),
662 fMinChargedPt(source.fMinChargedPt),
663 fMaxChargedPt(source.fMaxChargedPt),
664 fMinNeutralPt(source.fMinNeutralPt),
665 fMaxNeutralPt(source.fMaxNeutralPt),
666 fRhoName(source.fRhoName),
696 if (fMinJetEta < fMaxJetEta && (jet.
Eta() < fMinJetEta || jet.
Eta() > fMaxJetEta))
return kFALSE;
697 if (fMinJetPhi < fMaxJetPhi && (jet.
Phi() < fMinJetPhi || jet.
Phi() > fMaxJetPhi))
return kFALSE;
698 if (jet.
Pt() > fMaxJetPt || jet.
Pt() < fMinJetPt)
return kFALSE;
712 if (!jet)
return kFALSE;
713 return IsJetInAcceptance((*jet));
785 fCurrentDmesonJetInfo(0),
790 fClusterContainers(),
808 fCandidateType(type),
815 fNMassBins(nMassBins),
829 fCurrentDmesonJetInfo(0),
834 fClusterContainers(),
848 fPartons(source.fPartons),
849 fCandidateType(source.fCandidateType),
850 fCandidateName(source.fCandidateName),
851 fCandidatePDG(source.fCandidatePDG),
852 fNDaughters(source.fNDaughters),
853 fPDGdaughters(source.fPDGdaughters),
854 fBranchName(source.fBranchName),
855 fMCMode(source.fMCMode),
856 fNMassBins(source.fNMassBins),
857 fMinMass(source.fMinMass),
858 fMaxMass(source.fMaxMass),
860 fRejectedOrigin(source.fRejectedOrigin),
861 fAcceptedDecay(source.fAcceptedDecay),
862 fInhibit(source.fInhibit),
863 fJetDefinitions(source.fJetDefinitions),
864 fPtBinWidth(source.fPtBinWidth),
865 fMaxPt(source.fMaxPt),
866 fRandomGen(source.fRandomGen),
870 fCurrentDmesonJetInfo(0),
872 fCandidateArray(source.fCandidateArray),
874 fTrackContainers(source.fTrackContainers),
875 fClusterContainers(source.fClusterContainers),
904 for (
UInt_t i = 0; i < fJetDefinitions.size(); i++) {
905 if (fJetDefinitions[i].IsJetInAcceptance(dMesonJet, fJetDefinitions[i].GetName()))
return kTRUE;
921 switch (fCandidateType) {
924 fCandidateName =
"D0";
926 fPDGdaughters.Set(fNDaughters);
927 fPDGdaughters.Reset();
928 fPDGdaughters[0] = 211;
929 fPDGdaughters[1] = 321;
930 fBranchName =
"D0toKpi";
935 fCandidateName =
"2ProngLikeSign";
937 fPDGdaughters.Set(fNDaughters);
938 fPDGdaughters.Reset();
939 fPDGdaughters[0] = 211;
940 fPDGdaughters[1] = 321;
941 fBranchName =
"LikeSign2Prong";
945 fCandidateName =
"DStar";
947 fPDGdaughters.Set(fNDaughters);
948 fPDGdaughters.Reset();
949 fPDGdaughters[0] = 211;
950 fPDGdaughters[1] = 211;
951 fPDGdaughters[2] = 321;
952 fBranchName =
"Dstar";
956 ::Error(
"AliAnalysisTaskDmesonJets::AnalysisEngine::SetCandidateProperties",
"Candidate %d unknown!", fCandidateType);
967 if (fRDHFCuts)
delete fRDHFCuts;
977 if (fRDHFCuts)
delete fRDHFCuts;
978 fRDHFCuts =
static_cast<AliRDHFCuts*
>(cuts->Clone());
988 name = TString::Format(
"%s_%s", GetName(), jetDef.
GetName());
1000 name = fCandidateName;
1003 name +=
"_kBackgroundOnly";
1006 name +=
"_kSignalOnly";
1012 name +=
"_WrongPID";
1029 std::vector<AliHFJetDefinition>::iterator it = FindJetDefinition(def);
1031 if (it == fJetDefinitions.end() || *it != def) {
1032 fJetDefinitions.push_back(def);
1033 ::Info(
"AliAnalysisTaskDmesonJets::AnalysisEngine::AddJetDefinition",
"Jet definition '%s' has been added to analysis engine '%s'."
1034 "Total number of jet definitions is now %lu.",
1035 def.
GetName(), GetName(), fJetDefinitions.size());
1037 if (fMCMode !=
kMCTruth) fJetDefinitions[fJetDefinitions.size()-1].SetChargedPtRange(0., 100.);
1040 ::Warning(
"AliAnalysisTaskDmesonJets::AnalysisEngine::AddJetDefinition",
"The same jet definition '%s' was already added in analysis engine '%s'.", def.
GetName(), GetName());
1060 return AddJetDefinition(def);
1070 std::vector<AliHFJetDefinition>::iterator it = fJetDefinitions.begin();
1071 while (it != fJetDefinitions.end() && (*it) != def) it++;
1112 return ExtractD0Attributes(Dcand, DmesonJet, i);
1115 return ExtractDstarAttributes(static_cast<const AliAODRecoCascadeHF*>(Dcand), DmesonJet, i);
1131 AliDebug(10,
"Checking if D0 meson is selected");
1133 if (isSelected == 0)
return kFALSE;
1135 Int_t MCtruthPdgCode = 0;
1142 Int_t mcLab = Dcand->MatchToMC(fCandidatePDG,
fMCContainer->GetArray(), fNDaughters, fPDGdaughters.GetArray());
1147 AliAODMCParticle* aodMcPart =
static_cast<AliAODMCParticle*
>(
fMCContainer->GetArray()->At(mcLab));
1151 if (fRejectedOrigin) {
1152 auto origin = IsPromptCharm(aodMcPart,
fMCContainer->GetArray());
1153 if ((origin.first & fRejectedOrigin) == origin.first)
return kFALSE;
1155 MCtruthPdgCode = aodMcPart->PdgCode();
1160 if (isSelected == 1) {
1161 if (i != 0)
return kFALSE;
1163 if (fMCMode ==
kNoMC ||
1164 (MCtruthPdgCode == fCandidatePDG && fMCMode ==
kSignalOnly) ||
1166 (MCtruthPdgCode == -fCandidatePDG && fMCMode ==
kWrongPID)) {
1168 AliDebug(10,
"Selected as D0");
1175 else if (isSelected == 2) {
1176 if (i != 1)
return kFALSE;
1178 if (fMCMode ==
kNoMC ||
1179 (MCtruthPdgCode == -fCandidatePDG && fMCMode ==
kSignalOnly) ||
1181 (MCtruthPdgCode == fCandidatePDG && fMCMode ==
kWrongPID)) {
1183 AliDebug(10,
"Selected as D0bar");
1190 else if (isSelected == 3) {
1191 AliDebug(10,
"Selected as either D0 or D0bar");
1194 if ((MCtruthPdgCode == fCandidatePDG && fMCMode ==
kSignalOnly) ||
1196 if (i != 0)
return kFALSE;
1197 AliDebug(10,
"MC truth is D0");
1200 else if ((MCtruthPdgCode == -fCandidatePDG && fMCMode ==
kSignalOnly) ||
1202 if (i != 1)
return kFALSE;
1203 AliDebug(10,
"MC truth is D0bar");
1212 AliDebug(10,
"Returning invariant mass with D0 hypothesis");
1216 AliDebug(10,
"Returning invariant mass with D0bar hypothesis");
1228 DmesonJet.
fD.SetPtEtaPhiM(Dcand->Pt(), Dcand->Eta(), Dcand->Phi(), invMassD);
1241 AliDebug(10,
"Checking if D* meson is selected");
1243 if (isSelected == 0)
return kFALSE;
1245 if ((i == 1 && DstarCand->Charge()>0) || (i == 0 && DstarCand->Charge()<0) || i > 1)
return kFALSE;
1247 Int_t MCtruthPdgCode = 0;
1252 Int_t pdgDgDStartoD0pi[2] = { 421, 211 };
1253 Int_t pdgDgD0toKpi[2] = { 321, 211 };
1256 AliDebug(10, Form(
"MC label is %d", mcLab));
1259 AliAODMCParticle* aodMcPart =
static_cast<AliAODMCParticle*
>(
fMCContainer->GetArray()->At(mcLab));
1262 if (fRejectedOrigin) {
1263 auto origin = IsPromptCharm(aodMcPart,
fMCContainer->GetArray());
1264 if ((origin.first & fRejectedOrigin) == origin.first)
return kFALSE;
1267 MCtruthPdgCode = aodMcPart->PdgCode();
1268 AliDebug(10, Form(
"MC truth pdg code is %d",MCtruthPdgCode));
1273 Int_t absMCtruthPdgCode = TMath::Abs(MCtruthPdgCode);
1274 if (fMCMode ==
kNoMC ||
1275 (absMCtruthPdgCode == 413 && fMCMode ==
kSignalOnly) ||
1281 DmesonJet.
fD.SetPtEtaPhiM(DstarCand->Pt(), DstarCand->Eta(), DstarCand->Phi(), invMassD);
1302 Int_t absPdgPart = TMath::Abs(part->GetPdgCode());
1304 if (part->GetNDaughters() == 2) {
1306 AliAODMCParticle* d1 =
static_cast<AliAODMCParticle*
>(mcArray->At(part->GetDaughter(0)));
1307 AliAODMCParticle* d2 =
static_cast<AliAODMCParticle*
>(mcArray->At(part->GetDaughter(1)));
1313 Int_t absPdg1 = TMath::Abs(d1->GetPdgCode());
1314 Int_t absPdg2 = TMath::Abs(d2->GetPdgCode());
1316 if (absPdgPart == 421) {
1317 if ((absPdg1 == 211 && absPdg2 == 321) ||
1318 (absPdg1 == 321 && absPdg2 == 211)) {
1323 if (absPdgPart == 413) {
1324 if (absPdg1 == 421 && absPdg2 == 211) {
1325 Int_t D0decay = CheckDecayChannel(d1, mcArray);
1330 else if (absPdg1 == 211 && absPdg2 == 421) {
1331 Int_t D0decay = CheckDecayChannel(d2, mcArray);
1350 std::pair<AliAnalysisTaskDmesonJets::EMesonOrigin_t, AliAODMCParticle*> result(
kUnknownQuark, 0);
1352 if (!part)
return result;
1353 if (!mcArray)
return result;
1355 static std::set<UInt_t> partons = { 4, 5 };
1357 AliAODMCParticle* parton = FindParticleOrigin(part, mcArray, kFindLast, partons);
1359 result.second = parton;
1360 UInt_t absPdgParton = TMath::Abs(parton->GetPdgCode());
1361 if (absPdgParton == 4) result.first =
kFromCharm;
1362 else if (absPdgParton == 5) result.first =
kFromBottom;
1378 static std::set<UInt_t> pdgSet;
1380 return FindParticleOrigin(part, mcArray, mode, pdgSet);
1394 AliAODMCParticle* result =
nullptr;
1396 Int_t mother = part->GetMother();
1397 while (mother >= 0) {
1398 AliAODMCParticle* mcGranma =
static_cast<AliAODMCParticle*
>(mcArray->At(mother));
1400 UInt_t abspdgGranma = TMath::Abs(mcGranma->GetPdgCode());
1403 if (pdgSet.empty() || pdgSet.count(abspdgGranma) > 0) {
1406 if (mode == kFindLast)
break;
1408 mother = mcGranma->GetMother();
1411 ::Error(
"AliAnalysisTaskDmesonJets::AnalysisParams::FindParticleOrigin",
"Could not retrieve mother particle %d!", mother);
1422 for (
auto& jetDef : fJetDefinitions) {
1423 jetDef.fJets.clear();
1427 RunParticleLevelAnalysis();
1430 RunDetectorLevelAnalysis();
1442 const Int_t nD = fCandidateArray->GetEntriesFast();
1446 std::map<AliHFJetDefinition*,Double_t> maxJetPt;
1447 for (
auto& def : fJetDefinitions) maxJetPt[&def] = 0;
1450 Int_t nAccCharm[3] = {0};
1451 for (
Int_t icharm = 0; icharm < nD; icharm++) {
1453 if (!charmCand)
continue;
1457 if (!fRDHFCuts->IsInFiducialAcceptance(charmCand->Pt(), charmCand->Y(fCandidatePDG)))
continue;
1458 Int_t nMassHypo = 0;
1459 if (charmCand->Pt() > maxDPt) maxDPt = charmCand->Pt();
1460 for (
Int_t im = 0; im < 2; im++) {
1464 if (ExtractRecoDecayAttributes(charmCand, DmesonJet, im)) {
1465 for (
auto& def : fJetDefinitions) {
1466 if (FindJet(charmCand, DmesonJet, def)) {
1467 Double_t jetPt = DmesonJet.
fJets[def.GetName()].fMomentum.Pt();
1468 if (jetPt > maxJetPt[&def]) maxJetPt[&def] = jetPt;
1471 AliWarning(Form(
"Could not find jet '%s' for D meson '%s': pT = %.3f, eta = %.3f, phi = %.3f",
1472 def.GetName(), GetName(), DmesonJet.
fD.Pt(), DmesonJet.
fD.Eta(), DmesonJet.
fD.
Phi_0_2pi()));
1475 fDmesonJets[(icharm+1)*(1-(im*2))] = DmesonJet;
1480 if (nMassHypo == 2) {
1485 if (nMassHypo == 2) {
1486 fDmesonJets[(icharm+1)].fSelectionType = 3;
1487 fDmesonJets[-(icharm+1)].fSelectionType = 3;
1495 for (
auto track_cont : fTrackContainers) {
1498 ntracks += track_cont->GetNAcceptEntries();
1501 for (
auto& def : fJetDefinitions) {
1502 if (!def.fRho)
continue;
1503 hname = TString::Format(
"%s/%s/fHistRhoVsLeadJetPt", GetName(), def.GetName());
1506 hname = TString::Format(
"%s/%s/fHistRhoVsLeadDPt", GetName(), def.GetName());
1509 hname = TString::Format(
"%s/%s/fHistRhoVsCent", GetName(), def.GetName());
1512 hname = TString::Format(
"%s/%s/fHistLeadJetPtVsCent", GetName(), def.GetName());
1515 hname = TString::Format(
"%s/%s/fHistLeadDPtVsCent", GetName(), def.GetName());
1518 hname = TString::Format(
"%s/%s/fHistRhoVsNTracks", GetName(), def.GetName());
1521 hname = TString::Format(
"%s/%s/fHistLeadJetPtVsNTracks", GetName(), def.GetName());
1524 hname = TString::Format(
"%s/%s/fHistLeadDPtVsNTracks", GetName(), def.GetName());
1528 hname = TString::Format(
"%s/fHistNTotAcceptedDmesons", GetName());
1533 hname = TString::Format(
"%s/fHistNAcceptedDmesonsVsNtracks", GetName());
1536 hname = TString::Format(
"%s/fHistNDmesons", GetName());
1554 if (jetDef.
fRho) rho = jetDef.
fRho->GetVal();
1564 for (
auto track_cont : fTrackContainers) {
1567 hname = TString::Format(
"%s/%s/fHistTrackRejectionReason", GetName(), jetDef.
GetName());
1571 hname = TString::Format(
"%s/%s/fHistDMesonDaughterNotInJet", GetName(), jetDef.
GetName());
1574 for (
Int_t i = 0; i < daughters.GetEntriesFast(); i++) {
1575 AliVParticle* daughter =
static_cast<AliVParticle*
>(daughters.At(i));
1576 if (!hftrack_cont->GetArray()->FindObject(daughter)) histDaughterNotInJet->Fill(daughter->Pt());
1583 for (
auto clus_cont : fClusterContainers) {
1584 hname = TString::Format(
"%s/%s/fHistClusterRejectionReason", GetName(), jetDef.
GetName());
1594 for (
UInt_t ijet = 0; ijet < jets_incl.size(); ++ijet) {
1597 Bool_t isDmesonJet = kFALSE;
1604 for (
UInt_t ic = 0; ic < constituents.size(); ++ic) {
1605 if (constituents[ic].user_index() == 0) {
1606 isDmesonJet = kTRUE;
1608 else if (constituents[ic].user_index() >= 100) {
1609 if (constituents[ic].pt() > maxChPt) maxChPt = constituents[ic].pt();
1612 else if (constituents[ic].user_index() <= -100) {
1613 totalNeutralPt += constituents[ic].pt();
1614 if (constituents[ic].pt() > maxNePt) maxChPt = constituents[ic].pt();
1620 DmesonJet.
fJets[jetDef.
GetName()].fMomentum.SetPxPyPzE(jets_incl[ijet].px(), jets_incl[ijet].py(), jets_incl[ijet].pz(), jets_incl[ijet].E());
1621 DmesonJet.
fJets[jetDef.
GetName()].fNConstituents = nConst;
1622 DmesonJet.
fJets[jetDef.
GetName()].fMaxChargedPt = maxChPt;
1623 DmesonJet.
fJets[jetDef.
GetName()].fMaxNeutralPt = maxNePt;
1624 DmesonJet.
fJets[jetDef.
GetName()].fNEF = totalNeutralPt / jets_incl[ijet].pt();
1625 DmesonJet.
fJets[jetDef.
GetName()].fArea = jets_incl[ijet].area();
1626 DmesonJet.
fJets[jetDef.
GetName()].fCorrPt = DmesonJet.
fJets[jetDef.
GetName()].fMomentum.Pt() - jets_incl[ijet].area() * rho;
1640 auto itcont = cont->all_momentum();
1641 for (AliEmcalIterableMomentumContainer::iterator it = itcont.begin(); it != itcont.end(); it++) {
1642 UInt_t rejectionReason = 0;
1643 if (!cont->AcceptObject(it.current_index(), rejectionReason)) {
1644 if (rejectHist) rejectHist->Fill(AliEmcalContainer::GetRejectionReasonBitPosition(rejectionReason), it->first.Pt());
1647 if (fRandomGen && eff > 0 && eff < 1) {
1650 if (rejectHist) rejectHist->Fill(6, it->first.Pt());
1654 Int_t uid = offset >= 0 ? it.current_index() + offset: -it.current_index() - offset;
1671 Int_t nAccCharm[3] = {0};
1673 std::map<AliHFJetDefinition*, Double_t> maxJetPt;
1676 for (
auto &jetDef : fJetDefinitions) {
1677 maxJetPt[&jetDef] = 0;
1679 if (jetDef.fRho) rho = jetDef.fRho->GetVal();
1680 hname = TString::Format(
"%s/%s/fHistNDmesonsVsNconstituents", GetName(), jetDef.GetName());
1683 switch (jetDef.fJetType) {
1700 hname = TString::Format(
"%s/%s/fHistMCParticleRejectionReason", GetName(), jetDef.GetName());
1707 for (
auto jet : jets_incl) {
1708 Int_t nDmesonsInJet = 0;
1710 for (
auto constituent : jet.constituents()) {
1711 Int_t iPart = constituent.user_index() - 100;
1712 if (constituent.perp() < 1e-6)
continue;
1715 ::Error(
"AliAnalysisTaskDmesonJets::AnalysisEngine::RunParticleLevelAnalysis",
"Could not find jet constituent %d!", iPart);
1718 if (TMath::Abs(part->PdgCode()) == fCandidatePDG) {
1720 std::map<int, AliDmesonJetInfo>::iterator dMesonJetIt = fDmesonJets.find(iPart);
1721 if (dMesonJetIt == fDmesonJets.end()) {
1722 if (part->Pt() > maxDPt) maxDPt = part->Pt();
1723 std::pair<int, AliDmesonJetInfo> element;
1724 element.first = iPart;
1725 dMesonJetIt = fDmesonJets.insert(element).first;
1726 (*dMesonJetIt).second.fD.SetPxPyPzE(part->Px(), part->Py(), part->Pz(), part->E());
1727 (*dMesonJetIt).second.fDmesonParticle = part;
1728 (*dMesonJetIt).second.fSelectionType = part->PdgCode() > 0 ? 1 : 2;
1733 auto origin = IsPromptCharm(part,
fMCContainer->GetArray());
1736 while (rs >>= 1) { p++; }
1737 (*dMesonJetIt).second.fPartonType = p;
1738 (*dMesonJetIt).second.fParton = origin.second;
1740 (*dMesonJetIt).second.fAncestor = FindParticleOrigin(part,
fMCContainer->GetArray(), kFindFirst);
1742 if (part->PdgCode() > 0) {
1750 (*dMesonJetIt).second.fJets[jetDef.GetName()].fMomentum.SetPxPyPzE(jet.px(), jet.py(), jet.pz(), jet.E());
1751 (*dMesonJetIt).second.fJets[jetDef.GetName()].fNConstituents = jet.constituents().size();
1752 (*dMesonJetIt).second.fJets[jetDef.GetName()].fArea = jet.area();
1753 (*dMesonJetIt).second.fJets[jetDef.GetName()].fCorrPt = (*dMesonJetIt).second.fJets[jetDef.GetName()].fMomentum.Pt() - jet.area() * rho;
1754 if (jet.perp() > maxJetPt[&jetDef]) maxJetPt[&jetDef] = jet.perp();
1757 if (nDmesonsInJet > 0) histNDmesonsVsNconstituents->Fill(jet.constituents().size(), nDmesonsInJet);
1763 for (
auto& def : fJetDefinitions) {
1764 if (!def.fRho)
continue;
1765 hname = TString::Format(
"%s/%s/fHistRhoVsLeadJetPt", GetName(), def.GetName());
1768 hname = TString::Format(
"%s/%s/fHistRhoVsLeadDPt", GetName(), def.GetName());
1771 hname = TString::Format(
"%s/%s/fHistRhoVsCent", GetName(), def.GetName());
1774 hname = TString::Format(
"%s/%s/fHistLeadJetPtVsCent", GetName(), def.GetName());
1777 hname = TString::Format(
"%s/%s/fHistLeadDPtVsCent", GetName(), def.GetName());
1780 hname = TString::Format(
"%s/%s/fHistRhoVsNTracks", GetName(), def.GetName());
1783 hname = TString::Format(
"%s/%s/fHistLeadJetPtVsNTracks", GetName(), def.GetName());
1786 hname = TString::Format(
"%s/%s/fHistLeadDPtVsNTracks", GetName(), def.GetName());
1790 if (fDmesonJets.size() != nAccCharm[0]+nAccCharm[1]) AliError(Form(
"I found %lu mesons (%d)?", fDmesonJets.size(), nAccCharm[0]+nAccCharm[1]));
1791 hname = TString::Format(
"%s/fHistNTotAcceptedDmesons", GetName());
1796 hname = TString::Format(
"%s/fHistNAcceptedDmesonsVsNtracks", GetName());
1799 hname = TString::Format(
"%s/fHistNDmesons", GetName());
1810 classname =
"AliAnalysisTaskDmesonJets::AliDmesonMCInfoSummary";
1814 switch (fCandidateType) {
1817 classname =
"AliAnalysisTaskDmesonJets::AliD0InfoSummary";
1821 classname =
"AliAnalysisTaskDmesonJets::AliDStarInfoSummary";
1826 TString treeName = TString::Format(
"%s_%s", taskName, GetName());
1827 fTree =
new TTree(treeName, treeName);
1828 fTree->Branch(
"DmesonJet", classname, &fCurrentDmesonJetInfo);
1830 for (
Int_t i = 0; i < fJetDefinitions.size(); i++) {
1831 if (fJetDefinitions[i].fRhoName.IsNull()) {
1833 fTree->Branch(fJetDefinitions[i].GetName(),
"AliAnalysisTaskDmesonJets::AliJetInfoSummary", &fCurrentJetInfo[i]);
1837 fTree->Branch(fJetDefinitions[i].GetName(),
"AliAnalysisTaskDmesonJets::AliJetInfoPbPbSummary", &fCurrentJetInfo[i]);
1853 for (
auto &jetDef : fJetDefinitions) {
1855 AliDebug(2,Form(
"Now working on '%s'", jetDef.GetName()));
1865 title[dim] =
"#it{p}_{T,D} (GeV/#it{c})";
1872 title[dim] =
"#eta_{D}";
1878 title[dim] =
"#phi_{D} (rad)";
1881 max[dim] = TMath::TwoPi();
1886 title[dim] =
"#it{M}_{K#pi#pi} (GeV/#it{c}^{2})";
1887 nbins[dim] = fNMassBins;
1888 min[dim] = fMinMass;
1889 max[dim] = fMaxMass;
1894 title[dim] =
"#it{M}_{K#pi} (GeV/#it{c}^{2})";
1895 nbins[dim] = fNMassBins;
1896 min[dim] = fMinMass;
1897 max[dim] = fMaxMass;
1902 title[dim] =
"#it{M}_{K#pi} (GeV/#it{c}^{2})";
1903 nbins[dim] = fNMassBins;
1909 title[dim] =
"#it{M}_{K#pi#pi} - #it{M}_{K#pi} (GeV/#it{c}^{2})";
1910 nbins[dim] = fNMassBins*6;
1914 Double_t D0mass = TDatabasePDG::Instance()->GetParticle(421)->Mass();
1922 title[dim] =
"#it{p}_{T,#pi} (GeV/#it{c})";
1929 title[dim] =
"#it{z}_{D}";
1935 if ((enabledAxis &
kDeltaR) != 0) {
1936 title[dim] =
"#Delta R_{D-jet}";
1939 max[dim] = radius * 1.5;
1944 title[dim] =
"#eta_{D} - #eta_{jet}";
1946 min[dim] = -radius * 1.2;
1947 max[dim] = radius * 1.2;
1952 title[dim] =
"#phi_{D} - #phi_{jet} (rad)";
1954 min[dim] = -radius * 1.2;
1955 max[dim] = radius * 1.2;
1959 title[dim] =
"#it{p}_{T,jet} (GeV/#it{c})";
1966 title[dim] =
"#eta_{jet}";
1972 title[dim] =
"#phi_{jet} (rad)";
1975 max[dim] = TMath::TwoPi();
1980 title[dim] =
"No. of constituents";
1987 hname = TString::Format(
"%s/%s/fDmesonJets", GetName(), jetDef.GetName());
1989 for (
Int_t j = 0; j < dim; j++) {
1990 h->GetAxis(j)->SetTitle(title[j]);
2003 TH1* histAncestor =
nullptr;
2004 TH1* histPrompt =
nullptr;
2007 hname = TString::Format(
"%s/fHistPrompt", GetName());
2010 hname = TString::Format(
"%s/fHistAncestor", GetName());
2014 for (
auto& dmeson_pair : fDmesonJets) {
2015 fCurrentDmesonJetInfo->Set(dmeson_pair.second);
2017 for (
UInt_t ij = 0; ij < fJetDefinitions.size(); ij++) {
2018 fCurrentJetInfo[ij]->Reset();
2019 AliJetInfo* jet = dmeson_pair.second.GetJet(fJetDefinitions[ij].GetName());
2021 if (applyKinCuts && !fJetDefinitions[ij].IsJetInAcceptance(*jet)) {
2022 hname = TString::Format(
"%s/%s/fHistRejectedJetPt", GetName(), fJetDefinitions[ij].GetName());
2024 hname = TString::Format(
"%s/%s/fHistRejectedJetPhi", GetName(), fJetDefinitions[ij].GetName());
2026 hname = TString::Format(
"%s/%s/fHistRejectedJetEta", GetName(), fJetDefinitions[ij].GetName());
2030 fCurrentJetInfo[ij]->Set(dmeson_pair.second, fJetDefinitions[ij].GetName());
2035 if (dmeson_pair.second.fParton) {
2036 fPartons[dmeson_pair.second.fParton] = dmeson_pair.second.fPartonType;
2037 UInt_t absPdgParton = TMath::Abs(dmeson_pair.second.fParton->GetPdgCode());
2038 if (absPdgParton == 4) {
2039 histPrompt->Fill(
"Prompt", 1);
2041 else if (absPdgParton == 5) {
2042 histPrompt->Fill(
"Non-Prompt", 1);
2045 histPrompt->Fill(
"Unknown", 1);
2049 histPrompt->Fill(
"Unknown", 1);
2054 if (dmeson_pair.second.fAncestor) {
2055 UInt_t absPdgAncestor = TMath::Abs(dmeson_pair.second.fAncestor->GetPdgCode());
2056 if (absPdgAncestor == 4) {
2057 histAncestor->Fill(
"Charm", 1);
2059 else if (absPdgAncestor == 5) {
2060 histAncestor->Fill(
"Bottom", 1);
2062 else if (absPdgAncestor == 2212) {
2063 histAncestor->Fill(
"Proton", 1);
2066 histAncestor->Fill(
"Unknown", 1);
2070 histAncestor->Fill(
"Unknown", 1);
2077 hname = TString::Format(
"%s/fHistRejectedDMesonPt", GetName());
2079 hname = TString::Format(
"%s/fHistRejectedDMesonPhi", GetName());
2081 hname = TString::Format(
"%s/fHistRejectedDMesonEta", GetName());
2085 hname = TString::Format(
"%s/fHistRejectedDMesonInvMass", GetName());
2089 hname = TString::Format(
"%s/fHistRejectedDMeson2ProngInvMass", GetName());
2092 hname = TString::Format(
"%s/fHistRejectedDMesonDeltaInvMass", GetName());
2093 fHistManager->
FillTH1(hname, dmeson_pair.second.fD.M() - dmeson_pair.second.fInvMass2Prong);
2100 hname = TString::Format(
"%s/fHistPartonPt", GetName());
2102 hname = TString::Format(
"%s/fHistPartonEta", GetName());
2104 hname = TString::Format(
"%s/fHistPartonPhi", GetName());
2106 hname = TString::Format(
"%s/fHistPartonType", GetName());
2109 for (
auto parton : fPartons) {
2110 if (!parton.first)
continue;
2111 histPartonPt->Fill(parton.first->Pt());
2112 histPartonEta->Fill(parton.first->Eta());
2113 histPartonPhi->Fill(TVector2::Phi_0_2pi(parton.first->Phi()));
2114 histPartonType->Fill(parton.second);
2129 TH1* histAncestor =
nullptr;
2130 TH1* histPrompt =
nullptr;
2133 hname = TString::Format(
"%s/fHistPrompt", GetName());
2136 hname = TString::Format(
"%s/fHistAncestor", GetName());
2141 for (
auto& dmeson_pair : fDmesonJets) {
2143 for (
UInt_t ij = 0; ij < fJetDefinitions.size(); ij++) {
2144 AliJetInfo* jet = dmeson_pair.second.GetJet(fJetDefinitions[ij].GetName());
2146 if (applyKinCuts && !fJetDefinitions[ij].IsJetInAcceptance(*jet)) {
2147 hname = TString::Format(
"%s/%s/fHistRejectedJetPt", GetName(), fJetDefinitions[ij].GetName());
2149 hname = TString::Format(
"%s/%s/fHistRejectedJetPhi", GetName(), fJetDefinitions[ij].GetName());
2151 hname = TString::Format(
"%s/%s/fHistRejectedJetEta", GetName(), fJetDefinitions[ij].GetName());
2159 if (dmeson_pair.second.fParton) {
2160 fPartons[dmeson_pair.second.fParton] = dmeson_pair.second.fPartonType;
2161 UInt_t absPdgParton = TMath::Abs(dmeson_pair.second.fParton->GetPdgCode());
2162 if (absPdgParton == 4) {
2163 histPrompt->Fill(
"Prompt", 1);
2165 else if (absPdgParton == 5) {
2166 histPrompt->Fill(
"Non-Prompt", 1);
2169 histPrompt->Fill(
"Unknown", 1);
2173 histPrompt->Fill(
"Unknown", 1);
2178 if (dmeson_pair.second.fAncestor) {
2179 UInt_t absPdgAncestor = TMath::Abs(dmeson_pair.second.fAncestor->GetPdgCode());
2180 if (absPdgAncestor == 4) {
2181 histAncestor->Fill(
"Charm", 1);
2183 else if (absPdgAncestor == 5) {
2184 histAncestor->Fill(
"Bottom", 1);
2186 else if (absPdgAncestor == 2212) {
2187 histAncestor->Fill(
"Proton", 1);
2190 histAncestor->Fill(
"Unknown", 1);
2194 histAncestor->Fill(
"Unknown", 1);
2199 hname = TString::Format(
"%s/fHistRejectedDMesonPt", GetName());
2201 hname = TString::Format(
"%s/fHistRejectedDMesonPhi", GetName());
2203 hname = TString::Format(
"%s/fHistRejectedDMesonEta", GetName());
2207 hname = TString::Format(
"%s/fHistRejectedDMesonInvMass", GetName());
2211 hname = TString::Format(
"%s/fHistRejectedDMeson2ProngInvMass", GetName());
2214 hname = TString::Format(
"%s/fHistRejectedDMesonDeltaInvMass", GetName());
2215 fHistManager->
FillTH1(hname, dmeson_pair.second.fD.M() - dmeson_pair.second.fInvMass2Prong);
2222 hname = TString::Format(
"%s/fHistPartonPt", GetName());
2224 hname = TString::Format(
"%s/fHistPartonEta", GetName());
2226 hname = TString::Format(
"%s/fHistPartonPhi", GetName());
2228 hname = TString::Format(
"%s/fHistPartonType", GetName());
2231 for (
auto parton : fPartons) {
2232 if (!parton.first)
continue;
2233 histPartonPt->Fill(parton.first->Pt());
2234 histPartonEta->Fill(parton.first->Eta());
2235 histPartonPhi->Fill(TVector2::Phi_0_2pi(parton.first->Phi()));
2236 histPartonType->Fill(parton.second);
2250 for (
auto& dmeson_pair : fDmesonJets) {
2251 if (!IsAnyJetInAcceptance(dmeson_pair.second)) {
2252 hname = TString::Format(
"%s/fHistRejectedDMesonPt", GetName());
2254 hname = TString::Format(
"%s/fHistRejectedDMesonPhi", GetName());
2256 hname = TString::Format(
"%s/fHistRejectedDMesonEta", GetName());
2261 for (
auto &jetDef : fJetDefinitions) {
2263 hname = TString::Format(
"%s/%s/fDmesonJets", GetName(), jetDef.GetName());
2266 for (
auto& dmeson_pair : fDmesonJets) {
2267 const AliJetInfo* jet = dmeson_pair.second.GetJet(jetDef.GetName());
2269 if (!jetDef.IsJetInAcceptance(*jet)) {
2270 hname = TString::Format(
"%s/%s/fHistRejectedJetPt", GetName(), jetDef.GetName());
2272 hname = TString::Format(
"%s/%s/fHistRejectedJetPhi", GetName(), jetDef.GetName());
2274 hname = TString::Format(
"%s/%s/fHistRejectedJetEta", GetName(), jetDef.GetName());
2278 FillHnSparse(h, dmeson_pair.second, jetDef.GetName());
2301 std::map<std::string, AliJetInfo>::const_iterator it = DmesonJet.
fJets.find(n);
2302 if (it == DmesonJet.
fJets.end())
return kFALSE;
2304 for (
Int_t i = 0; i < h->GetNdimensions(); i++) {
2306 if (
title==
"#it{p}_{T,D} (GeV/#it{c})") contents[i] = DmesonJet.
fD.Pt();
2307 else if (
title==
"#eta_{D}") contents[i] = DmesonJet.
fD.Eta();
2310 else if (
title==
"#it{M}_{K#pi#pi} (GeV/#it{c}^{2})") contents[i] = DmesonJet.
fD.M();
2311 else if (
title==
"#it{M}_{K#pi#pi} - #it{M}_{K#pi} (GeV/#it{c}^{2})") contents[i] = DmesonJet.
fD.M() - DmesonJet.
fInvMass2Prong;
2312 else if (
title==
"#it{p}_{T,#pi} (GeV/#it{c})") contents[i] = DmesonJet.
fSoftPionPt;
2313 else if (
title==
"#it{z}_{D}") contents[i] = z;
2314 else if (
title==
"#Delta R_{D-jet}") contents[i] = deltaR;
2315 else if (
title==
"#eta_{D} - #eta_{jet}") contents[i] = deltaEta;
2316 else if (
title==
"#phi_{D} - #phi_{jet} (rad)") contents[i] = deltaPhi;
2317 else if (
title==
"#it{p}_{T,jet} (GeV/#it{c})") contents[i] = (*it).second.Pt();
2318 else if (
title==
"#eta_{jet}") contents[i] = (*it).second.Eta();
2319 else if (
title==
"#phi_{jet} (rad)") contents[i] = (*it).second.Phi_0_2pi();
2320 else if (
title==
"No. of constituents") contents[i] = (*it).second.fNConstituents;
2321 else AliWarning(Form(
"Unable to fill dimension '%s'!",
title.Data()));
2361 fEnabledAxis(k2ProngInvMass),
2362 fOutputType(kTreeOutput),
2364 fApplyKinematicCuts(kTRUE),
2365 fNOutputTrees(nOutputTrees),
2366 fTrackEfficiency(0),
2368 fJetAreaType(fastjet::active_area),
2369 fJetGhostArea(0.005),
2375 for (
Int_t i = 0; i < nOutputTrees; i++){
2376 DefineOutput(2+i, TTree::Class());
2395 TFile* filecuts = TFile::Open(cutfname);
2396 if (!filecuts || filecuts->IsZombie()) {
2397 ::Error(
"AliAnalysisTaskDmesonJets::LoadDMesonCutsFromFile",
"Input file not found: will use std cuts.");
2401 if (filecuts) analysiscuts =
dynamic_cast<AliRDHFCuts*
>(filecuts->Get(cutsname));
2403 if (!analysiscuts) {
2404 ::Error(
"AliAnalysisTaskDmesonJets::LoadDMesonCutsFromFile",
"Could not find analysis cuts '%s' in '%s'.", cutsname.Data(), cutfname.Data());
2410 ::Info(
"AliAnalysisTaskDmesonJets::LoadDMesonCutsFromFile",
"Cuts '%s' loaded from file '%s'", cutsname.Data(), cutfname.Data());
2413 return analysiscuts;
2442 if (!cutfname.IsNull()) {
2448 cutsname =
"D0toKpiCuts";
2451 cutsname =
"DStartoKpipiCuts";
2468 ::Info(
"AliAnalysisTaskDmesonJets::AddAnalysisEngine",
"A new analysis engine '%s' has been added. The total number of analysis engines is %lu.", eng.
GetName(),
fAnalysisEngines.size());
2472 ::Info(
"AliAnalysisTaskDmesonJets::AddAnalysisEngine",
"An analysis engine '%s' with %lu jet definitions has been found. The total number of analysis engines is %lu. A new jet definition '%s' is being added.", found_eng->
GetName(), found_eng->
fJetDefinitions.size(),
fAnalysisEngines.size(), jetDef.
GetName());
2476 if (found_eng->
fRDHFCuts != 0) ::Warning(
"AliAnalysisTaskDmesonJets::AddAnalysisEngine",
"D meson cuts were already defined for this D meson type. They will be overwritten.");
2494 ::Info(
"UserCreateOutputObjects",
"CreateOutputObjects of task %s", GetName());
2506 Int_t maxTracks = 6000;
2517 hname =
"fHistCharmPt";
2518 htitle = hname +
";#it{p}_{T,charm} (GeV/#it{c});counts";
2521 hname =
"fHistCharmEta";
2522 htitle = hname +
";#eta_{charm};counts";
2525 hname =
"fHistCharmPhi";
2526 htitle = hname +
";#phi_{charm};counts";
2529 hname =
"fHistCharmPt_Eta05";
2530 htitle = hname +
";#it{p}_{T,charm} (GeV/#it{c});counts";
2533 hname =
"fHistBottomPt";
2534 htitle = hname +
";#it{p}_{T,bottom} (GeV/#it{c});counts";
2537 hname =
"fHistBottomEta";
2538 htitle = hname +
";#eta_{bottom};counts";
2541 hname =
"fHistBottomPhi";
2542 htitle = hname +
";#phi_{bottom};counts";
2545 hname =
"fHistBottomPt_Eta05";
2546 htitle = hname +
";#it{p}_{T,bottom} (GeV/#it{c});counts";
2549 hname =
"fHistHighestPartonPt";
2550 htitle = hname +
";#it{p}_{T,bottom} (GeV/#it{c});counts";
2553 hname =
"fHistHighestPartonType";
2554 htitle = hname +
";type;counts";
2557 hname =
"fHistNHeavyQuarks";
2558 htitle = hname +
";number of heavy-quarks;counts";
2561 ::Info(
"AliAnalysisTaskDmesonJets::UserCreateOutputObjects",
"Allocating histograms for task '%s' (%lu analysis engines)", GetName(),
fAnalysisEngines.size());
2563 ::Info(
"AliAnalysisTaskDmesonJets::UserCreateOutputObjects",
"Allocating histograms for analysis engine '%s' (%lu jet definitions)", param.GetName(), param.fJetDefinitions.size());
2567 hname = TString::Format(
"%s/fHistNAcceptedDmesonsVsNtracks", param.GetName());
2568 htitle = hname +
";#it{N}_{tracks};#it{N}_{D};events";
2571 hname = TString::Format(
"%s/fHistNTotAcceptedDmesons", param.GetName());
2572 htitle = hname +
";;#it{N}_{D}";
2575 hname = TString::Format(
"%s/fHistNDmesons", param.GetName());
2576 htitle = hname +
";#it{N}_{D};events";
2579 hname = TString::Format(
"%s/fHistNEvents", param.GetName());
2580 htitle = hname +
";Event status;counts";
2582 h->GetXaxis()->SetBinLabel(1,
"Accepted");
2583 h->GetXaxis()->SetBinLabel(2,
"Rejected");
2585 hname = TString::Format(
"%s/fHistEventRejectionReasons", param.GetName());
2586 htitle = hname +
";Rejection reason;counts";
2589 hname = TString::Format(
"%s/fHistRejectedDMesonPt", param.GetName());
2590 htitle = hname +
";#it{p}_{T,D} (GeV/#it{c});counts";
2593 hname = TString::Format(
"%s/fHistRejectedDMesonEta", param.GetName());
2594 htitle = hname +
";#it{#eta}_{D};counts";
2597 hname = TString::Format(
"%s/fHistRejectedDMesonPhi", param.GetName());
2598 htitle = hname +
";#it{#phi}_{D};counts";
2603 hname = TString::Format(
"%s/fHistRejectedDMesonInvMass", param.GetName());
2604 htitle = hname +
";#it{M}_{K#pi} (GeV/#it{c}^{2});counts";
2611 hname = TString::Format(
"%s/fHistRejectedDMeson2ProngInvMass", param.GetName());
2612 htitle = hname +
";#it{M}_{K#pi} (GeV/#it{c}^{2});counts";
2616 Double_t D0mass = TDatabasePDG::Instance()->GetParticle(421)->Mass();
2617 hname = TString::Format(
"%s/fHistRejectedDMesonDeltaInvMass", param.GetName());
2618 htitle = hname +
";#it{M}_{K#pi#pi} - #it{M}_{K#pi} (GeV/#it{c}^{2});counts";
2625 hname = TString::Format(
"%s/fHistPartonPt", param.GetName());
2626 htitle = hname +
";#it{p}_{T,parton} (GeV/#it{c});counts";
2629 hname = TString::Format(
"%s/fHistPartonEta", param.GetName());
2630 htitle = hname +
";#eta_{parton};counts";
2633 hname = TString::Format(
"%s/fHistPartonPhi", param.GetName());
2634 htitle = hname +
";#phi_{parton};counts";
2637 hname = TString::Format(
"%s/fHistPartonType", param.GetName());
2638 htitle = hname +
";type;counts";
2641 hname = TString::Format(
"%s/fHistPrompt", param.GetName());
2642 htitle = hname +
";Type;counts";
2644 h->GetXaxis()->SetBinLabel(1,
"Unknown");
2645 h->GetXaxis()->SetBinLabel(2,
"Prompt");
2646 h->GetXaxis()->SetBinLabel(3,
"Non-Prompt");
2648 hname = TString::Format(
"%s/fHistAncestor", param.GetName());
2649 htitle = hname +
";Ancestor;counts";
2651 h->GetXaxis()->SetBinLabel(1,
"Unknown");
2652 h->GetXaxis()->SetBinLabel(2,
"Charm");
2653 h->GetXaxis()->SetBinLabel(3,
"Bottom");
2654 h->GetXaxis()->SetBinLabel(4,
"Proton");
2657 for (
auto& jetDef : param.fJetDefinitions) {
2658 ::Info(
"AliAnalysisTaskDmesonJets::UserCreateOutputObjects",
"Allocating histograms for jet definition '%s'", jetDef.GetName());
2661 hname = TString::Format(
"%s/%s/fHistNDmesonsVsNconstituents", param.GetName(), jetDef.GetName());
2662 htitle = hname +
";#it{N}_{constituents};#it{N}_{D};counts";
2666 hname = TString::Format(
"%s/%s/fHistMCParticleRejectionReason", param.GetName(), jetDef.GetName());
2667 htitle = hname +
";Track rejection reason;#it{p}_{T,track} (GeV/#it{c});counts";
2671 hname = TString::Format(
"%s/%s/fHistTrackRejectionReason", param.GetName(), jetDef.GetName());
2672 htitle = hname +
";Track rejection reason;#it{p}_{T,track} (GeV/#it{c});counts";
2676 hname = TString::Format(
"%s/%s/fHistClusterRejectionReason", param.GetName(), jetDef.GetName());
2677 htitle = hname +
";Cluster rejection reason;#it{p}_{T,cluster} (GeV/#it{c});counts";
2681 hname = TString::Format(
"%s/%s/fHistDMesonDaughterNotInJet", param.GetName(), jetDef.GetName());
2682 htitle = hname +
";#it{p}_{T,track} (GeV/#it{c});counts";
2685 hname = TString::Format(
"%s/%s/fHistRejectedJetPt", param.GetName(), jetDef.GetName());
2686 htitle = hname +
";#it{p}_{T,jet} (GeV/#it{c});counts";
2689 hname = TString::Format(
"%s/%s/fHistRejectedJetEta", param.GetName(), jetDef.GetName());
2690 htitle = hname +
";#it{#eta}_{jet};counts";
2693 hname = TString::Format(
"%s/%s/fHistRejectedJetPhi", param.GetName(), jetDef.GetName());
2694 htitle = hname +
";#it{#phi}_{jet};counts";
2697 if (!jetDef.fRhoName.IsNull()) {
2698 hname = TString::Format(
"%s/%s/fHistRhoVsLeadJetPt", param.GetName(), jetDef.GetName());
2699 htitle = hname +
";#it{p}_{T,jet} (GeV/#it{c});#rho (GeV/#it{c} #times rad^{-1});counts";
2702 hname = TString::Format(
"%s/%s/fHistRhoVsLeadDPt", param.GetName(), jetDef.GetName());
2703 htitle = hname +
";#it{p}_{T,D} (GeV/#it{c});#rho (GeV/#it{c} #times rad^{-1});counts";
2706 hname = TString::Format(
"%s/%s/fHistRhoVsCent", param.GetName(), jetDef.GetName());
2707 htitle = hname +
";Centrality (%);#rho (GeV/#it{c} #times rad^{-1});counts";
2710 hname = TString::Format(
"%s/%s/fHistLeadJetPtVsCent", param.GetName(), jetDef.GetName());
2711 htitle = hname +
";Centrality (%);#it{p}_{T,jet} (GeV/#it{c});counts";
2714 hname = TString::Format(
"%s/%s/fHistLeadDPtVsCent", param.GetName(), jetDef.GetName());
2715 htitle = hname +
";Centrality (%);#it{p}_{T,D} (GeV/#it{c});counts";
2718 hname = TString::Format(
"%s/%s/fHistRhoVsNTracks", param.GetName(), jetDef.GetName());
2719 htitle = hname +
";no. of tracks;#rho (GeV/#it{c} #times rad^{-1});counts";
2722 hname = TString::Format(
"%s/%s/fHistLeadJetPtVsNTracks", param.GetName(), jetDef.GetName());
2723 htitle = hname +
";no. of tracks;#it{p}_{T,jet} (GeV/#it{c});counts";
2726 hname = TString::Format(
"%s/%s/fHistLeadDPtVsNTracks", param.GetName(), jetDef.GetName());
2727 htitle = hname +
";no. of tracks;#it{p}_{T,D} (GeV/#it{c});counts";
2733 param.BuildTree(GetName());
2735 param.AssignDataSlot(treeSlot+2);
2740 AliError(Form(
"Number of data output slots %d not sufficient. Tree of analysis engine %s will not be posted!",
fNOutputTrees, param.GetName()));
2771 AliError(Form(
"This task need an AOD event (Task '%s'). Expect troubles...", GetName()));
2789 params.fRandomGen = rnd;
2791 for (
auto &jetdef: params.fJetDefinitions) {
2792 if (!jetdef.fRhoName.IsNull()) {
2793 jetdef.fRho =
dynamic_cast<AliRhoParameter*
>(fInputEvent->FindListObject(jetdef.fRhoName));
2795 ::Error(
"AliAnalysisTaskDmesonJets::ExecOnce",
2796 "%s: Could not find rho object '%s' for engine '%s'",
2797 GetName(), jetdef.fRhoName.Data(), params.GetName());
2802 if (!params.fRDHFCuts) {
2804 ::Warning(
"AliAnalysisTaskDmesonJets::ExecOnce",
2805 "%s: RDHF cuts not provided for engine '%s'.",
2806 GetName(), params.GetName());
2809 ::Error(
"AliAnalysisTaskDmesonJets::ExecOnce",
2810 "%s: RDHF cuts not provided. Engine '%s' disabled.",
2811 GetName(), params.GetName());
2812 params.fInhibit = kTRUE;
2818 for (
auto cont_it : fParticleCollArray) {
2820 if (track_cont) params.fTrackContainers.push_back(track_cont);
2823 for (
auto cont_it :
fClusterCollArray) params.fClusterContainers.push_back(cont_it.second);
2828 params.fCandidateArray =
dynamic_cast<TClonesArray*
>(
fAodEvent->GetList()->FindObject(params.fBranchName.Data()));
2830 if (params.fCandidateArray) {
2833 className =
"AliAODRecoDecayHF2Prong";
2836 className =
"AliAODRecoCascadeHF";
2838 if (!params.fCandidateArray->GetClass()->InheritsFrom(className)) {
2839 ::Error(
"AliAnalysisTaskDmesonJets::ExecOnce",
2840 "%s: Objects of type %s in %s are not inherited from %s! Task will be disabled!",
2841 GetName(), params.fCandidateArray->GetClass()->GetName(), params.fCandidateArray->GetName(), className.Data());
2842 params.fCandidateArray = 0;
2843 params.fInhibit = kTRUE;
2847 ::Error(
"AliAnalysisTaskDmesonJets::ExecOnce",
2848 "Could not find candidate array '%s', skipping the event. Analysis engine '%s' will be disabled!",
2849 params.fBranchName.Data(), params.GetName());
2850 params.fInhibit = kTRUE;
2854 if (params.fMCMode !=
kNoMC) {
2855 if (!params.fMCContainer) {
2856 ::Error(
"AliAnalysisTaskDmesonJets::ExecOnce",
2857 "No MC particle container was provided. Analysis engine '%s' will be disabled!",
2859 params.fInhibit = kTRUE;
2864 if (params.fTrackContainers.size() == 0 && params.fClusterContainers.size() == 0) {
2865 ::Error(
"AliAnalysisTaskDmesonJets::ExecOnce",
2866 "No track container and no cluster container were provided. Analysis engine '%s' will be disabled!",
2868 params.fInhibit = kTRUE;
2886 if (eng.fInhibit)
continue;
2887 hname = TString::Format(
"%s/fHistEventRejectionReasons", eng.GetName());
2895 if (matchingAODdeltaAODlevel <= 0) {
2898 if (eng.fInhibit)
continue;
2899 hname = TString::Format(
"%s/fHistEventRejectionReasons", eng.GetName());
2907 eng.fDmesonJets.clear();
2908 if (eng.fInhibit)
continue;
2913 hname = TString::Format(
"%s/fHistNEvents", eng.GetName());
2915 Bool_t iseventselected = kTRUE;
2916 if (eng.fRDHFCuts) iseventselected = eng.fRDHFCuts->IsEventSelected(
fAodEvent);
2917 if (!iseventselected) {
2919 hname = TString::Format(
"%s/fHistEventRejectionReasons", eng.GetName());
2920 UInt_t bitmap = eng.fRDHFCuts->GetEventRejectionBitMap();
2924 if (label.IsNull())
break;
2934 AliDebug(2,
"Event selected");
2947 if (param.fInhibit)
continue;
2967 Int_t absPdgHighParton = 0;
2968 for (
auto part : itcont) {
2969 Int_t absPdgCode = TMath::Abs(part.second->GetPdgCode());
2972 if (absPdgCode > 9 && absPdgCode != 21)
continue;
2975 if (highestPartonPt < part.first.Pt()) {
2976 highestPartonPt = part.first.Pt();
2977 absPdgHighParton = absPdgCode;
2993 if (absPdgCode != 4 && absPdgCode != 5)
continue;
2994 Bool_t notLastInPartonShower = kFALSE;
2995 for (
Int_t idaugh = 0; idaugh < 2; idaugh++){
2996 Int_t daughterIndex = part.second->GetDaughter(idaugh);
2997 if (daughterIndex < 0) {
2998 AliDebug(10, Form(
"Could not find daughter of heavy quark (pdg=%d, pt=%.3f)!", absPdgCode, part.first.Pt()));
3003 AliDebug(10, Form(
"Could not find daughter %d of heavy quark (pdg=%d, pt=%.3f)!", daughterIndex, absPdgCode, part.first.Pt()));
3006 Int_t daughterAbsPdgCode = TMath::Abs(daughter->GetPdgCode());
3007 if (daughterAbsPdgCode <= 9 || daughterAbsPdgCode == 21) notLastInPartonShower = kTRUE;
3008 AliDebug(10, Form(
"Found daughter with PDG=%d, pt=%.3f", daughterAbsPdgCode, daughter->Pt()));
3010 if (notLastInPartonShower)
continue;
3012 if (absPdgCode == 4) {
3016 if (TMath::Abs(part.first.Eta()) < 0.5)
fHistManager.
FillTH1(
"fHistCharmPt_Eta05", part.first.Pt());
3018 else if (absPdgCode == 5) {
3022 if (TMath::Abs(part.first.Eta()) < 0.5)
fHistManager.
FillTH1(
"fHistBottomPt_Eta05", part.first.Pt());
3028 Int_t partonType = 0;
3029 if (absPdgHighParton == 9 || absPdgHighParton == 21) {
3033 partonType = absPdgHighParton;
3047 TParticlePDG* part = TDatabasePDG::Instance()->GetParticle(TMath::Abs(pdg));
3052 if (nbins % 2 == 0) {
3053 minMass = mass - range / 2 - range / nbins / 2;
3054 maxMass = mass + range / 2 - range / nbins / 2;
3057 minMass = mass - range / 2;
3058 maxMass = mass + range / 2;
3073 label =
"NotSelTrigger";
3075 return label.Data();
3080 return label.Data();
3083 label =
"TooFewVtxContrib";
3085 return label.Data();
3088 label =
"ZVtxOutFid";
3090 return label.Data();
3095 return label.Data();
3098 label =
"OutsideCentrality";
3100 return label.Data();
3103 label =
"PhysicsSelection";
3105 return label.Data();
3108 label =
"BadSPDVertex";
3110 return label.Data();
3113 label =
"ZVtxSPDOutFid";
3115 return label.Data();
3118 label =
"CentralityFlattening";
3120 return label.Data();
3123 label =
"BadTrackV0Correl";
3125 return label.Data();
3128 return label.Data();
3160 ::Error(
"AddTaskDmesonJets",
"No analysis manager to connect to.");
3165 AliVEventHandler* handler = mgr->GetInputEventHandler();
3167 ::Error(
"AddTaskEmcalJetSpectraQA",
"This task requires an input event handler");
3173 if (handler->InheritsFrom(
"AliESDInputHandler")) {
3176 else if (handler->InheritsFrom(
"AliAODInputHandler")) {
3181 if (ntracks ==
"usedefault") {
3182 if (dataType ==
kESD) {
3185 else if (dataType ==
kAOD) {
3193 if (nclusters ==
"usedefault") {
3194 if (dataType ==
kESD) {
3195 nclusters =
"CaloClusters";
3197 else if (dataType ==
kAOD) {
3198 nclusters =
"caloClusters";
3205 if (nMCpart ==
"usedefault") {
3206 nMCpart =
"mcparticles";
3209 TString name(
"AliAnalysisTaskDmesonJets");
3210 if (strcmp(suffix,
"") != 0) {
3211 name += TString::Format(
"_%s", suffix.Data());
3216 if (!ntracks.IsNull()) {
3221 if (!nMCpart.IsNull()) {
3223 partCont->SetEtaLimits(-1.5, 1.5);
3224 partCont->SetPtLimits(0, 1000);
3231 mgr->AddTask(jetTask);
3234 AliAnalysisDataContainer* cinput1 = mgr->GetCommonInputContainer();
3236 contname1 +=
"_histos";
3237 AliAnalysisDataContainer* coutput1 = mgr->CreateContainer(contname1.Data(),
3238 TList::Class(), AliAnalysisManager::kOutputContainer,
3239 Form(
"%s", AliAnalysisManager::GetCommonFileName()));
3241 mgr->ConnectInput(jetTask, 0, cinput1);
3242 mgr->ConnectOutput(jetTask, 1, coutput1);
3244 for (
Int_t i = 0; i < nMaxTrees; i++) {
3245 TString contname = TString::Format(
"%s_tree_%d", name.Data(), i);
3246 AliAnalysisDataContainer *coutput = mgr->CreateContainer(contname.Data(),
3247 TTree::Class(),AliAnalysisManager::kOutputContainer,
3248 Form(
"%s", AliAnalysisManager::GetCommonFileName()));
3249 mgr->ConnectOutput(jetTask, 2+i, coutput);
Int_t GetNConstituents() const
void SetRejectionReasonLabels(TAxis *axis)
AliClusterContainer * AddClusterContainer(std::string branchName, std::string contName="")
void Print() const
Prints the content of this object in the standard output.
void UserCreateOutputObjects()
AliAODMCParticle * fParton
! pointer to the parton in the shower tree of the D meson (only for particle level D mesons) ...
std::list< AnalysisEngine > fAnalysisEngines
Array of analysis parameters.
Bool_t FillTree(Bool_t applyKinCuts)
AliEMCALGeometry * fGeom
!emcal geometry
void SetDMesonCandidate(AliAODRecoDecay *c)
Analysis task for D meson jets.
virtual void Set(const AliDmesonJetInfo &source)
Invariant mass of the D0 meson candidate in GeV/c2.
virtual void Reset()
Reset the object.
TList * fOutput
!output list
Bool_t IsJetInAcceptance(const AliJetInfo &jet) const
Double_t fSoftPionPt
! Transverse momentum of the soft pion of the D* candidate
EDataType_t
Switch for the data type.
virtual AliAODMCParticle * GetMCParticle(Int_t i=-1) const
AliRDHFCuts * fRDHFCuts
D meson candidates cuts.
virtual void Set(const AliDmesonJetInfo &source)
void RunAnalysis()
Run the analysis.
Lightweight class that encapsulates D meson jets.
Double_t fTrackEfficiency
Artificial tracking inefficiency (0...1)
Bool_t FillHnSparse(Bool_t applyKinCuts)
Int_t MatchToMC(Int_t pdgabs, Int_t pdgabs2prong, Int_t *pdgDg, Int_t *pdgDg2prong, TClonesArray *mcArray, Bool_t isV0=kFALSE) const
AliHFAODMCParticleContainer * fMCContainer
! MC particle container
ERecoScheme_t fRecoScheme
Jet recombination scheme (pt scheme, E scheme, ...)
const TObjArray & GetDaughterList() const
void SetRDHFCuts(AliRDHFCuts *cuts)
Double_t fMaxNeutralPt
Transverse momentum of the leading neutral particle (or cluster)
void RunDetectorLevelAnalysis()
Run a detector level analysis.
Container with name, TClonesArray and cuts for particles.
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
virtual void UserCreateOutputObjects()
Creates the output containers.
void FillPartonLevelHistograms()
Fill histograms with parton-level information.
static Int_t CheckMatchingAODdeltaAODevents()
Lightweight class that encapsulates D meson jets.
Double_t fInvMass2Prong
! 2-prong mass of the D* candidate (w/o the soft pion)
static void CalculateMassLimits(Double_t range, Int_t pdg, Int_t nbins, Double_t &minMass, Double_t &maxMass)
AliAODEvent * fAodEvent
! AOD event
virtual void Reset()
Reset the object.
Bool_t FindJet(AliAODRecoDecayHF2Prong *Dcand, AliDmesonJetInfo &DmesonJet, AliHFJetDefinition &jetDef)
UInt_t fEnabledAxis
Use bit defined in EAxis_t to enable axis in the THnSparse.
AliRhoParameter * fRho
Object that holds the average background value.
EMCMode_t fMCMode
MC mode: No MC (data and MC detector level), background-only (MC), signal-only (MC), MC truth (particle level)
Bool_t FillRecoCand(AliVEvent *event, AliAODRecoDecayHF3Prong *rd3)
Double_t fJetGhostArea
Area of the ghost particles.
Double_t InvMassD0() const
void BuildHnSparse(UInt_t enabledAxis)
void SetRecombScheme(const fastjet::RecombinationScheme &scheme)
const char * GetName() const
virtual void Reset()
Reset the object.
AnalysisEngine()
This is the default constructor, used for ROOT I/O purposes.
virtual void Reset()
Reset the current object.
EFindParticleOriginMode_t
void Init(const AliEMCALGeometry *const geom, Int_t runNumber)
Initialize the analysis engine.
static FJRecoScheme ConvertToFJRecoScheme(ERecoScheme_t reco)
AliVParticle * fDmesonParticle
! pointer to the particle object
static TString GenerateJetName(EJetType_t jetType, EJetAlgo_t jetAlgo, ERecoScheme_t recoScheme, Double_t radius, AliParticleContainer *partCont, AliClusterContainer *clusCont, TString tag)
static std::pair< AliAnalysisTaskDmesonJets::EMesonOrigin_t, AliAODMCParticle * > IsPromptCharm(const AliAODMCParticle *part, TClonesArray *mcArray)
Select tracks based on specific prescriptions of HF analysis.
ECandidateType_t fCandidateType
Candidate type.
Double_t GetDistance(std::string n, Double_t &deta, Double_t &dphi) const
Int_t fMCLabel
! MC label, i.e. index of the generator level D meson (only for detector level D meson candidates) ...
EBeamType_t fForceBeamType
forced beam type
virtual void Set(const AliDmesonJetInfo &source)
void AddInputVectors(AliEmcalContainer *cont, Int_t offset, TH2 *rejectHist=0, Double_t eff=0.)
const std::vector< fastjet::PseudoJet > & GetInclusiveJets() const
EJetType_t fJetType
Jet type (charged, full, neutral)
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
virtual void Set(const AliDmesonJetInfo &source)
AliTLorentzVector fD
! 4-momentum of the D meson candidate
Double_t GetDistance(const AliJetInfo &jet, Double_t &deta, Double_t &dphi) const
TObject * FindObject(const char *name) const
Find an object inside the container.
THashList * GetListOfHistograms() const
Get the list of histograms.
AliAnalysisTaskDmesonJets()
This is the default constructor, used for ROOT I/O purposes.
virtual void Reset()
Reset the current object.
AnalysisEngine & operator=(const AnalysisEngine &source)
Lightweight class that encapsulates D meson jets for PbPb analysis.
Struct that encapsulates analysis parameters.
std::vector< AliHFJetDefinition >::iterator FindJetDefinition(const AliHFJetDefinition &eng)
Base task in the EMCAL framework (lighter version of AliAnalysisTaskEmcal)
Double_t Phi_0_2pi() const
static AliAODMCParticle * FindParticleOrigin(const AliAODMCParticle *part, TClonesArray *mcArray, EFindParticleOriginMode_t mode, const std::set< UInt_t > &pdgSet)
Int_t GetDataSlotNumber() const
Double_t fRadius
Jet radius.
void SetAlgorithm(const fastjet::JetAlgorithm &algor)
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
AliAODTrack * GetBachelor() const
AliRDHFCuts * LoadDMesonCutsFromFile(TString cutfname, TString cutsname)
AliDmesonJetInfo()
Default constructor.
bool operator<(const AliAnalysisTaskDmesonJets::AliHFJetDefinition &lhs, const AliAnalysisTaskDmesonJets::AliHFJetDefinition &rhs)
std::list< AnalysisEngine >::iterator FindAnalysisEngine(const AnalysisEngine &eng)
std::vector< AliHFJetDefinition > fJetDefinitions
Jet definitions.
Double_t InvMassD0bar() const
EJetAlgo_t fJetAlgo
Jet algorithm (kt, anti-kt,...)
Double_t GetZ(std::string n) const
static const char * GetHFEventRejectionReasonLabel(UInt_t &bitmap)
Lightweight class that encapsulates D*.
virtual void Clear(const Option_t *="")
virtual void Reset()
Reset the object.
void SetRejectedOriginMap(UInt_t m)
Bool_t ExtractDstarAttributes(const AliAODRecoCascadeHF *DstarCand, AliDmesonJetInfo &DmesonJet, UInt_t i)
Int_t fJetAreaType
Jet area type.
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
const AliJetInfo * GetJet(std::string n) const
Short_t fPartonType
! type of the parton in the shower tree (only for particle level D mesons)
void SetAcceptedDecayMap(UInt_t m)
const AliMCParticleIterableMomentumContainer all_momentum() const
virtual ~AliAnalysisTaskDmesonJets()
This is the standard destructor.
Byte_t fSelectionType
! for D0: 0=not selected, 1=D0, 2=D0bar, 3=both
void SetCandidateProperties(Double_t range)
Bool_t ExtractD0Attributes(const AliAODRecoDecayHF2Prong *Dcand, AliDmesonJetInfo &DmesonJet, UInt_t i)
Double_t Phi_0_2pi() const
Select MC particles based on specific prescriptions of HF analysis.
static EMesonDecayChannel_t CheckDecayChannel(const AliAODMCParticle *part, TClonesArray *mcArray)
void SetGhostArea(Double_t gharea)
ClassImp(AliAnalysisTaskDeltaPt) AliAnalysisTaskDeltaPt
AliDmesonJetInfo & operator=(const AliDmesonJetInfo &source)
Double_t fMaxChargedPt
Transverse momentum of the leading charged particle (or track)
Double_t GetCorrZ(std::string n) const
std::vector< fastjet::PseudoJet > GetJetConstituents(UInt_t idx) const
static FJJetAlgo ConvertToFJAlgo(EJetAlgo_t algo)
void AdoptRDHFCuts(AliRDHFCuts *cuts)
Class that encapsulates jets.
std::map< std::string, AliJetInfo > fJets
! list of jets
AliAODMCParticle * fAncestor
! pointer to the ancestor particle in the shower tree of the D meson (only for particle level D meson...
Bool_t IsSpecialPDGFound() const
virtual void PrintAll() const
virtual ~AnalysisEngine()
void RunParticleLevelAnalysis()
Run a particle level analysis.
std::map< std::string, AliParticleContainer * > fParticleCollArray
particle/track collection array
Bool_t fApplyKinematicCuts
Apply jet kinematic cuts.
AnalysisEngine * AddAnalysisEngine(ECandidateType_t type, TString cutfname, EMCMode_t bkgMode, EJetType_t jettype, Double_t jetradius, TString rhoName="")
const char * GetName() const
Generate a name for this jet definition.
virtual void Set(const AliDmesonJetInfo &source, std::string n)
Bool_t ExtractRecoDecayAttributes(const AliAODRecoDecayHF2Prong *Dcand, AliDmesonJetInfo &DmesonJet, UInt_t i)
Double_t InvMassD0() const
Bool_t fRejectISR
Reject initial state radiation.
EOutputType_t fOutputType
Output type: none, TTree or THnSparse.
virtual void AddInputVector(Double_t px, Double_t py, Double_t pz, Double_t E, Int_t index=-99999)
bool operator==(const AliAnalysisTaskDmesonJets::AliHFJetDefinition &lhs, const AliAnalysisTaskDmesonJets::AliHFJetDefinition &rhs)
Double_t InvMassDstarKpipi() const
Int_t fNOutputTrees
Maximum number of output trees.
virtual Bool_t FillHistograms()
AliHFJetDefinition()
This is the default constructor, used for ROOT I/O purposes.
void SetSpecialPDG(Int_t pdg)
AliHFJetDefinition & operator=(const AliHFJetDefinition &source)
Int_t GetNAcceptedParticles() const
void SetAreaType(const fastjet::AreaType &atype)
AliTLorentzVector fMomentum
4-momentum of the jet
std::map< std::string, AliClusterContainer * > fClusterCollArray
cluster collection array
THnSparse * CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="")
Create a new THnSparse within the container.
Double_t fCorrPt
Transverse momentum of the jet after subtracting the average background.
AliHFJetDefinition * AddJetDefinition(EJetType_t type, Double_t r, EJetAlgo_t algo, ERecoScheme_t reco)
Container for MC-true particles within the EMCAL framework.
Lightweight class that encapsulates D0.
void SetMakeGeneralHistograms(Bool_t g)
Bool_t IsAnyJetInAcceptance(const AliDmesonJetInfo &dMesonJet) const
void AdoptParticleContainer(AliParticleContainer *cont)
Double_t fCent
!event centrality
void SetCharge(EChargeCut_t c)
Container for jet within the EMCAL jet framework.
void SetRejectISR(Bool_t b)
Int_t PostDataFromAnalysisEngine(const AnalysisEngine &eng)
AliFJWrapper * fFastJetWrapper
! Fastjet wrapper
THistManager fHistManager
Histogram manager.
void Reset()
Reset all fields to their default values.
static AliAnalysisTaskDmesonJets * AddTaskDmesonJets(TString ntracks="usedefault", TString nclusters="usedefault", TString nMCpart="", Int_t nMaxTrees=2, TString suffix="")
TTree * BuildTree(const char *taskName)
virtual void Set(const AliDmesonJetInfo &source, std::string n)
Bool_t FillQA(Bool_t applyKinCuts)