16 #include <TClonesArray.h>
20 #include <THnSparse.h>
22 #include <AliVCluster.h>
23 #include <AliVParticle.h>
47 fUseManualEventCuts(kFALSE),
49 fNDijetPtThresholds(1),
52 fDijetLeadingHadronPt(0),
56 fPlotJetHistograms(kFALSE),
57 fPlotDijetJetHistograms(kFALSE),
58 fPlotDijetImbalanceHistograms(kFALSE),
59 fDoMomentumBalance(kFALSE),
60 fDoGeometricalMatching(kFALSE),
62 fTrackConstituentThreshold(0),
63 fClusterConstituentThreshold(0)
80 fUseManualEventCuts(kFALSE),
82 fNDijetPtThresholds(1),
85 fDijetLeadingHadronPt(0),
89 fPlotJetHistograms(kFALSE),
90 fPlotDijetJetHistograms(kFALSE),
91 fPlotDijetImbalanceHistograms(kFALSE),
92 fDoMomentumBalance(kFALSE),
93 fDoGeometricalMatching(kFALSE),
95 fTrackConstituentThreshold(0),
96 fClusterConstituentThreshold(0)
140 while ((obj = next())) {
171 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
182 axisTitle[dim] =
"Centrality (%)";
190 axisTitle[dim] =
"#eta_{jet}";
197 axisTitle[dim] =
"#phi_{jet} (rad)";
200 max[dim] = TMath::Pi() * 2.02;
204 axisTitle[dim] =
"#it{p}_{T} (GeV/#it{c})";
205 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
212 axisTitle[dim] =
"#it{p}_{T}^{corr} (GeV/#it{c})";
213 nbins[dim] = TMath::CeilNint(
fMaxPt/2);
214 min[dim] = -
fMaxPt/2 + 25;
220 axisTitle[dim] =
"#it{p}_{T,particle}^{leading} (GeV/#it{c})";
227 max[dim] = pTLeadingBins[nbins[dim]];
228 binEdges[dim] = pTLeadingBins;
231 axisTitle[dim] =
"#it{A}_{jet}";
239 axisTitle[dim] =
"NEF";
247 axisTitle[dim] =
"#it{z}_{leading}";
255 axisTitle[dim] =
"No. of constituents";
263 axisTitle[dim] =
"No. of constituents";
271 TString thnname = TString::Format(
"%s/JetObservables", jets->GetArrayName().Data());
273 for (
Int_t i = 0; i < dim; i++) {
274 hn->GetAxis(i)->SetTitle(axisTitle[i]);
275 hn->SetBinEdges(i, binEdges[i]);
281 histname = TString::Format(
"%s/fHistJetRejectionReason", jets->GetArrayName().Data());
282 title = histname +
";Rejection reason;#it{p}_{T,jet} (GeV/#it{c});counts";
287 histname = TString::Format(
"%s/fHistRhoVsCent", jets->GetArrayName().Data());
288 title = histname +
";Centrality (%);#rho (GeV/#it{c});counts";
303 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
312 axisTitle[dim] =
"Centrality (%)";
320 axisTitle[dim] =
"LeadingHadronRequired";
327 axisTitle[dim] =
"#it{p}_{T,min}^{trig}";
334 axisTitle[dim] =
"#it{p}_{T,min}^{ass}";
341 axisTitle[dim] =
"isAccepted";
348 axisTitle[dim] =
"LeadingSubleading";
355 axisTitle[dim] =
"#it{p}_{T,jet} (GeV/#it{c})";
357 min[dim] = -
fMaxPt/2 + 25;
362 axisTitle[dim] =
"#phi_{jet}";
365 max[dim] = TMath::TwoPi();
369 axisTitle[dim] =
"#eta_{jet}";
376 axisTitle[dim] =
"N_{tracks}";
383 axisTitle[dim] =
"A_{jet}";
390 TString thnname = TString::Format(
"%s/DijetObservables", jets->GetArrayName().Data());
392 for (
Int_t i = 0; i < dim; i++) {
393 hn->GetAxis(i)->SetTitle(axisTitle[i]);
394 hn->SetBinEdges(i, binEdges[i]);
407 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
416 axisTitle[dim] =
"Centrality (%)";
424 axisTitle[dim] =
"LeadingHadronRequired";
431 axisTitle[dim] =
"#it{p}_{T,min}^{trig}";
438 axisTitle[dim] =
"#it{p}_{T,min}^{ass}";
445 axisTitle[dim] =
"#Delta#phi";
452 axisTitle[dim] =
"#Delta#eta";
459 axisTitle[dim] =
"A_{J}";
466 axisTitle[dim] =
"x_{J}";
473 axisTitle[dim] =
"k_{Ty} (GeV)";
480 TString thnname = TString::Format(
"%s/DijetImbalanceObservables", jets->GetArrayName().Data());
482 for (
Int_t i = 0; i < dim; i++) {
483 hn->GetAxis(i)->SetTitle(axisTitle[i]);
484 hn->SetBinEdges(i, binEdges[i]);
496 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
506 axisTitle[dim] =
"LeadingHadronRequired";
513 axisTitle[dim] =
"#it{p}_{T,min}^{trig}";
520 axisTitle[dim] =
"#it{p}_{T,min}^{ass}";
527 axisTitle[dim] =
"A_{J}";
534 axisTitle[dim] =
"#Delta#phi";
541 axisTitle[dim] =
"#it{p}_{T,particle} (GeV/#it{c})";
551 max[dim] = pTParticleBins[nbins[dim]];
552 binEdges[dim] = pTParticleBins;
555 axisTitle[dim] =
"#it{p}_{T}#parallel (GeV/#it{c})";
564 max[dim] = pTParallelBins[nbins[dim]];
565 binEdges[dim] = pTParallelBins;
568 TString thnname = TString::Format(
"%s/MomentumBalance", jets->GetArrayName().Data());
570 for (
Int_t i = 0; i < dim; i++) {
571 hn->GetAxis(i)->SetTitle(axisTitle[i]);
572 hn->SetBinEdges(i, binEdges[i]);
591 axisTitle[dim] =
"Centrality (%)";
599 axisTitle[dim] =
"#it{p}_{T,min}^{trig}";
606 axisTitle[dim] =
"#it{p}_{T,min}^{ass}";
613 axisTitle[dim] =
"isSwitched";
620 axisTitle[dim] =
"#DeltaR_{trig}";
627 axisTitle[dim] =
"#DeltaR_{ass}";
634 axisTitle[dim] =
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
641 axisTitle[dim] =
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}";
648 axisTitle[dim] =
"A_{J} low-threshold";
655 axisTitle[dim] =
"A_{J} hard-core";
662 TString thnname =
"GeometricalMatching";
664 for (
Int_t i = 0; i < dim; i++) {
665 hn->GetAxis(i)->SetTitle(axisTitle[i]);
666 hn->SetBinEdges(i, binEdges[i]);
672 histname =
"GeometricalMatchingEfficiency";
673 title = histname +
";isMatched;counts";
687 AliInfo(Form(
"Trigger jet threshold %d = %f, Associated jet threshold %d = %f", i,
fMinTrigJetPt[i], i,
fMinAssJetPt[i]));
720 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
721 TString jetContName = jetCont->GetName();
722 if (jetContName.Contains(
"HardCore"))
continue;
725 for (
Int_t leadingHadronCutType=0; leadingHadronCutType<2; leadingHadronCutType++) {
734 FindDijet(jetCont, leadingHadronCutType, trigJetMinPtType, assJetMinPtType);
738 TString histname = TString::Format(
"%s/DijetObservables", jetCont->GetArrayName().Data());
748 TString histname = TString::Format(
"%s/DijetImbalanceObservables", jetCont->GetArrayName().Data());
754 histname = TString::Format(
"%s/MomentumBalance", jetCont->GetArrayName().Data());
803 for(
auto assJetCand : jetCont->
accepted()) {
804 if (!assJetCand)
continue;
806 if ( TMath::Abs(trigJet->
Phi() - assJetCand->Phi()) <
fDeltaPhiMin )
continue;
809 if ( assJetCandPt < assJetPt )
continue;
841 track = trackIterator.second;
851 Double_t deltaPhiTrigJet = TMath::Abs(trackPhi - trigJetPhi);
852 Double_t deltaPhiAssJet = TMath::Abs(trackPhi - assJetPhi);
853 Bool_t isNearside = deltaPhiTrigJet < deltaPhiAssJet;
858 deltaPhi = trackPhi - trigJetPhi;
859 balancePt = trackPt * TMath::Cos(deltaPhi);
862 deltaPhi = trackPhi - assJetPhi;
863 balancePt = -trackPt * TMath::Cos(deltaPhi);
877 TString jetContAllName = Form(
"Jet_AKTFullR0%d0_tracks_pT0150_caloClusters_E0300_pt_scheme", (
int) (
fMatchingJetR*10) );
883 TString jetContHardCoreName = Form(
"JetHardCore_AKTFullR0%d0_tracks_pT%d_caloClusters_E%d_pt_scheme", (
int) (
fMatchingJetR*10), trackThreshold, clusThreshold);
905 for(
auto matchingTrigJetCand : jetCont->
accepted()) {
906 if (!matchingTrigJetCand)
continue;
908 if (matchingTrigJet) {
909 if (
GetJetPt(jetCont, matchingTrigJetCand) <
GetJetPt(jetCont, matchingTrigJet) )
continue;
911 matchingTrigJet = matchingTrigJetCand;
913 if (!matchingTrigJet)
return;
917 for(
auto matchingAssJetCand : jetCont->
accepted()) {
918 if (!matchingAssJetCand)
continue;
920 if (matchingAssJet) {
921 if (
GetJetPt(jetCont, matchingAssJetCand) <
GetJetPt(jetCont, matchingAssJet) )
continue;
923 matchingAssJet = matchingAssJetCand;
927 if (matchingAssJet) {
930 if (
GetJetPt(jetCont, matchingTrigJet) <
GetJetPt(jetCont, matchingAssJet) ) {
961 TString jetContName = jetCont->GetName();
962 if (jetContName.Contains(
"HardCore")) pT = jet->
Pt();
973 Double_t deltaR = TMath::Sqrt( deltaPhi*deltaPhi + deltaEta*deltaEta );
999 while ((jets = static_cast<AliJetContainer*>(nextJetColl()))) {
1000 TString jetContName = jets->GetName();
1001 if (jetContName.Contains(
"HardCore"))
continue;
1005 histname = TString::Format(
"%s/fHistRhoVsCent", jets->GetArrayName().Data());
1009 for (
auto jet : jets->
all()) {
1011 UInt_t rejectionReason = 0;
1012 if (!jets->
AcceptJet(jet, rejectionReason)) {
1013 histname = TString::Format(
"%s/fHistJetRejectionReason", jets->GetArrayName().Data());
1014 fHistManager.
FillTH2(histname.Data(), jets->GetRejectionReasonBitPosition(rejectionReason), jet->Pt());
1019 Float_t corrPt = jet->Pt() - rhoVal * jet->Area();
1021 TLorentzVector leadPart;
1024 if (z == 1 || (z > 1 && z - 1 < 1e-3)) z = 0.999;
1027 histname = TString::Format(
"%s/JetObservables", jets->GetArrayName().Data());
1029 if (!histJetObservables)
return;
1030 for (
Int_t i = 0; i < histJetObservables->GetNdimensions(); i++) {
1031 TString title(histJetObservables->GetAxis(i)->GetTitle());
1032 if (
title==
"Centrality (%)")
1033 contents[i] =
fCent;
1034 else if (
title==
"#eta_{jet}")
1035 contents[i] = jet->Eta();
1036 else if (
title==
"#phi_{jet} (rad)")
1037 contents[i] = jet->Phi_0_2pi();
1038 else if (
title==
"#it{p}_{T} (GeV/#it{c})")
1039 contents[i] = jet->Pt();
1040 else if (
title==
"#it{p}_{T}^{corr} (GeV/#it{c})")
1041 contents[i] = corrPt;
1042 else if (
title==
"#it{p}_{T,particle}^{leading} (GeV/#it{c})")
1043 contents[i] = ptLeading;
1044 else if (
title==
"#it{A}_{jet}")
1045 contents[i] = jet->Area();
1046 else if (
title==
"NEF")
1047 contents[i] = jet->NEF();
1048 else if (
title==
"#it{z}_{leading}")
1050 else if (
title==
"No. of constituents")
1051 contents[i] = jet->GetNumberOfConstituents();
1053 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1055 histJetObservables->Fill(contents);
1068 if (!histJetObservables)
return;
1069 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1070 TString title(histJetObservables->GetAxis(n)->GetTitle());
1071 if (
title==
"Centrality (%)")
1072 contents[n] =
fCent;
1073 else if (
title==
"LeadingHadronRequired")
1075 else if (
title==
"#it{p}_{T,min}^{trig}")
1077 else if (
title==
"#it{p}_{T,min}^{ass}")
1079 else if (
title==
"isAccepted")
1080 contents[n] = isAccepted;
1081 else if (
title==
"LeadingSubleading")
1082 contents[n] = IsAssJet;
1083 else if (
title==
"#it{p}_{T,jet} (GeV/#it{c})")
1084 contents[n] = jetPt;
1085 else if (
title==
"#phi_{jet}")
1086 contents[n] = jetPhi;
1087 else if (
title==
"#eta_{jet}")
1088 contents[n] = jetEta;
1089 else if (
title==
"N_{tracks}")
1090 contents[n] = nTracksJet;
1091 else if (
title==
"A_{jet}")
1092 contents[n] = jetArea;
1094 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1096 histJetObservables->Fill(contents);
1106 if (!histJetObservables)
return;
1107 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1108 TString title(histJetObservables->GetAxis(n)->GetTitle());
1109 if (
title==
"Centrality (%)")
1110 contents[n] =
fCent;
1111 else if (
title==
"LeadingHadronRequired")
1113 else if (
title==
"#it{p}_{T,min}^{trig}")
1115 else if (
title==
"#it{p}_{T,min}^{ass}")
1117 else if (
title==
"#Delta#phi")
1119 else if (
title==
"#Delta#eta")
1121 else if (
title==
"A_{J}")
1123 else if (
title==
"x_{J}")
1125 else if (
title==
"k_{Ty} (GeV)")
1128 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1130 histJetObservables->Fill(contents);
1140 if (!histJetObservables)
return;
1141 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1142 TString title(histJetObservables->GetAxis(n)->GetTitle());
1143 if (
title==
"LeadingHadronRequired")
1145 else if (
title==
"#it{p}_{T,min}^{trig}")
1147 else if (
title==
"#it{p}_{T,min}^{ass}")
1149 else if (
title==
"A_{J}")
1151 else if (
title==
"#Delta#phi")
1152 contents[n] = deltaPhi;
1153 else if (
title==
"#it{p}_{T,particle} (GeV/#it{c})")
1154 contents[n] = trackPt;
1155 else if (
title==
"#it{p}_{T}#parallel (GeV/#it{c})")
1156 contents[n] = balancePt;
1158 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1160 histJetObservables->Fill(contents);
1169 TString histname =
"GeometricalMatchingEfficiency";
1179 TString thnname =
"GeometricalMatching";
1182 if (!histJetObservables)
return;
1183 for (
Int_t n = 0; n < histJetObservables->GetNdimensions(); n++) {
1184 TString title(histJetObservables->GetAxis(n)->GetTitle());
1185 if (
title==
"Centrality (%)")
1186 contents[n] =
fCent;
1187 else if (
title==
"#it{p}_{T,min}^{trig}")
1189 else if (
title==
"#it{p}_{T,min}^{ass}")
1191 else if (
title==
"isSwitched")
1192 contents[n] = isSwitched;
1193 else if (
title==
"#DeltaR_{trig}")
1194 contents[n] = trigDeltaR;
1195 else if (
title==
"#DeltaR_{ass}")
1196 contents[n] = assDeltaR;
1197 else if (
title==
"trig #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
1199 else if (
title==
"ass #it{p}_{T,low-thresh} - #it{p}_{T,hard-core}")
1201 else if (
title==
"A_{J} low-threshold")
1203 else if (
title==
"A_{J} hard-core")
1206 AliWarning(Form(
"Unable to fill dimension %s!",
title.Data()));
1208 histJetObservables->Fill(contents);
Double_t fMatchingJetR
jet R for matching study
void AllocateDijetImbalanceHistograms()
TObjArray fClusterCollArray
cluster collection array
Double_t GetRhoVal() const
const TString & GetRhoName() const
void FindMatchingDijet(AliJetContainer *jetCont, Int_t assJetMinPtBin)
void UserCreateOutputObjects()
void AllocateJetHistograms()
Float_t fMaxPt
Histogram pt limit.
AliJetContainer * GetJetContainer(Int_t i=0) const
Bool_t fUseManualEventCuts
Flag to use manual event cuts.
UInt_t fOffTrigger
offline trigger for event selection
void AllocateGeometricalMatchingHistograms()
void DoMomentumBalance(TString histname)
Container with name, TClonesArray and cuts for particles.
Bool_t fPlotJetHistograms
Set whether to enable inclusive jet histograms.
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
Declaration of class AliTLorentzVector.
TList * fEventCutList
! Output list for event cut histograms
Double_t fDijetLeadingHadronPt
leading hadron pT threshold for leading jet in dijet
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
AliAnalysisTaskEmcalDijetImbalance()
void FillGeometricalMatchingHistograms()
UShort_t GetNumberOfTracks() const
Bool_t fDoMomentumBalance
Set whether to enable momentum balance study.
TObjArray fParticleCollArray
particle/track collection array
Bool_t fPlotDijetImbalanceHistograms
Set whether to enable dijet imbalance histograms.
AliEventCuts fEventCuts
event selection utility
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Int_t fNDijetPtThresholds
number of pT thresholds on leading/subleading jets
AliEmcalJet * GetLeadingJet(const char *opt="")
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
Dijet_t fDijet
! dijet candidate (per event)
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.
THashList * GetListOfHistograms() const
Get the list of histograms.
Double_t GetDeltaR(AliEmcalJet *jet1, AliEmcalJet *jet2)
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
Double_t fClusterConstituentThreshold
constituent threshold for matching study
Di-jet imbalance analysis with full jets.
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
BeamType fForceBeamType
forced beam type
Int_t leadingHadronCutType
Double_t fDeltaPhiMin
minimum delta phi between di-jets
Double_t fCent
!event centrality
Double_t GetJetPt(AliJetContainer *jetCont, AliEmcalJet *jet)
static Double_t GetParallelFraction(AliVParticle *part1, AliVParticle *part2)
void FillMomentumBalanceHistograms(TString histname, Double_t deltaPhi, Double_t trackPt, Double_t balancePt)
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
TObjArray fJetCollArray
jet collection array
THistManager fHistManager
Histogram manager.
void FillDijetImbalanceHistograms(TString histname)
AliRhoParameter * GetRhoParameter()
Bool_t fPlotDijetJetHistograms
Set whether to enable dijet pair histograms.
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
AliEmcalList * fOutput
!output list
void AllocateDijetJetHistograms()
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
Base task in the EMCAL jet framework.
Bool_t fDoGeometricalMatching
Set whether to enable constituent study with geometrical matching.
Represent a jet reconstructed using the EMCal jet framework.
void FillDijetJetHistograms(TString histname, Int_t isAccepted, Int_t IsAssJet, Double_t jetPt, Double_t jetPhi, Double_t jetEta, Int_t nTracksJet, Double_t jetArea)
const AliTrackIterableMomentumContainer accepted_momentum() const
Dijet_t fMatchingDijet
! low-threshold matching dijet, for matching study
void SetRejectionReasonLabels(TAxis *axis)
void UserCreateOutputObjects()
const AliJetIterableContainer accepted() const
Double_t fTrackConstituentThreshold
constituent threshold for matching study
Double_t * fCentHistBins
! cent bins
Int_t fNCentHistBins
! number of cent bins
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.
virtual ~AliAnalysisTaskEmcalDijetImbalance()
Container for jet within the EMCAL jet framework.
void DoGeometricalMatching()
void AllocateMomentumBalanceHistograms()
void FindDijet(AliJetContainer *jetCont, Int_t leadingHadronCutBin, Int_t trigJetMinPtBin, Int_t assJetMinPtBin)
const AliJetIterableContainer all() const