18 #include <TClonesArray.h> 21 #include <THnSparse.h> 24 #include <Riostream.h> 28 #include <AliVEventHandler.h> 29 #include <AliAnalysisManager.h> 33 #include "AliCentrality.h" 34 #include "AliVCluster.h" 35 #include "AliVParticle.h" 36 #include "AliVTrack.h" 38 #include "AliEMCALGeometry.h" 39 #include "AliEMCALGeoParams.h" 40 #include "AliESDtrack.h" 41 #include "AliAODTrack.h" 42 #include "AliAODMCParticle.h" 46 #include "AliMCEvent.h" 47 #include "AliGenPythiaEventHeader.h" 48 #include "AliAODMCHeader.h" 49 #include "AliPHOSGeometry.h" 50 #include "AliOADBContainer.h" 65 fUseAliEventCuts(kTRUE),
68 fUseManualEventCuts(kFALSE),
77 fGeneratorLevelName(),
79 fRejectOutlierEvents(kFALSE),
91 fNPtRelDiffHistBins(0),
92 fPtRelDiffHistBins(0),
98 fHistManager(
"AliAnalysisTaskPWGJEQA")
179 fEventCuts.fUseVariablesCorrelationCuts =
true;
188 printf(
"No implementation of manuel event cuts for pPb yet!");
208 while ((obj = next())) {
233 histname = TString::Format(
"%s/fHistCellEnergy",
fCaloCellsName.Data());
234 title = histname +
";#it{E}_{cell} (GeV);counts";
237 histname = TString::Format(
"%s/fProfCellAbsIdEnergy",
fCaloCellsName.Data());
238 title = histname +
";cell absId;<#it{E}_{cell}> (GeV)";
241 histname = TString::Format(
"%s/fHistCellTime",
fCaloCellsName.Data());
242 title = histname +
";#it{t}_{cell} (s);counts";
245 histname = TString::Format(
"%s/fProfCellAbsIdTime",
fCaloCellsName.Data());
246 title = histname +
";cell absId;<#it{t}_{cell}> (s)";
249 histname = TString::Format(
"%s/fHistCellEvsTime",
fCaloCellsName.Data());
250 title = histname +
";<#it{t}_{cell}> (s);<#it{E}_{cell}> (GeV)";
259 AliEmcalContainer* cont = 0;
265 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) {
267 histname = TString::Format(
"%s/fHistClusterRejectionReason", cont->GetArrayName().Data());
268 title = histname +
";Rejection reason;#it{E}_{clus} (GeV/);counts";
272 histname = TString::Format(
"%s/hPhosNCellsVsEnergy", cont->GetArrayName().Data());
273 title = histname +
";N cells;#it{E}_{clus} (GeV/);counts";
276 histname = TString::Format(
"%s/hPhosM02VsEnergy", cont->GetArrayName().Data());
277 title = histname +
";M02;#it{E}_{clus} (GeV/);counts";
280 histname = TString::Format(
"%s/hPhosCellIdVsEnergy", cont->GetArrayName().Data());
281 title = histname +
";Cell ID;#it{E}_{clus} (GeV/);counts";
284 const Int_t nEmcalSM = 20;
285 for (
Int_t sm = 0; sm < nEmcalSM; sm++) {
286 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
287 title = histname +
";#it{E}_{cluster} (GeV);counts";
291 for (
Int_t sm = 1; sm < 5; sm++) {
292 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", cont->GetArrayName().Data(), sm);
293 title = histname +
";#it{E}_{cluster} (GeV);counts";
306 title[dim] =
"Centrality %";
314 title[dim] =
"#it{E}_{clus} (GeV)";
335 title[dim] =
"cluster type";
342 TString thnname = TString::Format(
"%s/clusterObservables", cont->GetArrayName().Data());
344 for (
Int_t i = 0; i < dim; i++) {
345 hn->GetAxis(i)->SetTitle(title[i]);
346 hn->SetBinEdges(i, binEdges[i]);
356 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
368 axisTitle[dim] =
"Centrality (%)";
376 axisTitle[dim] =
"#eta_{jet}";
383 axisTitle[dim] =
"#phi_{jet} (rad)";
390 axisTitle[dim] =
"#it{p}_{T} (GeV/#it{c})";
391 nbins[dim] = TMath::CeilNint(
fMaxPt/3);
398 axisTitle[dim] =
"#it{p}_{T}^{corr} (GeV/#it{c})";
399 nbins[dim] = TMath::CeilNint(
fMaxPt/3);
400 min[dim] = -
fMaxPt/2 + 25;
406 axisTitle[dim] =
"#it{p}_{T,particle}^{leading} (GeV/#it{c})";
413 TString thnname = TString::Format(
"%s/fHistJetObservables", jets->GetArrayName().Data());
415 for (
Int_t i = 0; i < dim; i++) {
416 hn->GetAxis(i)->SetTitle(axisTitle[i]);
417 hn->SetBinEdges(i, binEdges[i]);
423 histname = TString::Format(
"%s/fHistJetRejectionReason", jets->GetArrayName().Data());
424 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
429 histname = TString::Format(
"%s/fHistRhoVsCent", jets->GetArrayName().Data());
430 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
434 histname = TString::Format(
"%s/hNEFVsPtEMC", jets->GetArrayName().Data());
435 title = histname +
";Centrality (%); #it{p}_{T}^{corr} (GeV/#it{c});NEF";
436 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100, 250, 0, 250, 50, 0, 1);
438 histname = TString::Format(
"%s/hNEFVsPtDCal", jets->GetArrayName().Data());
439 title = histname +
";Centrality (%); #it{p}_{T}^{corr} (GeV/#it{c});NEF";
440 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100, 250, 0, 250, 50, 0, 1);
442 histname = TString::Format(
"%s/hDeltaEHadCorr", jets->GetArrayName().Data());
443 title = histname +
";Centrality (%); #it{p}_{T}^{corr} (GeV/#it{c}); #sum #it{E_{nonlincorr}} - #it{E}_{hadcorr}";
444 fHistManager.
CreateTH3(histname.Data(), title.Data(), 20, 0, 100, 250, 0, 250, 250, 0, 50);
447 histname = TString::Format(
"%s/hNEFVsPtEMC", jets->GetArrayName().Data());
448 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});NEF";
451 histname = TString::Format(
"%s/hNEFVsPtDCal", jets->GetArrayName().Data());
452 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c});NEF";
455 histname = TString::Format(
"%s/hDeltaEHadCorr", jets->GetArrayName().Data());
456 title = histname +
";#it{p}_{T}^{corr} (GeV/#it{c}); #sum#it{E_{nonlincorr}} - #it{E}_{hadcorr}";
475 axistitle[dim] =
"Centrality %";
484 axistitle[dim] =
"No. of tracks";
488 max[dim] = 10000-0.5;
499 axistitle[dim] =
"#it{p}_{T,track}^{leading} (GeV/c)";
508 axistitle[dim] =
"No. of clusters";
524 axistitle[dim] =
"#it{E}_{cluster}^{leading} (GeV)";
533 for (
Int_t i = 0; i < dim; i++) {
534 hn->GetAxis(i)->SetTitle(axistitle[i]);
535 hn->SetBinEdges(i, binEdges[i]);
540 TString title = histname +
";#it{p}_{T,hard} (GeV/c);counts";
544 hTrials->GetXaxis()->SetBinLabel(1,
"#sum{ntrials}");
547 hxsection->GetXaxis()->SetBinLabel(1,
"<#sigma>");
565 title[dim] =
"Centrality %";
573 title[dim] =
"#it{p}_{T} (GeV/#it{c})";
594 title[dim] =
"track type";
601 title[dim] =
"#sigma(#it{p}_{T}) / #it{p}_{T}";
609 for (
Int_t i = 0; i < dim; i++) {
610 hn->GetAxis(i)->SetTitle(title[i]);
611 hn->SetBinEdges(i, binEdges[i]);
627 title[dim] =
"Centrality %";
635 title[dim] =
"#it{p}_{T} (GeV/#it{c})";
656 title[dim] =
"Findable";
664 for (
Int_t i = 0; i < dim; i++) {
665 hn->GetAxis(i)->SetTitle(title[i]);
666 hn->SetBinEdges(i, binEdges[i]);
681 title[dim] =
"Centrality %";
689 title[dim] =
"#it{p}_{T}^{gen} (GeV/#it{c})";
696 title[dim] =
"#eta^{gen}";
703 title[dim] =
"#phi^{gen}";
710 title[dim] =
"#it{p}_{T}^{det} (GeV/#it{c})";
717 title[dim] =
"#eta^{det}";
724 title[dim] =
"#phi^{det}";
731 title[dim] =
"(#it{p}_{T}^{gen} - #it{p}_{T}^{det}) / #it{p}_{T}^{gen}";
738 title[dim] =
"track type";
746 for (
Int_t i = 0; i < dim; i++) {
747 hn->GetAxis(i)->SetTitle(title[i]);
748 hn->SetBinEdges(i, binEdges[i]);
812 fPHOSGeo = AliPHOSGeometry::GetInstance();
814 AliInfo(
"Found instance of PHOS geometry!");
817 AliInfo(
"Creating PHOS geometry!");
818 Int_t runNum = InputEvent()->GetRunNumber();
820 fPHOSGeo = AliPHOSGeometry::GetInstance(
"IHEP");
822 fPHOSGeo = AliPHOSGeometry::GetInstance(
"Run2");
825 AliOADBContainer geomContainer(
"phosGeo");
826 geomContainer.InitFromFile(
"$ALICE_PHYSICS/OADB/PHOS/PHOSMCGeometry.root",
"PHOSMCRotationMatrixes");
827 TObjArray* matrixes = (
TObjArray*)geomContainer.GetObject(runNum,
"PHOSRotationMatrixes");
828 for(
Int_t mod=0; mod<6; mod++) {
829 if(!matrixes->At(mod))
continue;
830 fPHOSGeo->SetMisalMatrix(((TGeoHMatrix*)matrixes->At(mod)),mod);
831 printf(
".........Adding Matrix(%d), geo=%p\n",mod,
fPHOSGeo);
832 ((TGeoHMatrix*)matrixes->At(mod))->
Print();
862 AliGenPythiaEventHeader* pygen =
nullptr;
864 pygen =
dynamic_cast<AliGenPythiaEventHeader*
>(MCEvent()->GenEventHeader());
867 AliAODMCHeader* aodMCH =
dynamic_cast<AliAODMCHeader*
>(InputEvent()->FindListObject(AliAODMCHeader::StdBranchName()));
869 for (
UInt_t i = 0;i<aodMCH->GetNCocktailHeaders();i++) {
870 pygen =
dynamic_cast<AliGenPythiaEventHeader*
>(aodMCH->GetCocktailHeader(i));
884 Int_t nTriggerJets = pygen->NTriggerJets();
886 for (
Int_t ijet = 0; ijet< nTriggerJets; ijet++) {
887 pygen->TriggerJet(ijet, tmpjet);
888 jet.SetPxPyPzE(tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3]);
914 TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree();
916 AliError(Form(
"%s - UserNotify: No current tree!",GetName()));
924 TFile *curfile = tree->GetCurrentFile();
926 AliError(Form(
"%s - UserNotify: No current file!",GetName()));
931 if (chain) tree = chain->GetTree();
965 track = trackIterator.second;
972 AliESDtrack *esdTrack =
dynamic_cast<AliESDtrack*
>(track);
973 if (esdTrack) sigma = TMath::Sqrt(esdTrack->GetSigma1Pt2());
977 AliAODTrack *aodtrack =
dynamic_cast<AliAODTrack*
>(track);
978 if(!aodtrack) AliFatal(
"Not a standard AOD");
980 AliExternalTrackParam exParam;
984 aodtrack->GetCovMatrix(cov);
986 aodtrack->PxPyPz(pxpypz);
988 aodtrack->GetXYZ(xyz);
989 Short_t sign = aodtrack->Charge();
990 exParam.Set(xyz,pxpypz,cov,sign);
992 sigma = TMath::Sqrt(exParam.GetSigma1Pt2());
996 Int_t label = TMath::Abs(track->GetLabel());
1003 if (part->GetGeneratorIndex() == 0) {
1004 Int_t pdg = TMath::Abs(part->PdgCode());
1006 if (pdg == 211 || pdg == 2212 || pdg == 321 || pdg == 11 || pdg == 13) {
1014 AliError(Form(
"Track %d has type %d not recognized!",
fDetectorLevel->GetCurrentID(), type));
1019 AliAODMCParticle* part;
1021 part = partIterator.second;
1023 Byte_t findable = 0;
1025 Int_t pdg = TMath::Abs(part->PdgCode());
1027 if (pdg == 211 || pdg == 2212 || pdg == 321 || pdg == 11 || pdg == 13) findable = 1;
1046 for (
Int_t pos = 0; pos < ncells; pos++) {
1072 while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
1077 UInt_t rejectionReason = 0;
1078 if (!clusters->
AcceptCluster(it.current_index(), rejectionReason)) {
1079 histname = TString::Format(
"%s/fHistClusterRejectionReason", clusters->GetArrayName().Data());
1080 fHistManager.
FillTH2(histname, clusters->GetRejectionReasonBitPosition(rejectionReason), it->first.E());
1086 if (it->second->IsEMCAL()) {
1087 Double_t phi = it->first.Phi_0_2pi();
1091 }
else if (isDcal == 1) {
1098 Int_t sm =
fGeom->GetSuperModuleNumber(it->second->GetCellAbsId(0));
1099 if (sm >=0 && sm < 20) {
1100 histname = TString::Format(
"%s/BySM/hEmcalClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
1104 AliError(Form(
"Supermodule %d does not exist!", sm));
1107 }
else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
1109 Int_t nCells = it->second->GetNCells();
1110 Double_t M02 = it->second->GetM02();
1113 histname = TString::Format(
"%s/hPhosNCellsVsEnergy", clusters->GetArrayName().Data());
1116 histname = TString::Format(
"%s/hPhosM02VsEnergy", clusters->GetArrayName().Data());
1126 fPHOSGeo->AbsToRelNumbering(it->second->GetCellAbsId(0), relid);
1127 Int_t sm = relid[0];
1128 if (sm >=1 && sm < 5) {
1129 histname = TString::Format(
"%s/BySM/hPhosClusEnergy_SM%d", clusters->GetArrayName().Data(), sm);
1133 AliError(Form(
"Supermodule %d does not exist!", sm));
1138 histname = TString::Format(
"%s/hPhosCellIdVsEnergy", clusters->GetArrayName().Data());
1139 for (
Int_t i=0; i < nCells; i++) {
1146 histname = TString::Format(
"%s/clusterObservables", clusters->GetArrayName().Data());
1148 if (!histClusterObservables)
return;
1149 for (
Int_t i = 0; i < histClusterObservables->GetNdimensions(); i++) {
1150 TString title(histClusterObservables->GetAxis(i)->GetTitle());
1151 if (
title==
"Centrality %")
1152 contents[i] =
fCent;
1153 else if (
title==
"#it{E}_{clus} (GeV)")
1154 contents[i] = it->first.E();
1155 else if (
title==
"#eta")
1156 contents[i] = it->first.Eta();
1157 else if (
title==
"#phi")
1158 contents[i] = it->first.Phi_0_2pi();
1159 else if (
title==
"cluster type")
1160 contents[i] = clusType;
1162 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1164 histClusterObservables->Fill(contents);
1176 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1180 histname = TString::Format(
"%s/fHistRhoVsCent", jets->GetArrayName().Data());
1184 for (
auto jet : jets->
all()) {
1186 UInt_t rejectionReason = 0;
1187 if (!jets->
AcceptJet(jet, rejectionReason)) {
1188 histname = TString::Format(
"%s/fHistJetRejectionReason", jets->GetArrayName().Data());
1189 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
1194 Float_t corrPt = jet->Pt() - rhoVal * jet->Area();
1196 TLorentzVector leadPart;
1200 histname = TString::Format(
"%s/fHistJetObservables", jets->GetArrayName().Data());
1202 if (!histJetObservables)
return;
1203 for (
Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
1204 TString title(histJetObservables->GetAxis(i)->GetTitle());
1205 if (
title==
"Centrality (%)")
1206 contents[i] =
fCent;
1207 else if (
title==
"#eta_{jet}")
1208 contents[i] = jet->Eta();
1209 else if (
title==
"#phi_{jet} (rad)")
1210 contents[i] = jet->Phi_0_2pi();
1211 else if (
title==
"#it{p}_{T} (GeV/#it{c})")
1212 contents[i] = jet->Pt();
1213 else if (
title==
"#it{p}_{T}^{MC} (GeV/#it{c})")
1214 contents[i] = jet->MCPt();
1215 else if (
title==
"#it{p}_{T}^{corr} (GeV/#it{c})")
1216 contents[i] = corrPt;
1217 else if (
title==
"#it{p}_{T,particle}^{leading} (GeV/#it{c})")
1218 contents[i] = ptLeading;
1220 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1222 histJetObservables->Fill(contents);
1224 UInt_t jetType = jet->GetJetAcceptanceType();
1227 histname = TString::Format(
"%s/hNEFVsPtEMC", jets->GetArrayName().Data());
1233 histname = TString::Format(
"%s/hNEFVsPtDCal", jets->GetArrayName().Data());
1242 const AliVCluster* clus =
nullptr;
1243 Int_t nClusters = jet->GetNumberOfClusters();
1244 for (
Int_t iClus = 0; iClus < nClusters; iClus++) {
1245 clus = jet->Cluster(iClus);
1246 deltaEhadcorr += (clus->GetNonLinCorrEnergy() - clus->GetHadCorrEnergy());
1249 histname = TString::Format(
"%s/hDeltaEHadCorr", jets->GetArrayName().Data());
1264 for (
Int_t i = 0; i < 3; i++) {
1276 for (
Int_t i = 0; i < 3; i++) {
1282 for (
Int_t i = 0; i < histEventQA->GetNdimensions(); i++) {
1284 if (
title==
"Centrality %")
1285 contents[i] = eventQA.
fCent;
1286 else if (
title==
"No. of tracks")
1288 else if (
title==
"No. of clusters")
1289 contents[i] = globalNclusters;
1290 else if (
title==
"#it{p}_{T,track}^{leading} (GeV/c)")
1292 else if (
title==
"#it{E}_{cluster}^{leading} (GeV)")
1293 contents[i] = globalMaxCluster.E();
1295 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1298 histEventQA->Fill(contents);
1308 Double_t sigma1OverPt, Byte_t trackType)
1313 if (!thnTracks)
return;
1314 for (
Int_t i = 0; i < thnTracks->GetNdimensions(); i++) {
1316 if (
title==
"Centrality %")
1318 else if (
title==
"#it{p}_{T} (GeV/#it{c})")
1319 contents[i] = trackPt;
1320 else if (
title==
"#eta")
1321 contents[i] = trackEta;
1322 else if (
title==
"#phi")
1323 contents[i] = trackPhi;
1324 else if (
title==
"#sigma(1/#it{p}_{T}) (GeV/#it{c})^{-1}")
1325 contents[i] = sigma1OverPt;
1326 else if (
title==
"#sigma(#it{p}_{T}) / #it{p}_{T}")
1327 contents[i] = sigma1OverPt*trackPt;
1328 else if (
title==
"track type")
1329 contents[i] = trackType;
1331 AliWarning(Form(
"Unable to fill dimension %s of histogram %s!",
title.Data(), thnTracks->GetName()));
1334 thnTracks->Fill(contents);
1343 if (!thnTracks_PhysPrim)
return;
1344 for (
Int_t i = 0; i < thnTracks_PhysPrim->GetNdimensions(); i++) {
1345 TString title(thnTracks_PhysPrim->GetAxis(i)->GetTitle());
1346 if (
title==
"Centrality %")
1348 else if (
title==
"#it{p}_{T} (GeV/#it{c})")
1349 contents[i] = partPt;
1350 else if (
title==
"#eta")
1351 contents[i] = partEta;
1352 else if (
title==
"#phi")
1353 contents[i] = partPhi;
1354 else if (
title==
"Findable")
1355 contents[i] = findable;
1357 AliWarning(Form(
"Unable to fill dimension %s of histogram %s!",
title.Data(), thnTracks_PhysPrim->GetName()));
1360 thnTracks_PhysPrim->Fill(contents);
1370 if (!thnTracks_Matched)
return;
1371 for (
Int_t i = 0; i < thnTracks_Matched->GetNdimensions(); i++) {
1372 TString title(thnTracks_Matched->GetAxis(i)->GetTitle());
1373 if (
title==
"Centrality %")
1375 else if (
title==
"#it{p}_{T}^{gen} (GeV/#it{c})")
1376 contents[i] = partPt;
1377 else if (
title==
"#eta^{gen}")
1378 contents[i] = partEta;
1379 else if (
title==
"#phi^{gen}")
1380 contents[i] = partPhi;
1381 else if (
title==
"#it{p}_{T}^{det} (GeV/#it{c})")
1382 contents[i] = trackPt;
1383 else if (
title==
"#eta^{det}")
1384 contents[i] = trackEta;
1385 else if (
title==
"#phi^{det}")
1386 contents[i] = trackPhi;
1387 else if (
title==
"(#it{p}_{T}^{gen} - #it{p}_{T}^{det}) / #it{p}_{T}^{gen}")
1388 contents[i] = (partPt - trackPt) / partPt;
1389 else if (
title==
"(#it{p}_{T}^{gen} - #it{p}_{T}^{det}) / #it{p}_{T}^{det}")
1390 contents[i] = (partPt - trackPt) / trackPt;
1391 else if (
title==
"track type")
1394 AliWarning(Form(
"Unable to fill dimension %s of histogram %s!",
title.Data(), thnTracks_Matched->GetName()));
1397 thnTracks_Matched->Fill(contents);
1406 const char* ntracks,
1407 const char* nclusters,
1409 const char *nGenLev,
1421 ::Error(
"AddTaskPWGJEQA",
"No analysis manager to connect to.");
1426 AliVEventHandler* handler = mgr->GetInputEventHandler();
1428 ::Error(
"AddTaskPWGJEQA",
"This task requires an input event handler");
1440 if (handler->InheritsFrom(
"AliESDInputHandler")) {
1443 else if (handler->InheritsFrom(
"AliAODInputHandler")) {
1452 if (trackName ==
"usedefault") {
1453 if (dataType ==
kESD) {
1454 trackName =
"Tracks";
1456 else if (dataType == kAOD) {
1457 trackName =
"tracks";
1464 if (clusName ==
"usedefault") {
1465 if (dataType ==
kESD) {
1466 clusName =
"CaloClusters";
1468 else if (dataType == kAOD) {
1469 clusName =
"caloClusters";
1476 if (cellName ==
"usedefault") {
1477 if (dataType ==
kESD) {
1478 cellName =
"EMCALCells";
1480 else if (dataType == kAOD) {
1481 cellName =
"emcalCells";
1488 TString name(
"AliAnalysisTaskPWGJEQA");
1489 if (!trackName.IsNull()) {
1493 if (!clusName.IsNull()) {
1498 if (!cellName.IsNull()) {
1503 if (strcmp(suffix,
"")) {
1508 if (nGenLev && strcmp(nGenLev,
"")!=0) cout<<
"MC Part: "<< nGenLev<<endl;
1509 else cout<<
"No MC Part: "<< nGenLev<<endl;
1523 if (trackName ==
"tracks" || trackName ==
"Tracks") {
1527 else if (!trackName.IsNull()) {
1536 if (nGenLev && strcmp(nGenLev,
"")!=0) {
1552 mgr->AddTask(qaTask);
1555 AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer() ;
1557 TString contName = TString::Format(
"%s_histos", name.Data());
1559 commonoutput = mgr->GetCommonFileName();
1560 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contName.Data(),
1561 TList::Class(),AliAnalysisManager::kOutputContainer,
1563 mgr->ConnectInput (qaTask, 0, cinput1 );
1564 mgr->ConnectOutput (qaTask, 1, coutput1 );
void FillCellHistograms()
void AllocateMatchedParticlesTHnSparse()
Double_t * fEtaHistBins
! eta bins
Double_t * fPtResHistBins
! pt res bins
void Print(std::ostream &o, const char *name, Double_t dT, Double_t dVM, Double_t alldT, Double_t alldVM)
TObjArray fClusterCollArray
cluster collection array
void SetParticlePtCut(Double_t cut)
Bool_t fDoEventQA
Set whether to enable event QA.
Double_t GetRhoVal() const
const TString & GetRhoName() const
Int_t fNEtaHistBins
! number of eta bins
static AliAnalysisTaskPWGJEQA * AddTaskPWGJEQA(const char *ntracks="usedefault", const char *nclusters="usedefault", const char *ncells="usedefault", const char *nGenLev="mcparticles", Bool_t doTrackQA=kTRUE, Bool_t doCaloQA=kTRUE, Bool_t doJetQA=kTRUE, Bool_t doEventQA=kTRUE, Double_t trackPtCut=0.15, Double_t clusECut=0.30, const char *suffix="")
Int_t fNPtResHistBins
! number of pt res bins
AliTrackContainer * fDetectorLevel
! detector level container
Int_t fNPhiHistBins
! number of phi bins
void AllocateEventQAHistograms()
UInt_t fOffTrigger
offline trigger for event selection
Bool_t RetrieveEventObjects()
Retrieve common objects from event.
const AliMCParticleIterableMomentumContainer accepted_momentum() const
bidirectional stl iterator over the EMCAL iterable container
void SetDoTrackQA(Bool_t b)
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.
void AllocateJetHistograms()
TList * fEventCutList
! Output list for event cut histograms
AliAnalysisTaskPWGJEQA()
Default constructor for ROOT I/O purposes.
void SetDoEventQA(Bool_t b)
Bool_t fGeneralHistograms
whether or not it should fill some general histograms
void FillTH3(const char *hname, double x, double y, double z, double weight=1., Option_t *opt="")
Fill a 3D histogram within the container.
THistManager fHistManager
Histogram manager.
Bool_t fRejectOutlierEvents
flag to reject pythia pt-hard jet outlier events
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
void SetDoCaloQA(Bool_t b)
Int_t fNTotClusters[3]
!Total number of accepted clusters in current event (DCal/EMCal)
Bool_t RetrieveEventObjects()
AliTLorentzVector fMaxCluster[3]
TString fDetectorLevelName
detector level container name
void SetVzRange(Double_t min, Double_t max)
AliTLorentzVector fMaxTrack
Bool_t FillHistograms()
Function filling histograms.
Bool_t fDoTrackQA
Set whether to enable track QA.
AliClusterContainer * AddClusterContainer(const char *n)
Create new cluster container and attach it to the task.
Container for particles within the EMCAL framework.
void FillTrackHistograms()
TObjArray fParticleCollArray
particle/track collection array
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
void FillClusterHistograms()
Double_t * fPtHistBins
! pt bins
AliEventCuts fEventCuts
event selection utility
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
void AllocateDetectorLevelTHnSparse()
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.
TObject * FindObject(const char *name) const
Find an object inside the container.
void FillEventQAHistograms()
void CreateTProfile(const char *name, const char *title, int nbinsX, double xmin, double xmax, Option_t *opt="")
Create a new TProfile within the container.
THashList * GetListOfHistograms() const
Get the list of histograms.
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
AliEMCALGeometry * fGeom
!emcal geometry
AliPHOSGeometry * fPHOSGeo
! phos geometry
void FillDetectorLevelTHnSparse(Double_t cent, Double_t trackEta, Double_t trackPhi, Double_t trackPt, Double_t sigma1OverPt, Byte_t trackType)
virtual AliAODMCParticle * GetAcceptMCParticleWithLabel(Int_t lab)
void SetFilterHybridTracks(Bool_t f)
Int_t fNTotTracks
!Total number of accepted tracks in current event
AliParticleContainer * AddParticleContainer(const char *n)
Create new particle container and attach it to the task.
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
Float_t fCellEnergyCut
Energy cell cut.
Bool_t fUseAliEventCuts
Flag to use AliEventCuts (otherwise AliAnalysisTaskEmcal will be used)
BeamType fForceBeamType
forced beam type
void SetDoJetQA(Bool_t b)
virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const
Double_t * fPtRelDiffHistBins
! pt relative difference bins
void AllocateClusterHistograms()
void FillProfile(const char *name, double x, double y, double weight=1.)
Declaration of class AliAnalysisTaskPWGJEQA.
Double_t fCent
!event centrality
Int_t fNPtHistBins
! number of pt bins
TString fCaloCellsName
name of calo cell collection
void SetGeneratorLevelName(const char *name)
Int_t fNIntegerHistBins
! number of integer bins
AliMCParticleContainer * AddMCParticleContainer(const char *n)
Create new container for MC particles and attach it to the task.
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
Bool_t PythiaInfoFromFile(const char *currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard)
Loading PYTHIA information from external cross section file into the task.
TObjArray fJetCollArray
jet collection array
AliVCaloCells * fCaloCells
!cells
AliRhoParameter * GetRhoParameter()
Int_t fNCentHistBins
! number of cent bins
void ExecOnce()
Perform steps needed to initialize the analysis.
Double_t * fIntegerHistBins
! integer bins
const AliClusterIterableMomentumContainer all_momentum() const
void SetDetectorLevelName(const char *name)
virtual Bool_t IsEventSelected()
Performing event selection.
void FillMatchedParticlesTHnSparse(Double_t cent, Double_t partEta, Double_t partPhi, Double_t partPt, Double_t trackEta, Double_t trackPhi, Double_t trackPt, Byte_t trackType)
Float_t fPtHard
!event -hard
void FillGeneratorLevelTHnSparse(Double_t cent, Double_t partEta, Double_t partPhi, Double_t partPt, Byte_t findable)
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
void AllocateCellHistograms()
AliTLorentzVector fLeadingTrack
!Leading track in current event
void UserCreateOutputObjects()
AliEmcalList * fOutput
!output list
AliMCParticleContainer * GetMCParticleContainer(Int_t i=0) const
Char_t GetTrackType(const AliVTrack *track) const
Bool_t fIsEsd
!whether it's an ESD analysis
void GenerateHistoBins()
Generate histogram binning arrays.
AliTrackContainer * AddTrackContainer(const char *n)
Create new track container and attach it to the task.
AliTrackContainer * GetTrackContainer(Int_t i=0) const
void SelectPhysicalPrimaries(Bool_t s)
Bool_t fDoCaloQA
Set whether to enable cell/cluster QA.
TH1 * fHistEventRejection
!book keep reasons for rejecting event
void SetMakeGeneralHistograms(Bool_t g)
This is a task used to do basic PWGJE QA on tracks, clusters, and jets.
void SetNeedEmcalGeom(Bool_t n)
Base task in the EMCAL jet framework.
Bool_t fUseManualEventCuts
Flag to use manual event cuts.
Bool_t fIsPtHard
flag to enable pt-hard histos and make available outlier cut
const AliTrackIterableMomentumContainer accepted_momentum() const
Bool_t fDoJetQA
Set whether to enable jet QA.
void SetClusPtCut(Double_t cut)
TString fGeneratorLevelName
generator level container name
void SetRejectionReasonLabels(TAxis *axis)
void UserCreateOutputObjects()
Main initialization function on the worker.
Float_t fMaxPt
Histogram pt limit.
AliMCParticleContainer * fGeneratorLevel
! generator level container
Double_t * fCentHistBins
! cent bins
EDataType_t
Switch for the data type.
void SetCaloCellsName(const char *n)
void SetClusECut(Double_t cut)
void SetDefaultClusterEnergy(Int_t d)
virtual ~AliAnalysisTaskPWGJEQA()
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.
void AllocateTrackHistograms()
Container structure for EMCAL clusters.
DCal fiducial acceptance (each eta, phi edge narrowed by jet R)
Container for MC-true particles within the EMCAL framework.
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
Int_t fNPtRelDiffHistBins
! number of pt relative difference bins
EMCal fiducial acceptance (each eta, phi edge narrowed by jet R)
void AllocateGeneratorLevelTHnSparse()
Container for jet within the EMCAL jet framework.
TH3 * CreateTH3(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, int nbinsz, double zmin, double zmax, Option_t *opt="")
Create a new TH2 within the container.
Double_t * fPhiHistBins
! phi bins
AliTLorentzVector fLeadingCluster[3]
!Leading cluster in current event (EMCal/DCal)
void SetClusHadCorrEnergyCut(Double_t cut)
const AliJetIterableContainer all() const
static Double_t fgkEMCalDCalPhiDivide
phi value used to distinguish between DCal and EMCal